Selaa lähdekoodia

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

tags/0.9.0
J 4 vuotta sitten
vanhempi
commit
b6b911f6eb
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4
    1
      vue-theme/src/pages/single.vue

+ 4
- 1
vue-theme/src/pages/single.vue Näytä tiedosto

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

Loading…
Peruuta
Tallenna