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