From 4cf77e423ce9322f78a6ecc68a29383bf804ed51 Mon Sep 17 00:00:00 2001 From: SummonR7000P <2239760702@qq.com> Date: Sun, 9 Apr 2023 01:21:08 +0800 Subject: [PATCH] make cq target_type as selecter --- apps/web/src/pages/Start/ConfigDialog.tsx | 25 +++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/web/src/pages/Start/ConfigDialog.tsx b/apps/web/src/pages/Start/ConfigDialog.tsx index 887be11..8f085c6 100644 --- a/apps/web/src/pages/Start/ConfigDialog.tsx +++ b/apps/web/src/pages/Start/ConfigDialog.tsx @@ -12,6 +12,7 @@ import FormGroup from '@mui/material/FormGroup'; import Switch from '@mui/material/Switch'; import Divider from '@mui/material/Divider'; import Box from '@mui/material/Box'; +import MenuItem from '@mui/material/MenuItem'; type renderLoginType = React.FC<{ onOK: (phone: string, password: string) => Promise; @@ -79,6 +80,17 @@ export const RenderLogin: renderLoginType = (props) => { ); }; +const listTargetType = [ + { + value: 'private', + label: '私聊', + }, + { + value: 'group', + label: '群组', + }, +]; + export const RenderConfig: renderConfigType = (props) => { const [config, setConfig] = useState(defaultConfig); @@ -291,8 +303,8 @@ export const RenderConfig: renderConfigType = (props) => { ) => { setConfig(prev => { @@ -300,8 +312,13 @@ export const RenderConfig: renderConfigType = (props) => { }); }} fullWidth - variant="outlined" - /> + variant="outlined"> + {listTargetType.map((option) => ( + + {option.label} + + ))} +