Kaynağa Gözat

feat: 提供非固定icon出口

bill 2 ay önce
ebeveyn
işleme
9eac462fea
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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;