vue-intercept-log
vue-intercept-log
功能
统计用户行为(点击事件)与浏览器行为(浏览器信息,控制台打印,http请求,页面跳转,数据存储,请求异常,代码报错)
按照时间顺序生成完整的操作记录存储在客户端
目的
方便针对不方便调试的、以及偶发性问题进行分析
可作为调试工具进行使用
安装
npm install vue-intercept-log
用法
- 配置
// main.js
import VueInterceptLog from 'vue-intercept-log'
...
Vue.use(VueInterceptLog,{
isDefaultRecord: true,
router: router,
routePath: '/vue-intercept-log'
})
使用
router not exit
<vue-intercept-log />
router exit
直接将当前地址栏的路由名称改为传如的routePath或'vue-intercept-log'
选项
Key | Value | 类型 | 默认值 | 描述 | 是否必传 |
---|---|---|---|---|---|
isDefaultRecord | 是否开始进行日志记录 | Boolean | false | 只有为true才开始记录 | 否 |
router | 路由实例 | Router | 无 | 用于向当前添加日志路由 | 否 |
routePath | 路由path | String | 'vue-intercept-log' | 进入页面的路由访问路径 | 否 |
Dependencies
Dependencies
@babel/core: ^7.14.6@babel/plugin-proposal-nullish-coalescing-operator: ^7.14.5@babel/plugin-proposal-optional-chaining: ^7.14.5@babel/plugin-transform-runtime: ^7.14.5@babel/preset-env: ^7.14.7@types/chai: ^4.2.11@types/mocha: ^5.2.4@vue/cli-plugin-e2e-cypress: ~4.5.0@vue/cli-plugin-typescript: ~4.5.0@vue/cli-plugin-unit-mocha: ~4.5.0@vue/cli-plugin-vuex: ~4.5.0@vue/cli-service: ~4.5.0@vue/test-utils: ^1.0.3babel-loader: ^8.2.2chai: ^4.1.2chai-http: ^4.3.0clear: ^0.1.0express: ^4.17.1express-urlrewrite: ^1.4.0html-webpack-plugin: ^4.3.0karma-chai: ^0.1.0karma-chrome-launcher: ^3.1.0karma-cli: ^2.0.0karma-coverage: ^2.0.3karma-mocha: ^2.0.1karma-requirejs: ^1.1.0karma-spec-reporter: ^0.0.32karma-webpack: ^4.0.2mocha: ^9.0.2requirejs: ^2.3.6typescript: ~4.1.5vue: ^2.6.14vue-template-compiler: ^2.6.11webpack: ^4.43.0webpack-dev-middleware: ^5.0.0