diff --git a/docs/guide/advanced/controlled.md b/docs/guide/advanced/controlled.md index ad6938533de..1c14c1b703b 100644 --- a/docs/guide/advanced/controlled.md +++ b/docs/guide/advanced/controlled.md @@ -307,7 +307,7 @@ const DYNAMIC_INJECT_SCHEMA = { }, } -export default observer(() => { +const App = observer(() => { const oldTypeRef = useRef() const form = useMemo(() => createForm(), []) const currentType = form.values.type @@ -340,6 +340,8 @@ export default observer(() => { ) }) + +export default App ``` ## Schema fragment linkage (custom component) @@ -429,7 +431,7 @@ const DYNAMIC_INJECT_SCHEMA = { }, } -export default observer(() => { +const App = observer(() => { const form = useMemo(() => createForm(), []) const schema = { type: 'object', @@ -457,6 +459,8 @@ export default observer(() => { ) }) + +export default App ``` ## Field Level Control diff --git a/docs/guide/advanced/controlled.zh-CN.md b/docs/guide/advanced/controlled.zh-CN.md index 4be8251d37d..7f7b41a509b 100644 --- a/docs/guide/advanced/controlled.zh-CN.md +++ b/docs/guide/advanced/controlled.zh-CN.md @@ -307,7 +307,7 @@ const DYNAMIC_INJECT_SCHEMA = { }, } -export default observer(() => { +const App = observer(() => { const oldTypeRef = useRef() const form = useMemo(() => createForm(), []) const currentType = form.values.type @@ -340,6 +340,8 @@ export default observer(() => { ) }) + +export default App ``` ## Schema 片段联动(自定义组件) @@ -429,7 +431,7 @@ const DYNAMIC_INJECT_SCHEMA = { }, } -export default observer(() => { +const App = observer(() => { const form = useMemo(() => createForm(), []) const schema = { type: 'object', @@ -457,6 +459,8 @@ export default observer(() => { ) }) + +export default App ``` ## 字段级受控