| | |
| | | const [autoIncrement, setAutoIncrement] = useState(false); |
| | | |
| | | useEffect(() => { |
| | | setAutoIncrement(false); |
| | | form.resetFields(); |
| | | if (curSprite && props) { |
| | | form.setFieldsValue({ |
| | |
| | | } |
| | | |
| | | const handleFinish = (values) => { |
| | | console.log({ |
| | | ...values |
| | | , ...props.values |
| | | , autoIncrement: autoIncrement |
| | | }); return |
| | | props.submit({ |
| | | ...values |
| | | , ...props.values |
| | | , autoIncrement: autoIncrement |
| | | , type: curSprite?.data?.type |
| | | }) |
| | | } |
| | | |
| | | const formValuesChange = (value) => { |
| | | console.log(value); |
| | | } |
| | | |
| | | return ( |
| | |
| | | > |
| | | <Form |
| | | form={form} |
| | | onFieldsChange={formValuesChange} |
| | | initialValues={{ |
| | | copyGap: 0, |
| | | autoIncrement: false, |
| | |
| | | options={[ |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.sub.copy.ascend', defaultMessage: '升序' }), |
| | | value: 'Ascending' |
| | | value: 'ascending' |
| | | }, |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.sub.copy.descend', defaultMessage: '降序' }), |
| | | value: 'Descending' |
| | | value: 'descending' |
| | | }, |
| | | ]} |
| | | onChange={(value) => { |