Преглед изворни кода

feat: 提供非固定icon出口

bill пре 2 месеци
родитељ
комит
9eac462fea
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/components/icon/icon.ts

+ 1 - 1
src/core/components/icon/icon.ts

@@ -56,7 +56,7 @@ export const getIconStyle = async (
 ) => {
   const svgContent = parseSvgContent(await getSvgContent(url));
   if (!fixed) {
-    if (width / height > svgContent.width / svgContent.height) {
+    if (width / height < svgContent.width / svgContent.height) {
       width = (svgContent.width / svgContent.height) * height;
     } else {
       height = (svgContent.height / svgContent.width) * width;