From a53a3b3119659d6ec28b458dcefd46f4ec49d55c Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 17 七月 2020 16:43:47 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue

---
 ruoyi-ui/src/views/system/menu/index.vue |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue
index e9b8c9e..9fc2d78 100644
--- a/ruoyi-ui/src/views/system/menu/index.vue
+++ b/ruoyi-ui/src/views/system/menu/index.vue
@@ -49,16 +49,16 @@
       </el-table-column>
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button size="mini"
-            type="text"
-            icon="el-icon-edit"
+          <el-button size="mini" 
+            type="text" 
+            icon="el-icon-edit" 
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:menu:edit']"
           >淇敼</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-plus"
+          <el-button 
+            size="mini" 
+            type="text" 
+            icon="el-icon-plus" 
             @click="handleAdd(scope.row)"
             v-hasPermi="['system:menu:add']"
           >鏂板</el-button>
@@ -314,8 +314,10 @@
     handleAdd(row) {
       this.reset();
       this.getTreeselect();
-      if (row != null) {
+      if (row != null && row.menuId) {
         this.form.parentId = row.menuId;
+      } else {
+        this.form.parentId = 0;
       }
       this.open = true;
       this.title = "娣诲姞鑿滃崟";
@@ -369,4 +371,4 @@
     }
   }
 };
-</script>
+</script>
\ No newline at end of file

--
Gitblit v1.9.3