鸿蒙智能电子锁前端项目
he wei
2025-03-19 9b3d984360975e5dbae89ec6233e7a893e9217b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { createApp } from 'vue';
 
import App from './App.vue';
import 'element-plus/dist/index.css';
import router from './router';
import { setupStore } from './store';
import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
 
import zhCn from "element-plus/es/locale/lang/zh-cn";
 
import '@/styles/index.scss';
import SvgIcon from './icons'; // icon
import './permission'; // permission control
import vPermission from './directive/permission/index'; // permission control
import { checkEnableLogs } from './utils/error-log'; // error log
 
const app = createApp(App);
setupStore(app);
app.use(router);
app.use(ElementPlus, { locale: zhCn });
 
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
 
app.component('svg-icon', SvgIcon);
app.directive('permission', vPermission);
checkEnableLogs(app);
 
app.mount('#app');