mirror of
https://gitlab.52pay.top/go/easygoadmin.git
synced 2025-09-26 19:33:29 +08:00
fix: 修复多图控件空值问题
修复多图控件空值问题
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"fmt"
|
||||
"gitlab.52pay.top/go/easygoadmin/utils/gconv"
|
||||
"html/template"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -249,11 +248,13 @@ func Album(param string, data interface{}, exts string, size int) template.HTML
|
||||
}
|
||||
</style>`
|
||||
var list []string
|
||||
switch reflect.ValueOf(data).Kind() {
|
||||
case reflect.Slice:
|
||||
switch data.(type) {
|
||||
case []string:
|
||||
list = data.([]string)
|
||||
default:
|
||||
list = strings.Split(data.(string), ",")
|
||||
case string:
|
||||
if data.(string) != "" {
|
||||
list = strings.Split(data.(string), ",")
|
||||
}
|
||||
}
|
||||
// 上传控件拼接
|
||||
for _, v := range list {
|
||||
|
Reference in New Issue
Block a user