diff --git a/packages/form-render/package.json b/packages/form-render/package.json index c0d780ee9..f913ab95c 100644 --- a/packages/form-render/package.json +++ b/packages/form-render/package.json @@ -1,6 +1,6 @@ { "name": "form-render", - "version": "2.4.1", + "version": "2.4.2", "description": "通过 JSON Schema 生成标准 Form,常用于自定义搭建配置界面生成", "keywords": [ "Form", diff --git a/packages/form-render/src/render-core/FieldItem/main.tsx b/packages/form-render/src/render-core/FieldItem/main.tsx index 8a577b466..574f67b94 100644 --- a/packages/form-render/src/render-core/FieldItem/main.tsx +++ b/packages/form-render/src/render-core/FieldItem/main.tsx @@ -174,6 +174,7 @@ export default (props: any) => { const initialValue = schema.default ?? schema.defaultValue; const classRest = { 'fr-hide-label': label === 'fr-hide-label', 'fr-inline-field': inlineSelf, 'fr-field-visibility': !visible, [schema.className] : !! schema.className }; + debugger; const formItem = ( { wrapperCol={fieldCol} noStyle={noStyle} dependencies={dependencies} - validateTrigger={ validateTrigger ?? fieldRef?.current?.validator ? 'onSubmit' : 'onChange' } + validateTrigger={ validateTrigger ?? (fieldRef?.current?.validator ? 'onSubmit' : 'onChange') } > {fieldProps.onStatusChange ? ( 0) { if (['string', 'number'].indexOf(typeof value) > -1) { - const item = options.find(item => item.value === value); + const item = options.find((item: any) => item.value === value); __html = item?.label || '-'; } else if (Array.isArray(value)) {