From 6bb70898200903c1fa15de71f1696a7524ba3f23 Mon Sep 17 00:00:00 2001 From: awesomeYG <993631441@qq.com> Date: Thu, 11 Jan 2024 16:53:02 +0800 Subject: [PATCH] fix: update header package --- package-lock.json | 8 +- package.json | 2 +- src/styles/theme.ts | 3 + src/theme.ts | 274 -------------------------------------------- 4 files changed, 8 insertions(+), 279 deletions(-) delete mode 100644 src/theme.ts diff --git a/package-lock.json b/package-lock.json index ce0c0ad..c612f48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@chaitin_rivers/multi_river": "^0.0.3", + "@chaitin_rivers/multi_river": "^0.0.6", "@emotion/cache": "^11.11.0", "@emotion/react": "^11.11.0", "@emotion/server": "^11.11.0", @@ -676,9 +676,9 @@ } }, "node_modules/@chaitin_rivers/multi_river": { - "version": "0.0.3", - "resolved": "https://registry.npmmirror.com/@chaitin_rivers/multi_river/-/multi_river-0.0.3.tgz", - "integrity": "sha512-DJ46R3Vki+E1GNZ73DxJYTVNQYQ+UO6HffEAqTwZMdecvoQp9tj8imI1HPSxleIMKfOfCRVqogMzYK2IQC5ULw==", + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/@chaitin_rivers/multi_river/-/multi_river-0.0.6.tgz", + "integrity": "sha512-UwTOqC3+b9hkKwZMjW+SY0maZKefs28WbZpLUwJKcaDfFoEkiKP6g2ra4qAOPiXBaSSKtmly/kJXsspas/4wXQ==", "dependencies": { "@mui/icons-material": "^5.15.3", "react-copy-to-clipboard": "^5.1.0" diff --git a/package.json b/package.json index 7c4f912..a7edb67 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ } }, "dependencies": { - "@chaitin_rivers/multi_river": "^0.0.3", + "@chaitin_rivers/multi_river": "^0.0.6", "@emotion/cache": "^11.11.0", "@emotion/react": "^11.11.0", "@emotion/server": "^11.11.0", diff --git a/src/styles/theme.ts b/src/styles/theme.ts index 05f731a..c6a1e40 100644 --- a/src/styles/theme.ts +++ b/src/styles/theme.ts @@ -103,6 +103,9 @@ const theme = createTheme({ .error:{ color:"#ccc } + body{ + padding-top: ${process.env.NODE_ENV === 'production' ? '64px' : '0'} + } `, }, MuiFormHelperText: { diff --git a/src/theme.ts b/src/theme.ts deleted file mode 100644 index 9100dc8..0000000 --- a/src/theme.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { createTheme } from '@mui/material/styles'; -import { - primary, - primaryHover, - gray, - grayText2, - errorText, - leastText, -} from '@/constant/color'; - -const Alibaba_PuHuiTi_35_Thin = - 'https://heap-web.oss-cn-hangzhou.aliyuncs.com/fonts/Alibaba_PuHuiTi_2.0_35_Thin_35_Thin.woff2'; -const Alibaba_PuHuiTi_55_Regular = - 'https://heap-web.oss-cn-hangzhou.aliyuncs.com/fonts/Alibaba_PuHuiTi_2.0_55_Regular_55_Regular.woff2'; -const Alibaba_PuHuiTi_75_SemiBold = - 'https://heap-web.oss-cn-hangzhou.aliyuncs.com/fonts/Alibaba_PuHuiTi_2.0_75_SemiBold_75_SemiBold.woff2'; -const Din = 'https://heap-web.oss-cn-hangzhou.aliyuncs.com/fonts/Din.woff2'; -const Gilroy = - 'https://heap-web.oss-cn-hangzhou.aliyuncs.com/fonts/Gilroy.woff2'; - -const theme = createTheme({ - palette: { - primary: { - main: primary, - }, - secondary: { - main: primaryHover, - }, - }, - components: { - MuiCssBaseline: { - styleOverrides: ` - @font-face { - font-family:"Gilroy"; - font-weight:normal; - src: url(${Gilroy}) format("woff2"); - font-display: swap; - } - @font-face { - font-family:"DIN"; - font-weight:600; - src: url(${Din}) format("woff2"); - font-display: swap; - } - @font-face { - font-family: "AlibabaPuHuiTiRegular"; - font-weight: 400; - src: url(${Alibaba_PuHuiTi_55_Regular}) format("woff2"), local("PingFang SC"); - font-display: swap; - } - @font-face { - font-family: "AlibabaPuHuiTiBold"; - font-weight: 600; - src: url(${Alibaba_PuHuiTi_75_SemiBold}) format("woff2"), local("PingFang SC"); - font-display: swap; - } - @font-face { - font-family: "AlibabaPuHuiTiThin"; - font-weight: 250; - src: url(${Alibaba_PuHuiTi_35_Thin}) format("woff2"), local("PingFang SC"); - font-display: swap; - } - * { - box-sizing: border-box; - margin: 0px; - padding: 0px; - font-family: AlibabaPuHuiTiRegular, "PingFang SC"; - } - ::-webkit-scrollbar { - width: 4px; - height:4px; - border-radius: 4px; - background-color: transparent; - } - ::-webkit-scrollbar-thumb { - border-radius: 4px; - background: #bfbfbf; - } - ::placeholder { - color:${leastText}; - fontSize:14px; - font-family: AlibabaPuHuiTiRegular; - } - #root { - overflow: hidden; - } - body, html, #root { - width: 100%; - min-width: 1200px; - height: 100%; - font-size: 16px; - font-family: AlibabaPuHuiTiRegular, DIN, "PingFang SC"; - } - .impowerBox .qrcode { - width: 180px !important; - } - .impowerBox .title { - display: none !important; - } - .error:{ - color:"#ccc - }, - body{ - padding-top: ${process.env.NODE_ENV === 'production' ? '64px' : '0'} - } - `, - }, - MuiFormHelperText: { - styleOverrides: { - root: { - color: primary, - }, - }, - }, - MuiTextField: { - defaultProps: { - variant: 'standard', - }, - }, - MuiInput: { - styleOverrides: { - root: { - // "&::after": { - // borderBottomColor: primary, - // }, - fontSize: '0.875rem', - '&::before': { - borderBottomColor: gray, - }, - '&:hover:not(.Mui-disabled):before': { - borderBottom: `2px solid ${gray}`, - }, - }, - }, - }, - MuiOutlinedInput: { - styleOverrides: { - root: { - borderRadius: 4, - // "&:hover": { - // "& .MuiOutlinedInput-notchedOutline": { - // borderColor: primary, - // }, - // }, - }, - // notchedOutline: { - // borderColor: "transparent", - // }, - }, - }, - MuiFilledInput: { - styleOverrides: { - root: { - borderRadius: 0, - backgroundColor: '#F5F6F7FF', - '&::before': { - borderBottom: 'none', - }, - '&::after': { - borderBottom: 'none', - }, - '&:hover:not(.Mui-disabled):before': { - borderBottom: `none`, - }, - }, - input: { - padding: '8px 12px', - }, - }, - }, - MuiInputLabel: { - styleOverrides: { - root: { - fontFamily: 'AlibabaPuHuiTiRegular', - color: grayText2, - '&.Mui-focused': { - color: grayText2, - }, - }, - asterisk: { - color: errorText, - }, - }, - }, - MuiFormLabel: { - styleOverrides: { - root: { - fontFamily: 'AlibabaPuHuiTiRegular', - color: grayText2, - '&.Mui-focused': { - color: grayText2, - }, - }, - asterisk: { - color: errorText, - }, - }, - }, - MuiButton: { - styleOverrides: { - root: { - fontFamily: 'AlibabaPuHuiTiBold', - borderRadius: 0, - boxShadow: 'none', - '&:hover': { - boxShadow: 'none', - }, - }, - contained: { - color: '#fff', - }, - }, - }, - MuiLink: { - styleOverrides: { - root: { - cursor: 'pointer', - color: primary, - }, - }, - }, - MuiPaper: { - styleOverrides: { - root: { - borderRadius: 0, - }, - }, - }, - MuiCard: { - styleOverrides: { - root: { - backgroundImage: `linear-gradient(180deg, rgba(215,255,208,0.5) 0%, rgba(255,255,255,1) 10%)`, - boxShadow: '0px 8px 10px 0px rgba(4,27,15,0.06)', - }, - }, - }, - MuiStepIcon: { - styleOverrides: { - root: { - color: '#DADCE0', - }, - text: { - fill: '#fff', - }, - }, - }, - MuiCheckbox: { - styleOverrides: { - root: { - color: '#D9D9D9FF', - }, - }, - }, - MuiAlert: { - styleOverrides: { - root: { - borderRadius: '3px', - padding: '0px 16px', - border: '1px solid #d1e1ff', - backgroundColor: '#f8faff', - }, - }, - }, - MuiTooltip: { - styleOverrides: { - tooltip: { - backgroundColor: 'rgba(0,0,0,0.75)', - }, - }, - }, - }, -}); - -export default theme;