From 974d8f152ad812da97bc0436555eeb3475ad3813 Mon Sep 17 00:00:00 2001 From: icssoa <615206459@qq.com> Date: Sun, 8 May 2022 12:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/upload/components/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/upload/components/index.vue b/src/modules/upload/components/index.vue index 8434b21..f465ed6 100644 --- a/src/modules/upload/components/index.vue +++ b/src/modules/upload/components/index.vue @@ -140,6 +140,7 @@ import { ElMessage } from "element-plus"; import { useBaseStore } from "/$/base"; import Draggable from "vuedraggable"; import { fileSize, fileName } from "../utils"; +import dayjs from "dayjs"; interface Item { url: string; @@ -315,7 +316,9 @@ async function httpRequest(req: any, item?: any) { if (mode == "local") { data.append("key", fileName); } else { - fileName = props.prefixPath ? `${props.prefixPath}/${fileName}` : fileName; + fileName = [props.prefixPath, dayjs().format("YYYY-MM-DD"), fileName] + .filter(Boolean) + .join("/"); data.append("key", fileName); }