Explorar el Código

:recycle: always loading hero on list page

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

+ 5
- 5
vue-theme/src/pages/list.vue Ver fichero

@@ -141,11 +141,13 @@ export default {
141 141
             const page = this.allPages.filter(
142 142
                 page => page.slug == type + 's',
143 143
             )[0]
144
+
144 145
             let hero = { url: null, heroType: null }
145
-            
146
+
146 147
             // Clear the hero and bail
147 148
             if(!page) return this.$store.commit('SET_HERO', hero)
148 149
 
150
+            console.log('setting hero:', page)
149 151
             hero.url = page.featured
150 152
             hero.heroType = 'image'
151 153
             if (
@@ -181,11 +183,9 @@ export default {
181 183
         }
182 184
     },
183 185
     watch: {
184
-        posts() {
185
-            this.checkAndSetHero(this.type)
186
-        },
187 186
         $route(to, from) {
188
-            let type = convertTitleCase(this.type) +'s'
187
+            this.checkAndSetHero(this.type)
188
+            
189 189
             let sort = to.path
190 190
                 .split('/')
191 191
                 .filter(p => p)

Loading…
Cancelar
Guardar