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

fix(h5): events

上级 1bc3f8dd
......@@ -3013,7 +3013,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
// pass undefined as the old value when it's changed for the first time
oldValue === INITIAL_WATCHER_VALUE
? undefined
: (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
: isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
? []
: oldValue,
onCleanup
......@@ -9590,7 +9590,11 @@ function patchStopImmediatePropagation(e, value) {
originalStop.call(e);
e._stopped = true;
};
return value.map(fn => (e) => !e._stopped && fn && fn(e));
return value.map(fn => {
const patchedFn = (e) => !e._stopped && fn && fn(e);
patchedFn.__wwe = fn.__wwe;
return patchedFn;
});
}
else {
return value;
......
......@@ -3033,7 +3033,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
// pass undefined as the old value when it's changed for the first time
oldValue === INITIAL_WATCHER_VALUE
? undefined
: (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
: isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
? []
: oldValue,
onCleanup
......@@ -9690,7 +9690,11 @@ function patchStopImmediatePropagation(e, value) {
originalStop.call(e);
e._stopped = true;
};
return value.map(fn => (e) => !e._stopped && fn && fn(e));
return value.map(fn => {
const patchedFn = (e) => !e._stopped && fn && fn(e);
patchedFn.__wwe = fn.__wwe;
return patchedFn;
});
}
else {
return value;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册