1Panel/frontend/src/main.ts

44 lines
1.4 KiB
Go
Raw Normal View History

2022-08-16 23:30:23 +08:00
import { createApp } from 'vue';
import App from './App.vue';
import '@/styles/reset.scss';
import '@/styles/common.scss';
2022-08-17 17:46:49 +08:00
import '@/assets/iconfont/iconfont.css';
2022-08-18 17:30:38 +08:00
import '@/assets/iconfont/iconfont.js';
2022-08-16 23:30:23 +08:00
import ElementPlus from 'element-plus';
import Fit2CloudPlus from 'fit2cloud-ui-plus';
import * as Icons from '@element-plus/icons-vue';
import '@/styles/element-dark.scss';
import '@/styles/element.scss';
2022-08-19 16:02:58 +08:00
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/dark/css-vars.css';
import 'fit2cloud-ui-plus/src/styles/index.scss';
2022-08-16 23:30:23 +08:00
import directives from '@/directives/index';
import router from '@/routers/index';
import I18n from '@/lang/index';
import pinia from '@/store/index';
2022-08-18 17:30:38 +08:00
import SvgIcon from './components/svg-icon/svg-icon.vue';
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';
import hljs from 'highlight.js';
VMdPreview.use(githubTheme, {
hljs,
});
2022-08-16 23:30:23 +08:00
const app = createApp(App);
2022-08-18 17:30:38 +08:00
app.component('SvgIcon', SvgIcon);
2022-08-16 23:30:23 +08:00
app.use(ElementPlus);
app.use(Fit2CloudPlus);
Object.keys(Icons).forEach((key) => {
app.component(key, Icons[key as keyof typeof Icons]);
});
app.use(router);
app.use(I18n);
app.use(pinia);
app.use(directives);
app.use(VMdPreview);
2022-08-16 23:30:23 +08:00
app.mount('#app');