Работа над разделом "Серии"

This commit is contained in:
Book Pauk
2022-10-25 19:48:20 +07:00
parent 3a8fa12894
commit cc5d5167a3
8 changed files with 182 additions and 143 deletions

View File

@@ -101,7 +101,7 @@
<div class="q-mx-xs" />
<div class="row items-center q-mt-xs">
<div v-show="list.queryFound > 0">
{{ foundAuthorsMessage }}
{{ foundCountMessage }}
</div>
<div v-show="list.queryFound == 0">
Ничего не найдено
@@ -115,7 +115,7 @@
</div>
<!-- Формирование списка ------------------------------------------------------------------------>
<component :is="selectedListComponent" v-if="selectedListComponent" :list="list" :search="search" :genre-map="genreMap" @list-event="listEvent" />
<component :is="selectedListComponent" v-if="selectedListComponent" ref="list" :list="list" :search="search" :genre-map="genreMap" @list-event="listEvent" />
<!-- Формирование списка конец ------------------------------------------------------------------>
<div class="row justify-center">
@@ -251,8 +251,10 @@ const componentOptions = {
handler(newValue) {
this.updateGenreTreeIfNeeded();
if (this.prevList.totalFound != newValue.totalFound)
if (this.prevList.totalFound != newValue.totalFound) {
this.updatePageCount();
this.foundCountMessage = this.$refs.list.foundCountMessage;
}
this.prevList = _.cloneDeep(newValue);
},
@@ -278,6 +280,8 @@ class Search {
collection = '';
projectName = '';
foundCountMessage = '';
settingsDialogVisible = false;
selectGenreDialogVisible = false;
selectLangDialogVisible = false;
@@ -667,10 +671,6 @@ class Search {
this.lastScrollTop = 0;
}
get foundAuthorsMessage() {
return `Найден${utils.wordEnding(this.list.totalFound, 2)} ${this.list.totalFound} автор${utils.wordEnding(this.list.totalFound)}`;
}
updatePageCount() {
const prevPageCount = this.pageCount;