Merge pull request #2067 from metersphere/pr@dev@fix_module_init

fix(系统设置): 修复初始化模块状态
This commit is contained in:
刘瑞斌 2021-04-16 13:49:34 +08:00 committed by GitHub
commit cb9567d45c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@
<script>
import {LicenseKey} from '@/common/js/constants';
import {mapGetters} from "vuex";
import {hasLicense} from "@/common/js/utils";
const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/);
const report = requireContext.keys().map(key => requireContext(key).report);
@ -95,7 +96,7 @@ export default {
}
},
check(key) {
if (module.default !== undefined) {
if (module.default !== undefined && hasLicense()) {
return this.modules[key] === 'ENABLE';
}
return true;