naive-ui/demo/documentation/components/dynamicInput/enUS/index.md

36 lines
958 B
Markdown
Raw Normal View History

# Dynamic Input
2020-03-09 09:29:48 +08:00
## Demos
```demo
basic
2020-03-11 16:24:35 +08:00
pair
2020-03-09 09:29:48 +08:00
custom
```
## Props
2020-03-11 16:24:35 +08:00
### Input Props
2020-03-09 09:29:48 +08:00
|Name|Type|Default|Description|
|-|-|-|-|
2020-03-11 16:24:35 +08:00
|value|`Array`||**required**|
|placeholder|`string`|`''`||
|onAdd|`(resolve: (item) => void) => any`|`null`| Callback when click at '+'. Pass resolved item to resolve function to set a new node.|
### Pair Props
|Name|Type|Default|Description|
|-|-|-|-|
|value|`Array`|-|**required**|
2020-03-09 09:29:48 +08:00
|placeholderKey|`string`|`key`||
2020-03-11 16:24:35 +08:00
|placeholderValue|`string`|`value`||
|onAdd|`(resolve: (item) => void) => any`|`null`| Callback when click at '+'. Pass resolved item to resolve function to set a new node.|
### Custom Props
|Name|Type|Default|Description|
|-|-|-|-|
|value|`Array`|-|**required**|
2020-03-11 16:24:35 +08:00
|onAdd|`(resolve: (item) => void) => any`|`null`| Callback when click at '+'. Pass resolved item to resolve function to set a new node.|
## Events
|Name|Parameters|Description|
|-|-|-|
|remove|`(index: Number)`| Index is the item which you removed|