From c98e45bfac25e9110ad0383faac54a54d98ea9d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 18 十一月 2021 20:47:04 +0800 Subject: [PATCH] 2021-11-18 --- src/tabviews/custom/components/chart/custom-chart/index.jsx | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/tabviews/custom/components/chart/custom-chart/index.jsx b/src/tabviews/custom/components/chart/custom-chart/index.jsx index d72aae8..f7d88bd 100644 --- a/src/tabviews/custom/components/chart/custom-chart/index.jsx +++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx @@ -203,7 +203,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) @@ -279,11 +279,18 @@ let result = await Api.genericInterface(param) if (result.status) { + let reset = true + + if (hastimer && is(fromJS(result.data), fromJS(this.state.data))) { + reset = false + } + this.setState({ data: result.data, loading: false, empty: result.data.length === 0 }, () => { + if (!reset) return this.handleData() }) } else { -- Gitblit v1.8.0