@hbtv/array-input
v1.0.1
Published
AntDesign Form 组件
Downloads
1
Keywords
Readme
array-input AntDesign的Form组件
安装方法
npm install @hbtv/array-input --save
ChangeLog
1.0.1
- 修改了 操作按栏的宽度=>
120
使用方法
import React from 'react';
import {Form} from 'antd';
import ArrayInput from '@hbtv/array-input';
export default ()=> {
const handleFormFinish = (data: any) => {
console.log('data', data);
};
return (
<Form onFinish={handleFormFinish}>
<Form.Item label="输入内容" name="content" rules={[{ required: true, message: '请输入' }]}>
<ArrayInput />
</Form.Item>
</Form>
)
}
API
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| value | | string[]
| undefined
|
| onChange | | (string[]) => void
| undefined
|
| name | 用于key
| string
| array-input
|
| placeholder | | string
| undefined
|
| textArea | 是否是textArea
| boolean
| true
|
| showIndex | 显示序号 | boolean
| false
|