Przeglądaj źródła

:recycle: unchopping computed because it didnt work

tags/0.9.0
J 4 lat temu
rodzic
commit
6bb5ff025a
2 zmienionych plików z 15 dodań i 6 usunięć
  1. 9
    4
      vue-theme/src/pages/list.vue
  2. 6
    2
      vue-theme/src/pages/single.vue

+ 9
- 4
vue-theme/src/pages/list.vue Wyświetl plik

51
         }
51
         }
52
     },
52
     },
53
     computed: {
53
     computed: {
54
-        grid: () => this.type ? gridTypes.includes(this.type) : null,
55
-        isWide: () => this.type ? wideTypes.includes(this.type) : null,
56
-        sidebar: () => this.type ? !sansSidebarTypes.includes(this.type) : null,
57
         type() {
54
         type() {
58
-            // Checks for type and fixes Episodes route edge case
59
             return this.$route.params.type
55
             return this.$route.params.type
60
         },
56
         },
61
         sortBy() {
57
         sortBy() {
62
             return this.$route.params.sortBy
58
             return this.$route.params.sortBy
63
         },
59
         },
60
+        grid() {
61
+            return gridTypes.includes(this.type)
62
+        },
63
+        isWide() {
64
+            return wideTypes.includes(this.type)
65
+        },
66
+        sidebar() {
67
+            return !sansSidebarTypes.includes(this.type)
68
+        },
64
         pType() {
69
         pType() {
65
             if(!this.type) return
70
             if(!this.type) return
66
             return `${convertTitleCase(this.type)}s`
71
             return `${convertTitleCase(this.type)}s`

+ 6
- 2
vue-theme/src/pages/single.vue Wyświetl plik

63
         }
63
         }
64
     },
64
     },
65
     computed: {
65
     computed: {
66
-        slug: () => this.$route.params.slug,
67
-        type: () => this.$route.params.type,
66
+        type() {
67
+            return this.$route.params.type
68
+        },
69
+        slug() {
70
+            return this.$route.params.slug
71
+        },
68
         /**
72
         /**
69
          * We get the actual post data using the slug
73
          * We get the actual post data using the slug
70
          * Careful with name collisions with vuex helpers
74
          * Careful with name collisions with vuex helpers

Ładowanie…
Anuluj
Zapisz