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

This commit is contained in:
Book Pauk
2019-02-03 22:41:24 +07:00
parent 5a4ef54f52
commit 223b553359
2 changed files with 13 additions and 4 deletions

View File

@@ -120,6 +120,7 @@ class HistoryPage extends Vue {
mounted() {
this.updateTableData();
this.mostRecentBook = bookManager.mostRecentBook();
}
updateTableData() {
@@ -194,12 +195,17 @@ class HistoryPage extends Vue {
async handleDel(key) {
await bookManager.delRecentBook({key});
this.$emit('most-recent-book');
this.updateTableData();
const newRecent = bookManager.mostRecentBook();
if (this.mostRecentBook != newRecent)
this.$emit('load-book', newRecent);
this.mostRecentBook = newRecent;
}
loadBook(url) {
this.$emit('load-book', {url});
this.close();
}
close() {