naive-ui/demo/documentation/components/switch/enUS/event.md

21 lines
263 B
Markdown
Raw Normal View History

2019-09-29 19:07:16 +08:00
# Event
```html
<n-switch
v-model="active"
@change="handleChange"
/>
```
```js
export default {
data () {
return {
active: false
}
},
methods: {
handleChange (value) {
this.$NMessage.info(`Change Event: ${value}`)
}
}
}
```