From a35dfa00d0159c24187f66df344775dce428fccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=85=A7=E6=AD=A6?= Date: Mon, 15 Apr 2019 16:59:56 +0800 Subject: [PATCH] :zap:change trackEnable default value --- src/index.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/index.js b/src/index.js index ea68983..dfb6421 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ * @Author: 宋慧武 * @Date: 2019-03-06 17:49:29 * @Last Modified by: 宋慧武 - * @Last Modified time: 2019-04-15 15:49:50 + * @Last Modified time: 2019-04-15 16:55:12 */ import * as hooks from "./hooks"; @@ -14,18 +14,13 @@ export default class VTrack { // 保存当前点击的元素 static target = null; // Vue.use 将执行此方法 - static install( - Vue, - { - trackEvents, - trackAction, - trackEnable = { - UVPV: true, - TONP: true - } - } - ) { + static install(Vue, { trackEvents, trackAction, trackEnable = {} }) { const self = this; + trackEnable = { + UVPV: false, + TONP: false, + ...trackEnable + }; const TRACK_TONP = entertime => { if (trackEnable.TONP) { trackEvents.TONP({