naive-ui/demo/documentation/components/switch/zhCN/event.md
2020-02-04 17:12:12 +08:00

264 B

事件

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