forked from github/dataease
Merge pull request #5030 from dataease/pr@dev_memory_component
Pr@dev memory component
This commit is contained in:
commit
ee566d33d6
@ -322,6 +322,7 @@ export default {
|
||||
curFields: [],
|
||||
isFirstLoad: true, // 是否是第一次加载
|
||||
refId: null,
|
||||
getDataLoading: false,
|
||||
chart: BASE_CHART_STRING,
|
||||
requestStatus: 'success',
|
||||
message: null,
|
||||
@ -491,6 +492,7 @@ export default {
|
||||
handler: function(val1, val2) {
|
||||
if (isChange(val1, val2) && !this.isFirstLoad) {
|
||||
this.getData(this.element.propValue.viewId)
|
||||
this.getDataLoading = true
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
@ -747,6 +749,7 @@ export default {
|
||||
},
|
||||
getData(id, cache = true, dataBroadcast = false) {
|
||||
if (id) {
|
||||
if (this.getDataLoading) return
|
||||
this.requestStatus = 'waiting'
|
||||
this.message = null
|
||||
|
||||
@ -845,6 +848,8 @@ export default {
|
||||
}
|
||||
this.isFirstLoad = false
|
||||
return true
|
||||
}).finally(() => {
|
||||
this.getDataLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -423,7 +423,7 @@ export default {
|
||||
try {
|
||||
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
||||
if (targetRef) {
|
||||
targetRef[0].restore()
|
||||
targetRef[0]?.restore()
|
||||
}
|
||||
_this.$refs[this.activeTabName][0].resizeChart()
|
||||
} catch (e) {
|
||||
@ -528,7 +528,7 @@ export default {
|
||||
_this.activeTabName = _this.element.options.tabList[nowIndex].name
|
||||
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
||||
if (targetRef) {
|
||||
targetRef[0].restore()
|
||||
targetRef[0]?.restore()
|
||||
}
|
||||
});
|
||||
}, switchTime)
|
||||
|
Loading…
Reference in New Issue
Block a user