diff options
| author | zyh <[email protected]> | 2024-04-26 17:54:16 +0800 |
|---|---|---|
| committer | zyh <[email protected]> | 2024-04-26 17:54:16 +0800 |
| commit | 30506c2960ba03b418f6fac32b0b71df6b90dd6a (patch) | |
| tree | b64342b89a0804bd3a5e4290cee3cec7816c8b51 | |
| parent | 0219704e8ba961214c02c5b4137f3cca004e3409 (diff) | |
fix: explore graph showAllData使用emit传递数据rel-24.01.21
3 files changed, 15 insertions, 2 deletions
diff --git a/nezha-fronted/src/components/chart/chart.vue b/nezha-fronted/src/components/chart/chart.vue index 0ee25b98c..54b8515b5 100644 --- a/nezha-fronted/src/components/chart/chart.vue +++ b/nezha-fronted/src/components/chart/chart.vue @@ -18,6 +18,7 @@ @chartIsNoData="chartIsNoData" :from="from" :globalVariables="globalVariables" + @loadMore="loadMore" ></chart-time-series> <chart-doughnut :ref="'chart' + chartInfo.id" @@ -416,6 +417,9 @@ export default { }, refreshLogs (params) { this.$emit('refreshLogs', params) + }, + loadMore () { + this.$emit('loadMore') } }, mounted () { diff --git a/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeries.vue b/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeries.vue index 2d01b61e2..e82201217 100644 --- a/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeries.vue +++ b/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeries.vue @@ -662,8 +662,9 @@ export default { u.redraw(false, true) }, showMore () { - this.showAllData = true - this.initChart() + // this.showAllData = true + // this.initChart() + this.$emit('loadMore') }, themeChange (theme) { this.theme = theme diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 350f1da2b..c7bd90803 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -239,6 +239,7 @@ :is-fullscreen="false" :panelLock="true" :showAllData="showAllData" + @loadMore="loadMore" :isFullscreen="false" :globalVariables="[]" :from="'explore'" @@ -385,6 +386,7 @@ :is-fullscreen="false" :panelLock="true" :showAllData="showAllData" + @loadMore="loadMore" :isFullscreen="false" :globalVariables="[]" :from="'explore'" @@ -3808,6 +3810,12 @@ export default { this.scrollbarWrap.removeEventListener('scroll', this.onScroll) }, methods: { + loadMore () { + this.showAllData = true + this.$nextTick(() => { + this.$refs.exploreChart.$children[0].initChart() + }) + }, changeStack () { this.isStack = !this.isStack this.$refs.exploreChart.$children[0].changeStack() |
