mirror of
https://github.com/continew-org/continew-admin.git
synced 2026-01-01 08:57:12 +08:00
新增:新增获取路由信息 API(默认前端动态路由处于关闭状态,可通过[页面配置]>[菜单来源于后台]开启)
1.在页面导航栏中通过[页面配置]>[菜单来源于后台]临时启用,刷新后配置失效 2.在前端项目 src/config/setting.json 中,可通过 menuFromServer 配置永久启用
This commit is contained in:
@@ -3,7 +3,7 @@ import { Notification } from '@arco-design/web-vue';
|
||||
import type { NotificationReturn } from '@arco-design/web-vue/es/notification/interface';
|
||||
import type { RouteRecordNormalized } from 'vue-router';
|
||||
import defaultSettings from '@/config/settings.json';
|
||||
import { getMenuList } from '@/api/auth/login';
|
||||
import { listRoute } from '@/api/auth/login';
|
||||
import { AppState } from './types';
|
||||
|
||||
const useAppStore = defineStore('app', {
|
||||
@@ -52,7 +52,7 @@ const useAppStore = defineStore('app', {
|
||||
content: 'loading',
|
||||
closable: true,
|
||||
});
|
||||
const { data } = await getMenuList();
|
||||
const { data } = await listRoute();
|
||||
this.serverMenu = data;
|
||||
notifyInstance = Notification.success({
|
||||
id: 'menuNotice',
|
||||
|
||||
Reference in New Issue
Block a user