| | |
| | | }} |
| | | > |
| | | <Row gutter={[24, 16]}> |
| | | <Col span={24} /> |
| | | |
| | | <Col span={24}> |
| | | <Form.Item |
| | |
| | | {/* copy */} |
| | | <Col span={24}> |
| | | <Row gutter={0}> |
| | | <Col span={20}> |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.copy', defaultMessage: '复制' })} |
| | | labelCol={{ span: 4 }} |
| | | > |
| | | <Space.Compact> |
| | | <Form.Item |
| | | noStyle |
| | | name="copyDire" |
| | | > |
| | | <Select |
| | | style={{ width: 100 }} |
| | | options={[ |
| | | { value: 'left', label: intl.formatMessage({ id: 'map.settings.left', defaultMessage: '左' }) }, |
| | | { value: 'right', label: intl.formatMessage({ id: 'map.settings.right', defaultMessage: '右' }) }, |
| | | { value: 'top', label: intl.formatMessage({ id: 'map.settings.top', defaultMessage: '上' }) }, |
| | | { value: 'bottom', label: intl.formatMessage({ id: 'map.settings.bottom', defaultMessage: '下' }) }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='copyCount' |
| | | noStyle |
| | | rules={[ |
| | | { |
| | | required: true, |
| | | }, |
| | | ]} |
| | | > |
| | | <InputNumber |
| | | addonBefore={<Space.Compact></Space.Compact>} |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | min={1} |
| | | step={1} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item> |
| | | <Button |
| | | onClick={() => { |
| | | setChildrenDrawer(true); |
| | | }} |
| | | > |
| | | <FormattedMessage id='common.execute' defaultMessage='执行' /> |
| | | </Button> |
| | | <MapCopySettings |
| | | open={childrenDrawer} |
| | | refCurr={props.refCurr} |
| | | curSprite={props.curSprite} |
| | | values={form.getFieldsValue()} |
| | | submit={handleOnCopy} |
| | | onClose={() => { |
| | | setChildrenDrawer(false) |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | |
| | | </Space.Compact> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={0}> |
| | | <Col offset={16} span={8}> |
| | | <Form.Item> |
| | | <Button |
| | | type="dashed" |
| | | onClick={() => { |
| | | if (lastCopiedSprites) { |
| | | lastCopiedSprites.forEach(copiedSprite => { |
| | | Utils.getMapContainer().removeChild(copiedSprite); |
| | | }) |
| | | setLastCopiedSprites([]); |
| | | } |
| | | }} |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.copy', defaultMessage: '复制' })} |
| | | > |
| | | <Space.Compact> |
| | | <Form.Item |
| | | noStyle |
| | | name="copyDire" |
| | | > |
| | | <FormattedMessage id='map.settings.sub.copy.undo.last.copies' defaultMessage='撤回复制' /> |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | | <Select |
| | | style={{ width: 100 }} |
| | | options={[ |
| | | { value: 'left', label: intl.formatMessage({ id: 'map.settings.left', defaultMessage: '左' }) }, |
| | | { value: 'right', label: intl.formatMessage({ id: 'map.settings.right', defaultMessage: '右' }) }, |
| | | { value: 'top', label: intl.formatMessage({ id: 'map.settings.top', defaultMessage: '上' }) }, |
| | | { value: 'bottom', label: intl.formatMessage({ id: 'map.settings.bottom', defaultMessage: '下' }) }, |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='copyCount' |
| | | noStyle |
| | | rules={[ |
| | | { |
| | | required: true, |
| | | }, |
| | | ]} |
| | | > |
| | | <InputNumber |
| | | addonBefore={<Space.Compact></Space.Compact>} |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | min={1} |
| | | step={1} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item> |
| | | <Button |
| | | onClick={() => { |
| | | setChildrenDrawer(true); |
| | | }} |
| | | > |
| | | <FormattedMessage id='common.execute' defaultMessage='执行' /> |
| | | </Button> |
| | | <MapCopySettings |
| | | open={childrenDrawer} |
| | | refCurr={props.refCurr} |
| | | curSprite={props.curSprite} |
| | | values={form.getFieldsValue()} |
| | | submit={handleOnCopy} |
| | | onClose={() => { |
| | | setChildrenDrawer(false) |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item> |
| | | <Button |
| | | type="dashed" |
| | | onClick={() => { |
| | | if (lastCopiedSprites) { |
| | | lastCopiedSprites.forEach(copiedSprite => { |
| | | Utils.getMapContainer().removeChild(copiedSprite); |
| | | }) |
| | | setLastCopiedSprites([]); |
| | | } |
| | | }} |
| | | > |
| | | <FormattedMessage id='map.settings.sub.copy.reverse' defaultMessage='撤销' /> |
| | | </Button> |
| | | </Form.Item> |
| | | </Space.Compact> |
| | | </Form.Item> |
| | | </Row> |
| | | </Col> |
| | | |
| | | {/* more */} |
| | | <Col span={24}> |
| | | <Row gutter={24}> |
| | | <Col span={18}> |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.more', defaultMessage: '更多' })} |
| | | labelCol={{ span: 4 }} |
| | | > |
| | | <Button |
| | | type="dashed" |
| | | danger |
| | | onClick={() => { |
| | | Utils.getMapContainer().removeChild(curSprite); |
| | | props.setSpriteBySettings(null); |
| | | Utils.removeSelectedEffect(); |
| | | form.resetFields(); |
| | | }} |
| | | > |
| | | <FormattedMessage id='map.settings.delete' defaultMessage='删除' /> |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.more', defaultMessage: '更多' })} |
| | | > |
| | | <Button |
| | | type="dashed" |
| | | danger |
| | | onClick={() => { |
| | | Utils.getMapContainer().removeChild(curSprite); |
| | | props.setSpriteBySettings(null); |
| | | Utils.removeSelectedEffect(); |
| | | form.resetFields(); |
| | | }} |
| | | > |
| | | <FormattedMessage id='map.settings.delete' defaultMessage='删除' /> |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | </Row> |