代码拉取完成,页面将自动刷新
import { createApp, Directive } from 'vue';
import App from './App.vue';
import router from '@/router';
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import Pagination from '@/components/Pagination/index.vue';
import '@/permission';
// 引入svg注册脚本
import 'virtual:svg-icons-register';
// 国际化
import i18n from '@/lang/index';
// 自定义样式
import '@/styles/index.scss';
// 根据字典编码获取字典列表全局方法
import { listDictsByCode } from '@/api/system/dict';
const app = createApp(App);
// 自定义指令
import * as directive from '@/directive';
Object.keys(directive).forEach(key => {
app.directive(key, (directive as { [key: string]: Directive })[key]);
});
// 全局方法
app.config.globalProperties.$listDictsByCode = listDictsByCode;
// 注册全局组件
app
.component('Pagination', Pagination)
.use(createPinia())
.use(router)
.use(ElementPlus)
.use(i18n)
.mount('#app');
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。