Fix bug of Form component

This commit is contained in:
cuigh 2017-11-23 16:00:07 +08:00
parent 317446e5cd
commit 8ce6adf478
4 changed files with 25 additions and 24 deletions

View File

@ -747,6 +747,7 @@ var Swirl;
default:
entry.value = input.value;
}
if (entry.value != null) {
switch (dataType) {
case "integer":
entry.value = parseInt(entry.value);
@ -758,6 +759,7 @@ var Swirl;
entry.value = (entry.value === "true") || (entry.value === "1");
break;
}
}
return entry;
}
saveEntryToResult(parent, entry, input, delimiter) {

File diff suppressed because one or more lines are too long

View File

@ -233,6 +233,7 @@ namespace Swirl.Core {
entry.value = input.value;
}
if (entry.value != null) {
switch (dataType) {
case "integer":
entry.value = parseInt(entry.value);
@ -244,6 +245,7 @@ namespace Swirl.Core {
entry.value = (entry.value === "true") || (entry.value === "1");
break;
}
}
return entry;
}

View File

@ -16,9 +16,6 @@ var Funcs = map[string]interface{}{
// return t.Local().Format("2006-01-02 15:04:05")
//},
"join": strings.Join,
"eq": func(v1, v2 interface{}) bool {
return fmt.Sprint(v1) == fmt.Sprint(v2)
},
"elem": func(i interface{}) interface{} {
v := reflect.ValueOf(i)
for v.Kind() == reflect.Ptr {