From 8782b4396e2f2f8b27e1314e2930722c81da659e Mon Sep 17 00:00:00 2001 From: Aicirou <2643053021@qq.com> Date: Mon, 22 Jun 2020 21:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BFix=20misjudged=20file=20to=20image?= =?UTF-8?q?=20format=20#88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/page/GoList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/page/GoList.vue b/src/views/page/GoList.vue index 85335d1..ab12c20 100644 --- a/src/views/page/GoList.vue +++ b/src/views/page/GoList.vue @@ -132,7 +132,7 @@ export default { ...mapState("acrou/view", ["mode"]), images() { return this.files.filter( - (file) => file.mimeType.indexOf("image") != -1 + (file) => file.mimeType.startsWith("image/") ); }, renderHeadMD() { @@ -261,7 +261,7 @@ export default { this.$viewer = viewer; }, action(file, target) { - if (file.mimeType.indexOf("image") != -1) { + if (file.mimeType.startsWith("image/")) { this.viewer = true; this.$nextTick(() => { let index = this.images.findIndex((item) => item.path === file.path);