diff --git a/src/core/helpers/protocol/ui/popup.js b/src/core/helpers/protocol/ui/popup.js index c2b5ae6890f3fed816ac68448fecf0690c23a2a1..b1ad96df3eb6c07733e746b01a9ef2e6b5e58ef1 100644 --- a/src/core/helpers/protocol/ui/popup.js +++ b/src/core/helpers/protocol/ui/popup.js @@ -110,5 +110,8 @@ export const showActionSheet = { visible: { type: Boolean, default: true + }, + popover: { + type: Object } -} +} diff --git a/src/platforms/app-plus/service/api/ui/popup.js b/src/platforms/app-plus/service/api/ui/popup.js index d1dd31851173ddfabc2553b73a60a356bcb64f61..7d70b1c9fead49919644ae3d59e7378e83d8efc2 100644 --- a/src/platforms/app-plus/service/api/ui/popup.js +++ b/src/platforms/app-plus/service/api/ui/popup.js @@ -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 ({ }) } }) -} +}