Explorar el Código

:recycle: using loading flag on single pages | waiting for single content to load before hand over

tags/0.9.0
J hace 4 años
padre
commit
b6b911f6eb
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4
    1
      vue-theme/src/pages/single.vue

+ 4
- 1
vue-theme/src/pages/single.vue Ver fichero

@@ -2,7 +2,7 @@
2 2
 .page--single.f-col.between
3 3
     gallery(v-if="activeGalleryIndex >= 0" :activeImageIndex="activeImageIndex" :images="imagesInGallery" @close="closeGallery")
4 4
 
5
-    article.w-max(v-if="!singlePost")
5
+    article.w-max(v-if="!singlePost || loading")
6 6
         header
7 7
             p loading...
8 8
     article(v-else).w-max.f-grow.shadow
@@ -64,6 +64,7 @@ export default {
64 64
             // Gallery control
65 65
             activeGalleryIndex: -1,
66 66
             activeImageID: -1,
67
+            loading: true
67 68
         }
68 69
     },
69 70
     computed: {
@@ -231,6 +232,8 @@ export default {
231 232
                 `getSingle${convertTitleCase(this.type)}`,
232 233
                 singlePostData.id,
233 234
             )
235
+            this.loading = false
236
+            
234 237
             console.log('title case:',convertTitleCase(this.type))
235 238
             console.log('hero to set:',singlePostData)
236 239
         },

Loading…
Cancelar
Guardar