Преглед на файлове

:recycle: stop using sortBy watching | watch exhibitions and events list for initPosts

tags/1.0.0^2
J преди 3 години
родител
ревизия
2ca40e5fe8
променени са 2 файла, в които са добавени 7 реда и са изтрити 4 реда
  1. 6
    4
      vue-theme/src/pages/list.vue
  2. 1
    0
      vue-theme/src/store/index.js

+ 6
- 4
vue-theme/src/pages/list.vue Целия файл

@@ -172,6 +172,7 @@ export default {
172 172
         // _setHeroInfo(post) {} from mixin
173 173
         // _clearHero(store) {} from mixin
174 174
         async checkAndSetHero(type) {
175
+            console.log('hero type :', type)
175 176
             this._clearHero(this.$store)
176 177
             try {
177 178
                 const page = await this.getPage(type)
@@ -238,8 +239,10 @@ export default {
238 239
             if(!postTypes.includes(newType)) return console.warn('Type not valid...')
239 240
 
240 241
             // Ignore some types with presorts so the sortBy watcher can handle them
241
-            const ignore = ['artist', 'event', 'exibition']
242
-            if(ignore.includes(newType)) return
242
+            const ignore = ['artist']
243
+            if(ignore.includes(newType)) {
244
+                return
245
+            }
243 246
             // Reset the search term betweem loads
244 247
             // so we initPostList() works correctly when 
245 248
             // navigating from search result to a type list page
@@ -248,9 +251,8 @@ export default {
248 251
         },
249 252
         // Fires when navigating between pages with different sorts
250 253
         sortBy(newSort) {
251
-            // console.log('sort changed :', newSort)
252 254
             if(!Object.values(sortTypes).includes(newSort)) return
253
-            this.initPostList()
255
+            // this.initPostList()
254 256
         },
255 257
     },
256 258
     mounted() {

+ 1
- 0
vue-theme/src/store/index.js Целия файл

@@ -41,6 +41,7 @@ const state = {
41 41
 
42 42
 const mutations = {
43 43
     SET_HERO(state, hero) {
44
+        console.log(hero)
44 45
         if (!hero.url) {
45 46
             console.warn('No hero url to set')
46 47
             state.hero.url = null

Loading…
Отказ
Запис