|
@@ -12,6 +12,7 @@ export default class ClickPlugin extends TrackPlugins {
|
|
|
|
|
|
if (checkHasJquery()) {
|
|
|
const clickFn = throttle(function (e) {
|
|
|
+ const eventPath = e.composedPath ? e.composedPath() : e.path
|
|
|
const jqEvent = checkJqueryEventBind.call(this, e, 0)
|
|
|
let eInfo = {}
|
|
|
let eTarget = jqEvent.target
|
|
@@ -20,7 +21,7 @@ export default class ClickPlugin extends TrackPlugins {
|
|
|
eTarget = vueEvent.target
|
|
|
}
|
|
|
if (eTarget) {
|
|
|
- eInfo = getElementInfo(e, eTarget.get(0))
|
|
|
+ eInfo = getElementInfo(e, eventPath[0])
|
|
|
}
|
|
|
_global.$subscribe.$emit(pluginName, {
|
|
|
type: 'CLICK',
|
|
@@ -31,7 +32,7 @@ export default class ClickPlugin extends TrackPlugins {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- $('body').on('click', '*', clickFn)
|
|
|
+ document.body.addEventListener('click', clickFn, false)
|
|
|
} else {
|
|
|
// _global.logger.debug('未检测到Jq')
|
|
|
window.onload = () => {
|