From c9e56c663c56d146d5591b9f651b8f4881f44368 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期二, 18 一月 2022 11:03:48 +0800
Subject: [PATCH] update copyright 2022

---
 src/components/TreeSelect/index.vue |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/components/TreeSelect/index.vue b/src/components/TreeSelect/index.vue
index 7eef938..261e5a0 100644
--- a/src/components/TreeSelect/index.vue
+++ b/src/components/TreeSelect/index.vue
@@ -82,13 +82,15 @@
 function initHandle() {
   nextTick(() => {
     const selectedValue = valueId.value;
-    if(selectedValue !== null && typeof (selectedValue) !== "undefined"){
+    if(selectedValue && selectedValue !== null && typeof (selectedValue) !== "undefined"){
       const node = proxy.$refs.selectTree.getNode(selectedValue)
       if (node) {
         valueTitle.value = node.data[props.objMap.label]
         proxy.$refs.selectTree.setCurrentKey(selectedValue) // 璁剧疆榛樿閫変腑
         defaultExpandedKey.value = [selectedValue] // 璁剧疆榛樿灞曞紑
       }
+    } else {
+      clearHandle()
     }
   })
 }

--
Gitblit v1.9.3