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