1Panel/frontend/src/main.ts

36 lines
1020 B
Go
Raw Normal View History

2022-08-16 15:30:23 +00:00
import { createApp } from 'vue';
import App from './App.vue';
2023-01-12 03:45:01 +00:00
import '@/styles/index.scss';
2022-08-16 15:30:23 +00:00
import '@/styles/common.scss';
2022-08-17 09:46:49 +00:00
import '@/assets/iconfont/iconfont.css';
2022-08-18 09:30:38 +00:00
import '@/assets/iconfont/iconfont.js';
2023-06-27 08:38:11 +00:00
import '@/styles/style.css';
2023-01-12 03:45:01 +00:00
2022-08-16 15:30:23 +00:00
import directives from '@/directives/index';
import router from '@/routers/index';
import i18n from '@/lang/index';
2022-08-16 15:30:23 +00:00
import pinia from '@/store/index';
2022-08-18 09:30:38 +00:00
import SvgIcon from './components/svg-icon/svg-icon.vue';
import Components from '@/components';
2023-01-12 03:45:01 +00:00
import ElementPlus from 'element-plus';
import Fit2CloudPlus from 'fit2cloud-ui-plus';
import * as Icons from '@element-plus/icons-vue';
2022-08-16 15:30:23 +00:00
const app = createApp(App);
2022-08-18 09:30:38 +00:00
app.component('SvgIcon', SvgIcon);
2022-08-16 15:30:23 +00:00
app.use(ElementPlus);
2023-03-17 07:51:02 +00:00
app.use(Fit2CloudPlus, { locale: i18n.global.messages.value[localStorage.getItem('lang') || 'zh'] });
2023-03-17 07:51:02 +00:00
2022-08-16 15:30:23 +00:00
Object.keys(Icons).forEach((key) => {
app.component(key, Icons[key as keyof typeof Icons]);
});
app.use(router);
app.use(i18n);
2022-08-16 15:30:23 +00:00
app.use(pinia);
app.use(directives);
app.use(Components);
2022-08-16 15:30:23 +00:00
app.mount('#app');