fix
This commit is contained in:
@@ -191,12 +191,10 @@ const ServicePage = () => {
|
||||
const sectionIndex = sections.findIndex((s) => s.key === sectionKey);
|
||||
|
||||
if (sectionIndex > -1) {
|
||||
// 直接删除项目,而不是清空
|
||||
sections[sectionIndex].items = sections[sectionIndex].items.filter(
|
||||
(_, idx) => idx !== itemIndex
|
||||
);
|
||||
|
||||
// 如果该部分没有项目了,删除整个部分
|
||||
if (sections[sectionIndex].items.length === 0) {
|
||||
sections.splice(sectionIndex, 1);
|
||||
}
|
||||
@@ -435,8 +433,8 @@ const ServicePage = () => {
|
||||
},
|
||||
{
|
||||
title: "模板类型",
|
||||
dataIndex: ["attributes", "type"],
|
||||
key: "type",
|
||||
dataIndex: ["attributes", "template_type"],
|
||||
key: "template_type",
|
||||
filters: Object.entries(TEMPLATE_TYPES).map(([key, value]) => ({
|
||||
text: value.label,
|
||||
value: key,
|
||||
@@ -575,6 +573,7 @@ const ServicePage = () => {
|
||||
<Card className="shadow-lg rounded-lg">
|
||||
<TableHeader />
|
||||
<Table
|
||||
scroll={{x:true}}
|
||||
columns={columns}
|
||||
dataSource={data}
|
||||
rowKey="id"
|
||||
|
||||
Reference in New Issue
Block a user