组件简介
基于antd的Table、Form、等组件封装的一个可编辑表格组件,支持单行编辑、多行编辑,编辑之后数据自动保存更新,简化控件之间的联动实现,简化表格类数据编辑
啥也不说了直接上代码:基础使用,全表可编辑编辑import React from 'react';
import { Editable } from 'dumi';
import { Input, Button, InputNumber } from 'antd';
const fields = [
{
title: '姓名',
id: 'name',
width: '30%',
editable: true,
},
{
title: '简介',
id: 'info',
children: [
{
title: '年龄',
id: 'age',
editable: true,
renderFormInput: () => {
return ;
}
},
{
title: '身高',
id: 'height'
}
]
},
{
title: '地址',
id: &