diff --git a/web/src/pages/nodes/wizard/Step1NodeName.tsx b/web/src/pages/nodes/wizard/Step1NodeName.tsx new file mode 100644 index 0000000..67c592c --- /dev/null +++ b/web/src/pages/nodes/wizard/Step1NodeName.tsx @@ -0,0 +1,60 @@ +import { Radio, Input, Typography } from '@arco-design/web-react' + +const { Text } = Typography +const TextArea = Input.TextArea + +export type Mode = 'single' | 'batch' + +interface Props { + mode: Mode + onModeChange: (m: Mode) => void + singleName: string + onSingleNameChange: (v: string) => void + batchText: string + onBatchTextChange: (v: string) => void +} + +export function Step1NodeName({ + mode, onModeChange, singleName, onSingleNameChange, batchText, onBatchTextChange, +}: Props) { + return ( +
+
+ onModeChange(v as Mode)} + options={[ + { label: '单节点', value: 'single' }, + { label: '批量创建', value: 'batch' }, + ]} + /> +
+ {mode === 'single' ? ( +
+ 节点名称 + +
+ ) : ( +
+ 节点名称(每行一个,最多 50 个) +