fix: 🐛 scTable dataChanged

This commit is contained in:
tk 2024-12-23 11:52:19 +08:00 committed by nsnail
parent 81ac00d1f1
commit 52e7f93cc2

View File

@ -325,8 +325,7 @@ export default {
}
//
if (this.queryApi) {
const res = await this.getData()
this.$emit('dataChange', res, this.tableData)
await this.getData()
} else if (this.data) {
this.tableData = this.data
this.total = this.tableData.length
@ -460,6 +459,7 @@ export default {
},
//
async getData() {
const ret = await (async () => {
this.loading = true
let res
@ -498,6 +498,9 @@ export default {
}
this.$refs.scTable?.setScrollTop(0)
return res
})()
this.$emit('dataChange', ret, this.tableData)
},
//
_clearData() {