From 2fef02a5bf0a565411e1d213c4793c968aab7b3b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 30 May 2025 14:19:59 +0800
Subject: [PATCH] feat:算法仓库图片预览-暂无缩略图
---
src/utils/util.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/utils/util.js b/src/utils/util.js
index 978bddf..94137a6 100644
--- a/src/utils/util.js
+++ b/src/utils/util.js
@@ -120,6 +120,16 @@
})
}
/**
+ * 获取缩略图路径
+ * @param url
+ * @returns {string}
+ */
+export const getSmallImg = url => {
+ if (!url) return ''
+ const lastDotIndex = url.lastIndexOf('.')
+ return `${url.substring(0, lastDotIndex)}_small${url.substring(lastDotIndex)}`
+}
+/**
* 浏览器判断是否全屏
*/
export const fullscreenEnable = () => {
--
Gitblit v1.9.3