|
|
@@ -24,6 +24,7 @@
|
|
|
import MainNavbar from "./main-navbar";
|
|
|
import MainSidebar from "./main-sidebar";
|
|
|
import MainContent from "./main-content";
|
|
|
+import useUserStore from "@/store_v3/modules/user";
|
|
|
|
|
|
import debounce from "lodash/debounce";
|
|
|
export default {
|
|
|
@@ -180,6 +181,9 @@ export default {
|
|
|
return this.$message.error(res.msg);
|
|
|
}
|
|
|
window.SITE_CONFIG["permissions"] = res.data;
|
|
|
+ // Keep the reactive Pinia permission state in sync with the legacy global config.
|
|
|
+ // v-hasPermi reads from this store, so updating only SITE_CONFIG leaves buttons hidden.
|
|
|
+ useUserStore().permissions = res.data;
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|