2020-02-10 22:07:02 +08:00
|
|
|
|
# Pairwise Value
|
|
|
|
|
```html
|
|
|
|
|
<n-input
|
|
|
|
|
pair
|
2020-08-08 20:11:46 +08:00
|
|
|
|
separator="-"
|
2020-02-10 22:07:02 +08:00
|
|
|
|
v-model="value"
|
|
|
|
|
:placeholder="placeholder"
|
|
|
|
|
clearable
|
|
|
|
|
@blur="handleInputBlur"
|
|
|
|
|
@focus="handleInputFocus"
|
|
|
|
|
@change="handleInputChange"
|
2020-09-09 15:49:26 +08:00
|
|
|
|
@update:modelValue="handleInputInput"
|
2020-02-10 22:07:02 +08:00
|
|
|
|
/>
|
|
|
|
|
```
|
|
|
|
|
```js
|
|
|
|
|
export default {
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
placeholder: ['From', 'To'],
|
2020-02-28 19:59:47 +08:00
|
|
|
|
value: ['0', '100']
|
2020-02-10 22:07:02 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleInputBlur () {
|
|
|
|
|
this.$NMessage.info('Pairwise Value:Blur')
|
|
|
|
|
},
|
|
|
|
|
handleInputFocus () {
|
|
|
|
|
this.$NMessage.info('Pairwise Value:Focus')
|
|
|
|
|
},
|
|
|
|
|
handleInputInput () {
|
|
|
|
|
this.$NMessage.info('Pairwise Value:Input')
|
|
|
|
|
},
|
|
|
|
|
handleInputChange () {
|
|
|
|
|
this.$NMessage.info('Pairwise Value:Change')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
```css
|
|
|
|
|
.n-input {
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
```
|