Skip to content

Commit

Permalink
update: plusClick --> fabClick
Browse files Browse the repository at this point in the history
  • Loading branch information
Wangyaqi committed Jan 28, 2020
1 parent cb005a8 commit 69a6113
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/uni-fab/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Fab",
"desc": "悬浮按钮",
"url": "fab",
"edition": "1.0.3",
"edition": "1.0.4",
"path": "https://ext.dcloud.net.cn/plugin?id=144",
"update_log": "- 新增 仅显示加号按钮选项\n- 新增 加号按钮点击事件plusClick"
}
2 changes: 1 addition & 1 deletion src/components/uni-fab/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| @trigger | Function | 展开菜单点击事件,返回点击信息|
| @plusClick| Function | 加号按钮点击事件 |
| @fabClick | Function | 悬浮按钮点击事件 |

### 插件预览地址

Expand Down
3 changes: 2 additions & 1 deletion src/components/uni-fab/uni-fab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
* @property {Array} content 展开菜单内容配置项
* @property {Boolean} popMenu 是否使用弹出菜单
* @event {Function} trigger 展开菜单点击事件,返回点击信息
* @event {Function} fabClick 悬浮按钮点击事件
*/
export default {
name: 'UniFab',
Expand Down Expand Up @@ -172,7 +173,7 @@
},
methods: {
_onClick() {
this.$emit('plusClick')
this.$emit('fabClick')
if (!this.popMenu) {
return
}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/fab/fab.nvue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class="word-btn-white">右上角显示</text></view>
</view>
<uni-fab ref="fab" :pattern="pattern" :content="content" :horizontal="horizontal" :vertical="vertical" :direction="direction"
@trigger="trigger" @plusClick="plusClick" />
@trigger="trigger" @fabClick="fabClick" />
</view>
</template>

Expand Down Expand Up @@ -80,9 +80,9 @@
}
})
},
plusClick() {
fabClick() {
uni.showToast({
title: '点击了加号按钮',
title: '点击了悬浮按钮',
icon: 'none'
})
},
Expand Down

0 comments on commit 69a6113

Please sign in to comment.