Forráskód Böngészése

feat: 所有去掉 新增 删除 编辑按钮

luoyali 1 éve
szülő
commit
42fdaf7683
1 módosított fájl, 17 hozzáadás és 14 törlés
  1. 17 14
      src/views/flow/form/index.vue

+ 17 - 14
src/views/flow/form/index.vue

@@ -23,8 +23,8 @@
 							<template #default="{ node, data }">
 								<span class="custom-tree-node">
 									<span class="label">{{ node.label }}</span>
-									<span v-if="false" class="code">{{ data.code }}</span>
-									<span class="do">
+									<!--<span v-if="false" class="code">{{ data.code }}</span>-->
+									<span class="do" v-if="node.label !== treeParentName">
 										<el-icon @click.stop="addHandler('table')"><Plus /></el-icon>
 										<el-icon @click.stop="dicEdit(data)"><Edit /></el-icon>
 										<el-icon @click.stop="dictDel(node, data)"><Delete /></el-icon>
@@ -142,7 +142,7 @@ import { useTablePage } from '@/hooks/useTablePage'
 import StatusIndicator from '@/components/StatusIndicator/index.vue'
 import DesignForm from './designForm.vue'
 import { statusOptions, templateForms, typeOptions, typeOptions_config } from './data.tsx'
-
+const treeParentName = '所有'
 const visible = ref(false) // 弹窗显示隐藏
 const visibleTemplate = ref(false) // 弹窗显示隐藏
 const visibleDesignForm = ref(false) // 弹窗显示隐藏
@@ -259,7 +259,7 @@ const getGroup = async () => {
 			return { value: item.id, label: item.name }
 		})
 		showGroupLoading.value = false
-		treeData.value = [{ id: '', name: '所有', children: data }]
+		treeData.value = [{ id: '', name: treeParentName, children: data }]
 		// treeData.value = data
 	}
 }
@@ -466,7 +466,7 @@ const addHandler = mode => {
 	isCreate.value = true
 	if (mode !== 'tableTemplate') {
 		activeData.value = {
-        status: true
+			status: true
 		}
 		visible.value = true
 		current_mode.value = mode
@@ -524,15 +524,18 @@ watch(
 <style scoped lang="scss">
 // 表单的树结构样式
 :deep(.menu-tree) {
-	.el-tree-node {
-		//&:first-child {
-		//	.custom-tree-node {
-		//		.do {
-		//			display: none !important;
-		//		}
-		//	}
-		//}
-	}
+	//.el-tree-node {
+	//	.el-tree-node__content {
+	//		.custom-tree-node {
+	//			.do {
+	//				&:first-child {
+	//					display: block !important;
+	//				}
+	//				display: none !important;
+	//			}
+	//		}
+	//	}
+	//}
 }
 
 .custom-tree-node {