From 22ca45510becde927a1beb7747a154972735ab54 Mon Sep 17 00:00:00 2001 From: youzi <2410633923@qq.com> Date: Mon, 11 Aug 2025 17:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=BB=E5=BB=8A-=E7=80=91=E5=B8=83=E6=B5=81?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 3 + env.d.ts | 4 +- src/App.vue | 36 +++++++ src/api/file/index.ts | 10 ++ src/assets/base.less | 6 ++ src/components/homeSide.vue | 4 +- src/util/request.ts | 23 +++-- src/views/Gallery.vue | 186 ++++++++++++++++++++++++++++++++++-- src/views/login/Login.vue | 4 +- 9 files changed, 256 insertions(+), 20 deletions(-) diff --git a/components.d.ts b/components.d.ts index 6c043a8..d753653 100644 --- a/components.d.ts +++ b/components.d.ts @@ -32,4 +32,7 @@ declare module 'vue' { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } + export interface GlobalDirectives { + vImagePreview: typeof import('vue-devui/image-preview/index.es.js')['ImagePreviewDirective'] + } } diff --git a/env.d.ts b/env.d.ts index f06121c..554aeb2 100644 --- a/env.d.ts +++ b/env.d.ts @@ -5,13 +5,15 @@ declare global { let $http: any; let $cookies: any; let $msg: any; - let $store:any + let $store:any; + let $modal :any interface Window { // 扩展Windows环境下的全局$http对象 $http: any; $cookies: any; $msg: any; $store:any + $modal:any } } diff --git a/src/App.vue b/src/App.vue index 31f20a9..b391568 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,15 +4,51 @@ + + + {{ modal.content }} +
+ 取消 + | + 确定 +
+
\ No newline at end of file diff --git a/src/api/file/index.ts b/src/api/file/index.ts index e69de29..5dfcb7c 100644 --- a/src/api/file/index.ts +++ b/src/api/file/index.ts @@ -0,0 +1,10 @@ +import request from "@/util/request"; + +//getFileList +export function getFileList(params: Record) { + return request({ + url: "/files/search", + method: "get", + params, + }); +} diff --git a/src/assets/base.less b/src/assets/base.less index 6abe776..da4f1bf 100644 --- a/src/assets/base.less +++ b/src/assets/base.less @@ -10,3 +10,9 @@ .ps__thumb-y { background-color: #f6cbe7 !important; } +.devui-image-preview { + background-color: #00000090 !important; + img { + border-radius: 8px; + } +} \ No newline at end of file diff --git a/src/components/homeSide.vue b/src/components/homeSide.vue index 289b8f5..823950b 100644 --- a/src/components/homeSide.vue +++ b/src/components/homeSide.vue @@ -39,8 +39,8 @@