naive-ui/demo/documentation/components/button/zhCN/events.demo.md
2020-10-07 03:33:37 +08:00

19 lines
238 B
Markdown

# 事件
处理按钮的事件。
```html
<n-button @click="handleClick">
点它
</n-button>
```
```js
export default {
inject: ['message'],
methods: {
handleClick () {
this.message.info('Button Clicked')
}
}
}
```