2021-12-14 18:36:19 +08:00
|
|
|
import Vue from 'vue';
|
|
|
|
|
import App from './App.vue';
|
|
|
|
|
import ui from 'element-ui';
|
|
|
|
|
import router from './router/router';
|
|
|
|
|
import axios from './router/axios';
|
|
|
|
|
import utils from './utils';
|
2022-12-01 09:35:20 +08:00
|
|
|
import dui from 'dui';
|
2021-12-14 18:36:19 +08:00
|
|
|
import store from './store';
|
|
|
|
|
import dataV from '@jiaminghi/data-view';
|
2022-08-19 13:39:28 +08:00
|
|
|
import appComps from '../components'
|
2021-12-14 18:36:19 +08:00
|
|
|
|
|
|
|
|
Vue.use(dataV);
|
|
|
|
|
Vue.use(ui);
|
2022-12-01 09:35:20 +08:00
|
|
|
Vue.use(dui);
|
2022-08-19 13:39:28 +08:00
|
|
|
Vue.use(appComps);
|
2021-12-14 18:36:19 +08:00
|
|
|
//富文本编辑器配置
|
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
Object.keys(utils).map((e) => (Vue.prototype[e] = utils[e]));
|
2022-07-27 10:31:56 +08:00
|
|
|
Vue.prototype.$request = axios
|
2022-08-19 11:03:44 +08:00
|
|
|
const app = new Vue({
|
2022-03-09 11:58:28 +08:00
|
|
|
router,
|
|
|
|
|
store,
|
2022-08-19 11:03:44 +08:00
|
|
|
render: h => h(App)
|
|
|
|
|
});
|
|
|
|
|
let theme = null
|
|
|
|
|
store.dispatch('getSystem').then(({colorScheme}) => {
|
|
|
|
|
theme = JSON.parse(colorScheme || null)
|
|
|
|
|
Vue.prototype.$theme = theme?.web || "blue"
|
2022-11-29 18:27:14 +08:00
|
|
|
return import(`dui/lib/styles/theme.${theme?.web}.scss`).catch(() => 0)
|
2022-08-19 11:03:44 +08:00
|
|
|
}).finally(() => {
|
2022-11-07 16:03:02 +08:00
|
|
|
Vue.prototype.$vm = app
|
2022-11-29 18:27:14 +08:00
|
|
|
!theme ? app.$mount('#app') : import(`dui/lib/styles/common.scss`).finally(() => app.$mount('#app'))
|
2022-08-19 11:03:44 +08:00
|
|
|
})
|
|
|
|
|
|