瀏覽代碼

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;