From d782070a1cdddf68d1b71e8e5dffb84f24543968 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 17 十二月 2025 15:56:47 +0800
Subject: [PATCH] 最新版本541200007

---
 admin/src/components/common/Tree.vue |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/admin/src/components/common/Tree.vue b/admin/src/components/common/Tree.vue
index 5d6fd7b..0c68c47 100644
--- a/admin/src/components/common/Tree.vue
+++ b/admin/src/components/common/Tree.vue
@@ -2,9 +2,9 @@
     <div class="tree">
         <div v-for="(item, index) of list" :key="index" @click.stop="clickIten(item)">
             <div class="tree_item">
-                <i class="el-icon-caret-bottom" :class="{ 'activeColor': item.fsStatus === 1 }" v-show="item.fsStatus === 1 && item.childList.length > 0"></i>
-                <i class="el-icon-caret-right color" v-show="item.childList.length > 0 && (item.fsStatus === 0 || !item.fsStatus)"></i>
-                <div class="tree_item_label long-title-style" :title="item.name" :class="{ 'activeColor': item.fsDate === 1 && item.childList.length === 0 }">{{ item.name }}</div>
+                <i class="el-icon-caret-bottom" :class="{ 'activeColor': item.fsStatus === 1 }" v-show="item.fsStatus === 1 && item.childList && item.childList.length > 0"></i>
+                <i class="el-icon-caret-right color" v-show="item.childList && item.childList.length > 0 && (item.fsStatus === 0 || !item.fsStatus)"></i>
+                <div class="tree_item_label long-title-style" :title="item.name" :class="{ 'activeColor': item.fsDate === 1 &&(!item.childList || item.childList.length === 0) }">{{ item.name }}</div>
                 <!--                <i class="el-icon-caret-bottom" :class="{ 'activeColor': item[defaultProps.status] }" v-show="item[defaultProps.status] && item[defaultProps.children]"></i>-->
 <!--                <i class="el-icon-caret-right color" v-show="item[defaultProps.children] && !item[defaultProps.status]"></i>-->
 <!--                <div class="tree_item_label long-title-style" :title="item[defaultProps.name]" :class="{ 'activeColor': item[defaultProps.status] && !item[defaultProps.children] }">{{ item[defaultProps.name] }}</div>-->
@@ -83,7 +83,7 @@
         i.fsDate = 0
       })
       item.fsDate = fsDate
-      if (item.childList.length > 0) {
+      if (item.childList &&item.childList.length > 0) {
         item.fsStatus === 0 || !item.fsStatus ? item.fsStatus = 1 : item.fsStatus = 0
       }
       this.$emit('callback', item, item)
@@ -92,7 +92,7 @@
     recursion (children) {
       children.forEach(item => {
         item.fsDate = 0
-        if (item.childList.length > 0) {
+        if (item.childList && item.childList.length > 0) {
           this.recursion(item.childList)
         }
         // item[this.defaultProps.status] = false

--
Gitblit v1.9.3