From b9ef10731196c3e5eadd3c792896c0c6772463c6 Mon Sep 17 00:00:00 2001 From: jmal Date: Thu, 19 Mar 2020 21:12:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=E5=88=B0=E6=A0=B9=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E5=B0=B1=E4=B8=8D=E5=81=9A=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/index.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 9e20558..064d740 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -851,10 +851,14 @@ export default { }, // 浏览器的返回事件 goBack(){ + if (this.pathList.length === 2){ + this.$router.push(`/?vmode=${this.vmode}&path=${encodeURIComponent(this.path)}`) + return + } const linkIndex = this.pathList.length-3 this.handleLink(this.pathList[linkIndex],linkIndex) }, - handleLink(item, index, unPushLink) { + handleLink(item, index, unPushLink, unRefresh) { if(item && item.search){ if(item.searchKey){ this.searchFileByKeyWord(item.searchKey) @@ -874,17 +878,17 @@ export default { }) if(!unPushLink){ if (!this.$route.query.path){ - this.$router.push(`/_m`) + this.$router.push(`/?vmode=${this.vmode}&path=${encodeURIComponent(this.path)}`) } else { - // this.$router.push(`?path=${encodeURIComponent(this.path)}`) this.$router.push(`?vmode=${this.vmode}&path=${encodeURIComponent(this.path)}`) } } - setPath(this.path, this.pathList) - this.pagination.pageIndex = 1 - this.getFileList() + if(!unRefresh){ + this.pagination.pageIndex = 1 + this.getFileList() + } + // setPath(this.path, this.pathList) } - console.log("this.pathList:", this.pathList) }, // 新建文档 newDocument() {