2019-10-11 17:01:23 +08:00
|
|
|
# Event
|
|
|
|
```html
|
2020-05-19 13:56:34 +08:00
|
|
|
<n-checkbox v-model="value" @change="handleChange" label="Event" />
|
2019-10-11 17:01:23 +08:00
|
|
|
<n-checkbox-group v-model="cities" @change="handleChange">
|
2020-05-19 13:56:34 +08:00
|
|
|
<n-checkbox value="Beijing" label="Beijing" />
|
|
|
|
<n-checkbox value="Shanghai" label="Shanghai" />
|
|
|
|
<n-checkbox value="Guangzhou" label="Guangzhou" />
|
|
|
|
<n-checkbox value="Shenzen" label="Shenzhen" />
|
2019-10-11 17:01:23 +08:00
|
|
|
</n-checkbox-group>
|
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
value: false,
|
|
|
|
cities: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleChange (v) {
|
|
|
|
this.$NMessage.info(JSON.stringify(v))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```css
|
|
|
|
.n-checkbox, .n-button {
|
|
|
|
margin: 0 12px 8px 0;
|
|
|
|
}
|
|
|
|
```
|