diff --git a/client/src/components/Radio/index.tsx b/client/src/components/Radio/index.tsx index 6a78860a4..48ba742bf 100644 --- a/client/src/components/Radio/index.tsx +++ b/client/src/components/Radio/index.tsx @@ -25,6 +25,7 @@ const Radio = ({ list, value, onChange, ...props }: Props) => { mr: 1, borderRadius: '16px', transition: '0.2s', + boxSizing: 'border-box', ...(value === item.value ? { border: '5px solid', diff --git a/client/src/constants/theme.ts b/client/src/constants/theme.ts index 4873047bb..ff1ea23fb 100644 --- a/client/src/constants/theme.ts +++ b/client/src/constants/theme.ts @@ -11,8 +11,6 @@ const { definePartsStyle: switchPart, defineMultiStyleConfig: switchMultiStyle } createMultiStyleConfigHelpers(switchAnatomy.keys); const { definePartsStyle: selectPart, defineMultiStyleConfig: selectMultiStyle } = createMultiStyleConfigHelpers(selectAnatomy.keys); -const { definePartsStyle: checkboxPart, defineMultiStyleConfig: checkboxMultiStyle } = - createMultiStyleConfigHelpers(checkboxAnatomy.keys); // modal 弹窗 const ModalTheme = defineMultiStyleConfig({ @@ -69,6 +67,7 @@ const Button = defineStyleConfig({ backgroundImage: 'linear-gradient(to bottom right, #2152d9 0%,#3370ff 40%, #4e83fd 100%) !important', color: 'white', + border: 'none', _hover: { filter: 'brightness(115%)' }, diff --git a/client/src/pages/_error.tsx b/client/src/pages/_error.tsx index 745497af7..09b006b6e 100644 --- a/client/src/pages/_error.tsx +++ b/client/src/pages/_error.tsx @@ -1,12 +1,10 @@ -function Error({ errStr }: { errStr: string }) { - return
{errStr}
; +function Error() { + return ( ++ 部分系统不兼容,导致页面崩溃。如果可以,请联系作者,反馈下具体操作和页面。大部分是 苹果 的 + safari 浏览器导致,可以尝试更换 chrome 浏览器。 +
+ ); } -Error.getInitialProps = ({ res, err }: { res: any; err: any }) => { - console.log(err); - return { - errStr: `部分系统不兼容,导致页面崩溃。如果可以,请联系作者,反馈下具体操作和页面。大部分是 苹果 的 safari 浏览器导致,可以尝试更换 chrome 浏览器。` - }; -}; - export default Error; diff --git a/client/src/pages/model/components/ModelList.tsx b/client/src/pages/model/components/ModelList.tsx index 2cfb3e90f..235031a9a 100644 --- a/client/src/pages/model/components/ModelList.tsx +++ b/client/src/pages/model/components/ModelList.tsx @@ -9,9 +9,14 @@ import { useToast } from '@/hooks/useToast'; import { useQuery } from '@tanstack/react-query'; import { useUserStore } from '@/store/user'; import { MyModelsTypeEnum } from '@/constants/user'; +import dynamic from 'next/dynamic'; -import Avatar from '@/components/Avatar'; -import Tabs from '@/components/Tabs'; +const Avatar = dynamic(() => import('@/components/Avatar'), { + ssr: true +}); +const Tabs = dynamic(() => import('@/components/Tabs'), { + ssr: true +}); const ModelList = ({ modelId }: { modelId: string }) => { const [currentTab, setCurrentTab] = useState(MyModelsTypeEnum.my); diff --git a/client/src/pages/model/components/detail/components/ModelEditForm.tsx b/client/src/pages/model/components/detail/components/ModelEditForm.tsx index 7f3476d5c..e64b5d028 100644 --- a/client/src/pages/model/components/detail/components/ModelEditForm.tsx +++ b/client/src/pages/model/components/detail/components/ModelEditForm.tsx @@ -47,10 +47,10 @@ import { defaultShareChat } from '@/constants/model'; import type { ShareChatEditType } from '@/types/model'; import type { ModelSchema } from '@/types/mongoSchema'; import { formatTimeToChatTime, useCopyData, getErrText } from '@/utils/tools'; -import MyIcon from '@/components/Icon'; import { useGlobalStore } from '@/store/global'; import { useUserStore } from '@/store/user'; import Avatar from '@/components/Avatar'; +import MyIcon from '@/components/Icon'; const ModelEditForm = ({ formHooks, @@ -174,32 +174,6 @@ ${e.password ? `密码为: ${e.password}` : ''}`; // init kb select list const { data: kbList = [] } = useQuery(['loadKbList'], () => loadKbList()); - const RenderSelectedKbList = useCallback(() => { - const kbs = getValues('chat.relatedKbs')?.map((id) => kbList.find((kb) => kb._id === id)) || []; - - return ( - <> - {kbs.map((item) => - item ? ( -