From 0e180ca3373b017de40f7b04a629b54b611d4a45 Mon Sep 17 00:00:00 2001 From: Xc Date: Thu, 22 Dec 2022 12:21:17 +0800 Subject: [PATCH] =?UTF-8?q?myInfo=E7=9A=84=E6=A0=B7=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/icon/web.tsx | 8 +++++++- src/components/my/info/index.ts | 2 +- src/components/my/info/web.pc.module.less | 1 - src/components/my/info/web.pc.tsx | 18 ++++++++++-------- src/components/my/info/web.tsx | 6 +++--- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/components/icon/web.tsx b/src/components/icon/web.tsx index 9be4e7a6d..3faa0e4b2 100644 --- a/src/components/icon/web.tsx +++ b/src/components/icon/web.tsx @@ -24,7 +24,13 @@ export default function Render( | '7x' | '8x' | '9x' - | '10x'; + | '10x' + | 'xs' + | '2xs' + | 'sm' + | 'lg' + | 'xl' + | '2xl'; }, {} > diff --git a/src/components/my/info/index.ts b/src/components/my/info/index.ts index f11321b8d..a4bd5a35d 100644 --- a/src/components/my/info/index.ts +++ b/src/components/my/info/index.ts @@ -24,7 +24,7 @@ export default OakComponent({ }; }, properties: { - hideLogout: Boolean, + showLogout: Boolean, }, lifetimes: { attached() { diff --git a/src/components/my/info/web.pc.module.less b/src/components/my/info/web.pc.module.less index cd8a6ffbf..0bdfeb317 100644 --- a/src/components/my/info/web.pc.module.less +++ b/src/components/my/info/web.pc.module.less @@ -4,7 +4,6 @@ display: flex; flex-direction: column; align-items: stretch; - min-height: 100vh; background-color: var(--oak-bg-color-container); .header { diff --git a/src/components/my/info/web.pc.tsx b/src/components/my/info/web.pc.tsx index fba7211ac..aaf60e3fa 100644 --- a/src/components/my/info/web.pc.tsx +++ b/src/components/my/info/web.pc.tsx @@ -24,13 +24,13 @@ const IdStateColor = { verified: SuccessColor, } export default function Render(props: WebComponentProps void; updateAttribute: (attr: string, value: any) => Promise; }>) { - const { nameText, mobileText, userId, nickname, name, idState, userState, gender } = props.data; + const { nameText, mobileText, userId, nickname, name, idState, userState, gender, showLogout } = props.data; const { t, logout, navigateTo, updateAttribute } = props.methods; const [updateAttr, setUpdateAttr] = useState(undefined as string | undefined); @@ -69,12 +69,14 @@ export default function Render(props: WebComponentProps
{nameText || t('unset')}
- + { + showLogout && + }
void; updateAttribute: (attr: string, value: any) => Promise; }>) { - const { nameText, mobileText, userId, nickname, name, idState, userState, gender, hideLogout } = props.data; + const { nameText, mobileText, userId, nickname, name, idState, userState, gender, showLogout } = props.data; const { t, logout, navigateTo, updateAttribute } = props.methods; const [updateAttr, setUpdateAttr] = useState(undefined as string | undefined); @@ -107,7 +107,7 @@ export default function Render(props: WebComponentProps
{ - !hideLogout && <> + showLogout && <>