naive-ui/demo/documentation/components/input/zhCN/pair.md

43 lines
767 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 输入成对值
```html
<n-input
pair
seperator="-"
v-model="value"
:placeholder="placeholder"
clearable
@blur="handleInputBlur"
@focus="handleInputFocus"
@change="handleInputChange"
@input="handleInputInput"
/>
```
```js
export default {
data () {
return {
placeholder: ['从', '到'],
value: ['0', '100']
}
},
methods: {
handleInputBlur () {
this.$NMessage.info('输入成对值Blur')
},
handleInputFocus () {
this.$NMessage.info('输入成对值Focus')
},
handleInputInput () {
this.$NMessage.info('输入成对值Input')
},
handleInputChange () {
this.$NMessage.info('输入成对值Change')
}
}
}
```
```css
.n-input {
margin-bottom: 8px;
}
```