@hzab/form-render 1.7.10 → 1.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/index.tsx +6 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -147,6 +147,7 @@ import FormRender from "@hzab/form-render";
|
|
|
147
147
|
| initialValues | Object | 否 | - | form 初始值 |
|
|
148
148
|
| components | Object | 否 | - | 自定义组件 |
|
|
149
149
|
| formOptions | Object | 否 | - | createForm 的参数 |
|
|
150
|
+
| emptyValue | string | 否 | N/A | 只读模式 PreviewText emptyValue 配置 |
|
|
150
151
|
| disabled | boolean | 否 | - | 禁用状态 |
|
|
151
152
|
| readOnly | boolean | 否 | - | 只读状态 |
|
|
152
153
|
| onFormValuesChange | Function | 否 | - | 表单事件 (form)=>{} https://core.formilyjs.org/zh-CN/api/entry/form-effect-hooks |
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -180,10 +180,12 @@ const FormRender = forwardRef((props: any, parentRef) => {
|
|
|
180
180
|
onAutoSubmit={autoSubmit}
|
|
181
181
|
onAutoSubmitFailed={autoSubmitFailed}
|
|
182
182
|
>
|
|
183
|
-
<
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
<PreviewText.Placeholder value={props?.emptyValue}>
|
|
184
|
+
<FormLayout {...formLayoutProps}>
|
|
185
|
+
<SchemaField schema={schema}></SchemaField>
|
|
186
|
+
<div className="form-render-footer xxm">{footer}</div>
|
|
187
|
+
</FormLayout>
|
|
188
|
+
</PreviewText.Placeholder>
|
|
187
189
|
</Form>
|
|
188
190
|
</GlobalPropsContext.Provider>
|
|
189
191
|
);
|