diff --git a/src/app.tsx b/src/app.tsx index 16af7a77..b16a4d91 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -49,9 +49,9 @@ export async function getInitialState(): Promise<{ // ProLayout 支持的api https://procomponents.ant.design/components/layout export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => { + console.log(initialState?.settings); return { rightContentRender: () => , - disableContentMargin: false, waterMarkProps: { content: initialState?.currentUser?.name, }, diff --git a/src/components/HeaderDropdown/index.tsx b/src/components/HeaderDropdown/index.tsx index 714ff761..07df291b 100644 --- a/src/components/HeaderDropdown/index.tsx +++ b/src/components/HeaderDropdown/index.tsx @@ -11,7 +11,11 @@ export type HeaderDropdownProps = { } & Omit; const HeaderDropdown: React.FC = ({ overlayClassName: cls, ...restProps }) => ( - + target.parentElement || document.body} + {...restProps} + /> ); export default HeaderDropdown; diff --git a/src/components/RightContent/index.less b/src/components/RightContent/index.less index 79fec19d..0719f76a 100644 --- a/src/components/RightContent/index.less +++ b/src/components/RightContent/index.less @@ -17,6 +17,15 @@ height: 48px; margin-left: auto; overflow: hidden; + + .name { + width: 40px; + height: 48px; + overflow: hidden; + line-height: 48px; + white-space: nowrap; + text-overflow: ellipsis; + } .action { display: flex; align-items: center;