mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-10-31 19:35:26 +08:00 
			
		
		
		
	fix: 🐛 scTable dataChanged
This commit is contained in:
		| @@ -325,8 +325,7 @@ export default { | |||||||
|         } |         } | ||||||
|         //判断是否静态数据 |         //判断是否静态数据 | ||||||
|         if (this.queryApi) { |         if (this.queryApi) { | ||||||
|             const res = await this.getData() |             await this.getData() | ||||||
|             this.$emit('dataChange', res, this.tableData) |  | ||||||
|         } else if (this.data) { |         } else if (this.data) { | ||||||
|             this.tableData = this.data |             this.tableData = this.data | ||||||
|             this.total = this.tableData.length |             this.total = this.tableData.length | ||||||
| @@ -460,6 +459,7 @@ export default { | |||||||
|         }, |         }, | ||||||
|         //获取数据 |         //获取数据 | ||||||
|         async getData() { |         async getData() { | ||||||
|  |             const ret = await (async () => { | ||||||
|                 this.loading = true |                 this.loading = true | ||||||
|  |  | ||||||
|                 let res |                 let res | ||||||
| @@ -498,6 +498,9 @@ export default { | |||||||
|                 } |                 } | ||||||
|                 this.$refs.scTable?.setScrollTop(0) |                 this.$refs.scTable?.setScrollTop(0) | ||||||
|                 return res |                 return res | ||||||
|  |             })() | ||||||
|  |  | ||||||
|  |             this.$emit('dataChange', ret, this.tableData) | ||||||
|         }, |         }, | ||||||
|         //清空数据 |         //清空数据 | ||||||
|         _clearData() { |         _clearData() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user