Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Commit 3609d01

Browse files
committed
fix(AtFab): 修复 AtFab 点击事件
1 parent 91bb7ca commit 3609d01

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/components/fab/index.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ export default {
1212
type: [Object, String],
1313
default: '',
1414
},
15-
handleClick: {
15+
onClick: {
1616
type: Function,
1717
default: () => () => {},
1818
},
1919
},
2020
methods: {
2121
handleTab(event) {
22-
this.handleClick && this.handleClick(event)
22+
this.onClick && this.onClick(event)
2323
},
2424
},
2525
render() {
@@ -28,7 +28,7 @@ export default {
2828
[`at-fab--${size}`]: size,
2929
})
3030
return (
31-
<view class={rootClass} onTab={this.handleTab}>
31+
<view class={rootClass} onTap={this.handleTab}>
3232
{this.$slots.default}
3333
</view>
3434
)

src/pages/demo/index.vue

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<text />
44
<view />
55
<input type="text">
6+
<AtFab :on-click="clickFab">
7+
fab
8+
</AtFab>
69
<AtBadge dot>
710
<AtButton loading>
811
按钮文字
@@ -110,6 +113,9 @@ export default {
110113
},
111114
clickAccordion() {
112115
this.open = !this.open
116+
},
117+
clickFab(e) {
118+
console.log('clickFab', e)
113119
}
114120
}
115121
}

0 commit comments

Comments
 (0)