Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
86e5187c
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
718
Star
38705
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,发现更多精彩内容 >>
You need to sign in or sign up before continuing.
提交
86e5187c
编写于
5月 18, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build uni mp-alipay
上级
0249de45
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
48 addition
and
32 deletion
+48
-32
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+41
-25
packages/uni-mp-alipay/package.json
packages/uni-mp-alipay/package.json
+1
-1
src/core/runtime/index.js
src/core/runtime/index.js
+4
-4
src/core/runtime/wrapper/create-component.js
src/core/runtime/wrapper/create-component.js
+1
-1
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
+1
-1
未找到文件。
packages/uni-mp-alipay/dist/index.js
浏览文件 @
86e5187c
...
@@ -1283,6 +1283,25 @@ function initRelation$1 (detail) {
...
@@ -1283,6 +1283,25 @@ function initRelation$1 (detail) {
this
.
props
.
onVueInit
(
detail
);
this
.
props
.
onVueInit
(
detail
);
}
}
const
SPECIAL_EVENTS
=
[
'
formReset
'
,
'
markerTap
'
,
'
calloutTap
'
,
'
controlTap
'
,
'
regionChange
'
];
function
initSpecialEvents
(
mpMethods
,
vueMethods
)
{
if
(
!
vueMethods
)
{
return
}
SPECIAL_EVENTS
.
forEach
((
name
)
=>
{
if
(
vueMethods
[
name
])
{
mpMethods
[
name
]
=
vueMethods
[
name
];
}
});
}
function
initChildVues
(
mpInstance
)
{
function
initChildVues
(
mpInstance
)
{
// 此时需保证当前 mpInstance 已经存在 $vm
// 此时需保证当前 mpInstance 已经存在 $vm
if
(
!
mpInstance
.
$vm
)
{
if
(
!
mpInstance
.
$vm
)
{
...
@@ -1293,7 +1312,7 @@ function initChildVues (mpInstance) {
...
@@ -1293,7 +1312,7 @@ function initChildVues (mpInstance) {
vueOptions
,
vueOptions
,
VueComponent
,
VueComponent
,
mpInstance
:
childMPInstance
mpInstance
:
childMPInstance
})
=>
{
})
=>
{
// 父子关系
// 父子关系
handleLink
.
call
(
mpInstance
,
{
handleLink
.
call
(
mpInstance
,
{
detail
:
{
detail
:
{
...
@@ -1306,9 +1325,9 @@ function initChildVues (mpInstance) {
...
@@ -1306,9 +1325,9 @@ function initChildVues (mpInstance) {
handleRef
.
call
(
vueOptions
.
parent
.
$scope
,
childMPInstance
);
handleRef
.
call
(
vueOptions
.
parent
.
$scope
,
childMPInstance
);
childMPInstance
.
$vm
.
$mount
();
childMPInstance
.
$vm
.
$mount
();
initChildVues
(
childMPInstance
);
initChildVues
(
childMPInstance
);
childMPInstance
.
$vm
.
_isMounted
=
true
;
childMPInstance
.
$vm
.
_isMounted
=
true
;
childMPInstance
.
$vm
.
__call_hook
(
'
mounted
'
);
childMPInstance
.
$vm
.
__call_hook
(
'
mounted
'
);
...
@@ -1462,7 +1481,7 @@ function parsePage (vuePageOptions) {
...
@@ -1462,7 +1481,7 @@ function parsePage (vuePageOptions) {
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
args
);
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
args
);
},
},
onReady
()
{
onReady
()
{
initChildVues
(
this
);
initChildVues
(
this
);
this
.
$vm
.
_isMounted
=
true
;
this
.
$vm
.
_isMounted
=
true
;
this
.
$vm
.
__call_hook
(
'
mounted
'
);
this
.
$vm
.
__call_hook
(
'
mounted
'
);
this
.
$vm
.
__call_hook
(
'
onReady
'
);
this
.
$vm
.
__call_hook
(
'
onReady
'
);
...
@@ -1476,11 +1495,9 @@ function parsePage (vuePageOptions) {
...
@@ -1476,11 +1495,9 @@ function parsePage (vuePageOptions) {
__l
:
handleLink$1
__l
:
handleLink$1
};
};
initHooks
(
pageOptions
,
hooks$1
);
initHooks
(
pageOptions
,
hooks$1
);
if
(
vueOptions
.
methods
&&
vueOptions
.
methods
.
formReset
)
{
initSpecialEvents
(
pageOptions
,
vueOptions
.
methods
);
pageOptions
.
formReset
=
vueOptions
.
methods
.
formReset
;
}
return
pageOptions
return
pageOptions
}
}
...
@@ -1517,23 +1534,23 @@ function initVm (VueComponent) {
...
@@ -1517,23 +1534,23 @@ function initVm (VueComponent) {
// 触发首次 setData
// 触发首次 setData
this
.
$vm
.
$mount
();
this
.
$vm
.
$mount
();
}
else
{
}
else
{
// 处理父子关系
// 处理父子关系
initRelation$1
.
call
(
this
,
{
initRelation$1
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
,
vueOptions
:
options
,
VueComponent
,
VueComponent
,
mpInstance
:
this
mpInstance
:
this
});
});
if
(
options
.
parent
)
{
// 父组件已经初始化,直接初始化子,否则放到父组件的 didMount 中处理
if
(
options
.
parent
)
{
// 父组件已经初始化,直接初始化子,否则放到父组件的 didMount 中处理
// 初始化 vue 实例
// 初始化 vue 实例
this
.
$vm
=
new
VueComponent
(
options
);
this
.
$vm
=
new
VueComponent
(
options
);
handleRef
.
call
(
options
.
parent
.
$scope
,
this
);
handleRef
.
call
(
options
.
parent
.
$scope
,
this
);
// 触发首次 setData
// 触发首次 setData
this
.
$vm
.
$mount
();
this
.
$vm
.
$mount
();
initChildVues
(
this
);
initChildVues
(
this
);
this
.
$vm
.
_isMounted
=
true
;
this
.
$vm
.
_isMounted
=
true
;
this
.
$vm
.
__call_hook
(
'
mounted
'
);
this
.
$vm
.
__call_hook
(
'
mounted
'
);
...
@@ -1589,15 +1606,14 @@ function parseComponent (vueComponentOptions) {
...
@@ -1589,15 +1606,14 @@ function parseComponent (vueComponentOptions) {
componentOptions
.
didUpdate
=
createObserver$1
(
true
);
componentOptions
.
didUpdate
=
createObserver$1
(
true
);
}
}
if
(
vueOptions
.
methods
&&
vueOptions
.
methods
.
formReset
)
{
initSpecialEvents
(
componentOptions
.
methods
,
vueOptions
.
methods
);
componentOptions
.
methods
.
formReset
=
vueOptions
.
methods
.
formReset
;
}
return
componentOptions
return
componentOptions
}
}
function
createComponent
(
vueOptions
)
{
function
createComponent
(
vueOptions
)
{
{
{
return
my
.
creat
eComponent
(
parseComponent
(
vueOptions
))
return
my
.
defin
eComponent
(
parseComponent
(
vueOptions
))
}
}
}
}
...
@@ -1660,10 +1676,10 @@ if (typeof Proxy !== 'undefined') {
...
@@ -1660,10 +1676,10 @@ if (typeof Proxy !== 'undefined') {
}
}
});
});
}
}
my
.
createApp
=
createApp
;
my
.
createApp
=
createApp
;
my
.
createPage
=
createPage
;
my
.
createPage
=
createPage
;
my
.
createComponent
=
createComponent
;
my
.
createComponent
=
createComponent
;
var
uni$1
=
uni
;
var
uni$1
=
uni
;
...
...
packages/uni-mp-alipay/package.json
浏览文件 @
86e5187c
{
{
"name"
:
"@dcloudio/uni-mp-alipay"
,
"name"
:
"@dcloudio/uni-mp-alipay"
,
"version"
:
"0.0.80
6
"
,
"version"
:
"0.0.80
7
"
,
"description"
:
"uni-app mp-alipay"
,
"description"
:
"uni-app mp-alipay"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
src/core/runtime/index.js
浏览文件 @
86e5187c
...
@@ -87,10 +87,10 @@ if (typeof Proxy !== 'undefined') {
...
@@ -87,10 +87,10 @@ if (typeof Proxy !== 'undefined') {
}
}
})
})
}
}
__GLOBAL__
.
createApp
=
createApp
__GLOBAL__
.
createApp
=
createApp
__GLOBAL__
.
createPage
=
createPage
__GLOBAL__
.
createPage
=
createPage
__GLOBAL__
.
createComponent
=
createComponent
__GLOBAL__
.
createComponent
=
createComponent
export
{
export
{
createApp
,
createApp
,
...
...
src/core/runtime/wrapper/create-component.js
浏览文件 @
86e5187c
...
@@ -2,7 +2,7 @@ import parseComponent from 'uni-platform/runtime/wrapper/component-parser'
...
@@ -2,7 +2,7 @@ import parseComponent from 'uni-platform/runtime/wrapper/component-parser'
export
default
function
createComponent
(
vueOptions
)
{
export
default
function
createComponent
(
vueOptions
)
{
if
(
__PLATFORM__
===
'
mp-alipay
'
)
{
if
(
__PLATFORM__
===
'
mp-alipay
'
)
{
return
my
.
creat
eComponent
(
parseComponent
(
vueOptions
))
return
my
.
defin
eComponent
(
parseComponent
(
vueOptions
))
}
else
{
}
else
{
return
Component
(
parseComponent
(
vueOptions
))
return
Component
(
parseComponent
(
vueOptions
))
}
}
...
...
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
浏览文件 @
86e5187c
...
@@ -70,7 +70,7 @@ export default function parsePage (vuePageOptions) {
...
@@ -70,7 +70,7 @@ export default function parsePage (vuePageOptions) {
initHooks
(
pageOptions
,
hooks
)
initHooks
(
pageOptions
,
hooks
)
initSpecialEvents
(
pageOptions
.
methods
,
vueOptions
.
methods
)
initSpecialEvents
(
pageOptions
,
vueOptions
.
methods
)
return
pageOptions
return
pageOptions
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录