@tuhu/mp-monitor
Advanced tools
Comparing version 0.1.8-alpha.0 to 0.1.8
@@ -12,2 +12,6 @@ "use strict"; | ||
exports.FLAG_PAGE_START = Symbol("pagestart"); | ||
/** 页面触发过 onHide 标记 | ||
* @constant | ||
*/ | ||
var FLAG_PAGE_HIDDEN = Symbol('PAGE_HIDDEN'); | ||
/** 小程序开始加载时间标记 */ | ||
@@ -75,2 +79,10 @@ exports.FLAG_APP_START = Symbol("appstart"); | ||
}, | ||
onShow: function () { | ||
if (this[FLAG_PAGE_HIDDEN]) { | ||
this[exports.FLAG_PAGE_START] = Date.now(); | ||
} | ||
}, | ||
onHide: function () { | ||
this[FLAG_PAGE_HIDDEN] = true; | ||
}, | ||
onUnload: function () { | ||
@@ -77,0 +89,0 @@ monitorPage.resolveWaitPage(this.route); |
{ | ||
"name": "@tuhu/mp-monitor", | ||
"version": "0.1.8-alpha.0", | ||
"version": "0.1.8", | ||
"main": "lib/index.js", | ||
@@ -26,3 +26,3 @@ "types": "lib/index.d.ts", | ||
}, | ||
"gitHead": "82f2e9b44a93737cc51c85c64f1ae115da94e469" | ||
"gitHead": "ddc8e63e8161284130b590e9239a9e934c4e9b47" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
45530
1191
1