Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦里逆天
uni-app
提交
0249de45
U
uni-app
项目概览
梦里逆天
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
22
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0249de45
编写于
5月 18, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mp): mp-alipay map 事件转换
上级
f5dae4e6
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
41 addition
and
23 deletion
+41
-23
src/platforms/mp-alipay/runtime/wrapper/component-parser.js
src/platforms/mp-alipay/runtime/wrapper/component-parser.js
+11
-11
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
+7
-8
src/platforms/mp-alipay/runtime/wrapper/util.js
src/platforms/mp-alipay/runtime/wrapper/util.js
+23
-4
未找到文件。
src/platforms/mp-alipay/runtime/wrapper/component-parser.js
浏览文件 @
0249de45
...
@@ -17,7 +17,8 @@ import {
...
@@ -17,7 +17,8 @@ import {
triggerEvent
,
triggerEvent
,
createObserver
,
createObserver
,
isComponent2
,
isComponent2
,
initChildVues
initChildVues
,
initSpecialEvents
}
from
'
./util
'
}
from
'
./util
'
function
initVm
(
VueComponent
)
{
function
initVm
(
VueComponent
)
{
...
@@ -118,8 +119,7 @@ export default function parseComponent (vueComponentOptions) {
...
@@ -118,8 +119,7 @@ export default function parseComponent (vueComponentOptions) {
componentOptions
.
didUpdate
=
createObserver
(
true
)
componentOptions
.
didUpdate
=
createObserver
(
true
)
}
}
if
(
vueOptions
.
methods
&&
vueOptions
.
methods
.
formReset
)
{
initSpecialEvents
(
componentOptions
.
methods
,
vueOptions
.
methods
)
componentOptions
.
methods
.
formReset
=
vueOptions
.
methods
.
formReset
}
return
componentOptions
return
componentOptions
}
}
src/platforms/mp-alipay/runtime/wrapper/page-parser.js
浏览文件 @
0249de45
...
@@ -13,7 +13,8 @@ import {
...
@@ -13,7 +13,8 @@ import {
handleRef
,
handleRef
,
handleLink
,
handleLink
,
initBehavior
,
initBehavior
,
initChildVues
initChildVues
,
initSpecialEvents
}
from
'
./util
'
}
from
'
./util
'
const
hooks
=
[
const
hooks
=
[
...
@@ -69,9 +70,7 @@ export default function parsePage (vuePageOptions) {
...
@@ -69,9 +70,7 @@ export default function parsePage (vuePageOptions) {
initHooks
(
pageOptions
,
hooks
)
initHooks
(
pageOptions
,
hooks
)
if
(
vueOptions
.
methods
&&
vueOptions
.
methods
.
formReset
)
{
initSpecialEvents
(
pageOptions
.
methods
,
vueOptions
.
methods
)
pageOptions
.
formReset
=
vueOptions
.
methods
.
formReset
}
return
pageOptions
return
pageOptions
}
}
src/platforms/mp-alipay/runtime/wrapper/util.js
浏览文件 @
0249de45
...
@@ -42,6 +42,25 @@ export function initRelation (detail) {
...
@@ -42,6 +42,25 @@ export function initRelation (detail) {
this
.
props
.
onVueInit
(
detail
)
this
.
props
.
onVueInit
(
detail
)
}
}
const
SPECIAL_EVENTS
=
[
'
formReset
'
,
'
markerTap
'
,
'
calloutTap
'
,
'
controlTap
'
,
'
regionChange
'
]
export
function
initSpecialEvents
(
mpMethods
,
vueMethods
)
{
if
(
!
vueMethods
)
{
return
}
SPECIAL_EVENTS
.
forEach
((
name
)
=>
{
if
(
vueMethods
[
name
])
{
mpMethods
[
name
]
=
vueMethods
[
name
]
}
})
}
export
function
initChildVues
(
mpInstance
)
{
export
function
initChildVues
(
mpInstance
)
{
// 此时需保证当前 mpInstance 已经存在 $vm
// 此时需保证当前 mpInstance 已经存在 $vm
if
(
!
mpInstance
.
$vm
)
{
if
(
!
mpInstance
.
$vm
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录