From 398483e8649897d6022b1a6b998b73965d4e3ab8 Mon Sep 17 00:00:00 2001 From: Aicirou <2643053021@qq.com> Date: Fri, 21 Aug 2020 22:33:20 +0800 Subject: [PATCH] :bug: Fix some of the operation functions in the search list cannot be used #112 --- src/views/page/GoList.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/views/page/GoList.vue b/src/views/page/GoList.vue index 1b0db09..1947bf2 100644 --- a/src/views/page/GoList.vue +++ b/src/views/page/GoList.vue @@ -261,7 +261,7 @@ export default { inited(viewer) { this.$viewer = viewer; }, - action(file, target) { + action(file, target, isSearch = true) { // If it is a shortcut, the prompt cannot be downloaded if (file.mimeType === "application/vnd.google-apps.shortcut") { this.$notify({ @@ -271,6 +271,13 @@ export default { }); return; } + + let cmd = this.$route.params.cmd; + if (cmd && cmd === "search" && isSearch) { + this.goSearchResult(file, target); + return; + } + if (file.mimeType.startsWith("image/") && target === "view") { this.viewer = true; this.$nextTick(() => { @@ -281,7 +288,7 @@ export default { } if ( file.mimeType.startsWith("audio/") && - file.mimeType !== "audio/mpegurl" && + file.mimeType.indexOf("mpegurl")==-1 && target === "view" ) { if (window.aplayer) { @@ -297,11 +304,6 @@ export default { } return; } - let cmd = this.$route.params.cmd; - if (cmd && cmd === "search") { - this.goSearchResult(file, target); - return; - } this.target(file, target); }, target(file, target) { @@ -365,7 +367,7 @@ export default { let data = res.data; if (data) { file.path = `/${id}:${data}`; - this.target(file, target); + this.action(file, target, false); } }) .catch((e) => {