diff --git a/src/hooks/auth.ts b/src/hooks/auth.ts index 0c925382..3a7dcd16 100644 --- a/src/hooks/auth.ts +++ b/src/hooks/auth.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/camelcase */ -import { onMounted, onUnmounted, computed } from 'vue' +import { computed } from 'vue' import { useRouter } from 'vue-router' import { useStore } from 'vuex' import { Toast } from 'vant' diff --git a/src/pages/auth/component/sidebar-auth/cell.tsx b/src/pages/auth/component/sidebar-auth/cell.tsx index 23c48bf5..0a129c97 100644 --- a/src/pages/auth/component/sidebar-auth/cell.tsx +++ b/src/pages/auth/component/sidebar-auth/cell.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { defineComponent } from 'vue' import Icon from '@/components-global/icon/main' import './style.less' @@ -29,9 +30,7 @@ export default defineComponent({ } }, setup($props) { - console.log('X-Cell => Go~') - - const onClick = (e: any) => { + const onClick = (e: MouseEvent) => { if ($props.externalLink) { window.open($props.externalLink) } else { diff --git a/src/pages/auth/component/sidebar-auth/index.tsx b/src/pages/auth/component/sidebar-auth/index.tsx index 40e56735..ad4e2d50 100644 --- a/src/pages/auth/component/sidebar-auth/index.tsx +++ b/src/pages/auth/component/sidebar-auth/index.tsx @@ -26,11 +26,11 @@ export const SidebarAuth = defineComponent({ } } - const goProfile = (e: any) => { + const goProfile = () => { if (isLogin.value) $router.push('/profile') } - const popupProfile = (e: any) => { + const popupProfile = (e: MouseEvent) => { if (isLogin.value) { e.stopPropagation() state.show = !state.show @@ -43,7 +43,7 @@ export const SidebarAuth = defineComponent({ const doSingin = useSignin() - const clickListener = (e: any) => { + const clickListener = () => { if (state.show) { state.show = false } diff --git a/src/pages/auth/component/sidebar-auth/style.less b/src/pages/auth/component/sidebar-auth/style.less index 7f0bd8eb..fea3c39a 100644 --- a/src/pages/auth/component/sidebar-auth/style.less +++ b/src/pages/auth/component/sidebar-auth/style.less @@ -1,13 +1,13 @@ .sidebar-profile { position: absolute; - z-index: 99; top: 0; left: 100%; + z-index: 99; width: 320px; - box-shadow: 0 0 6px 0 #dcdcdc; + padding: 4px 0; background: #fff; border-radius: 4px; - padding: 4px 0; + box-shadow: 0 0 6px 0 #dcdcdc; } .sidebar-nav { @@ -16,20 +16,20 @@ } &-loginbox { position: relative; - width: fit-content; display: flex; align-items: center; + width: fit-content; color: var(--secondary-text); &::after { display: block; width: 0; height: 0; + margin-right: 10px; margin-left: 6px; content: ''; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid #8e8e8e; - margin-right: 10px; } > span { padding-left: 8px; @@ -43,8 +43,8 @@ .sidebar-hr { width: 100%; height: 1px; - background: #ededed; margin: 4px 0; + background: #ededed; } .sidebar-x__info { display: flex; @@ -52,12 +52,12 @@ margin: 20px 0; } .sidebar-x__item { - width: 94px; - height: 56px; display: flex; + flex-direction: column; align-items: center; justify-content: center; - flex-direction: column; + width: 94px; + height: 56px; &:not(:last-child) { border-right: 1px solid #f2f2f2; } @@ -84,42 +84,40 @@ .sidebar-x__signin, .sidebar-x__unsignin { - width: 96px; - height: 32px; display: flex; align-items: center; justify-content: center; - border-radius: 32px; + width: 96px; + height: 32px; margin-bottom: 14px; + border-radius: 32px; } .sidebar-x__signin { - border: 1px solid #cfcfcf; color: #b7bdb7; + border: 1px solid #cfcfcf; &:hover { cursor: default; } } .sidebar-x__unsignin { - border: 1px solid #f2f2f2; color: #6b6b6b; + border: 1px solid #f2f2f2; &:hover { + color: #4c4c4c; cursor: pointer; border-color: #afafaf; - color: #4c4c4c; } } .x-cell { + display: flex; + justify-content: space-between; width: 100%; height: 36px; - padding-left: 20px; padding-right: 10px; - - display: flex; - justify-content: space-between; - + padding-left: 20px; &__right, &__left { display: flex; @@ -133,8 +131,8 @@ } &__right { - color: #afafaf; font-size: 12px; + color: #afafaf; } &__rightarrow { @@ -142,7 +140,7 @@ } &:hover { - background: #f2f2f2; cursor: pointer; + background: #f2f2f2; } }