From 210e251b2374f2872bc295d9c303cca3e7ce1039 Mon Sep 17 00:00:00 2001 From: Miao_Spring <539943419@qq.com> Date: Fri, 30 Aug 2024 05:15:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=B2=A1=E5=95=A5=E5=8A=9F=E8=83=BD=E7=9A=84=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/hooks/init.ts | 17 ++++ src/views/miaoImages.vue | 167 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 src/views/miaoImages.vue diff --git a/index.html b/index.html index cdd0520..121f524 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + MiaoDirectory diff --git a/src/hooks/init.ts b/src/hooks/init.ts index ac28ef5..8364c27 100644 --- a/src/hooks/init.ts +++ b/src/hooks/init.ts @@ -98,4 +98,21 @@ export default function init() { return false } ) + pluginCenter.registerComponent( + "miaoImages", + "图片浏览", + async () => (await import("@/views/miaoImages.vue")).default, + (vDirs, vFiles) => { + if (vDirs.length === 0 && vFiles.length === 0) { + return false; + } + miao: for (let vf of vFiles) + for (let end of [".xbm", ".tif", "pjp", ".svgz", "jpg", "jpeg", "ico", "tiff", ".gif", "svg", ".jfif", ".webp", ".png", ".bmp", "pjpeg", ".avif"]) { + if (vf.name.endsWith(end)) { + continue miao; + } + } + return true; + } + ); } diff --git a/src/views/miaoImages.vue b/src/views/miaoImages.vue new file mode 100644 index 0000000..d3c9e95 --- /dev/null +++ b/src/views/miaoImages.vue @@ -0,0 +1,167 @@ + + + + +