|
|
|
@ -772,12 +772,12 @@ export default { |
|
|
|
if (!prop) { |
|
|
|
if (!prop) { |
|
|
|
// 如果取消排序,清空排序参数 |
|
|
|
// 如果取消排序,清空排序参数 |
|
|
|
this.query.orderByField = undefined; |
|
|
|
this.query.orderByField = undefined; |
|
|
|
this.query.isAsc = undefined; |
|
|
|
this.query.asc = undefined; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
|
|
|
|
|
|
|
this.query.orderByField = orderByField; |
|
|
|
this.query.orderByField = orderByField; |
|
|
|
this.query.isAsc = order === 'ascending' ? true : false; |
|
|
|
this.query.asc = order === 'ascending' ? true : false; |
|
|
|
} |
|
|
|
} |
|
|
|
// // 重新加载数据 |
|
|
|
// // 重新加载数据 |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|