This commit is contained in:
icssoa
2025-07-29 22:30:23 +08:00
parent bb4caddc0b
commit c0b5305daa
8 changed files with 46 additions and 42 deletions

View File

@@ -120,17 +120,17 @@ const icon = computed<Icon>(() => {
// 图标样式
const iconStyle = computed(() => {
const style = new Map<string, string>();
const style = {};
if (props.color != "") {
style.set("color", props.color);
style["color"] = props.color;
}
style.set("fontFamily", icon.value.font);
style.set("fontSize", parseRpx(props.size!));
style.set("height", parseRpx(props.height ?? props.size!));
style.set("width", parseRpx(props.width ?? props.size!));
style.set("lineHeight", parseRpx(props.size!));
style["fontFamily"] = icon.value.font;
style["fontSize"] = parseRpx(props.size!);
style["height"] = parseRpx(props.height ?? props.size!);
style["width"] = parseRpx(props.width ?? props.size!);
style["lineHeight"] = parseRpx(props.size!);
return style;
});