From 95150112b5baf318e42510407703c43e315d7bbb Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Sat, 20 May 2023 02:14:10 +0800 Subject: [PATCH] Fixed the bug that the permission change menu could not be loaded after switching users --- ui/src/pages/Main.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/pages/Main.vue b/ui/src/pages/Main.vue index 4f0045d..d130930 100644 --- a/ui/src/pages/Main.vue +++ b/ui/src/pages/Main.vue @@ -220,7 +220,9 @@ export default { }, mounted() { this.username = getUsername() - const allRoutes = _.filter(_.get(this.$router, 'options.routes[0].children'), 'meta.title') + const allRoutes = _.cloneDeep( + _.filter(_.get(this.$router, 'options.routes[0].children'), 'meta.title') + ) const user = getUser() const menus = user.menus