|
@@ -24,11 +24,15 @@ export default (target, hasPagination = true) => ({
|
|
|
.then(data => {
|
|
|
this.total = data.count
|
|
|
this.data = Object.freeze(bindPrototype(data.list, target))
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.table && this.$refs.table.doLayout()
|
|
|
+ }, 0)
|
|
|
}).catch(console.error).finally(() => {})
|
|
|
} else {
|
|
|
this.$$request(target.$$api.getList, this.query).then(list => {
|
|
|
this.total = list.length
|
|
|
this.data = Object.freeze(bindPrototype(Object.freeze(list), target))
|
|
|
+ this.$refs.table && this.$refs.table.doLayout()
|
|
|
}).catch(console.error).finally(() => {})
|
|
|
}
|
|
|
},
|