From 3a169428762f8a1d5cc3b7cece1e8d437ff5a27f Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 1 Dec 2020 13:20:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Ddisplay=E5=BC=95?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/SystemParameterSetting.vue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/settings/system/SystemParameterSetting.vue b/frontend/src/business/components/settings/system/SystemParameterSetting.vue index 7a119a9c1a..d16f7c20e7 100644 --- a/frontend/src/business/components/settings/system/SystemParameterSetting.vue +++ b/frontend/src/business/components/settings/system/SystemParameterSetting.vue @@ -12,7 +12,7 @@ - + @@ -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: {