mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-30 12:52:43 +08:00
750 B
750 B
输入成对值
<n-input
pair
separator="-"
v-model:value="value"
:placeholder="placeholder"
clearable
@blur="handleInputBlur"
@focus="handleInputFocus"
@change="handleInputChange"
@update:value="handleInputInput"
/>
export default {
inject: ['message'],
data () {
return {
placeholder: ['从', '到'],
value: ['0', '100']
}
},
methods: {
handleInputBlur () {
this.message.info('输入成对值:Blur')
},
handleInputFocus () {
this.message.info('输入成对值:Focus')
},
handleInputInput () {
this.message.info('输入成对值:Input')
},
handleInputChange () {
this.message.info('输入成对值:Change')
}
}
}