Basic field-type components that support read-write separation based on antd with React
online example: https://favori.gitee.io/gantd-landing (CodePen)
- Data-intensive field components for business
- Support read and write separation
- Keep UI style with antd
import React, { useState } from 'react';
import { Input, InputTelePhone, InputEmail, SwitchStatus } from 'data-cell-g';
function BasicUse() {
const [edit, setEdit] = useState('CANCEL')
return <>
<Button onClick={() => setEdit(SwitchStatus)} style={{ marginBottom: 5 }} size="small">{!(edit === 'EDIT') ? 'toEdit' : 'toRead'}</Button>
<Input edit={edit}/>
<InputTelePhone edit={edit}/>
<InputEmail edit={edit}/>
</>
}
React.render(<BasicUse/>, mountNode);
- Create a Github issue for bug reports, feature requests, or questions
- Follow @GantFDT for announcements
- Add a ⭐️ star on GitHub to support the project❤️!
GantFDT
MIT