diff --git a/docs/form-render/advanced/display.md b/docs/form-render/advanced/display.md
index 2762cc133..b34e04c48 100644
--- a/docs/form-render/advanced/display.md
+++ b/docs/form-render/advanced/display.md
@@ -50,7 +50,6 @@ const schema = displayType => ({
},
});
-
export default () => (
display: row
diff --git a/docs/form-render/schema/schema.md b/docs/form-render/schema/schema.md
index d1f74029e..62bfdb4e6 100644
--- a/docs/form-render/schema/schema.md
+++ b/docs/form-render/schema/schema.md
@@ -475,9 +475,9 @@ readOnly=true 的情况,FormRender 默认使用 html 组件渲染。特殊情
"input1": {
"title": "简单输入框",
"type": "string",
- "required": true,
- },
- }
+ "required": true
+ }
+ }
}
}
}
diff --git a/packages/form-render/CHANGELOG.md b/packages/form-render/CHANGELOG.md
index 244e281a5..1e9f1cb45 100644
--- a/packages/form-render/CHANGELOG.md
+++ b/packages/form-render/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 1.9.7
+
+- [+] 对嵌套的`对象类型`组件扩展`schema`,新增`collapsed`属性用于控制面板折叠。
+
+## 1.9.6
+
+- [+] 更新`schema`类型声明
+
## 1.9.5
- [+] 扩展`watch`的能力
diff --git a/packages/form-render/package.json b/packages/form-render/package.json
index 06e450df4..b6a4c4157 100644
--- a/packages/form-render/package.json
+++ b/packages/form-render/package.json
@@ -1,6 +1,6 @@
{
"name": "form-render",
- "version": "1.9.6",
+ "version": "1.9.7",
"description": "通过 JSON Schema 生成标准 Form,常用于自定义搭建配置界面生成",
"keywords": [
"Form",
diff --git a/packages/form-render/src/index.d.ts b/packages/form-render/src/index.d.ts
index e42ce5c40..d74cbe81e 100644
--- a/packages/form-render/src/index.d.ts
+++ b/packages/form-render/src/index.d.ts
@@ -10,7 +10,7 @@ export type SchemaType =
| 'void'
| 'date'
| 'datetime'
- | (string & {})
+ | (string & {});
interface SchemaBase {
type: SchemaType;
diff --git a/packages/form-render/src/widgets/antd/map.js b/packages/form-render/src/widgets/antd/map.js
index f62cd2e74..67e2572cd 100644
--- a/packages/form-render/src/widgets/antd/map.js
+++ b/packages/form-render/src/widgets/antd/map.js
@@ -10,13 +10,11 @@ export default function Map({ children, title, schema, ...rest }) {
// setCollapsed(allCollapsed);
// }, [allCollapsed]);
- useEffect(()=>{
- if(schema.hasOwnProperty('collapsed')){
- setCollapsed(schema.collapsed)
+ useEffect(() => {
+ if (schema.hasOwnProperty('collapsed')) {
+ setCollapsed(schema.collapsed);
}
- },[schema.collapsed])
-
-
+ }, [schema.collapsed]);
if (!title) {
return
{children}
;