diff --git a/client/.env.template b/client/.env.template index 624af8100c..3f36714933 100644 --- a/client/.env.template +++ b/client/.env.template @@ -1,7 +1,7 @@ # 运行端口,如果不是 3000 口运行,需要改成其他的。注意:不是改了这个变量就会变成其他端口,而是因为改成其他端口,才用这个变量。 PORT=3000 # database max link -DB_MAX_LINK=15 +DB_MAX_LINK=5 # 代理 # AXIOS_PROXY_HOST=127.0.0.1 # AXIOS_PROXY_PORT=7890 diff --git a/client/src/components/Select/index.tsx b/client/src/components/Select/index.tsx index 4999d5a9d8..a43f9c0467 100644 --- a/client/src/components/Select/index.tsx +++ b/client/src/components/Select/index.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useRef } from 'react'; import { Menu, MenuButton, MenuList, MenuItem, Button, useDisclosure } from '@chakra-ui/react'; import type { ButtonProps } from '@chakra-ui/react'; import { ChevronDownIcon } from '@chakra-ui/icons'; @@ -13,6 +13,7 @@ interface Props extends ButtonProps { } const MySelect = ({ placeholder, value, width = 'auto', list, onchange, ...props }: Props) => { + const ref = useRef(null); const menuItemStyles = { borderRadius: 'sm', py: 2, @@ -26,8 +27,9 @@ const MySelect = ({ placeholder, value, width = 'auto', list, onchange, ...props return ( - +