Browse Source

试验文件子节点显示

duy 2 years ago
parent
commit
c8c2215071

+ 3 - 1
src/views/data-fill/collapse-form/test-file.vue

@@ -163,7 +163,9 @@ const thirdtreeDatas = ref([])
 const thirdElTreeProps = ref({
 const thirdElTreeProps = ref({
     label: 'nodeName',
     label: 'nodeName',
     children: 'children',
     children: 'children',
-    isLeaf: 'hasChildren'
+    isLeaf: function (data) {
+          return !data.hasChildren;
+    },
 })
 })
 const getthirdTreeDatas = async (type) => {
 const getthirdTreeDatas = async (type) => {
     const {error, code, data} = await getTreeAll({
     const {error, code, data} = await getTreeAll({

+ 4 - 1
src/views/data-fill/collapse-form/testTree.vue

@@ -31,7 +31,10 @@ const ElTreeRef = ref(null)
 const ElTreeProps = ref({
 const ElTreeProps = ref({
     label: 'title',
     label: 'title',
     children: 'children',
     children: 'children',
-    isLeaf: 'hasChildren'
+    // isLeaf: 'hasChildren'
+    isLeaf: function (data) {
+          return !data.hasChildren;
+    },
 })
 })
 
 
 const projectId = ref(props.projectId);
 const projectId = ref(props.projectId);