提交 cc789a32 编写于 作者: fxy060608's avatar fxy060608

fix(v3): remove cyclic structures of event #1559

上级 e84118dc
...@@ -6,10 +6,11 @@ import { ...@@ -6,10 +6,11 @@ import {
* mpvue event * mpvue event
*/ */
export function wrapperMPEvent (event) { export function wrapperMPEvent (event) {
return Object.assign({ event.mp = Object.assign({
mp: event, '@warning': 'mp is deprecated'
_processed: true
}, event) }, event)
event._processed = true
return event
} }
/** /**
* app-plus titleNView * app-plus titleNView
...@@ -48,4 +49,4 @@ export function mergeTitleNView (navigationBar, titleNView) { ...@@ -48,4 +49,4 @@ export function mergeTitleNView (navigationBar, titleNView) {
} }
} }
return navigationBar return navigationBar
} }
...@@ -3,6 +3,10 @@ import { ...@@ -3,6 +3,10 @@ import {
noop noop
} from 'uni-shared' } from 'uni-shared'
import {
wrapperMPEvent
} from 'uni-helpers/patch'
import { import {
VD_SYNC, VD_SYNC,
UI_EVENT, UI_EVENT,
...@@ -55,10 +59,7 @@ function wrapperEvent (event) { ...@@ -55,10 +59,7 @@ function wrapperEvent (event) {
parseTargets(event) parseTargets(event)
event.preventDefault = noop event.preventDefault = noop
event.stopPropagation = noop event.stopPropagation = noop
event.mp = event return wrapperMPEvent(event)
return Object.assign({
mp: event // mpvue
}, event)
} }
const handleVdData = { const handleVdData = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册