Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
1fc563c1
U
uni-app
项目概览
DCloud
/
uni-app
28 天 前同步成功
通知
702
Star
38704
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1fc563c1
编写于
8月 24, 2022
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
105993af
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
82 addition
and
37 deletion
+82
-37
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+2
-1
packages/uni-app-plus/dist/view.css
packages/uni-app-plus/dist/view.css
+1
-1
packages/uni-h5/dist/index.umd.min.js
packages/uni-h5/dist/index.umd.min.js
+1
-1
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+2
-1
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+2
-1
packages/uni-mp-jd/dist/index.js
packages/uni-mp-jd/dist/index.js
+2
-1
packages/uni-mp-kuaishou/dist/index.js
packages/uni-mp-kuaishou/dist/index.js
+2
-1
packages/uni-mp-lark/dist/index.js
packages/uni-mp-lark/dist/index.js
+2
-1
packages/uni-mp-qq/dist/index.js
packages/uni-mp-qq/dist/index.js
+2
-1
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+60
-25
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+2
-1
packages/uni-mp-xhs/dist/index.js
packages/uni-mp-xhs/dist/index.js
+2
-1
packages/uni-quickapp-webview/dist/index.js
packages/uni-quickapp-webview/dist/index.js
+2
-1
未找到文件。
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
1fc563c1
...
...
@@ -21444,11 +21444,12 @@ var serviceContext = (function () {
const hasSuccess = isFn(success);
const hasFail = isFn(fail);
const hasComplete = isFn(complete);
Promise.resolve().then(() => {
if (typeof enabled === 'undefined') {
enabled = false;
cid = '';
cidErrMsg = 'uni
p
ush is not enabled';
cidErrMsg = 'uni
P
ush is not enabled';
}
getPushCidCallbacks.push((cid, errMsg) => {
let res;
...
...
packages/uni-app-plus/dist/view.css
浏览文件 @
1fc563c1
此差异已折叠。
点击以展开。
packages/uni-h5/dist/index.umd.min.js
浏览文件 @
1fc563c1
此差异已折叠。
点击以展开。
packages/uni-mp-alipay/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1776,11 +1776,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-mp-baidu/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1424,11 +1424,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-mp-jd/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1061,11 +1061,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-mp-kuaishou/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1229,11 +1229,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-mp-lark/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1279,11 +1279,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-mp-qq/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1389,11 +1389,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1481,11 +1481,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
@@ -2422,6 +2423,7 @@ function initRefs (vm) {
}
const
instances
=
Object
.
create
(
null
);
const
components
=
Object
.
create
(
null
);
function
initRelation
({
vuePid
,
...
...
@@ -2641,17 +2643,26 @@ function parseBaseComponent (vueComponentOptions, {
return
[
componentOptions
,
VueComponent
]
}
const
components
=
[];
function
currentComponents
(
mpInstance
,
callback
)
{
const
webviewId
=
mpInstance
.
__webviewId__
;
const
currentComponents
=
components
[
webviewId
];
if
(
currentComponents
)
{
callback
(
currentComponents
);
}
}
function
parseComponent
(
vueOptions
)
{
const
[
componentOptions
,
VueComponent
]
=
parseBaseComponent
(
vueOptions
);
const
lifetimes
=
componentOptions
.
lifetimes
;
// 基础库 2.0 以上 attached 顺序错乱,按照 created 顺序强制纠正
componentOptions
.
lifetimes
.
created
=
function
created
()
{
components
.
push
(
this
);
lifetimes
.
created
=
function
created
()
{
currentComponents
(
this
,
components
=>
{
components
.
push
(
this
);
});
};
componentOptions
.
lifetimes
.
attached
=
function
attached
()
{
lifetimes
.
attached
=
function
attached
()
{
this
.
__lifetimes_attached
=
function
()
{
const
properties
=
this
.
properties
;
...
...
@@ -2678,17 +2689,28 @@ function parseComponent (vueOptions) {
// 触发首次 setData
this
.
$vm
.
$mount
();
};
let
component
=
this
;
while
(
component
&&
component
.
__lifetimes_attached
&&
components
[
0
]
&&
component
===
components
[
0
])
{
components
.
shift
();
component
.
__lifetimes_attached
();
delete
component
.
__lifetimes_attached
;
component
=
components
[
0
];
}
currentComponents
(
this
,
components
=>
{
let
component
=
this
;
while
(
component
&&
component
.
__lifetimes_attached
&&
components
[
0
]
&&
component
===
components
[
0
])
{
components
.
shift
();
component
.
__lifetimes_attached
();
delete
component
.
__lifetimes_attached
;
component
=
components
[
0
];
}
});
};
lifetimes
.
detached
=
function
detached
()
{
currentComponents
(
this
,
components
=>
{
const
index
=
components
.
indexOf
(
this
);
if
(
index
>=
0
)
{
components
.
splice
(
index
,
1
);
}
});
};
// ready 比 handleLink 还早,初始化逻辑放到 handleLink 中
delete
componentOptions
.
lifetimes
.
ready
;
delete
lifetimes
.
ready
;
componentOptions
.
methods
.
__l
=
handleLink$1
;
...
...
@@ -2731,8 +2753,17 @@ function parsePage (vuePageOptions) {
isPage
,
initRelation
});
const
lifetimes
=
pageOptions
.
lifetimes
;
const
oldCreated
=
lifetimes
.
created
;
lifetimes
.
created
=
function
created
()
{
const
webviewId
=
this
.
__webviewId__
;
components
[
webviewId
]
=
[];
if
(
typeof
oldCreated
===
'
function
'
)
{
oldCreated
.
call
(
this
);
}
};
// 页面需要在 ready 中触发,其他组件是在 handleLink 中触发
pageOptions
.
lifetimes
.
ready
=
function
ready
()
{
lifetimes
.
ready
=
function
ready
()
{
if
(
this
.
$vm
&&
this
.
$vm
.
mpType
===
'
page
'
)
{
this
.
$vm
.
__call_hook
(
'
created
'
);
this
.
$vm
.
__call_hook
(
'
beforeMount
'
);
...
...
@@ -2742,17 +2773,21 @@ function parsePage (vuePageOptions) {
}
else
{
this
.
is
&&
console
.
warn
(
this
.
is
+
'
is not ready
'
);
}
};
pageOptions
.
lifetimes
.
detached
=
function
detached
()
{
this
.
$vm
&&
this
.
$vm
.
$destroy
();
// 清理
const
webviewId
=
this
.
__webviewId__
;
webviewId
&&
Object
.
keys
(
instances
).
forEach
(
key
=>
{
if
(
key
.
indexOf
(
webviewId
+
'
_
'
)
===
0
)
{
delete
instances
[
key
];
}
});
};
const
oldDetached
=
lifetimes
.
detached
;
lifetimes
.
detached
=
function
detached
()
{
if
(
typeof
oldDetached
===
'
function
'
)
{
oldDetached
.
call
(
this
);
}
this
.
$vm
&&
this
.
$vm
.
$destroy
();
// 清理
const
webviewId
=
this
.
__webviewId__
;
webviewId
&&
Object
.
keys
(
instances
).
forEach
(
key
=>
{
if
(
key
.
indexOf
(
webviewId
+
'
_
'
)
===
0
)
{
delete
instances
[
key
];
}
});
delete
components
[
webviewId
];
};
return
pageOptions
...
...
packages/uni-mp-weixin/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1212,11 +1212,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-mp-xhs/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1059,11 +1059,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
packages/uni-quickapp-webview/dist/index.js
浏览文件 @
1fc563c1
...
...
@@ -1230,11 +1230,12 @@ function getPushClientId (args) {
const
hasSuccess
=
isFn
(
success
);
const
hasFail
=
isFn
(
fail
);
const
hasComplete
=
isFn
(
complete
);
Promise
.
resolve
().
then
(()
=>
{
if
(
typeof
enabled
===
'
undefined
'
)
{
enabled
=
false
;
cid
=
''
;
cidErrMsg
=
'
uni
p
ush is not enabled
'
;
cidErrMsg
=
'
uni
P
ush is not enabled
'
;
}
getPushCidCallbacks
.
push
((
cid
,
errMsg
)
=>
{
let
res
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录