MCPcopy Create free account
hub / github.com/ModelEngine-Group/app-platform / getTitle

Function getTitle

agent-flow/src/components/Header.jsx:82–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 => {

Callers 1

HeaderFunction · 0.70

Calls 1

onInputBlurFunction · 0.70

Tested by

no test coverage detected