fix: 过滤旧前端菜单
This commit is contained in:
@@ -78,6 +78,10 @@ type RecordRaws = {
|
|||||||
function buildRouters(recordRaws: RecordRaws[]): RouteRecordRaw[] {
|
function buildRouters(recordRaws: RecordRaws[]): RouteRecordRaw[] {
|
||||||
const routers: RouteRecordRaw[] = [];
|
const routers: RouteRecordRaw[] = [];
|
||||||
for (const item of recordRaws) {
|
for (const item of recordRaws) {
|
||||||
|
// 过滤旧前端菜单 是layui的菜单跳过
|
||||||
|
if (['', '/page"'].includes(item.path)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// 路由页面组件
|
// 路由页面组件
|
||||||
let component: RouteComponent = {};
|
let component: RouteComponent = {};
|
||||||
if (item.component) {
|
if (item.component) {
|
||||||
|
|||||||
@@ -424,6 +424,8 @@ function fnGetList() {
|
|||||||
tableState.loading = true;
|
tableState.loading = true;
|
||||||
listMenu(toRaw(queryParams)).then(res => {
|
listMenu(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
|
// 过滤旧前端菜单
|
||||||
|
res.data = res.data.filter(i => i.perms !== 'page');
|
||||||
menuListData = JSON.parse(JSON.stringify(res.data));
|
menuListData = JSON.parse(JSON.stringify(res.data));
|
||||||
// 初始上级菜单和展开编号key
|
// 初始上级菜单和展开编号key
|
||||||
if (treeDataAll.length <= 0) {
|
if (treeDataAll.length <= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user