Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
1a97104c
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1a97104c
编写于
4月 07, 2022
作者:
inkwalk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(weixin): protocol showActionSheet, title -> alertText
上级
459c0452
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
41 addition
and
24 deletion
+41
-24
packages/uni-mp-core/src/api/protocols/index.ts
packages/uni-mp-core/src/api/protocols/index.ts
+1
-0
packages/uni-mp-core/src/api/protocols/showActionSheet.ts
packages/uni-mp-core/src/api/protocols/showActionSheet.ts
+10
-0
packages/uni-mp-core/src/index.ts
packages/uni-mp-core/src/index.ts
+1
-0
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+19
-12
packages/uni-mp-weixin/dist/uni.mp.esm.js
packages/uni-mp-weixin/dist/uni.mp.esm.js
+9
-12
packages/uni-mp-weixin/src/api/protocols.ts
packages/uni-mp-weixin/src/api/protocols.ts
+1
-0
未找到文件。
packages/uni-mp-core/src/api/protocols/index.ts
浏览文件 @
1a97104c
...
...
@@ -4,5 +4,6 @@ export { getSystemInfo } from './getSystemInfo'
export
{
getSystemInfoSync
}
from
'
./getSystemInfoSync
'
export
{
redirectTo
}
from
'
./redirectTo
'
export
{
previewImage
}
from
'
./previewImage
'
export
{
showActionSheet
}
from
'
./showActionSheet
'
export
{
navigateTo
,
initEventChannel
,
getEventChannel
}
from
'
./navigateTo
'
export
*
from
'
./types
'
packages/uni-mp-core/src/api/protocols/showActionSheet.ts
0 → 100644
浏览文件 @
1a97104c
import
{
MPProtocol
}
from
'
./types
'
export
const
showActionSheet
:
MPProtocol
=
{
args
(
fromArgs
:
UniApp
.
ShowActionSheetOptions
,
toArgs
:
WechatMiniprogram
.
ShowActionSheetOption
)
{
toArgs
.
alertText
=
fromArgs
.
title
},
}
packages/uni-mp-core/src/index.ts
浏览文件 @
1a97104c
...
...
@@ -52,6 +52,7 @@ export {
getSystemInfoSync
,
addSafeAreaInsets
,
useDeviceId
,
showActionSheet
,
}
from
'
./api/protocols
'
// types
export
{
MiniProgramAppOptions
,
MiniProgramAppInstance
}
from
'
./runtime/app
'
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
1a97104c
...
...
@@ -17,10 +17,6 @@ function invokeCreateVueAppHook(app) {
createVueAppHooks
.
forEach
((
hook
)
=>
hook
(
app
));
}
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
}
const
E
=
function
()
{
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
...
...
@@ -72,6 +68,10 @@ E.prototype = {
};
var
E$1
=
E
;
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
}
function
validateProtocolFail
(
name
,
msg
)
{
console
.
warn
(
`
${
name
}
:
${
msg
}
`
);
}
...
...
@@ -958,6 +958,12 @@ const previewImage = {
},
};
const
showActionSheet
=
{
args
(
fromArgs
,
toArgs
)
{
toArgs
.
alertText
=
fromArgs
.
title
;
},
};
const
mocks
=
[
'
__route__
'
,
'
__wxExparserNodeId__
'
,
'
__wxWebviewId__
'
];
const
getProvider
=
initGetProvider
({
...
...
@@ -988,17 +994,18 @@ function createSelectorQuery() {
}
var
shims
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
getProvider
:
getProvider
,
createSelectorQuery
:
createSelectorQuery
__proto__
:
null
,
getProvider
:
getProvider
,
createSelectorQuery
:
createSelectorQuery
});
var
protocols
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
redirectTo
:
redirectTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
__proto__
:
null
,
redirectTo
:
redirectTo
,
previewImage
:
previewImage
,
getSystemInfo
:
getSystemInfo
,
getSystemInfoSync
:
getSystemInfoSync
,
showActionSheet
:
showActionSheet
});
var
index
=
initUni
(
shims
,
protocols
);
...
...
packages/uni-mp-weixin/dist/uni.mp.esm.js
浏览文件 @
1a97104c
...
...
@@ -21,13 +21,11 @@ const ON_RESIZE = 'onResize';
const
ON_TAB_ITEM_TAP
=
'
onTabItemTap
'
;
const
ON_REACH_BOTTOM
=
'
onReachBottom
'
;
const
ON_PULL_DOWN_REFRESH
=
'
onPullDownRefresh
'
;
const
ON_ADD_TO_FAVORITES
=
'
onAddToFavorites
'
;
const
ON_ADD_TO_FAVORITES
=
'
onAddToFavorites
'
;
const
customizeRE
=
/:/g
;
function
customizeEvent
(
str
)
{
return
camelize
(
str
.
replace
(
customizeRE
,
'
-
'
));
}
function
hasLeadingSlash
(
str
)
{
return
str
.
indexOf
(
'
/
'
)
===
0
;
}
...
...
@@ -50,7 +48,7 @@ function once(fn, ctx = null) {
}
return
res
;
});
}
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -70,8 +68,7 @@ function stringifyQuery(obj, encodeStr = encode) {
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
}
const
MINI_PROGRAM_PAGE_RUNTIME_HOOKS
=
/*#__PURE__*/
(()
=>
{
return
{
onPageScroll
:
1
,
...
...
@@ -862,12 +859,12 @@ function handleLink(event) {
}
var
parseOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
});
const
createApp
=
initCreateApp
();
...
...
packages/uni-mp-weixin/src/api/protocols.ts
浏览文件 @
1a97104c
...
...
@@ -3,4 +3,5 @@ export {
previewImage
,
getSystemInfo
,
getSystemInfoSync
,
showActionSheet
,
}
from
'
@dcloudio/uni-mp-core
'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录