From 5445620776cf2ce5f5b9f7c1a7d54b0e2ff1bb9e Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 12 Aug 2025 14:10:59 +0800
Subject: [PATCH] feat:样式调整

---
 src/utils/util.js |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/src/utils/util.js b/src/utils/util.js
index acf5472..325dcc5 100644
--- a/src/utils/util.js
+++ b/src/utils/util.js
@@ -130,6 +130,16 @@
 	return `${url.substring(0, lastDotIndex)}_small${url.substring(lastDotIndex)}`
 }
 /**
+ * 获取正射路径
+ * @param url
+ * @returns {string}
+ */
+export const getzsSmallImg = url => {
+	if (!url) return ''
+	const lastDotIndex = url.lastIndexOf('.')
+	return `${url.substring(0, lastDotIndex)}_small.jpeg`
+}
+/**
  * 浏览器判断是否全屏
  */
 export const fullscreenEnable = () => {
@@ -467,4 +477,16 @@
     }
   }
   return newObj
-}
\ No newline at end of file
+}
+
+// a链接直接下载
+export const aLinkDownloadUtil = (url, name) => {
+  let a = document.createElement('a')
+  a.style.display = 'none'
+  a.href = url
+  a.download = name
+  document.body.appendChild(a)
+  a.click()
+  document.body.removeChild(a)
+  a = null
+}

--
Gitblit v1.9.3