update 排序参数调整

This commit is contained in:
赵霄
2023-09-27 14:15:51 +08:00
parent 843dd588d7
commit b632ada33d
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -204,8 +204,9 @@ export const ConfigurableTableMixin = {
}) })
}, },
tableOnChange (pagination, filters, sorter) { tableOnChange (pagination, filters, sorter) {
console.log(sorter)
if (Object.keys(sorter).length > 0) { if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field this.isorter.column = sorter.order ? sorter.field : 'createTime'
this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc'
} }
this.ipagination = pagination this.ipagination = pagination
+1 -1
View File
@@ -259,7 +259,7 @@ export const JeroListMixin = {
handleTableChange (pagination, filters, sorter) { handleTableChange (pagination, filters, sorter) {
// 分页、排序、筛选变化时触发 // 分页、排序、筛选变化时触发
if (Object.keys(sorter).length > 0) { if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field this.isorter.column = sorter.order ? sorter.field : 'createTime'
this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc'
} }
this.ipagination = pagination this.ipagination = pagination