From fd58568cf0b42e24cf92ea1e886c82522931771e Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Tue, 27 Oct 2020 14:16:30 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B4=20LibsPage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Reader/LibsPage/LibsPage.vue | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/client/components/Reader/LibsPage/LibsPage.vue b/client/components/Reader/LibsPage/LibsPage.vue index e7e28f50..59110030 100644 --- a/client/components/Reader/LibsPage/LibsPage.vue +++ b/client/components/Reader/LibsPage/LibsPage.vue @@ -26,14 +26,18 @@ Открыть
- + @@ -65,6 +69,7 @@ export default @Component({ } }) class LibsPage extends Vue { + frameVisible = false; startLink = ''; rootLink = ''; selectedLink = ''; @@ -81,6 +86,8 @@ class LibsPage extends Vue { this.$refs.window.init(); if (!this.frameSrc) this.frameSrc = this.libs.startLink; + this.frameVisible = false; + this.frameVisible = true; } get libs() { @@ -139,6 +146,14 @@ class LibsPage extends Vue { this.frameSrc = this.addProtocol(this.bookUrl); } + goToStartLink() { + this.frameSrc = this.libs.startLink; + this.frameVisible = false; + this.$nextTick(() => { + this.frameVisible = true; + }); + } + addProtocol(url) { if ((url.indexOf('http://') != 0) && (url.indexOf('https://') != 0)) return 'http://' + url; @@ -184,7 +199,7 @@ class LibsPage extends Vue { submitUrl() { if (this.bookUrl) { - this.$emit('load-book', {url: this.bookUrl, force: true}); + this.$emit('load-book', {url: this.addProtocol(this.bookUrl), force: true}); this.bookUrl = ''; } }