naive-ui/demo/documentation/components/inputNumber/enUS/event.md
2020-01-29 16:14:59 +08:00

373 B

Event

Blur & change events are exposed.

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