From 02a0b485f91b545a1cee2ba37c32e40072fa6a7c Mon Sep 17 00:00:00 2001 From: Rizky Date: Sat, 29 Jun 2024 21:52:21 -0700 Subject: [PATCH] fix --- comps/form/Form.tsx | 3 +- comps/form/base/BaseField.tsx | 19 +++++++---- comps/form/field/Field.tsx | 15 ++++----- comps/form/field/FieldInput.tsx | 9 +++-- comps/form/field/Label.tsx | 6 +--- comps/form/gen/gen-form.ts | 38 +++++++++++++++------ comps/form/typings.ts | 12 +++---- comps/list/TableList.tsx | 60 ++++++++++++++++++--------------- exports.tsx | 2 +- 9 files changed, 94 insertions(+), 70 deletions(-) diff --git a/comps/form/Form.tsx b/comps/form/Form.tsx index aadc9e0..84a921b 100755 --- a/comps/form/Form.tsx +++ b/comps/form/Form.tsx @@ -14,7 +14,7 @@ const editorFormWidth = {} as Record; export { FMLocal } from "./typings"; export const Form: FC = (props) => { - const { PassProp, body, feature, sfd_field, style } = props; + const { PassProp, body, feature, sfd_field } = props; const fm = useLocal({ data: editorFormData[props.item.id] ? editorFormData[props.item.id].data @@ -168,7 +168,6 @@ export const Form: FC = (props) => {
{ const { field, fm, arg } = prop; const w = field.width; - const mode = fm.props.label_mode; const prefix = typeof field.prefix === "function" ? field.prefix() @@ -30,8 +29,8 @@ export const BaseField = (prop: { : null; const name = field.name; const errors = fm.error.get(name); - let type_field = typeof arg.type === "function" ? arg.type() : arg.type; // tipe field + const showlabel = arg.show_label || "y"; return (