Skip to content

Commit baf9f6d

Browse files
committed
U
1 parent 6a29219 commit baf9f6d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

readme.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,25 @@ import 'mint-ui/lib/toast/style.css';
8888

8989
- [源码:mint_ui1v.vue] (https://github.com/bhnddowinf/vuejs2-learn/blob/master/my-project/src/vuex-demo/mint_ui1v.vue)
9090

91+
#### 补充
92+
93+
- 关于事件绑定
94+
- 在 Vue 2.0 中,为自定义组件绑定原生事件必须使用 *.native* 修饰符:
95+
96+
```js
97+
<my-component @click.native="handleClick">Click Me</my-component>
98+
```
99+
100+
- 从易用性的角度出发,我们对 *Button* 组件进行了处理,使它可以监听 *click* 事件:
101+
102+
```js
103+
<mt-button @click="handleButtonClick">Click Me</mt-button>
104+
```
105+
106+
- 但是对于其他组件,还是需要添加 *.native* 修饰符。
107+
108+
109+
- 来源: http://mint-ui.github.io/docs/#!/zh-cn2
91110

92111
### 1-2.多页应用
93112

0 commit comments

Comments
 (0)