当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
9 Star 32 Fork 27

有来技术团队/vue3-element-admin
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.ts 1020 Bytes
一键复制 编辑 原始数据 按行查看 历史
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');
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/youlaitech/vue3-element-admin.git
git@gitee.com:youlaitech/vue3-element-admin.git
youlaitech
vue3-element-admin
vue3-element-admin
master

搜索帮助