鸿蒙智能电子锁前端项目
he wei
2025-01-15 20cfb19d192127e304a081ceb60ca9052f813bf7
src/main.ts
@@ -4,6 +4,10 @@
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
@@ -14,6 +18,12 @@
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);