1
0
Fork 0
5g-track/src/main.js

37 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-05-26 08:53:53 +08:00
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'normalize.css/normalize.css' // 重置、初始化css样式的库
import '@/permission' // 挂载路由后添加路由拦截器(守卫
// import NutUI from "@nutui/nutui";
// import "@nutui/nutui/dist/style.css";
// Vue.use(NutUI)
import Loading from 'globalComponents/Loading'
import Toast from 'globalComponents/Toast'
Vue.use(Toast) //启用全局提示组件
Vue.use(Loading) //使用全局loading组件
/**
* 如果需要bus总线模式
* this.$bus.$data.xxx = xxx
* this.$bus.emit('change',data)
* this.$bus.$on('change',data => console.log(data))
* this.$bus.$off('change')
*/
// import bus from './bus'
// Vue.use(bus) //使用BUS总线模式实现组件间任意传值
Vue.config.productionTip = false //生产模式下关闭vue在控制台的提示
if (process.env.NODE_ENV == 'development'){
require('./mock/index.js');
}
const vm = new Vue({
router,
render: h => h(App),
}).$mount('#app')
export default vm