mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-16 04:03:17 +08:00
🐛 修正链接判断逻辑
This commit is contained in:
@@ -85,10 +85,10 @@ const useAppStore = defineStore(
|
||||
}
|
||||
|
||||
function getImageUrl(url: string, fmt?: string): string {
|
||||
let check = false;
|
||||
let check = true;
|
||||
if (fmt && !["jpg", "png", "webp", "gif", "jpeg"].includes(fmt.toLowerCase())) check = false;
|
||||
if (check && (url.endsWith(".gif") || imageQualityPercent.value === 100)) return url;
|
||||
return `${url}?x-oss-process=image/format,jpg/quality,Q_${imageQualityPercent.value}`;
|
||||
if (url.endsWith(".gif") || (check && imageQualityPercent.value === 100)) return url;
|
||||
return `${url}?x-oss-process=image/format,png/quality,Q_${imageQualityPercent.value}`;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user