From 16fcff23e254e02bd0b09624e8dc44b6097dc6f9 Mon Sep 17 00:00:00 2001
From: xieb <vip_xiaobin810@163.com>
Date: Thu, 16 Nov 2023 10:23:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/demo' into demo

---
 src/utils/common.ts |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/utils/common.ts b/src/utils/common.ts
index 03c65f2..891e618 100644
--- a/src/utils/common.ts
+++ b/src/utils/common.ts
@@ -1,4 +1,8 @@
-
+/**
+ * 下载文件
+ * @param data
+ * @param fileName
+ */
 export function downloadFile (data: Blob, fileName: string) {
   const lable = document.createElement('a')
   lable.href = window.URL.createObjectURL(data)
@@ -6,3 +10,7 @@
   lable.click()
   URL.revokeObjectURL(lable.href)
 }
+
+export const requireImg = (imgPath: string) => {
+  return new URL(`../assets/${imgPath}`, import.meta.url).href
+}

--
Gitblit v1.9.3