From ea9cdac78107c68b94d24a0055bce461d0fd1ae2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 11 五月 2023 10:41:36 +0800 Subject: [PATCH] 2023-05-11 --- 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 19713cf..f2b717e 100644 --- a/src/tabviews/custom/components/chart/custom-chart/index.jsx +++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx @@ -267,7 +267,7 @@ let result = await Api.genericInterface(param) if (result.status) { - if (config.$cache) { + if (config.$cache && config.setting.onload !== 'false') { Api.writeCacheConfig(config.uuid, result.data || '') } @@ -280,6 +280,13 @@ this.data = result.data || [] this.handleData() } + + if (config.timer && config.clearField && result.data && result.data[0]) { + let vals = (config.clearValue || '').split(',') + if (vals.includes(result.data[0][config.clearField])) { + this.timer && this.timer.stop() + } + } } else { this.setState({ loading: false -- Gitblit v1.8.0