Files
dvcp_v2_webapp/examples/main.js

35 lines
954 B
JavaScript
Raw Normal View History

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({
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"
return import(`dui/lib/styles/theme.${theme?.web}.scss`).catch(() => 0)
2022-08-19 11:03:44 +08:00
}).finally(() => {
Vue.prototype.$vm = app
import(`dui/lib/styles/common.scss`).finally(() => app.$mount('#app'))
2022-08-19 11:03:44 +08:00
})