From ed7d889f7d9dfca77fd7f055ad8d6ec6ad85ae91 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 20 七月 2022 18:28:13 +0800
Subject: [PATCH] 2022-07-20

---
 src/tabviews/custom/components/tree/antd-tree/index.jsx |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx
index e9d7bc7..5f5c919 100644
--- a/src/tabviews/custom/components/tree/antd-tree/index.jsx
+++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -62,7 +62,9 @@
       sync: _sync
     }, () => {
       if (config.setting.sync !== 'true' && config.setting.onload === 'true') {
-        this.loadData(null)
+        setTimeout(() => {
+          this.loadData(null)
+        }, config.setting.delay || 0)
       } else if (config.setting.sync === 'true' && _data) {
         this.handleData()
       }
@@ -460,7 +462,7 @@
     const { config, loading, treeNodes, expandedKeys, selectedKeys } = this.state
 
     return (
-      <div className="custom-tree-box" style={config.style}>
+      <div className="custom-tree-box" id={'anchor' + config.uuid} style={config.style}>
         {loading ?
           <div className="loading-mask">
             <div className="ant-spin-blur"></div>
@@ -468,7 +470,7 @@
           </div> : null
         }
         {config.wrap.title || config.wrap.searchable === 'true' ? <div className="tree-header" style={config.headerStyle}>
-          <span className="title">{config.wrap.title}</span>
+          <span className={'title ' + (config.wrap.searchable !== 'true' ? 'search-unable' : '')}>{config.wrap.title}</span>
           {config.wrap.searchable === 'true' ? <Search allowClear onSearch={this.treeFilter} /> : null}
         </div> : null}
         {treeNodes && treeNodes.length > 0 ? <div className="tree-box" style={{height: config.wrap.contentHeight}}>

--
Gitblit v1.8.0