naive-ui/demo/documentation/components/button/zhCN/events.md

22 lines
253 B
Markdown
Raw Normal View History

2019-09-21 17:03:05 +08:00
# 事件
处理按钮的事件。
2019-09-20 00:27:06 +08:00
```html
<n-button @click="handleClick">
2020-02-03 20:45:06 +08:00
点它
2019-09-20 00:27:06 +08:00
</n-button>
```
```js
export default {
data () {
return {
}
},
methods: {
handleClick () {
this.$NMessage.info('Button Clicked')
}
}
}
```