Commit 6b4b2b7f authored by 文旺-丰林-DEV's avatar 文旺-丰林-DEV

fix sider style

parent 6f8b236c
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
}, },
{ {
path: '/', path: '/',
redirect: '/welcome', redirect: '/chat',
}, },
{ {
component: './404', component: './404',
......
...@@ -3,9 +3,20 @@ ...@@ -3,9 +3,20 @@
.chatContent { .chatContent {
background: white !important; background: white !important;
} }
.siderMask {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 13;
background: rgba(0, 0, 0, 0.45);
pointer-events: auto;
}
.siderWrapper { .siderWrapper {
background: white; background: white;
.sider { .sider {
position: fixed; position: fixed;
top: 0; top: 0;
......
...@@ -148,6 +148,14 @@ const Chat: React.FC = () => { ...@@ -148,6 +148,14 @@ const Chat: React.FC = () => {
{isMobile && renderMobileHeader()} {isMobile && renderMobileHeader()}
<Row> <Row>
<Col className={`${styles.siderWrapper}`}> <Col className={`${styles.siderWrapper}`}>
{isMobile && showSider && (
<div
onClick={() => {
setShowSider(false);
}}
className={styles.siderMask}
></div>
)}
<div <div
style={{ top: isMobile && '44px', zIndex: isMobile ? 13 : 10 }} style={{ top: isMobile && '44px', zIndex: isMobile ? 13 : 10 }}
className={`${styles.sider} ${showSider ? styles.siderOpen : ''}`} className={`${styles.sider} ${showSider ? styles.siderOpen : ''}`}
...@@ -170,7 +178,7 @@ const Chat: React.FC = () => { ...@@ -170,7 +178,7 @@ const Chat: React.FC = () => {
className={styles.chatFooterItem} className={styles.chatFooterItem}
hidden={!access.roles?.find((x) => ['管理员', 'admin'].includes(x))} hidden={!access.roles?.find((x) => ['管理员', 'admin'].includes(x))}
onClick={() => { onClick={() => {
history.push('/'); history.push('/welcome');
}} }}
> >
<Space wrap> <Space wrap>
...@@ -269,7 +277,6 @@ const Chat: React.FC = () => { ...@@ -269,7 +277,6 @@ const Chat: React.FC = () => {
> >
<Item name="chatInput"> <Item name="chatInput">
<Input <Input
autoComplete={false}
required required
placeholder="在这里输入你想知道的问题,给我几句提示,我来帮你回答" placeholder="在这里输入你想知道的问题,给我几句提示,我来帮你回答"
size="large" size="large"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment