mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
487001d697
.demo.md for component demo .demo-entry.md for demo entry .md for common docs
621 B
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;
}