Skip to content

Commit b65b74d

Browse files
authored
Merge pull request #832 from hosea3000/fix-number-input
fix🐛: 修复自动生成代码时选择字段类型为int64, 前端提交还是string 导致报错的问题
2 parents 817e34c + 8649d8d commit b65b74d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/v4/vue.go.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
{{- else }}
176176
<el-form-item label="{{.ColumnComment}}" prop="{{.JsonField}}">
177177
{{ if eq "input" .HtmlType -}}
178-
<el-input v-model="form.{{.JsonField}}" placeholder="{{.ColumnComment}}"
178+
<el-input v-model{{if eq .GoType "int64" -}}.number{{- end}}="form.{{.JsonField}}" placeholder="{{.ColumnComment}}"
179179
{{if eq .IsEdit "false" -}}:disabled="isEdit" {{- end}}/>
180180
{{- else if eq "select" .HtmlType -}}
181181
{{- if ne .FkTableName "" -}}

0 commit comments

Comments
 (0)