Commit 3c869418 authored by Captain.B's avatar Captain.B Committed by 刘瑞斌
Browse files

fix: 修复启用禁用模块顶部没有刷新的问题

parent 03293013
No related merge requests found
Showing with 11 additions and 0 deletions
+11 -0
......@@ -38,6 +38,7 @@
import {LicenseKey} from '@/common/js/constants';
import {mapGetters} from "vuex";
import {hasLicense} from "@/common/js/utils";
import {MODULE_CHANGE, ModuleEvent} from "@/business/components/common/head/ListEvent";
const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/);
const report = requireContext.keys().map(key => requireContext(key).report);
......@@ -80,6 +81,7 @@ export default {
}
}
this.registerEvents();
},
computed: {
...mapGetters([
......@@ -106,6 +108,15 @@ export default {
}
return true;
},
registerEvents() {
ModuleEvent.$on(MODULE_CHANGE, () => {
if (module.default) {
module.default.listModules(this).then(() => {
this.menuKey++;
});
}
});
}
}
};
</script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment