提交 0eec203c 作者: 龚洪江

功能:租赁商品新增

上级 72e72530
...@@ -2,7 +2,7 @@ import './index.scss'; ...@@ -2,7 +2,7 @@ import './index.scss';
import { Button, Cascader, Form, Radio, Table } from 'antd'; import { Button, Cascader, Form, Radio, Table } from 'antd';
import EditableCell from '~/components/EditableCell'; import EditableCell from '~/components/EditableCell';
import { useState } from 'react'; import { useState } from 'react';
import { PlusOutlined } from '@ant-design/icons'; import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
type EditableTableProps = Parameters<typeof Table>[0]; type EditableTableProps = Parameters<typeof Table>[0];
type ColumnTypes = Exclude<EditableTableProps['columns'], undefined>; type ColumnTypes = Exclude<EditableTableProps['columns'], undefined>;
...@@ -48,7 +48,16 @@ const RentAttr = () => { ...@@ -48,7 +48,16 @@ const RentAttr = () => {
{ {
title: '操作', title: '操作',
dataIndex: '', dataIndex: '',
render: () => <Button icon={<PlusOutlined />}></Button>, render: (_text: string, _record: any, index: number) => (
<>
{index === parameterTableData.length - 1 ? (
<Button icon={<PlusOutlined />} type='primary'></Button>
) : (
''
)}
{index ? <Button type='primary' icon={<MinusOutlined />}></Button> : ''}
</>
),
}, },
]; ];
const columns = attrTableColumns.map((col) => { const columns = attrTableColumns.map((col) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论