naive-ui/demo/documentation/components/switch/enUS/event.md
2019-09-29 19:07:16 +08:00

263 B

Event

<n-switch
  v-model="active"
  @change="handleChange"
/>
export default {
  data () {
    return {
      active: false
    }
  },
  methods: {
    handleChange (value) {
      this.$NMessage.info(`Change Event: ${value}`)
    }
  }
}