fix: scTable refresh问题
This commit is contained in:
parent
3376d9c5af
commit
7fe603dbc2
|
@ -92,6 +92,7 @@ export default {
|
|||
tableName: { type: String, default: "" },
|
||||
apiObj: { type: Object, default: () => { } },
|
||||
params: { type: Object, default: () => ({}) },
|
||||
query: { type: Object, default: () => ({}) },
|
||||
data: { type: Object, default: () => { } },
|
||||
height: { type: [String, Number], default: "100%" },
|
||||
size: { type: String, default: "default" },
|
||||
|
@ -123,9 +124,16 @@ export default {
|
|||
this.total = this.tableData.length;
|
||||
},
|
||||
apiObj() {
|
||||
// this.tableParams = this.params;
|
||||
this.tableParams = this.params;
|
||||
this.refresh();
|
||||
},
|
||||
// query 暂时不监听手动调用
|
||||
// query: {
|
||||
// handler() {
|
||||
// this.refresh();
|
||||
// },
|
||||
// deep: true
|
||||
// }
|
||||
},
|
||||
computed: {
|
||||
_height() {
|
||||
|
@ -210,7 +218,7 @@ export default {
|
|||
// delete reqData[config.request.page]
|
||||
// delete reqData[config.request.pageSize]
|
||||
}
|
||||
var c = Object.assign({}, this.tableParams, reqData)
|
||||
var c = Object.assign({}, this.query, this.tableParams, reqData)
|
||||
try {
|
||||
if (this.apiObj) {
|
||||
var res = await this.apiObj.req(c);
|
||||
|
|
Loading…
Reference in New Issue