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';
|
2022-05-23 14:37:16 +08:00
|
|
|
import React from 'react';
|
2020-07-03 16:25:29 +08:00
|
|
|
|
|
|
|
let acc = 0;
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => {
|
2020-07-03 16:25:29 +08:00
|
|
|
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-05-19 09:46:26 +08:00
|
|
|
export default App;
|
2020-07-03 16:25:29 +08:00
|
|
|
```
|