fix: 修复启用禁用模块顶部没有刷新的问题
This commit is contained in:
parent
03293013ad
commit
3c8694181f
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue