1234567891011121314151617181920212223242526272829303132333435 |
- import { createApp } from 'vue'
- import { createPinia } from 'pinia'
- import App from './App.vue'
- import router from './router'
- import * as ElementPlusIconsVue from '@element-plus/icons-vue'
- import './assets/base.css'
- const app = createApp(App)
- for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
- app.component(key, component)
- }
- app.use(createPinia())
- app.use(router)
- /**
- * 全局异常捕获,此处只用于调试
- *
- * @param err 错误对象
- * @param instance 触发该错误的组件实例
- * @param info 错误来源类型信息
- */
- // app.config.errorHandler = (err, instance, info) => {
- // console.log('-----------------')
- // console.log('未被捕获的异常')
- // console.log(err)
- // console.log(instance)
- // console.log(info)
- // console.log('-----------------')
- // }
- app.mount('#app')
|