减少不必要的代码
Former-commit-id: 8c704c1c9e29c1f8887eb3b899977b35b8a5e4bd
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
|
||||
axios.interceptors.response.use(res => {
|
||||
return res.data
|
||||
}, err => {
|
||||
return Promise.reject(err)
|
||||
})
|
||||
|
||||
Vue.prototype.$axios = axios
|
||||
@@ -0,0 +1,8 @@
|
||||
export default {
|
||||
install (Vue, options) {
|
||||
// 打开一个url
|
||||
Vue.prototype.$open = (url = 'https://github.com/d2-projects') => {
|
||||
window.open(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user