mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2026-04-22 22:57:15 +08:00
补充excel文档
This commit is contained in:
@@ -22,6 +22,7 @@ var cols = []excel2.Col{
|
||||
{Name: "更新时间", Key: "UpdateTime", Width: 15, Decode: util.NullTimeUtil.DecodeTime},
|
||||
}
|
||||
```
|
||||
|
||||
# 注意点
|
||||
1. Key对应的字段,如果是自定义结构体,需要实现string接口、或者传递Encode函数
|
||||
|
||||
<<< @/../server/util/excel2/excel_test.go#envConfig
|
||||
@@ -39,4 +39,13 @@ func (i Int) MarshalJSON() ([]byte, error) {
|
||||
return []byte(strconv.FormatInt(n, 10)), nil
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 自带了三个可为null类型:
|
||||
1. 相对于guregu/null的优点
|
||||
2. NullFloat、NullInt:支持前端传递null、字符串数字、数字
|
||||
```go
|
||||
core.NullFloat
|
||||
core.NullInt
|
||||
core.NullTime
|
||||
```
|
||||
Reference in New Issue
Block a user