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