From 293f05bb72c4642b26a9399fff6e02b02dbac927 Mon Sep 17 00:00:00 2001 From: qxz Date: Fri, 8 May 2020 14:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 2 +- src/views/page/GoList.vue | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21eb9b2..b600fc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12327,7 +12327,7 @@ }, "webpack-bundle-analyzer": { "version": "3.7.0", - "resolved": "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-3.7.0.tgz?cache=0&sync_timestamp=1586846510646&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-3.7.0.tgz", + "resolved": "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-3.7.0.tgz?cache=0&sync_timestamp=1586846559504&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-bundle-analyzer%2Fdownload%2Fwebpack-bundle-analyzer-3.7.0.tgz", "integrity": "sha1-hNpDTolEKJm4hNmtOORm0NsCpW8=", "dev": true, "requires": { diff --git a/src/views/page/GoList.vue b/src/views/page/GoList.vue index 3ab0b07..2ca6eff 100644 --- a/src/views/page/GoList.vue +++ b/src/views/page/GoList.vue @@ -1,6 +1,6 @@ @@ -297,20 +297,19 @@ export default { }, watch: { $route (to, from) { - if (!to.path.indexOf(':search')) { - // 后退设置page_token为空 - if (to.path.length < from.path.length) { - this.page.page_token = null; - } - if (to.path.substr(-1) !== '/' && from.meta.view !== "list") { - return - } + // 后退设置page_token为空 + if (to.path.length < from.path.length) { + this.page.page_token = null; + } + if ((to.path.indexOf(':search') > 0) || (to.path.substr(-1) === '/' && from.meta.view === "list")) { + this.render(); } - - this.headmd = { display: false, file: {}, path: "" }, - this.readmemd = { display: false, file: {}, path: "" } - this.render(); } - } + }, + // beforeRouteUpdate (to, from, next) { + // this.headmd = { display: false, file: {}, path: "" }, + // this.readmemd = { display: false, file: {}, path: "" } + // next() + // }, };