mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-01-23 10:50:24 +08:00
fix generate
This commit is contained in:
parent
5aa7ace31b
commit
8582748eef
@ -69,7 +69,7 @@ func (l *gCurd) generateLogicSwitchFields(ctx context.Context, in *CurdPreviewIn
|
||||
if in.options.Step.HasSwitch {
|
||||
for _, field := range in.masterFields {
|
||||
if field.FormMode == "Switch" {
|
||||
buffer.WriteString("\t\tdao." + in.In.DaoName + ".Columns()." + field.GoName + ",\n")
|
||||
buffer.WriteString("\t\t\"" + field.TsName + "\",\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -204,6 +204,8 @@ func (l *gCurd) generateWebModelFormSchemaEach(buffer *bytes.Buffer, fields []*s
|
||||
case FormModeTimeRange:
|
||||
component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n type: '%s',\n clearable: true,\n shortcuts: %s,\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NDatePicker", field.Dc, "datetimerange", "defRangeShortcuts()")
|
||||
|
||||
case FormModeSwitch:
|
||||
fallthrough
|
||||
case FormModeRadio:
|
||||
component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n giProps: {\n //span: 24,\n },\n componentProps: {\n options: [],\n onUpdateChecked: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NRadioGroup", field.Dc)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user