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

43 lines
758 B
Markdown
Raw Normal View History

# Pairwise Value
```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: ['From', 'To'],
value: [0, 100]
}
},
methods: {
handleInputBlur () {
this.$NMessage.info('Pairwise ValueBlur')
},
handleInputFocus () {
this.$NMessage.info('Pairwise ValueFocus')
},
handleInputInput () {
this.$NMessage.info('Pairwise ValueInput')
},
handleInputChange () {
this.$NMessage.info('Pairwise ValueChange')
}
}
}
```
```css
.n-input {
margin-bottom: 8px;
}
```