update 排序修改

This commit is contained in:
赵霄
2023-09-27 14:31:05 +08:00
parent f0c1f11ed7
commit 3505b21c02
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ export const ConfigurableTableMixin = {
},
/* 排序参数 */
isorter: {
column: 'createTime',
column: '',
order: 'desc'
},
columns: [],
@@ -206,7 +206,7 @@ export const ConfigurableTableMixin = {
tableOnChange (pagination, filters, sorter) {
console.log(sorter)
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.order ? sorter.field : 'createTime'
this.isorter.column = sorter.order ? sorter.field : ''
this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc'
}
this.ipagination = pagination