diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 03aaa60306977d33222f251cc83b42de6907c917..ece486e09de2b3a70074a502c5a1c705f44c742b 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -579,6 +579,14 @@ var getSystemInfo = { } }; +var showActionSheet = { + args (fromArgs) { + if (typeof fromArgs === 'object') { + fromArgs.alertText = fromArgs.title; + } + } +}; + // import navigateTo from 'uni-helpers/navigate-to' const protocols = { @@ -586,7 +594,8 @@ const protocols = { // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP previewImage, getSystemInfo, - getSystemInfoSync: getSystemInfo + getSystemInfoSync: getSystemInfo, + showActionSheet }; const todos = [ 'vibrate', diff --git a/src/platforms/mp-weixin/helpers/show-action-sheet.js b/src/platforms/mp-weixin/helpers/show-action-sheet.js new file mode 100644 index 0000000000000000000000000000000000000000..a5119c27ac9c58072b72ad5a1e8ee3d240a945f2 --- /dev/null +++ b/src/platforms/mp-weixin/helpers/show-action-sheet.js @@ -0,0 +1,7 @@ +export default { + args (fromArgs) { + if (typeof fromArgs === 'object') { + fromArgs.alertText = fromArgs.title + } + } +} diff --git a/src/platforms/mp-weixin/runtime/api/protocols.js b/src/platforms/mp-weixin/runtime/api/protocols.js index 247d57bc9b0db47da6774453ef763217264e65ed..b9de8c7227368440c3079d992b0699959d106979 100644 --- a/src/platforms/mp-weixin/runtime/api/protocols.js +++ b/src/platforms/mp-weixin/runtime/api/protocols.js @@ -2,13 +2,15 @@ import redirectTo from '../../helpers/redirect-to' import previewImage from '../../helpers/normalize-preview-image' import getSystemInfo from '../../helpers/system-info' +import showActionSheet from '../../helpers/show-action-sheet' export const protocols = { redirectTo, // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP previewImage, getSystemInfo, - getSystemInfoSync: getSystemInfo + getSystemInfoSync: getSystemInfo, + showActionSheet } export const todos = [ 'vibrate',