Selaa lähdekoodia

update vue lifecylelogs

Michael Wang 6 vuotta sitten
vanhempi
commit
719cad8394
2 muutettua tiedostoa jossa 9 lisäystä ja 2 poistoa
  1. 1 0
      src/modules/basic/view/campus.vue
  2. 8 2
      src/plugins/vueLifecylceLogs.js

+ 1 - 0
src/modules/basic/view/campus.vue

@@ -329,6 +329,7 @@ export default {
   data() {
     return {
       isSuperAdmin: false,
+      paginationShow: false,
       rootOrgList: [],
       formSearch: {
         parentId: null,

+ 8 - 2
src/plugins/vueLifecylceLogs.js

@@ -45,7 +45,7 @@ const injectMethods = [
   { name: "destroyed", style: "color: red; font-weight: bold" }
 ];
 
-const injecRoutertMethods = [
+const injectRouterMethods = [
   { name: "beforeRouteEnter", style: ["background: #aaa", "color: #0000aa;"] },
   { name: "beforeRouteUpdate", 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 (!startLogging) {
         startLogging = true;
+        if (groupCollapsed) {
+          console.groupCollapsed("Vue lifecyle logs");
+        } else {
+          console.group("Vue lifecyle logs");
+        }
+
         loggingTime = Date.now();
       }
       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) {
     if (!startLogging) {
       startLogging = true;