Просмотр исходного кода

bug: removing conditional req, prevents gallery prop passing

tags/0.9.0
John Maeda 6 лет назад
Родитель
Сommit
bc8fddd376
1 измененных файлов: 5 добавлений и 7 удалений
  1. 5
    7
      vue-theme/src/pages/single.vue

+ 5
- 7
vue-theme/src/pages/single.vue Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 <template lang="pug">
2 2
 .page--single.f-row.between(v-if="$route.params.slug")
3
-    gallery(v-if="images.length" :fullscreengallery="fullscreengallery" v-on:close="fullscreengallery = false" :images="images")
3
+    gallery(:fullscreengallery="fullscreengallery" v-on:close="fullscreengallery = false" :images="images")
4 4
     article.f-grow.shadow
5 5
         header
6 6
             h1 {{ type }}:{{ $route.params.slug }} single
@@ -87,12 +87,10 @@ export default {
87 87
         }
88 88
     },
89 89
     mounted() {
90
-        // Only makes req if this hasn't been loaded yet
91
-        if(!this.posts[this.$route.params.slug]) {
92
-            let type = this.$route.params.type
93
-            type = type.charAt(0).toUpperCase() + type.slice(1)
94
-            this.$store.dispatch(`getAll${type}`)
95
-        }
90
+        // TODO: Only makes req if this hasn't been loaded yet
91
+        let type = this.$route.params.type
92
+        type = type.charAt(0).toUpperCase() + type.slice(1)
93
+        this.$store.dispatch(`getAll${type}`)
96 94
     }
97 95
 }
98 96
 </script>

Загрузка…
Отмена
Сохранить