fix: 打开后选中table中第一条数据

This commit is contained in:
Xu Zhimeng 2023-12-12 17:45:44 +08:00
parent 570ac48c5d
commit 0a9efad3ac

View File

@ -559,16 +559,21 @@ export default {
this.opts.notMerge = false this.opts.notMerge = false
this.isFitting = false this.isFitting = false
this.replotNeeded = false this.replotNeeded = false
this.selectedTableItem = null
this.$nextTick(() => { this.$nextTick(() => {
this.option.brush = { toolbox: [] } this.option.brush = { toolbox: [] }
this.selectedKeys = [] const firstLine = this.list[0]
if(firstLine) {
this.handleTableRowClick(firstLine)
this.selectedKeys = [firstLine.index]
}
}) })
this.clearRect() this.clearRect()
this.handleResetChart() this.handleResetChart()
}, },
beforeModalOpen() { async beforeModalOpen() {
this.getInfo() await this.getInfo()
this.reset() this.reset()
}, },