Bläddra i källkod

新增菜单默认主类目

RuoYi 5 år sedan
förälder
incheckning
76aa1cda49
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3 1
      ruoyi-ui/src/views/system/menu/index.vue

+ 3 - 1
ruoyi-ui/src/views/system/menu/index.vue

@@ -314,8 +314,10 @@ export default {
314 314
     handleAdd(row) {
315 315
       this.reset();
316 316
       this.getTreeselect();
317
-      if (row != null) {
317
+      if (row != null && row.menuId) {
318 318
         this.form.parentId = row.menuId;
319
+      } else {
320
+        this.form.parentId = 0;
319 321
       }
320 322
       this.open = true;
321 323
       this.title = "添加菜单";