BUG 30868

This commit is contained in:
aixianling
2022-08-19 11:03:44 +08:00
parent 3f51798bc1
commit 37df0942ff
2 changed files with 19 additions and 12 deletions

View File

@@ -19,8 +19,17 @@ Vue.use(dvui)
Vue.config.productionTip = false;
Object.keys(utils).map((e) => (Vue.prototype[e] = utils[e]));
Vue.prototype.$request = axios
new Vue({
const app = new Vue({
router,
store,
render: (h) => h(App)
}).$mount('#app');
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(`dvcp-ui/lib/styles/theme.${theme?.web}.scss`).catch(() => 0)
}).finally(() => {
!theme ? app.$mount('#app') : import(`dvcp-ui/lib/styles/common.scss`).finally(() => app.$mount('#app'))
})