diff --git a/template/v4/vue.go.template b/template/v4/vue.go.template index 2b1e43f1..6b72c465 100644 --- a/template/v4/vue.go.template +++ b/template/v4/vue.go.template @@ -66,7 +66,7 @@ {{- if and (eq .IsList "1") (eq .FkTableName "") (eq .DictType "") (eq .HtmlType "datetime") }}{{$hasDatetime = true}}{{end -}} {{- if eq .IsQuery "1" }}{{$hasQuery = true}}{{end -}} {{- if and (eq .IsInsert "1") (eq .IsRequired "1") (not .Pk) (ne .GoField "CreatedAt") (ne .GoField "UpdatedAt") (ne .GoField "DeletedAt") (ne .GoField "UpdateBy") (ne .GoField "CreateBy") }}{{$hasRules = true}}{{end -}} - {{- if and .Pk (eq .GoType "string") }}{{$pkType = "string"}}{{end -}} + {{- if and .Pk (eq .GoType "string") }}{{$pkType = "string"}}{{$hasRules = true}}{{end -}} {{- end -}}