框架优化

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

@@ -374,7 +374,6 @@ const ServicePage = () => {
title: "项目名称",
dataIndex: "name",
key: "name",
width: "25%",
render: (text, record) => {
const isEditing = record.key === editingKey;
return isEditing ? (
@@ -408,7 +407,6 @@ const ServicePage = () => {
title: "描述",
dataIndex: "description",
key: "description",
width: "25%",
render: (text, record) => {
const isEditing = record.key === editingKey;
return isEditing ? (
@@ -454,7 +452,6 @@ const ServicePage = () => {
title: "单价",
dataIndex: "price",
key: "price",
width: "15%",
render: (price, record) => {
const isEditing = record.key === editingKey;
return isEditing ? (
@@ -489,7 +486,6 @@ const ServicePage = () => {
title: "数量",
dataIndex: "quantity",
key: "quantity",
width: "15%",
render: (quantity, record) => {
const isEditing = record.key === editingKey;
return isEditing ? (
@@ -517,7 +513,6 @@ const ServicePage = () => {
{
title: "小计",
key: "subtotal",
width: "20%",
render: (_, record) => (
<span className="text-blue-600 font-medium">
¥
@@ -534,7 +529,7 @@ const ServicePage = () => {
{
title: "操作",
key: "action",
width: "150px",
fixed: 'right',
render: (_, record) => {
const isEditing = record.key === editingKey;
return isEditing ? (
@@ -630,6 +625,7 @@ const ServicePage = () => {
>
<Table
columns={itemColumns}
scroll={{ x: true }}
dataSource={section.items.map((item, itemIndex) => ({
...item,
key: `${record.id}-${sectionIndex}-${itemIndex}`,