|
@@ -45,7 +45,7 @@ const injectMethods = [
|
|
{ name: "destroyed", style: "color: red; font-weight: bold" }
|
|
{ name: "destroyed", style: "color: red; font-weight: bold" }
|
|
];
|
|
];
|
|
|
|
|
|
-const injecRoutertMethods = [
|
|
|
|
|
|
+const injectRouterMethods = [
|
|
{ name: "beforeRouteEnter", style: ["background: #aaa", "color: #0000aa;"] },
|
|
{ name: "beforeRouteEnter", style: ["background: #aaa", "color: #0000aa;"] },
|
|
{ name: "beforeRouteUpdate", style: ["background: #aaa", "color: #0000aa;"] },
|
|
{ name: "beforeRouteUpdate", style: ["background: #aaa", "color: #0000aa;"] },
|
|
{ name: "beforeRouteLeave", style: ["background: #aaa", "color: #0000aa;"] }
|
|
{ name: "beforeRouteLeave", style: ["background: #aaa", "color: #0000aa;"] }
|
|
@@ -63,6 +63,12 @@ for (const m of injectMethods) {
|
|
if (!componentNameMatch(this.$options.name)) {
|
|
if (!componentNameMatch(this.$options.name)) {
|
|
if (!startLogging) {
|
|
if (!startLogging) {
|
|
startLogging = true;
|
|
startLogging = true;
|
|
|
|
+ if (groupCollapsed) {
|
|
|
|
+ console.groupCollapsed("Vue lifecyle logs");
|
|
|
|
+ } else {
|
|
|
|
+ console.group("Vue lifecyle logs");
|
|
|
|
+ }
|
|
|
|
+
|
|
loggingTime = Date.now();
|
|
loggingTime = Date.now();
|
|
}
|
|
}
|
|
console.log(
|
|
console.log(
|
|
@@ -73,7 +79,7 @@ for (const m of injectMethods) {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
-for (const m of injecRoutertMethods) {
|
|
|
|
|
|
+for (const m of injectRouterMethods) {
|
|
lifeCycleMixins[m.name] = function(to, from, next) {
|
|
lifeCycleMixins[m.name] = function(to, from, next) {
|
|
if (!startLogging) {
|
|
if (!startLogging) {
|
|
startLogging = true;
|
|
startLogging = true;
|