持续集成分支
This commit is contained in:
33
src/main.js
Normal file
33
src/main.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import Vue from 'vue';
|
||||
import App from './App.vue';
|
||||
import ui from 'element-ui';
|
||||
import router from './utils/router';
|
||||
import utils from './utils';
|
||||
import vcUI from 'dui';
|
||||
import appComp from '@dui/dv';
|
||||
import store from './utils/store';
|
||||
import autoRoutes from "./utils/autoRoutes";
|
||||
import extra from "./config.json"
|
||||
import axios from "./utils/axios";
|
||||
//import ob from "dui/lib/js/observer"
|
||||
//备注底座信息,勿删
|
||||
console.log("欢迎使用%s", extra.sysInfo?.name || "构建版本")
|
||||
//new ob()
|
||||
window.Vue = Vue
|
||||
Vue.use(ui);
|
||||
Vue.use(vcUI);
|
||||
Vue.use(appComp);
|
||||
Vue.config.productionTip = false;
|
||||
Vue.prototype.$cdn = "https://cdn.cunwuyun.cn"
|
||||
Vue.prototype.$request = axios
|
||||
Object.keys(utils).map((e) => (Vue.prototype[e] = utils[e]));
|
||||
const loadPage = () => autoRoutes.init().finally(() => new Vue({router, store, render: h => h(App)}).$mount("#app"))
|
||||
let theme = null
|
||||
store.dispatch('getSystem', extra.sysInfo).then(res => {
|
||||
theme = JSON.parse(res?.colorScheme || null)
|
||||
return import(`dui/lib/styles/theme.${theme?.web}.scss`).catch(() => 0)
|
||||
}).finally(() => {
|
||||
Vue.prototype.$theme = theme?.web || "blue"
|
||||
!!theme?.web && theme?.web != "blue" ? loadPage() : import(`dui/lib/styles/common.scss`).finally(loadPage)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user