1 Star 0 Fork 2.4K

janssonHua/plus-ui

forked from 疯狂的狮子Li/plus-ui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.ts 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
LiuHao 提交于 2023-04-18 23:36 +08:00 . add i18n
import { createApp } from 'vue';
// global css
import 'uno.css';
import '@/assets/styles/index.scss';
import 'element-plus/theme-chalk/dark/css-vars.css';
// App、router、store
import App from './App.vue';
import store from './store';
import router from './router';
// 自定义指令
import directive from './directive';
// 注册插件
import plugins from './plugins/index'; // plugins
import { download } from '@/utils/request';
// 预设动画
import animate from './animate';
// svg图标
import 'virtual:svg-icons-register';
import ElementIcons from '@/plugins/svgicon';
// permission control
import './permission';
import { useDict } from '@/utils/dict';
import { getConfigKey, updateConfigByKey } from '@/api/system/config';
import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi';
// 国际化
import i18n from '@/lang/index';
const app = createApp(App);
// 全局方法挂载
app.config.globalProperties.useDict = useDict;
app.config.globalProperties.getConfigKey = getConfigKey;
app.config.globalProperties.updateConfigByKey = updateConfigByKey;
app.config.globalProperties.download = download;
app.config.globalProperties.parseTime = parseTime;
app.config.globalProperties.handleTree = handleTree;
app.config.globalProperties.addDateRange = addDateRange;
app.config.globalProperties.selectDictLabel = selectDictLabel;
app.config.globalProperties.selectDictLabels = selectDictLabels;
app.config.globalProperties.animate = animate;
app.use(ElementIcons);
app.use(router);
app.use(store);
app.use(i18n);
app.use(plugins);
// 自定义指令
directive(app);
app.mount('#app');
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/janssonhua/plus-ui.git
git@gitee.com:janssonhua/plus-ui.git
janssonhua
plus-ui
plus-ui
ts

搜索帮助