diff --git a/src/views/components/ChatMark/index.tsx b/src/views/components/ChatMark/index.tsx index 0b29130..6278b5f 100644 --- a/src/views/components/ChatMark/index.tsx +++ b/src/views/components/ChatMark/index.tsx @@ -2,9 +2,19 @@ import React from 'react'; import { Box, Button, Checkbox, Text, Radio, Textarea, createStyles } from '@mantine/core'; const useStyles = createStyles((theme) => ({ - chatmarkBox:{ + container:{ padding:0, margin:0, + }, + button:{ + marginTop:theme.spacing.xs, + marginRight:theme.spacing.xs, + }, + checkbox:{ + marginTop:theme.spacing.xs, + }, + radio:{ + marginTop:theme.spacing.xs, } })); @@ -30,21 +40,21 @@ const ChatMark = ({ children }) => { match = line.match(/\((.*?)\)\s(.*)/); if (match) { const [id, title] = match.slice(1); - widgets.push(); + widgets.push(); } } else if (line.startsWith('> [')) { // Checkbox widget match = line.match(/\[([x ]*)\]\((.*?)\):\s*(.*)/); if (match) { const [status, id, title] = match.slice(1); - widgets.push(); + widgets.push(); } } else if (line.startsWith('> -')) { // Radio button widget match = line.match(/-\s\((.*?)\):\s(.*)/); if (match) { const [id, title] = match.slice(1); - radioGroup.push(); + radioGroup.push(); // 检查下一行是否还是 Radio,如果不是则结束当前 Group const nextLine = lines[index + 1]; @@ -77,7 +87,7 @@ const ChatMark = ({ children }) => { }; return ( - + {renderWidgets(children)} );