浏览代码

修复权限选择的name显示

yanglzh 2 年之前
父节点
当前提交
9668126b44
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      src/views/system/manage/role/component/permission.vue

+ 2 - 6
src/views/system/manage/role/component/permission.vue

@@ -28,11 +28,7 @@
 			<el-step title="接口权限" />
 		</el-steps>
 		<div class="scroll-part mt-3">
-			<el-tree ref="treeRef" v-if="step === 0" :data="treeData" show-checkbox default-expand-all node-key="id" highlight-current :props="{
-				children: 'children',
-				label: 'title',
-			}" check-on-click-node :expand-on-click-node="false" @check-change="checkChange" />
-			<el-tree ref="treeRef" v-else :data="treeData" show-checkbox default-expand-all node-key="id" highlight-current :props="defaultProps" check-on-click-node :expand-on-click-node="false" @check-change="checkChange" />
+			<el-tree ref="treeRef" :data="treeData" show-checkbox default-expand-all node-key="id" highlight-current :props="defaultProps" check-on-click-node :expand-on-click-node="false" @check-change="checkChange" />
 		</div>
 	</el-dialog>
 </template>
@@ -62,7 +58,7 @@ const idsList = [menuIds, buttonIds, columnIds, apiIds];
 const treeDataList = [menuData, buttonData, listData, apiData];
 const defaultProps = {
 	children: 'children',
-	label: 'name',
+	label: 'title',
 };
 
 const openDialog = async (row: any) => {