浏览代码

bug: removing conditional req, prevents gallery prop passing

tags/0.9.0
John Maeda 6 年前
父节点
当前提交
bc8fddd376
共有 1 个文件被更改,包括 5 次插入7 次删除
  1. 5
    7
      vue-theme/src/pages/single.vue

+ 5
- 7
vue-theme/src/pages/single.vue 查看文件

1
 <template lang="pug">
1
 <template lang="pug">
2
 .page--single.f-row.between(v-if="$route.params.slug")
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
     article.f-grow.shadow
4
     article.f-grow.shadow
5
         header
5
         header
6
             h1 {{ type }}:{{ $route.params.slug }} single
6
             h1 {{ type }}:{{ $route.params.slug }} single
87
         }
87
         }
88
     },
88
     },
89
     mounted() {
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
 </script>
96
 </script>

正在加载...
取消
保存