naive-ui/demo/documentation/components/switch/zhCN/event.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +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}`)
    }
  }
}