fix: 调整报表颜色样式

This commit is contained in:
renzhiyuan 2026-01-04 18:26:06 +08:00
parent 04c0077e16
commit aa3151baa5
2 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import (
const ( const (
RedStyle = "${color: FF0000;horizontal:center;vertical:center;borderColor:#000000}" RedStyle = "${color: FF0000;horizontal:center;vertical:center;borderColor:#000000}"
GreenStyle = "${color: 3e7c41;horizontal:center;vertical:center;borderColor:#000000}" GreenStyle = "${color: 008000;horizontal:center;vertical:center;borderColor:#000000}"
) )
var ( var (

View File

@ -143,7 +143,9 @@ func SetStyle(styleMap map[string]string, f *excelize.File) (int, error) {
// 设置字体颜色 // 设置字体颜色
if colorHex, exists := styleMap["color"]; exists { if colorHex, exists := styleMap["color"]; exists {
style.Font = &excelize.Font{ style.Font = &excelize.Font{
Color: colorHex, Color: colorHex,
Family: "SimHei",
Bold: true,
} }
} }
// 设置水平对齐 // 设置水平对齐