perf: 参数值

This commit is contained in:
archer
2023-04-21 19:55:56 +08:00
parent 3c0fa30aaf
commit 4f51839026
7 changed files with 114 additions and 27 deletions

View File

@@ -40,6 +40,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
// 去重
const searchRes = await Promise.allSettled(
data.map(async ([q, a]) => {
if (!q || !a) {
return Promise.reject('q/a为空');
}
try {
q = q.replace(/\\n/g, '\n');
a = a.replace(/\\n/g, '\n');

View File

@@ -88,7 +88,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
throttle(() => {
if (!ChatBox.current) return;
const isBottom =
ChatBox.current.scrollTop + ChatBox.current.clientHeight + 50 >=
ChatBox.current.scrollTop + ChatBox.current.clientHeight + 80 >=
ChatBox.current.scrollHeight;
isBottom && scrollToBottom('auto');

View File

@@ -51,7 +51,7 @@ const NumberSetting = () => {
</Box>
<Flex mt={6} alignItems={'center'}>
<Box flex={'0 0 60px'}>:</Box>
<Box flex={'0 0 60px'}>:</Box>
<Box>{userInfo?.username}</Box>
</Flex>
<Box mt={6}>