Browse Source

update layout style

dev
powersir 1 year ago
parent
commit
557a76b3e3
6 changed files with 25 additions and 17 deletions
  1. +9
    -1
      src/App.tsx
  2. +7
    -7
      src/assets/css/overwrite.css
  3. +3
    -3
      src/layout/content/index.tsx
  4. +2
    -2
      src/layout/header/index.tsx
  5. +3
    -3
      src/layout/slide/index.tsx
  6. +1
    -1
      src/pages/custom/product/sample/index.tsx

+ 9
- 1
src/App.tsx View File

@@ -26,6 +26,12 @@ function App() {
i18n.changeLanguage(lang); i18n.changeLanguage(lang);
}, [lang]); }, [lang]);


const components = {
Menu: {
groupTitleFontSize: 12,
itemMarginBlock: 2
}
}


const curTheme: ThemeConfig = useMemo(() => { const curTheme: ThemeConfig = useMemo(() => {
if (darkMode) { if (darkMode) {
@@ -38,8 +44,9 @@ function App() {
colorBgTextHover: 'rgba(124, 77, 255, 0.082)', colorBgTextHover: 'rgba(124, 77, 255, 0.082)',
colorTextHover: 'rgba(124, 77, 255, 0.082)', colorTextHover: 'rgba(124, 77, 255, 0.082)',
controlItemBgActive: 'rgba(33, 150, 243, 0.16)', controlItemBgActive: 'rgba(33, 150, 243, 0.16)',
colorBgElevated: 'rgb(33, 41, 70)'
colorBgElevated: 'rgb(33, 41, 70)',
}, },
components,
algorithm: theme.darkAlgorithm, algorithm: theme.darkAlgorithm,
} }
} else { } else {
@@ -47,6 +54,7 @@ function App() {
token: { token: {
colorPrimary: 'rgb(124, 77, 255)', colorPrimary: 'rgb(124, 77, 255)',
}, },
components,
} }
} }
}, [darkMode]); }, [darkMode]);


+ 7
- 7
src/assets/css/overwrite.css View File

@@ -4,13 +4,13 @@
} }


.ant-menu-item { .ant-menu-item {
height: 50px !important;
line-height: 50px !important;
height: 46px !important;
line-height: 46px !important;
} }


.ant-menu-submenu-title { .ant-menu-submenu-title {
height: 50px !important;
line-height: 50px !important;
height: 46px !important;
line-height: 46px !important;
} }


.ant-menu-item span { .ant-menu-item span {
@@ -122,9 +122,9 @@
} }




.ant-menu-sub {
/* .ant-menu-sub {
background-color: transparent !important; background-color: transparent !important;
}
} */


body.dark { body.dark {
background-color: rgb(17, 25, 54); background-color: rgb(17, 25, 54);
@@ -145,4 +145,4 @@ a {


a:hover { a:hover {
color: rgba(124, 77, 255, 0.7); color: rgba(124, 77, 255, 0.7);
}
}

+ 3
- 3
src/layout/content/index.tsx View File

@@ -14,13 +14,13 @@ const Content: FC<any> = ({ children }) => {


return ( return (
<div <div
className='color-transition mt-[80px] w-[100%] bg-container !<lg:ml-[16px]'
className='color-transition mt-[60px] w-[100%] bg-container !<lg:ml-[16px]'
style={{ style={{
borderRadius: '8px', borderRadius: '8px',
marginLeft: collapsed ? 112 : defaultSetting.slideWidth,
marginLeft: collapsed ? 100 : defaultSetting.slideWidth,
minHeight: 'calc(100vh - 80px)', minHeight: 'calc(100vh - 80px)',
transition: "all 200ms cubic-bezier(0.4, 0, 0.6, 1) 0ms", transition: "all 200ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
width: `calc(100vw - ${isPC ? collapsed ? 112 : defaultSetting.slideWidth : 32}px)`
width: `calc(100vw - ${isPC ? collapsed ? 100 : defaultSetting.slideWidth : 32}px)`
}} }}
> >
<div <div


+ 2
- 2
src/layout/header/index.tsx View File

@@ -37,7 +37,7 @@ const Header = () => {
return ( return (
<div <div
style={{ zIndex: 998 }} style={{ zIndex: 998 }}
className="color-transition h-[80px] flex basis-[48px] items-center px-0 gap-[16px] fixed top-0 right-0 left-0 bg-primary"
className="color-transition h-[60px] flex basis-[48px] items-center px-0 gap-[16px] fixed top-0 right-0 left-0 bg-primary"
> >
<div style={{ width: defaultSetting.slideWidth }} className="<lg:hidden flex justify-between items-center"> <div style={{ width: defaultSetting.slideWidth }} className="<lg:hidden flex justify-between items-center">
<div className='flex items-center gap-[4px] text-[20px] px-[24px] pr-0'> <div className='flex items-center gap-[4px] text-[20px] px-[24px] pr-0'>
@@ -60,7 +60,7 @@ const Header = () => {
outline: 'none', outline: 'none',
boxShadow: 'none' boxShadow: 'none'
}} }}
className='w-[400px] h-[50px] focus:(border-[rgb(135,94,196)]) <lg:hidden'
className='w-[400px] h-[40px] focus:(border-[rgb(135,94,196)]) <lg:hidden'
size="large" size="large"
prefix={ prefix={
<IconFangdajing <IconFangdajing


+ 3
- 3
src/layout/slide/index.tsx View File

@@ -56,7 +56,7 @@ const SlideIndex = () => {
headerStyle={{ padding: '24px 0', border: 'none' }} headerStyle={{ padding: '24px 0', border: 'none' }}
bodyStyle={{ padding: '0 16px' }} bodyStyle={{ padding: '0 16px' }}
onClose={() => { onClose={() => {
setCollapsed(true);
//setCollapsed(true);
}} }}
> >
{renderMenu()} {renderMenu()}
@@ -66,8 +66,8 @@ const SlideIndex = () => {


return ( return (
<div <div
style={{ width: collapsed ? 112 : defaultSetting.slideWidth }}
className="menu-slide color-transition top-[80px] fixed box-border left-0 bottom-0 overflow-y-auto px-[16px] bg-primary <lg:hidden"
style={{ width: collapsed ? 100 : defaultSetting.slideWidth }}
className="menu-slide color-transition top-[60px] fixed box-border left-0 bottom-0 overflow-y-auto px-[8px] bg-primary <lg:hidden"
> >
{renderMenu()} {renderMenu()}
</div> </div>


+ 1
- 1
src/pages/custom/product/sample/index.tsx View File

@@ -151,7 +151,7 @@ const TablePage: React.FC = () => {


return ( return (
<div> <div>
<div className="mt-[16px] dark:bg-[rgb(33,41,70)] rounded-md">
<div className="dark:bg-[rgb(33,41,70)] rounded-md">
<Table rowSelection={rowSelection} scroll={{ x: true }} columns={columns} dataSource={data} className='bg-transparent' <Table rowSelection={rowSelection} scroll={{ x: true }} columns={columns} dataSource={data} className='bg-transparent'
pagination={{ position: ['bottomRight'] }} pagination={{ position: ['bottomRight'] }}
/> />


Loading…
Cancel
Save