diff --git a/app/system/service/tools_gen_table.go b/app/system/service/tools_gen_table.go index 8e482bd..1e711b5 100644 --- a/app/system/service/tools_gen_table.go +++ b/app/system/service/tools_gen_table.go @@ -665,11 +665,11 @@ func (s *toolsGenTable) writeDb(path string, ctx context.Context) (err error) { if e == io.EOF { break } - if gstr.Trim(string(bytes)) == "" { + str := gstr.Trim(string(bytes)) + + if str == "" { continue } - bytes = bytes[:len(bytes)-2] - str := string(bytes) if strings.Contains(str, "/*") { isAnnotation = true diff --git a/template/vm/vue/list-vue.template b/template/vm/vue/list-vue.template index 39cb861..0ede179 100644 --- a/template/vm/vue/list-vue.template +++ b/template/vm/vue/list-vue.template @@ -5,7 +5,7 @@ {{range $index, $column := .table.Columns}} {{if and (eq $column.IsQuery "1") (ne $column.ColumnName "created_by") (ne $column.ColumnName "updated_by") (ne $column.ColumnName "created_at") (ne $column.ColumnName "updated_at") (ne $column.ColumnName "deleted_at")}} - {{if eq $column.HtmlType "input"}} + {{if eq $column.HtmlType "input" "textarea"}} {{range $index, $column := .table.Columns}} {{if and (eq $column.IsQuery "1") (ne $column.ColumnName "created_by") (ne $column.ColumnName "updated_by") (ne $column.ColumnName "created_at") (ne $column.ColumnName "updated_at") (ne $column.ColumnName "deleted_at")}} - {{if eq $column.HtmlType "input"}} + {{if eq $column.HtmlType "input" "textarea"}}