From 691c0c39ec0c266a446362a2365a8c2c78945418 Mon Sep 17 00:00:00 2001 From: xjs Date: Thu, 10 Apr 2025 13:08:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CheckBoxSelector/index.module.less | 129 ----------------- src/components/CheckBoxSelector/index.tsx | 103 -------------- src/components/Header/index.module.less | 130 ------------------ src/components/Header/index.tsx | 102 -------------- src/pages/MainPage/MainArea/Room/index.tsx | 3 +- src/pages/MainPage/index.module.less | 2 +- src/pages/MainPage/index.tsx | 7 +- 7 files changed, 4 insertions(+), 472 deletions(-) delete mode 100644 src/components/CheckBoxSelector/index.module.less delete mode 100644 src/components/CheckBoxSelector/index.tsx delete mode 100644 src/components/Header/index.module.less delete mode 100644 src/components/Header/index.tsx diff --git a/src/components/CheckBoxSelector/index.module.less b/src/components/CheckBoxSelector/index.module.less deleted file mode 100644 index d440678..0000000 --- a/src/components/CheckBoxSelector/index.module.less +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved. - * SPDX-license-identifier: BSD-3-Clause - */ - -.wrapper { - width: 100%; - display: flex; - flex-direction: row; - align-items: center; - - .placeholder { - font-size: 14px; - font-weight: 400; - line-height: 22px; - color: var(--text-color-text-3, rgba(115, 122, 135, 1)); - } - - .box { - margin-right: 16px; - } - - .seeMore { - display: flex; - padding: 6px 12px; - justify-content: center; - align-items: center; - gap: var(--border-radius-small, 4px); - border-radius: 6px; - background: linear-gradient(96deg, rgba(22, 100, 255, 0.10) 0%, rgba(128, 64, 255, 0.10) 97.7%); - - .seeMoreText { - font-family: "PingFang SC"; - font-size: 13px; - font-style: normal; - font-weight: 500; - line-height: 22px; /* 169.231% */ - letter-spacing: 0.039px; - background: var(--Linear, linear-gradient(90deg, #004FFF 38.86%, #9865FF 100%)); - background-clip: text; - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - } - } -} - -:global { - - .ant-modal-content { - border-radius: 8px; - } - .ant-modal-footer { - border-top: 0px; - } - - .ant-modal-body { - padding-top: 8px; - padding-bottom: 16px; - } - - .ant-modal-header { - border-bottom: 0px; - border-radius: 8px; - } -} - -.footer { - width: calc(100% - 12px); - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - gap: 12px; - - .cancel { - width: 88px; - height: 32px; - border-radius: 6px; - border: 1px solid var(--line-color-border-3, rgba(221, 226, 233, 1)) - } - - .confirm { - width: 88px; - height: 32px; - border-radius: 6px; - background: linear-gradient(95.87deg, #1664FF 0%, #8040FF 97.7%); - color: white !important; - } - - .confirm:hover { - opacity: .8; - } - - .confirm:active { - opacity: 1; - } -} - -.modalInner { - width: 100%; - // max-height: 500px; - display: flex; - flex: row; - flex-wrap: wrap; - overflow: auto; - gap: 12px; -} - -.modal { - // max-height: 650px; - overflow: hidden; -} - -.modalInner::-webkit-scrollbar { - width: 8px; - height: 8px; - border-radius: 5px; -} - -.modalInner::-webkit-scrollbar-thumb { - background: rgb(205, 204, 204); - border-radius: 0px; - border-radius: 5px; -} - -.modalInner::-webkit-scrollbar-track { - background: rgb(255, 255, 255); - border-radius: 0px; -} \ No newline at end of file diff --git a/src/components/CheckBoxSelector/index.tsx b/src/components/CheckBoxSelector/index.tsx deleted file mode 100644 index 4194e30..0000000 --- a/src/components/CheckBoxSelector/index.tsx +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved. - * SPDX-license-identifier: BSD-3-Clause - */ - -import { useEffect, useMemo, useState, memo } from 'react'; -import { Button, Drawer } from '@arco-design/web-react'; -import CheckBox from '@/components/CheckBox'; -import styles from './index.module.less'; -import utils from '@/utils/utils'; - -export interface ICheckBoxItemProps { - icon?: string; - label: string; - description?: string; - key: string; -} - -interface IProps { - data?: ICheckBoxItemProps[]; - onChange?: (key: string) => void; - value?: string; - label?: string; - moreIcon?: string; - moreText?: string; - placeHolder?: string; -} - -function CheckBoxSelector(props: IProps) { - const { placeHolder, label = '', data = [], value, onChange, moreIcon, moreText } = props; - const [visible, setVisible] = useState(false); - const [selected, setSelected] = useState(value!); - const selectedOne = useMemo(() => data.find((item) => item.key === value), [data, value]); - const handleSeeMore = () => { - setVisible(true); - }; - useEffect(() => { - setSelected(value!); - }, [visible]); - - return ( - <> -
- {selectedOne ? ( - - ) : ( -
{placeHolder}
- )} - -
- - - - - } - > -
- {data.map((item) => ( - setSelected(item.key)} - /> - ))} -
-
- - ); -} - -export default memo(CheckBoxSelector); diff --git a/src/components/Header/index.module.less b/src/components/Header/index.module.less deleted file mode 100644 index aa29e58..0000000 --- a/src/components/Header/index.module.less +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved. - * SPDX-license-identifier: BSD-3-Clause - */ - -.header { - height: 48px; - background: white; - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; - position: relative; - - :global { - .arco-popover-content-top { - padding: 0px; - } - } -} - -.header-logo { - display: flex; - align-items: center; - justify-content: space-between; - margin-left: 24px; - - :global { - img { - height: 24px; - } - .arco-popover-content { - padding: 0; - } - } -} - -.menu-wrapper { - display: flex; - flex-direction: column; - align-items: center; - row-gap: 8px; - justify-content: space-between; -} - -.header-logo-text { - background: linear-gradient(90deg, #004FFF 38.86%, #9865FF 100%); - -webkit-background-clip: text; - background-clip: text; - color: transparent; - font-size: 16px; -} - -.header-right { - z-index: 2; - color: #fff; - display: flex; - align-items: center; - :global { - span { - height: 24px; - } - } -} - -.header-setting-btn { - background-color: transparent; - border: none; - margin-right: 24px; - color: #000000; - font-size: 16px; - cursor: pointer; -} - -.header-pop { - :global { - .ant-popover-arrow { - // display: none; - left: 16px; - .ant-popover-arrow-content { - &:before { - background-color: white; - } - } - } - .ant-popover-content { - margin-left: 12px; - } - .ant-popover-inner { - margin-right: 12px; - } - .ant-popover-inner-content { - padding: 0; - background-color: white; - position: relative; - width: 100px; - height: 100px; - display: flex; - align-items: center; - flex-direction: column; - justify-content: space-between; - padding-bottom: 7px; - padding-top: 7px; - cursor: pointer; - color: black; - - div { - font-size: 13px; - font-weight: 400; - line-height: 20px; - &:hover { - color: #1664ff; - } - } - } - } -} - -.divider { - margin-top: 2px; - margin-bottom: 2px; - min-width: 70%; - width: 70%; -} - -.header-right-text { - color: #000000; - margin-right: 24px; - cursor: pointer; -} diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx deleted file mode 100644 index ab4accf..0000000 --- a/src/components/Header/index.tsx +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved. - * SPDX-license-identifier: BSD-3-Clause - */ - -import { Button, Divider, Popover } from '@arco-design/web-react'; -import { IconMenu } from '@arco-design/web-react/icon'; -import NetworkIndicator from '@/components/NetworkIndicator'; -import utils from '@/utils/utils'; -import Logo from '@/assets/img/Logo.svg'; -import styles from './index.module.less'; - -const Disclaimer = 'https://www.volcengine.com/docs/6348/68916'; -const ReversoContext = 'https://www.volcengine.com/docs/6348/68918'; -const UserAgreement = 'https://www.volcengine.com/docs/6348/128955'; - -interface HeaderProps { - children?: React.ReactNode; - hide?: boolean; -} - -function Header(props: HeaderProps) { - const { children, hide } = props; - - const MenuProps = [ - { - name: '免责声明', - url: Disclaimer, - }, - { - name: '隐私政策', - url: ReversoContext, - }, - { - name: '用户协议', - url: UserAgreement, - }, - ]; - - return ( -
-
- {utils.isMobile() ? null : ( - - {MenuProps.map((menuItem) => ( - - ))} -
- } - > - - - )} - Logo - - 实时对话式 AI 体验馆 - -
- {children} - {utils.isMobile() ? null : ( -
-
- window.open('https://www.volcengine.com/product/veRTC/ConversationalAI', '_blank') - } - > - 官网链接 -
-
- window.open( - 'https://www.volcengine.com/contact/product?t=%E5%AF%B9%E8%AF%9D%E5%BC%8Fai&source=%E4%BA%A7%E5%93%81%E5%92%A8%E8%AF%A2', - '_blank' - ) - } - > - 联系我们 -
-
- )} - - ); -} - -export default Header; diff --git a/src/pages/MainPage/MainArea/Room/index.tsx b/src/pages/MainPage/MainArea/Room/index.tsx index 185b623..a4c0d05 100644 --- a/src/pages/MainPage/MainArea/Room/index.tsx +++ b/src/pages/MainPage/MainArea/Room/index.tsx @@ -7,12 +7,11 @@ import Conversation from './Conversation'; import AudioController from './AudioController'; -import utils from '@/utils/utils'; import style from './index.module.less'; function Room() { return ( -
+
diff --git a/src/pages/MainPage/index.module.less b/src/pages/MainPage/index.module.less index d998ff0..5a2d1a2 100644 --- a/src/pages/MainPage/index.module.less +++ b/src/pages/MainPage/index.module.less @@ -6,7 +6,7 @@ .main { position: relative; width: 100%; - height: 100%; + height: 100vh; box-sizing: border-box; .mainArea { diff --git a/src/pages/MainPage/index.tsx b/src/pages/MainPage/index.tsx index 4b6f031..e129783 100644 --- a/src/pages/MainPage/index.tsx +++ b/src/pages/MainPage/index.tsx @@ -3,22 +3,19 @@ * SPDX-license-identifier: BSD-3-Clause */ -import ResizeWrapper from '@/components/ResizeWrapper'; -import utils from '@/utils/utils'; + import MainArea from './MainArea'; import styles from './index.module.less'; export default function () { return ( -
-
+
- ); }