naive-ui/demo/documentation/components/inputNumber/enUS/event.md
2019-10-30 18:10:11 +08:00

26 lines
356 B
Markdown

# Event
```html
<n-input-number
v-model="value"
@change="handleChange"
@blur="handleBlur"
/>
```
```js
export default {
data () {
return {
value: 0
}
},
methods: {
handleChange (newValue) {
this.$NMessage.info(`value: ${newValue}`)
},
handleBlur (e, v) {
this.$NMessage.info(`blur: ` + v)
},
}
}
```