分析排序

This commit is contained in:
liuzanying
2023-09-15 17:24:14 +08:00
parent 446d53bab9
commit a20598a0da
8 changed files with 150 additions and 23 deletions

View File

@@ -125,7 +125,19 @@ export default defineComponent({
// align: "center",
fixed: index === 0 ? "left" : null,
};
}else {
} else if (item.key === 'number') {
return {
...item,
title: () => <RenderTableTitle title={item.title} />,
dataIndex: item.key,
key: item.key,
slots: { customRender: item.key },
width: 100,
// align: "center",
fixed: index === 0 ? "left" : null,
sorter: (a, b) => { return a.number > b.number? 1 : -1 },
};
} else {
return {
...item,
title: () => <RenderTableTitle title={item.title} />,
@@ -137,7 +149,7 @@ export default defineComponent({
fixed: index === 0 ? "left" : null,
};
}
}) || [];
tableInstance.value.data = tableSource.value;
tableInstance.value.columns = data.head;