style: pagecontainer padding
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
.ant-layout-sider-children {
|
.ant-layout-sider-children {
|
||||||
background-color: var(--color-fill-1);
|
background-color: var(--color-fill-1);
|
||||||
border-inline: none;
|
border-inline: none;
|
||||||
border-radius: var(--menu-border-radius-base);
|
border-radius: 0;
|
||||||
padding-inline: 16px;
|
padding-inline: 16px;
|
||||||
padding-block-end: 12px;
|
padding-block-end: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-1
@@ -9,6 +9,8 @@ html {
|
|||||||
--color-fill-3: #f3f6fa;
|
--color-fill-3: #f3f6fa;
|
||||||
--color-logs-bg: #1e1e1e;
|
--color-logs-bg: #1e1e1e;
|
||||||
--color-logs-text: #d4d4d4;
|
--color-logs-text: #d4d4d4;
|
||||||
|
--layout-content-blockpadding: 32px;
|
||||||
|
--layout-content-inlinepadding: 32px;
|
||||||
--menu-border-radius-base: 8px;
|
--menu-border-radius-base: 8px;
|
||||||
--border-radius-base: 8px;
|
--border-radius-base: 8px;
|
||||||
--border-radius-middle: 20px;
|
--border-radius-middle: 20px;
|
||||||
@@ -40,7 +42,7 @@ html {
|
|||||||
--ant-input-active-shadow: 0 0 0 2px rgba(5, 255, 105, 6%);
|
--ant-input-active-shadow: 0 0 0 2px rgba(5, 255, 105, 6%);
|
||||||
--ant-input-active-border-color: #2fbf85;
|
--ant-input-active-border-color: #2fbf85;
|
||||||
--ant-input-hover-border-color: #54cc98;
|
--ant-input-hover-border-color: #54cc98;
|
||||||
--box-shadow-base: 0 4px 12px rgb(227, 232, 240);
|
--box-shadow-base: 0 4px 12px rgba(227, 232, 240, 70%);
|
||||||
|
|
||||||
.css-var-rf {
|
.css-var-rf {
|
||||||
--ant-font-size: var(--font-size-base);
|
--ant-font-size: var(--font-size-base);
|
||||||
@@ -272,6 +274,14 @@ body {
|
|||||||
|
|
||||||
.ant-pro-layout {
|
.ant-pro-layout {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
// .ant-pro-layout-content {
|
||||||
|
// padding-block: var(--layout-content-blockpadding);
|
||||||
|
// padding-inline: var(--layout-content-inlinepadding);
|
||||||
|
// }
|
||||||
|
.ant-pro-page-container-children-container {
|
||||||
|
padding-block: var(--layout-content-blockpadding);
|
||||||
|
padding-inline: var(--layout-content-inlinepadding);
|
||||||
|
}
|
||||||
|
|
||||||
.ant-pro-sider-logo {
|
.ant-pro-sider-logo {
|
||||||
padding-left: 22px;
|
padding-left: 22px;
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ export default (props: any) => {
|
|||||||
}
|
}
|
||||||
if (menuItemProps.path && location.pathname !== menuItemProps.path) {
|
if (menuItemProps.path && location.pathname !== menuItemProps.path) {
|
||||||
return (
|
return (
|
||||||
// handle wildcard route path, for example /slave/* from qiankun
|
|
||||||
<Link
|
<Link
|
||||||
to={menuItemProps.path.replace('/*', '')}
|
to={menuItemProps.path.replace('/*', '')}
|
||||||
target={menuItemProps.target}
|
target={menuItemProps.target}
|
||||||
|
|||||||
@@ -77,6 +77,26 @@ export function getRightRenderContent(opts: {
|
|||||||
// 如果没有打开Locale,并且头像为空就取消掉这个返回的内容
|
// 如果没有打开Locale,并且头像为空就取消掉这个返回的内容
|
||||||
if (!avatar) return null;
|
if (!avatar) return null;
|
||||||
|
|
||||||
|
const renderMenu = () => {
|
||||||
|
return (
|
||||||
|
<Menu triggerSubMenuAction="hover">
|
||||||
|
<Menu.Item title="admin" key="avatar">
|
||||||
|
<ul>
|
||||||
|
<Menu.SubMenu
|
||||||
|
key="settings"
|
||||||
|
icon={<SettingOutlined />}
|
||||||
|
title={intl?.formatMessage?.({ id: 'common.button.settings' })}
|
||||||
|
></Menu.SubMenu>
|
||||||
|
<Menu.SubMenu
|
||||||
|
key="logout"
|
||||||
|
icon={<LogoutOutlined />}
|
||||||
|
title={intl?.formatMessage?.({ id: 'common.button.logout' })}
|
||||||
|
></Menu.SubMenu>
|
||||||
|
</ul>
|
||||||
|
</Menu.Item>
|
||||||
|
</Menu>
|
||||||
|
);
|
||||||
|
};
|
||||||
const langMenu = {
|
const langMenu = {
|
||||||
className: 'umi-plugin-layout-menu',
|
className: 'umi-plugin-layout-menu',
|
||||||
selectedKeys: [],
|
selectedKeys: [],
|
||||||
@@ -123,7 +143,7 @@ export function getRightRenderContent(opts: {
|
|||||||
|
|
||||||
let dropdownProps;
|
let dropdownProps;
|
||||||
if (version.startsWith('5.') || version.startsWith('4.24.')) {
|
if (version.startsWith('5.') || version.startsWith('4.24.')) {
|
||||||
dropdownProps = { menu: langMenu };
|
dropdownProps = { menu: langMenu, mode: 'vertical' };
|
||||||
} else if (version.startsWith('3.')) {
|
} else if (version.startsWith('3.')) {
|
||||||
dropdownProps = {
|
dropdownProps = {
|
||||||
overlay: (
|
overlay: (
|
||||||
@@ -138,7 +158,7 @@ export function getRightRenderContent(opts: {
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// 需要 antd 4.20.0 以上版本
|
// 需要 antd 4.20.0 以上版本
|
||||||
dropdownProps = { overlay: <Menu {...langMenu} /> };
|
dropdownProps = { overlay: <Menu {...langMenu} mode="vertical" /> };
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -153,7 +173,6 @@ export function getRightRenderContent(opts: {
|
|||||||
>
|
>
|
||||||
{avatar}
|
{avatar}
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<span></span>
|
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
avatar
|
avatar
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ const UtilizationOvertime: React.FC = () => {
|
|||||||
<LineChart
|
<LineChart
|
||||||
data={result}
|
data={result}
|
||||||
locale={locale}
|
locale={locale}
|
||||||
|
height={390}
|
||||||
labelFormatter={labelFormatter}
|
labelFormatter={labelFormatter}
|
||||||
slider={sliderConfig}
|
slider={sliderConfig}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { PageContainer } from '@ant-design/pro-components';
|
||||||
import { Spin } from 'antd';
|
import { Spin } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { queryDashboardData } from './apis';
|
import { queryDashboardData } from './apis';
|
||||||
@@ -27,14 +28,16 @@ const Dashboard: React.FC = () => {
|
|||||||
getDashboardData();
|
getDashboardData();
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<Spin spinning={loading}>
|
<PageContainer ghost extra={[]}>
|
||||||
<DashboardContext.Provider value={{ ...data }}>
|
<Spin spinning={loading}>
|
||||||
<Overview></Overview>
|
<DashboardContext.Provider value={{ ...data }}>
|
||||||
<SystemLoad></SystemLoad>
|
<Overview></Overview>
|
||||||
<Usage></Usage>
|
<SystemLoad></SystemLoad>
|
||||||
<ActiveTable></ActiveTable>
|
<Usage></Usage>
|
||||||
</DashboardContext.Provider>
|
<ActiveTable></ActiveTable>
|
||||||
</Spin>
|
</DashboardContext.Provider>
|
||||||
|
</Spin>
|
||||||
|
</PageContainer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import TransitionWrapper from '@/components/transition';
|
|||||||
import HotKeys from '@/config/hotkeys';
|
import HotKeys from '@/config/hotkeys';
|
||||||
import { fetchChunkedData, readStreamData } from '@/utils/fetch-chunk-data';
|
import { fetchChunkedData, readStreamData } from '@/utils/fetch-chunk-data';
|
||||||
import { EyeInvisibleOutlined } from '@ant-design/icons';
|
import { EyeInvisibleOutlined } from '@ant-design/icons';
|
||||||
import { PageContainer } from '@ant-design/pro-components';
|
|
||||||
import { useIntl } from '@umijs/max';
|
import { useIntl } from '@umijs/max';
|
||||||
import { Button, Input, Spin } from 'antd';
|
import { Button, Input, Spin } from 'antd';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
@@ -185,7 +184,7 @@ const MessageList: React.FC<MessageProps> = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ground-left">
|
<div className="ground-left">
|
||||||
<PageContainer title={false} className="message-list-wrap">
|
<div className="message-list-wrap">
|
||||||
<div style={{ marginBottom: 40 }}>
|
<div style={{ marginBottom: 40 }}>
|
||||||
<TransitionWrapper
|
<TransitionWrapper
|
||||||
header={renderLabel()}
|
header={renderLabel()}
|
||||||
@@ -227,7 +226,7 @@ const MessageList: React.FC<MessageProps> = (props) => {
|
|||||||
</Spin>
|
</Spin>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</PageContainer>
|
</div>
|
||||||
<div className="ground-left-footer">
|
<div className="ground-left-footer">
|
||||||
<ChatFooter
|
<ChatFooter
|
||||||
onClear={handleClear}
|
onClear={handleClear}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import CardWrapper from '@/components/card-wrapper';
|
import { PageContainer } from '@ant-design/pro-components';
|
||||||
import { useSearchParams } from '@umijs/max';
|
import { useSearchParams } from '@umijs/max';
|
||||||
import { Divider } from 'antd';
|
import { Divider } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
@@ -27,8 +27,8 @@ const Playground: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '32px 40px' }}>
|
<div>
|
||||||
<CardWrapper>
|
<PageContainer ghost extra={[]}>
|
||||||
<div className="play-ground">
|
<div className="play-ground">
|
||||||
<div className="chat">
|
<div className="chat">
|
||||||
<GroundLeft parameters={params}></GroundLeft>
|
<GroundLeft parameters={params}></GroundLeft>
|
||||||
@@ -45,7 +45,7 @@ const Playground: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CardWrapper>
|
</PageContainer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.chat-footer {
|
.chat-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-inline: 26px;
|
padding-inline: 0 32px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
// box-shadow: 0px -1px 2px 0px var(--ant-color-border);
|
// box-shadow: 0px -1px 2px 0px var(--ant-color-border);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,11 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
height: calc(100vh - 84px);
|
height: calc(100vh - 84px);
|
||||||
padding-bottom: 120px;
|
padding-bottom: 120px;
|
||||||
|
padding-right: 32px;
|
||||||
|
|
||||||
.message-list-wrap {
|
.message-list-wrap {
|
||||||
max-height: calc(100vh - 152px);
|
max-height: calc(100vh - 152px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
.ant-pro-page-container-children-container {
|
|
||||||
padding-inline: 16px 26px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ground-left-footer {
|
.ground-left-footer {
|
||||||
|
|||||||
@@ -44,7 +44,10 @@ const Profile: React.FC = () => {
|
|||||||
extra={[]}
|
extra={[]}
|
||||||
>
|
>
|
||||||
<CardWrapper
|
<CardWrapper
|
||||||
style={{ padding: '32px', marginTop: '70px', width: 'max-content' }}
|
style={{
|
||||||
|
padding: 'var(--layout-content-inlinepadding)',
|
||||||
|
width: 'max-content'
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
style={{ width: '524px' }}
|
style={{ width: '524px' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user