更新记录
1.0.0(2023-05-26) 下载此版本
底部菜单
平台兼容性
popup-menu 底部弹出菜单
组件名:h-popup-menu 代码块:
<h-popup-menu></h-popup-menu>
关联组件:uni-popup
。
属性说明
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
maskCloseAble | 是否允许通过点击遮罩关闭Picker | Boolean | false |
zIndex | 弹出的z-index值 | Number | 9999 |
list | 需要显示的菜单内容(格式如下) | Array | [] |
@close | 菜单关闭回调 | Handler | 无 |
list说明
参数 | 说明 | 类型 |
---|---|---|
lable | 菜单文本 | String |
icon | 菜单icon地址 | String |
url | 跳转地址 | String |
示例
<template>
<view>
<h-popup-menu ref="popupMenu" @close="close" :list="list"></h-popup-menu>
</view>
</template>
<script>
export default {
data() {
return {
list:[{
lable: '开销售单',
icon: '/static/images/kxsd.png',
url: '/pages/workbench/drawBillv2/drawBill_sale'
},
{
lable: '开服务单',
icon: '/static/images/kfwd.png',
url: '/pages/workbench/reserve/reserve'
}, {
lable: '快速收银',
icon: '/static/images/kssk.png',
url: '/pages/workbench/cashier/index'
},
{
lable: '发帖子',
icon: '/static/images/ftz.png',
url: '/pagesA/publish_posts/publish_posts'
}
]
}
},
onReady() {
//打开菜单
this.$refs.popupMenu.open()
},
methods: {
close(){
console.log('菜单被关闭了')
}
}
}
</script>