From f078c137d61270d243cd8e03077fa9cf000e276b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 14 八月 2023 14:02:40 +0800
Subject: [PATCH] 2023-08-14

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

diff --git a/src/tabviews/custom/components/code/sand-box/index.jsx b/src/tabviews/custom/components/code/sand-box/index.jsx
index 560976e..4119dea 100644
--- a/src/tabviews/custom/components/code/sand-box/index.jsx
+++ b/src/tabviews/custom/components/code/sand-box/index.jsx
@@ -116,7 +116,7 @@
             Api.getLCacheConfig(config.uuid, config.$time).then(res => {
               if (!res.valid && config.setting.onload === 'true') {
                 setTimeout(() => {
-                  this.loadData()
+                  this.loadData('init')
                 }, config.setting.delay || 0)
               }
     
@@ -142,7 +142,7 @@
   
           if (config.setting.onload === 'true') {
             setTimeout(() => {
-              this.loadData()
+              this.loadData('init')
             }, config.setting.delay || 0)
           } else if (this.loaded) {
             this.renderView()
@@ -204,7 +204,7 @@
     this.loadData()
   }
 
-  async loadData () {
+  async loadData (type) {
     const { config, arr_field, BID } = this.state
 
     if (config.wrap.datatype === 'static') {
@@ -243,7 +243,7 @@
       let _data = result.data || []
 
       this.loaded = true
-      if (config.$cache && config.setting.onload !== 'false') {
+      if (config.$cache && type === 'init') {
         Api.writeCacheConfig(config.uuid, result.data || [])
       }
 

--
Gitblit v1.8.0