naive-ui/demo/documentation/components/dynamicInput/zhCN/basic.md

28 lines
351 B
Markdown
Raw Normal View History

2020-03-09 09:29:48 +08:00
# 基础用法
```html
<n-dynamic-input
2020-03-09 12:12:31 +08:00
v-model="test"
placeholder-key="placeholder1"
placeholder-value="placeholder2"
2020-03-11 16:24:35 +08:00
:on-add="add"
/>
2020-03-09 12:12:31 +08:00
<pre>
{{ JSON.stringify(test,0,2) }}
</pre>
```
```js
export default {
data () {
return {
2020-03-09 12:12:31 +08:00
test: [
2020-03-11 16:24:35 +08:00
''
]
}
2020-03-11 16:24:35 +08:00
},
methods: {
add (resolve) {
resolve('')
}
}
}
```