框架优化

This commit is contained in:
liamzi
2024-12-25 18:34:20 +08:00
parent ac0f7ccbb7
commit a6a4cbb337
28 changed files with 56 additions and 117 deletions

View File

@@ -151,28 +151,23 @@ const SectionManagement = () => {
{
title: '项目名称',
dataIndex: 'name',
width: '20%',
},
{
title: '描述',
dataIndex: 'description',
width: '25%',
},
{
title: '单价',
dataIndex: 'price',
width: '15%',
render: (price) => `¥${price}`
},
{
title: '数量',
dataIndex: 'quantity',
width: '15%',
},
{
title: '单位',
dataIndex: 'unit',
width: '15%',
}
];
@@ -181,7 +176,6 @@ const SectionManagement = () => {
{
title: '项目名称',
dataIndex: 'name',
width: '20%',
render: (_, __, index) => (
<Form.Item
name={[index, 'name']}
@@ -194,7 +188,6 @@ const SectionManagement = () => {
{
title: '描述',
dataIndex: 'description',
width: '25%',
render: (_, __, index) => (
<Form.Item
name={[index, 'description']}
@@ -207,7 +200,6 @@ const SectionManagement = () => {
{
title: '单价',
dataIndex: 'price',
width: '15%',
render: (_, __, index) => (
<Form.Item
name={[index, 'price']}
@@ -225,7 +217,6 @@ const SectionManagement = () => {
{
title: '数量',
dataIndex: 'quantity',
width: '15%',
render: (_, __, index) => (
<Form.Item
name={[index, 'quantity']}
@@ -243,7 +234,6 @@ const SectionManagement = () => {
{
title: '单位',
dataIndex: 'unit',
width: '15%',
render: (_, __, index) => (
<Form.Item
name={[index, 'unit']}
@@ -268,7 +258,6 @@ const SectionManagement = () => {
},
{
title: '操作',
width: '10%',
render: (_, __, index, { remove }) => (
<Button
type="link"
@@ -350,6 +339,7 @@ const SectionManagement = () => {
</div>
<div className="p-4">
<Table
scroll={{ x: true }}
dataSource={section.attributes.items}
columns={drawerColumns}
pagination={false}