diff --git a/examples/main.js b/examples/main.js index 10638d5c..14bbe689 100644 --- a/examples/main.js +++ b/examples/main.js @@ -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')) +}) + diff --git a/packages/meta/AppResident/AppResidentTags.vue b/packages/meta/AppResident/AppResidentTags.vue index 34d6c73b..150858a6 100644 --- a/packages/meta/AppResident/AppResidentTags.vue +++ b/packages/meta/AppResident/AppResidentTags.vue @@ -49,7 +49,7 @@ export default { permissions: Function }, computed: { - ...mapState(['user']), + ...mapState(['user', 'sys']), rules() { return { labelName: [{required: true, message: "请输入标签"}], @@ -57,7 +57,12 @@ export default { }, dialogTitle() { return `${this.form.id ? "编辑" : "添加"}标签` - } + }, + colConfigs: v => [{type: "selection"}, + {label: "标签信息", prop: "labelName"}, + {label: "创建时间", prop: "createTime", align: '120px'}, + {label: "创建人", prop: "createUserName", align: 'center', openType: v.sys.info?.edition == "saas" ? "userName" : null}, + {slot: "options"}] }, data() { return { @@ -66,13 +71,6 @@ export default { tableData: [], search: {name: "", ids: ""}, form: {}, - colConfigs: [ - {type: "selection"}, - {label: "标签信息", prop: "labelName"}, - {label: "创建时间", prop: "createTime", align: '120px'}, - {label: "创建人", prop: "createUserName", align: 'center'}, - {slot: "options"} - ] } }, methods: {