mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-27 21:03:41 +08:00
up generate
表单组件是动态键值对类型,默认值改为空数组
This commit is contained in:
@@ -47,6 +47,9 @@ func (l *gCurd) generateWebModelState(ctx context.Context, in *CurdPreviewInput)
|
||||
if field.FormMode == "Switch" {
|
||||
value = 2
|
||||
}
|
||||
if field.FormMode == "InputDynamic" {
|
||||
value = "[]"
|
||||
}
|
||||
buffer.WriteString(fmt.Sprintf(" public %s = %v; // %s\n", field.TsName, value, field.Dc))
|
||||
}
|
||||
buffer.WriteString("\n constructor(state?: Partial<State>) {\n if (state) {\n Object.assign(this, state);\n }\n }")
|
||||
|
Reference in New Issue
Block a user