2020-07-03 16:25:29 +08:00
|
|
|
---
|
|
|
|
order: 99
|
|
|
|
title:
|
|
|
|
zh-CN: Dep Debug
|
|
|
|
en-US: Dep Debug
|
2020-08-10 09:41:45 +08:00
|
|
|
debug: true
|
2020-07-03 16:25:29 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
Buggy!
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Buggy!
|
|
|
|
|
|
|
|
```tsx
|
|
|
|
import { Form, Input } from 'antd';
|
|
|
|
|
|
|
|
let acc = 0;
|
|
|
|
|
|
|
|
const Demo = () => {
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
return (
|
|
|
|
<Form
|
|
|
|
form={form}
|
|
|
|
name="debug"
|
|
|
|
initialValues={{
|
|
|
|
debug1: 'debug1',
|
|
|
|
debug2: 'debug2',
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Form.Item noStyle dependencies={['debug1']}>
|
2021-02-23 10:45:11 +08:00
|
|
|
{
|
|
|
|
() => acc++
|
2020-07-03 16:25:29 +08:00
|
|
|
// return <pre>{JSON.stringify(form.getFieldsValue(), null, 2)}</pre>;
|
2021-02-23 10:45:11 +08:00
|
|
|
}
|
2020-07-03 16:25:29 +08:00
|
|
|
</Form.Item>
|
|
|
|
<Form.Item label="debug1" name="debug1">
|
|
|
|
<Input />
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item label="debug2" name="debug2">
|
|
|
|
<Input />
|
|
|
|
</Form.Item>
|
|
|
|
</Form>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2022-04-03 23:27:45 +08:00
|
|
|
export default () => <Demo />;
|
2020-07-03 16:25:29 +08:00
|
|
|
```
|