Skip to content

Commit

Permalink
feat(fr):v1.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
siyi98 committed Mar 23, 2022
1 parent dc59ae3 commit 1cf2cb1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
1 change: 0 additions & 1 deletion docs/form-render/advanced/display.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const schema = displayType => ({
},
});


export default () => (
<div>
<h2>display: row</h2>
Expand Down
6 changes: 3 additions & 3 deletions docs/form-render/schema/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ readOnly=true 的情况,FormRender 默认使用 html 组件渲染。特殊情
"input1": {
"title": "简单输入框",
"type": "string",
"required": true,
},
}
"required": true
}
}
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions packages/form-render/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.9.7

- [+] 对嵌套的`对象类型`组件扩展`schema`,新增`collapsed`属性用于控制面板折叠。

## 1.9.6

- [+] 更新`schema`类型声明

## 1.9.5

- [+] 扩展`watch`的能力
Expand Down
2 changes: 1 addition & 1 deletion packages/form-render/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-render",
"version": "1.9.6",
"version": "1.9.7",
"description": "通过 JSON Schema 生成标准 Form,常用于自定义搭建配置界面生成",
"keywords": [
"Form",
Expand Down
2 changes: 1 addition & 1 deletion packages/form-render/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type SchemaType =
| 'void'
| 'date'
| 'datetime'
| (string & {})
| (string & {});

interface SchemaBase {
type: SchemaType;
Expand Down
10 changes: 4 additions & 6 deletions packages/form-render/src/widgets/antd/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div className="w-100">{children}</div>;
Expand Down

0 comments on commit 1cf2cb1

Please sign in to comment.