diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index d1724ed7a..111fb02f8 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -56,7 +56,7 @@ animation: 150, handle: '.chart-title' }" > -
+
- - - - - { if(item.title.indexOf(searchName)>-1){ item.isLoaded = false; + item.isHide=false; + chartListTmp.push(item); + }else{ + item.isLoaded = false; + item.isHide=true; chartListTmp.push(item); } }); }else{ this.dataTotalListBak.forEach((item)=>{ item.isLoaded = false; + item.isHide=false; chartListTmp.push(item); }); } @@ -1454,8 +1459,10 @@ setChartSize(item, index) { this.$nextTick(() => { let chartBox = document.getElementById("chart-" + item.id); - chartBox.style.width = `${(item.span / 12) * 100}%`; - chartBox.style.height = `${item.height}px`; + if(chartBox){ + chartBox.style.width = `${(item.span / 12) * 100}%`; + chartBox.style.height = `${item.height}px`; + } }); }, getNewTime(time, num) {