Kaynağa Gözat

:recycle: unchopping computed because it didnt work

tags/0.9.0
J 4 yıl önce
ebeveyn
işleme
6bb5ff025a
2 değiştirilmiş dosya ile 15 ekleme ve 6 silme
  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 Dosyayı Görüntüle

@@ -51,16 +51,21 @@ export default {
51 51
         }
52 52
     },
53 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 54
         type() {
58
-            // Checks for type and fixes Episodes route edge case
59 55
             return this.$route.params.type
60 56
         },
61 57
         sortBy() {
62 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 69
         pType() {
65 70
             if(!this.type) return
66 71
             return `${convertTitleCase(this.type)}s`

+ 6
- 2
vue-theme/src/pages/single.vue Dosyayı Görüntüle

@@ -63,8 +63,12 @@ export default {
63 63
         }
64 64
     },
65 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 73
          * We get the actual post data using the slug
70 74
          * Careful with name collisions with vuex helpers

Loading…
İptal
Kaydet