mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
43 lines
758 B
Markdown
43 lines
758 B
Markdown
|
# 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 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;
|
|||
|
}
|
|||
|
```
|