Преглед изворни кода

:recycle: fixing up route info method

tags/0.9.0
J пре 4 година
родитељ
комит
1465feaf04
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4
    2
      vue-theme/src/pages/list.vue

+ 4
- 2
vue-theme/src/pages/list.vue Прегледај датотеку

198
             this.loadMorePosts()
198
             this.loadMorePosts()
199
         },
199
         },
200
         routeInfoFromPath(fullPath) {
200
         routeInfoFromPath(fullPath) {
201
+            console.log(fullPath)
202
+            console.log(fullPath.split('/'))
201
             const [ potentialType, potentialSort ] = fullPath.split('/')
203
             const [ potentialType, potentialSort ] = fullPath.split('/')
204
+            console.log(potentialType)
202
             return {
205
             return {
203
                 sortBy: Object.values(sortTypes).includes(potentialSort) ? potentialSort : null,
206
                 sortBy: Object.values(sortTypes).includes(potentialSort) ? potentialSort : null,
204
                 type: postTypes.includes(potentialType) ? potentialType : null
207
                 type: postTypes.includes(potentialType) ? potentialType : null
210
         // a list page, to another list page
213
         // a list page, to another list page
211
         type(newType, oldType) {
214
         type(newType, oldType) {
212
             if(!postTypes.includes(newType)) return console.warn('type not found...')
215
             if(!postTypes.includes(newType)) return console.warn('type not found...')
213
-            // this.clearAndInitPostList()
214
         },
216
         },
215
         $route(to, from) {
217
         $route(to, from) {
216
             console.log('---')
218
             console.log('---')
224
             if(!toPathInfo.sortBy != sortTypes.material) {
226
             if(!toPathInfo.sortBy != sortTypes.material) {
225
                 this.setIntersectionLoader()
227
                 this.setIntersectionLoader()
226
             }
228
             }
227
-            
229
+
228
             // Check if we changed sort method
230
             // Check if we changed sort method
229
             // from no sort to sorted
231
             // from no sort to sorted
230
             // or sorted to no sort
232
             // or sorted to no sort

Loading…
Откажи
Сачувај