Parcourir la source

Merge branch 'all-v4-liufei' into 'all-v4'

约定菜单和权限的顶级目录值为-1

See merge request skyeye/skyeye_frontend/skyeye-admin!255
Fei Liu il y a 1 an
Parent
commit
99aae79c4f

+ 2 - 2
src/views/system/menu/MenuForm.vue

@@ -371,7 +371,7 @@
     return [
       {
         label: '顶级目录',
-        value: 0,
+        value: -1, // 约定顶级目录值是 -1. 
         children: replaceParams(cloneDeep(props.parentMenuTree || []), 'label', 'id'),
       },
     ];
@@ -396,7 +396,7 @@
       } 
 
       // 若选择顶级目录, 返回路由表的 leve1 列表
-      if (newVal === 0) {
+      if (newVal === -1) {
         routeViewList.value = getChildRoutesView(null);
         return;
       } 

+ 1 - 1
src/views/system/permission/PermissionForm.vue

@@ -127,7 +127,7 @@
     return [
       {
         label: '顶级目录',
-        value: 0,
+        value: -1, // 约定顶级目录是 -1.
         children: props.permissionList || [],
       },
     ];