This commit is contained in:
theluyuan 2024-09-25 10:59:56 +08:00
parent cf87e0c28a
commit 2f5407d7b3
4 changed files with 7 additions and 1 deletions

View File

@ -1268,6 +1268,7 @@ const _sfc_main = defineComponent({
e.target.parentNode.setAttribute("lay-sort", "");
tableDataSource.value = [...props.dataSource];
} else {
console.log("\u6392\u5E8F\u4E86");
e.target.parentNode.setAttribute("lay-sort", "desc");
tableDataSource.value.sort((x, y) => {
if (x[key] < y[key])
@ -1283,6 +1284,7 @@ const _sfc_main = defineComponent({
e.target.parentNode.setAttribute("lay-sort", "");
tableDataSource.value = [...props.dataSource];
} else {
console.log("\u6392\u5E8F\u4E86");
e.target.parentNode.setAttribute("lay-sort", "asc");
tableDataSource.value.sort((x, y) => {
if (x[key] < y[key])

View File

@ -40323,6 +40323,7 @@ const _sfc_main$D = defineComponent({
e.target.parentNode.setAttribute("lay-sort", "");
tableDataSource.value = [...props.dataSource];
} else {
console.log("\u6392\u5E8F\u4E86");
e.target.parentNode.setAttribute("lay-sort", "desc");
tableDataSource.value.sort((x, y) => {
if (x[key] < y[key])
@ -40338,6 +40339,7 @@ const _sfc_main$D = defineComponent({
e.target.parentNode.setAttribute("lay-sort", "");
tableDataSource.value = [...props.dataSource];
} else {
console.log("\u6392\u5E8F\u4E86");
e.target.parentNode.setAttribute("lay-sort", "asc");
tableDataSource.value.sort((x, y) => {
if (x[key] < y[key])

View File

@ -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;

File diff suppressed because one or more lines are too long