更新CHANGELOG,修复模板样式保持问题,重构样式复制机制,优化代码结构,更新README示例中的方法调用,确保API向下兼容,增加测试用例以验证修复效果。

This commit is contained in:
zero
2025-06-04 09:43:07 +08:00
parent 5ccd71e726
commit b037e832c8
21 changed files with 2003 additions and 1810 deletions

View File

@@ -36,10 +36,10 @@ func main() {
fmt.Println("2. 设置表头格式...")
headerFormat := &document.CellFormat{
TextFormat: &document.TextFormat{
Bold: true,
FontSize: 14,
FontColor: "FFFFFF", // 白色文字
FontName: "微软雅黑",
Bold: true,
FontSize: 14,
FontColor: "FFFFFF", // 白色文字
FontFamily: "微软雅黑",
},
HorizontalAlign: document.CellAlignCenter,
VerticalAlign: document.CellVAlignCenter,
@@ -57,8 +57,8 @@ func main() {
fmt.Println("3. 设置数据行格式...")
dataFormat := &document.CellFormat{
TextFormat: &document.TextFormat{
FontSize: 12,
FontName: "宋体",
FontSize: 12,
FontFamily: "宋体",
},
HorizontalAlign: document.CellAlignCenter,
VerticalAlign: document.CellVAlignCenter,