提交 c343facc 编写于 作者: Q qiang

feat: app-v3 uni.showActionSheet 支持 popover 配置

上级 a849158f
......@@ -110,5 +110,8 @@ export const showActionSheet = {
visible: {
type: Boolean,
default: true
},
popover: {
type: Object
}
}
}
......@@ -154,11 +154,12 @@ export function showModal ({
export function showActionSheet ({
itemList = [],
itemColor = '#000000',
title = ''
title = '',
popover
}, callbackId) {
const options = {
buttons: itemList.map(item => ({
title: item,
title: item,
color: itemColor
}))
}
......@@ -170,7 +171,7 @@ export function showActionSheet ({
options.cancel = '取消'
}
plus.nativeUI.actionSheet(options, (e) => {
plus.nativeUI.actionSheet(Object.assign(options, { popover }), (e) => {
if (e.index > 0) {
invoke(callbackId, {
errMsg: 'showActionSheet:ok',
......@@ -182,4 +183,4 @@ export function showActionSheet ({
})
}
})
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册