2020-03-15 00:04:46 +08:00
|
|
|
# 使用输入预设
|
2020-03-15 12:35:10 +08:00
|
|
|
默认状况下,`n-dynamic-input` 的预设是 `input`。
|
2019-10-23 23:08:29 +08:00
|
|
|
```html
|
2020-03-11 20:46:45 +08:00
|
|
|
<n-dynamic-input
|
2020-03-15 00:04:46 +08:00
|
|
|
v-model="value"
|
2020-03-17 15:31:28 +08:00
|
|
|
placeholder="请输入"
|
2020-03-15 12:35:10 +08:00
|
|
|
:min="3"
|
|
|
|
:max="6"
|
2019-10-23 23:08:29 +08:00
|
|
|
/>
|
2020-03-09 12:12:31 +08:00
|
|
|
<pre>
|
2020-03-15 00:04:46 +08:00
|
|
|
{{ JSON.stringify(value, 0, 2) }}
|
2020-03-09 12:12:31 +08:00
|
|
|
</pre>
|
2019-10-23 23:08:29 +08:00
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
2020-03-15 00:04:46 +08:00
|
|
|
value: [
|
2020-03-15 12:35:10 +08:00
|
|
|
'',
|
|
|
|
'',
|
2020-03-11 16:24:35 +08:00
|
|
|
''
|
2019-10-23 23:08:29 +08:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|