From 176c6e1da22e96a1110fa91f8fc8eb8ad2881e08 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 08 八月 2022 18:13:37 +0800
Subject: [PATCH] 2022-08-08

---
 src/tabviews/custom/components/code/sand-box/index.jsx |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/tabviews/custom/components/code/sand-box/index.jsx b/src/tabviews/custom/components/code/sand-box/index.jsx
index 1fd9fa9..5eb969e 100644
--- a/src/tabviews/custom/components/code/sand-box/index.jsx
+++ b/src/tabviews/custom/components/code/sand-box/index.jsx
@@ -14,7 +14,6 @@
     data: PropTypes.array,           // 缁熶竴鏌ヨ鏁版嵁
     config: PropTypes.object,        // 缁勪欢閰嶇疆淇℃伅
     mainSearch: PropTypes.any,       // 澶栧眰鎼滅储鏉′欢
-    menuType: PropTypes.any,         // 鑿滃崟绫诲瀷
   }
 
   state = {
@@ -67,7 +66,9 @@
       arr_field: _config.columns.map(col => col.field).join(','),
     }, () => {
       if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
-        this.loadData()
+        setTimeout(() => {
+          this.loadData()
+        }, _config.setting.delay || 0)
       }
       this.renderView()
     })
@@ -122,7 +123,7 @@
   }
 
   async loadData () {
-    const { mainSearch, menuType } = this.props
+    const { mainSearch } = this.props
     const { config, arr_field, BID } = this.state
 
     if (config.wrap.datatype === 'static') {
@@ -151,7 +152,7 @@
     })
 
     let _orderBy = config.setting.order || ''
-    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType)
+    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
 
     let result = await Api.genericInterface(param)
     if (result.status) {
@@ -195,7 +196,7 @@
         try {
           // eslint-disable-next-line no-eval
           eval(js)
-        } catch {
+        } catch (e) {
           console.warn('JS 鎵ц澶辫触锛�')
         }
       }
@@ -206,7 +207,7 @@
     const { config, loading, html } = this.state
 
     return (
-      <div className="custom-sand-box" style={{...config.style}}>
+      <div className="custom-sand-box" id={'anchor' + config.uuid} style={{...config.style}}>
         {loading ?
           <div className="loading-mask">
             <div className="ant-spin-blur"></div>

--
Gitblit v1.8.0