变更
This commit is contained in:
@@ -517,6 +517,7 @@ const sortTable = (e: any, key: string, sort: string, issoul = false) => {
|
||||
e.target.parentNode.setAttribute("lay-sort", "");
|
||||
tableDataSource.value = [...props.dataSource];
|
||||
} else {
|
||||
console.log("排序了");
|
||||
e.target.parentNode.setAttribute("lay-sort", "desc");
|
||||
tableDataSource.value.sort((x, y) => {
|
||||
if (x[key] < y[key]) return 1;
|
||||
@@ -529,6 +530,7 @@ const sortTable = (e: any, key: string, sort: string, issoul = false) => {
|
||||
e.target.parentNode.setAttribute("lay-sort", "");
|
||||
tableDataSource.value = [...props.dataSource];
|
||||
} else {
|
||||
console.log("排序了");
|
||||
e.target.parentNode.setAttribute("lay-sort", "asc");
|
||||
tableDataSource.value.sort((x, y) => {
|
||||
if (x[key] < y[key]) return -1;
|
||||
|
||||
Reference in New Issue
Block a user