浏览代码

Поправки багов

Book Pauk 2 年之前
父节点
当前提交
f8416a4aec
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      client/components/Search/Search.vue

+ 6 - 4
client/components/Search/Search.vue

@@ -182,7 +182,7 @@
                             <div v-if="isExpandedSeries(book) && book.books">
                             <div v-if="isExpandedSeries(book) && book.books">
                                 <div v-if="book.showAllBooks" class="book-row column">
                                 <div v-if="book.showAllBooks" class="book-row column">
                                     <BookView
                                     <BookView
-                                        v-for="subbook in book.allBooks" :key="subbook.key"
+                                        v-for="subbook in book.allBooks" :key="subbook.id"
                                         :book="subbook" :genre-tree="genreTree"
                                         :book="subbook" :genre-tree="genreTree"
                                         show-author
                                         show-author
                                         :show-read-link="showReadLink"
                                         :show-read-link="showReadLink"
@@ -330,6 +330,10 @@ const componentOptions = {
         search: {
         search: {
             handler(newValue) {
             handler(newValue) {
                 this.limit = newValue.limit;
                 this.limit = newValue.limit;
+
+                if (this.pageCount > 1)
+                    this.prevPage = this.search.page;
+
                 this.makeTitle();
                 this.makeTitle();
                 this.refresh();
                 this.refresh();
             },
             },
@@ -761,10 +765,8 @@ class Search {
             this.search.page = this.prevPage;
             this.search.page = this.prevPage;
         }
         }
 
 
-        if (this.search.page > this.pageCount) {
-            this.prevPage = this.search.page;
+        if (this.search.page > this.pageCount)
             this.search.page = 1;
             this.search.page = 1;
-        }
     }
     }
 
 
     getBookCount(item) {
     getBookCount(item) {