no message
Former-commit-id: 9050b9d382144bfe3ab53b012be11461e0332aba Former-commit-id: 945e9c09f433ee70768ae89a742df931dca1748f Former-commit-id: 2dc0ede52e025f6ad6be58135a579ccda3ab93ad
This commit is contained in:
@@ -29,11 +29,12 @@ import '@/mock/index.js'
|
|||||||
// vuex
|
// vuex
|
||||||
import store from '@/store/index.js'
|
import store from '@/store/index.js'
|
||||||
|
|
||||||
import d2Admin from '@/plugin/d2Admin'
|
// log简化
|
||||||
|
import pluginLog from '@/plugin/log'
|
||||||
|
|
||||||
Vue.use(ElementUI)
|
Vue.use(ElementUI)
|
||||||
|
|
||||||
Vue.use(d2Admin)
|
Vue.use(pluginLog)
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then (res => {
|
.then (res => {
|
||||||
console.group('登录')
|
this.$log('登录结果', res)
|
||||||
console.log(res)
|
|
||||||
console.groupEnd()
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
export default {
|
|
||||||
install (Vue, options) {
|
|
||||||
Vue.mixin({
|
|
||||||
created () {
|
|
||||||
console.log('hahaha')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
18
src/plugin/log/index.js
Normal file
18
src/plugin/log/index.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
export default {
|
||||||
|
install (Vue, options) {
|
||||||
|
// 打印log
|
||||||
|
// 如果只有一个参数 就只简单打印第一个参数
|
||||||
|
// 如果有大于一个参数 第一个参数会当做是分组的名称
|
||||||
|
Vue.prototype.$log = (arg1 = 'log', ...logs) => {
|
||||||
|
if (logs.length === 0) {
|
||||||
|
console.log(arg1)
|
||||||
|
} else {
|
||||||
|
console.group(arg1)
|
||||||
|
logs.forEach(e => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
console.groupEnd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user