From c343faccd57a96831aa3c6f18aa889c4dab9382a Mon Sep 17 00:00:00 2001 From: qiang Date: Wed, 18 Mar 2020 15:37:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20app-v3=20uni.showActionSheet=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20popover=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/helpers/protocol/ui/popup.js | 5 ++++- src/platforms/app-plus/service/api/ui/popup.js | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/helpers/protocol/ui/popup.js b/src/core/helpers/protocol/ui/popup.js index c2b5ae689..b1ad96df3 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 d1dd31851..7d70b1c9f 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 ({ }) } }) -} +} -- GitLab