提交 7545b7f0 作者: ZhangLingKun

功能:问题修复

上级 216afbe3
流水线 #7355 已通过 于阶段
in 6 分 14 秒
......@@ -15,11 +15,8 @@ import { setUserInfo, UserInfoState } from '@/store/module/userInfo';
import getLocationByIP from '@/utils/getLocationByIP';
const HeaderView: React.FC<{
placeholder?: boolean;
placeholder: boolean;
}> = ({ placeholder }) => {
HeaderView.defaultProps = {
placeholder: true,
};
// 当前的路由数据
const router = useRouter();
// store
......@@ -104,7 +101,12 @@ const HeaderView: React.FC<{
},
];
return (
<HeaderWrap>
<>
<HeaderWrap
style={{
background: placeholder ? '#2A2A2A' : 'rgba(86, 86, 86, 0.25)',
}}
>
<div className="header-wrap">
<div className="header-location">
<div className="location-icon">
......@@ -170,6 +172,13 @@ const HeaderView: React.FC<{
</div>
</div>
</HeaderWrap>
{placeholder && (
<div
className="header-wrap"
style={{ width: '100%', height: '3rem' }}
></div>
)}
</>
);
};
......
......@@ -9,7 +9,10 @@ import QrcodeModalView from '@/components/qrcodeModal';
import { RootState } from '@/store';
import { GlobalDataState, setGlobalData } from '@/store/module/globalData';
const LayoutView = ({ children }: { children?: React.ReactNode }) => {
const LayoutView: React.FC<{
children?: React.ReactNode;
placeholder?: boolean;
}> = ({ children, placeholder }) => {
// 打开二维码弹窗
const [qrcodeShow, setQrcodeShow] = useState<boolean>(false);
// store
......@@ -34,7 +37,11 @@ const LayoutView = ({ children }: { children?: React.ReactNode }) => {
// setQrcodeShow(!qrcodeShow);
}}
>
<HeaderView></HeaderView>
{placeholder ? (
<HeaderView placeholder={true}></HeaderView>
) : (
<HeaderView placeholder={false}></HeaderView>
)}
<ContentView>{children}</ContentView>
<FooterView></FooterView>
</div>
......
import React from 'react';
import { ConfigProvider, theme } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import type { AppProps } from 'next/app';
import '../styles/animate.css';
import '../styles/globals.css';
......@@ -7,7 +8,6 @@ import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { wrapper } from '@/store';
import themeConfig from '../theme/themeConfig';
import zhCN from 'antd/locale/zh_CN';
const App = ({ Component, pageProps, ...rest }: AppProps) => {
const { store } = wrapper.useWrappedStore(rest);
......
......@@ -39,7 +39,7 @@ const MallView = (props: any) => {
}, [props]);
return (
<>
<LayoutView>
<LayoutView placeholder={true}>
<div>测试</div>
<Button
onClick={() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论