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