naive-ui/demo/documentation/components/checkbox/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

621 B

事件

<n-checkbox v-model="value" @change="handleChange" label="事件" />
<n-checkbox-group v-model="cities"  @change="handleChange">
  <n-checkbox value="Beijing" label="北京" />
  <n-checkbox value="Shanghai" label="上海" />
  <n-checkbox value="Guangzhou" label="广州" />
  <n-checkbox value="Shenzen" label="深圳" />
</n-checkbox-group>
export default {
  data () {
    return {
      value: false,
      cities: null
    }
  },
  methods: {
    handleChange (v) {
      this.$NMessage.info(JSON.stringify(v))
    }
  }
}
.n-checkbox, .n-button {
  margin: 0 12px 8px 0;
}