anatawa12
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
16 additions and
0 deletions
-
client/components/tags.vue
|
|
@ -250,6 +250,22 @@ export default { |
|
|
|
[{name: this.$t('tags:localeAny'), code: 'any'}], |
|
|
|
(siteLangs.length > 0 ? siteLangs : []) |
|
|
|
) |
|
|
|
if (this.$route.query.lang) { |
|
|
|
this.locale = this.$route.query.lang |
|
|
|
} |
|
|
|
if (this.$route.query.sort) { |
|
|
|
this.orderBy = this.$route.query.sort.toLowerCase() |
|
|
|
switch (this.orderBy) { |
|
|
|
case 'updatedat': |
|
|
|
this.orderBy = 'updatedAt' |
|
|
|
break |
|
|
|
} |
|
|
|
this.pagination.sortBy = [this.orderBy] |
|
|
|
} |
|
|
|
if (this.$route.query.dir) { |
|
|
|
this.orderByDirection = this.$route.query.dir === 'asc' ? 0 : 1 |
|
|
|
this.pagination.sortDesc = [this.orderByDirection === 1] |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
toggleTag (tag) { |
|
|
|