naive-ui/demo/documentation/components/inputNumber/enUS/event.md

26 lines
356 B
Markdown
Raw Normal View History

2019-10-22 14:27:25 +08:00
# Event
```html
<n-input-number
v-model="value"
@change="handleChange"
2019-10-30 18:10:11 +08:00
@blur="handleBlur"
2019-10-22 14:27:25 +08:00
/>
```
```js
export default {
data () {
return {
value: 0
}
},
methods: {
handleChange (newValue) {
this.$NMessage.info(`value: ${newValue}`)
2019-10-30 18:10:11 +08:00
},
handleBlur (e, v) {
this.$NMessage.info(`blur: ` + v)
},
2019-10-22 14:27:25 +08:00
}
}
```