mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
627 B
627 B
Event
<n-checkbox v-model="value" @change="handleChange" label="Event" />
<n-checkbox-group v-model="cities" @change="handleChange">
<n-checkbox value="Beijing" label="Beijing" />
<n-checkbox value="Shanghai" label="Shanghai" />
<n-checkbox value="Guangzhou" label="Guangzhou" />
<n-checkbox value="Shenzen" label="Shenzhen" />
</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;
}