fix: 修复display引入的问题

This commit is contained in:
Captain.B 2020-12-01 13:20:05 +08:00
parent 605e308159
commit 3a16942876
1 changed files with 14 additions and 5 deletions

View File

@ -12,7 +12,7 @@
<ldap-setting/>
</el-tab-pane>
<el-tab-pane v-if="hasLicense()" :label="$t('display.title')" name="display">
<ms-display/>
<component :is="displayComponent"></component>
</el-tab-pane>
</el-tabs>
</el-card>
@ -22,19 +22,28 @@
import EmailSetting from "./EmailSetting";
import LdapSetting from "./LdapSetting";
import BaseSetting from "./BaseSetting";
import MsDisplay from "@/business/components/xpack/display/Display";
import {hasLicense} from '@/common/js/utils';
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const display = requireComponent.keys().length > 0 ? requireComponent("./display/Display.vue") : {};
export default {
name: "SystemParameterSetting",
components: {
MsDisplay,
BaseSetting,
EmailSetting, LdapSetting
EmailSetting,
LdapSetting,
"MsDisplay": display.default
},
data() {
return {
activeName: 'base'
activeName: 'base',
displayComponent: null,
}
},
mounted() {
if (display.default !== undefined) {
this.displayComponent = "MsDisplay";
}
},
methods: {