Merge pull request #7356 from dataease/pr@dev@fix_tab_switch

Pr@dev@fix tab switch
This commit is contained in:
wisonic-s 2023-12-26 15:27:39 +08:00 committed by GitHub
commit 2e2101ca09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -655,6 +655,7 @@ export default {
tabSwitch(tabCanvasId) {
if (this.charViewS2ShowFlag && tabCanvasId === this.canvasId && this.$refs[this.element.propValue.id]) {
// do nothing
this.$refs[this.element.propValue.id].chartResize()
}
},
//

View File

@ -396,7 +396,8 @@ export default {
const { width: chartWidth, height: chartHeight } = this.myChart.options
if (width !== chartWidth || height !== chartHeight) {
this.myChart?.changeSheetSize(width, height)
if (chartWidth || chartHeight) {
// tab
if (chartWidth || chartHeight || !(chartHeight || chartWidth)) {
this.myChart.render()
}
this.initScroll()