diff --git a/kernel/api/icon.go b/kernel/api/icon.go index f6048ed87..6067c5ce8 100644 --- a/kernel/api/icon.go +++ b/kernel/api/icon.go @@ -521,6 +521,10 @@ func generateTypeSevenSVG(color string, lang string, dateInfo map[string]interfa // Type 8: 文字图标 func generateTypeEightSVG(color, content, id string) string { + if strings.Contains(content, ".action{") { + content = model.RenderDynamicIconContentTemplate(content, id) + } + colorScheme := getColorScheme(color) // 动态变化字体大小 @@ -558,10 +562,6 @@ func generateTypeEightSVG(color, content, id string) string { } } - if strings.Contains(content, ".action{") { - content = model.RenderDynamicIconContentTemplate(content, id) - } - return fmt.Sprintf(`