| 80 | * @return {JSX.Element} 标题组件. |
| 81 | */ |
| 82 | const getTitle = () => { |
| 83 | if (edit) { |
| 84 | return (<> |
| 85 | <Form.Item |
| 86 | name='title' |
| 87 | rules={[{required: true, message: t('pleaseInsertName')}]} |
| 88 | initialValue={shape.text}> |
| 89 | <Input |
| 90 | onBlur={(e) => onInputBlur(e)} |
| 91 | ref={inputRef} |
| 92 | onMouseDown={(e) => e.stopPropagation()} |
| 93 | placeholder={t('pleaseInsertName')} |
| 94 | style={{height: '24px', borderColor: shape.focusBorderColor}}/> |
| 95 | </Form.Item> |
| 96 | </>); |
| 97 | } else { |
| 98 | return <TextDisplay text={shape.text} lineHeight={19} width={200} fontSize={16} fontWeight={700}/>; |
| 99 | } |
| 100 | }; |
| 101 | |
| 102 | const onOpenChange = (openKeys) => { |
| 103 | shape.drawer.getToolMenus().forEach(m => { |