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

fix(h5): wxs instance

上级 a73dba3a
...@@ -54,10 +54,9 @@ export default { ...@@ -54,10 +54,9 @@ export default {
Vue.prototype.$handleWxsEvent = function ($event) { Vue.prototype.$handleWxsEvent = function ($event) {
if ($event instanceof Event) { // 未处理的 event 对象 需要对 target 校正及包装 if ($event instanceof Event) { // 未处理的 event 对象 需要对 target 校正及包装
// 查找 uniTarget const currentTarget = $event.currentTarget
const target = findUniTarget($event, this.$el) const instance = currentTarget && currentTarget.__vue__ && currentTarget.__vue__.$getComponentDescriptor()
const instance = target && target.__vue__ && target.__vue__.$getComponentDescriptor() $event = processEvent.call(this, $event.type, $event, {}, findUniTarget($event, this.$el) || $event.target, $event.currentTarget)
$event = processEvent.call(this, $event.type, $event, {}, target || $event.target, $event.currentTarget)
$event.instance = instance $event.instance = instance
} }
return $event return $event
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册