@youngbeen/angle-ctrl
Advanced tools
+4
-0
@@ -17,2 +17,6 @@ 'use strict'; | ||
| tagTime = tagTime.getTime(); | ||
| window.addEventListener('error', function (e) { | ||
| undefined.saveLog(e.message, 'error', e.lineno.toString(), '', '', e.error.stack); | ||
| undefined.sendLog(); | ||
| }, true); | ||
| exports.default = { | ||
@@ -19,0 +23,0 @@ saveLog: function saveLog(msg, type) { |
+1
-1
| { | ||
| "name": "@youngbeen/angle-ctrl", | ||
| "version": "1.1.2", | ||
| "version": "1.1.3", | ||
| "description": "The controllers used in angle-FE team", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+4
-4
@@ -17,4 +17,4 @@ ## [@youngbeen/angle-ctrl](https://www.npmjs.com/package/@youngbeen/angle-ctrl) | ||
| step: 1000, | ||
| tick: function, | ||
| end: function | ||
| tick: <function>, | ||
| end: <function> | ||
| }) | ||
@@ -50,4 +50,4 @@ ``` | ||
| step: 1000, | ||
| tick: function, | ||
| end: function | ||
| tick: <function>, | ||
| end: <function> | ||
| }) | ||
@@ -54,0 +54,0 @@ ``` |
+4
-0
@@ -7,2 +7,6 @@ import { dateUtil } from '@youngbeen/angle-util'; | ||
| tagTime = tagTime.getTime(); | ||
| window.addEventListener('error', (e) => { | ||
| this.saveLog(e.message, 'error', e.lineno.toString(), '', '', e.error.stack); | ||
| this.sendLog(); | ||
| }, true); | ||
| export default { | ||
@@ -9,0 +13,0 @@ saveLog(msg, type, line = '', compName = '', funcName = '', attach = '') { |
+6
-0
@@ -25,2 +25,8 @@ // this controller is about to provide functions for log controll | ||
| // 侦听error | ||
| window.addEventListener('error', (e) => { | ||
| this.saveLog(e.message, 'error', e.lineno.toString(), '', '', e.error.stack) | ||
| this.sendLog() | ||
| }, true) | ||
| export default { | ||
@@ -27,0 +33,0 @@ // 保存日志到历史记录 -- 信息内容,信息类型,[ 行数,所在组件名,所在函数名,附加信息 ] |
36060
1.39%917
1.44%