Переглянути джерело

:recycle: adjusting route query

tags/1.0.0^2
J 3 роки тому
джерело
коміт
53914532f6
1 змінених файлів з 3 додано та 3 видалено
  1. 3
    3
      vue-theme/src/pages/list.vue

+ 3
- 3
vue-theme/src/pages/list.vue Переглянути файл

63
             return postTypes.includes(this.$route.params.type) ? this.$route.params.type : 'post'
63
             return postTypes.includes(this.$route.params.type) ? this.$route.params.type : 'post'
64
         },
64
         },
65
         hasSubtype() {
65
         hasSubtype() {
66
-            return this.$route.query.subtype
66
+            return this.$route.query.type
67
         },
67
         },
68
         sortBy() {
68
         sortBy() {
69
             return this.$route.params.sortBy
69
             return this.$route.params.sortBy
154
                     limit: this.shouldLoadAllAtOnce ? -1 : this.perPage,
154
                     limit: this.shouldLoadAllAtOnce ? -1 : this.perPage,
155
                     page: this.page
155
                     page: this.page
156
                 }
156
                 }
157
-                if(this.subtype) {
158
-                    params.type = this.subtype
157
+                if(this.hasSubtype) {
158
+                    params.type = this.$route.query.type
159
                 }
159
                 }
160
                 const res = await getPosts(
160
                 const res = await getPosts(
161
                     params,
161
                     params,

Завантаження…
Відмінити
Зберегти