diff --git a/docs/Examples/antd/Actions.md b/docs/Examples/antd/Actions.md index 2e24e3b3e1c..7428badea70 100644 --- a/docs/Examples/antd/Actions.md +++ b/docs/Examples/antd/Actions.md @@ -33,7 +33,8 @@ import 'antd/dist/antd.css' const actions = createFormActions() -actions.setFieldState('aa', state => { //同步调用会出错 +actions.setFieldState('aa', state => { + //同步调用会出错 state.value = '123' }) actions.submit() //同步调用会出错 @@ -48,24 +49,23 @@ const App = () => ( > - + }} + > + 修改AA的值并提交表单 + ) -console.log(React.unstable_ConcurrentMode) -ReactDOM.render( - - - , - document.getElementById('root') -) + +ReactDOM.render(, document.getElementById('root')) ``` ### 使用 createAsyncFormActions 做通讯 diff --git a/docs/Examples/next/Actions.md b/docs/Examples/next/Actions.md index ee92e25bf02..e16b4a01a66 100644 --- a/docs/Examples/next/Actions.md +++ b/docs/Examples/next/Actions.md @@ -33,7 +33,8 @@ import '@alifd/next/dist/next.css' const actions = createFormActions() -actions.setFieldState('aa', state => { //同步调用会出错 +actions.setFieldState('aa', state => { + //同步调用会出错 state.value = '123' }) actions.submit() //同步调用会出错 @@ -48,24 +49,23 @@ const App = () => ( > - + }} + > + 修改AA的值并提交表单 + ) -console.log(React.unstable_ConcurrentMode) -ReactDOM.render( - - - , - document.getElementById('root') -) + +ReactDOM.render(, document.getElementById('root')) ``` ### 使用 createAsyncFormActions 做通讯