From ea06034e06a30d3e97838c7885ae7694273a8ca1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 05 十二月 2024 20:03:51 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/custom/components/interfaces/interItem/index.jsx |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/custom/components/interfaces/interItem/index.jsx b/src/tabviews/custom/components/interfaces/interItem/index.jsx
index 8db4d23..bd37fa6 100644
--- a/src/tabviews/custom/components/interfaces/interItem/index.jsx
+++ b/src/tabviews/custom/components/interfaces/interItem/index.jsx
@@ -1,4 +1,4 @@
-import {Component} from 'react'
+import { Component } from 'react'
 import PropTypes from 'prop-types'
 
 import Api from '@/api'
@@ -15,6 +15,7 @@
   }
 
   loading = false
+  loadTimer = null
   
   state = {
     BID: ''
@@ -39,9 +40,7 @@
     }
 
     if (config.setting.onload !== 'false') {
-      setTimeout(() => {
-        this.loadData()
-      }, config.setting.delay)
+      this.loadData()
     } else {
       MKEmitter.addListener('initFinish', this.initFinish)
     }
@@ -84,9 +83,7 @@
     if (config.MenuID !== MenuID) return
 
     if (config.setting.onload === 'false') {
-      setTimeout(() => {
-        this.loadData()
-      }, config.setting.delay)
+      this.loadData()
     }
   }
 
@@ -107,7 +104,17 @@
     this.loadData()
   }
 
-  async loadData () {
+  loadData = () => {
+    const { config } = this.props
+
+    this.loadTimer && clearTimeout(this.loadTimer)
+
+    this.loadTimer = setTimeout(() => {
+      this.execLoadData()
+    }, config.setting.delay)
+  }
+
+  async execLoadData () {
     const { config } = this.props
     const { BID } = this.state
 

--
Gitblit v1.8.0