Skip to content

Commit

Permalink
style: less formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
little-buddy committed Feb 19, 2021
1 parent d0381cd commit 7db6fb8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/hooks/auth.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
5 changes: 2 additions & 3 deletions src/pages/auth/component/sidebar-auth/cell.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/auth/component/sidebar-auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,7 +43,7 @@ export const SidebarAuth = defineComponent({

const doSingin = useSignin()

const clickListener = (e: any) => {
const clickListener = () => {
if (state.show) {
state.show = false
}
Expand Down
42 changes: 20 additions & 22 deletions src/pages/auth/component/sidebar-auth/style.less
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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;
Expand All @@ -43,21 +43,21 @@
.sidebar-hr {
width: 100%;
height: 1px;
background: #ededed;
margin: 4px 0;
background: #ededed;
}
.sidebar-x__info {
display: flex;
justify-content: center;
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;
}
Expand All @@ -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;
Expand All @@ -133,16 +131,16 @@
}

&__right {
color: #afafaf;
font-size: 12px;
color: #afafaf;
}

&__rightarrow {
margin-left: 10px;
}

&:hover {
background: #f2f2f2;
cursor: pointer;
background: #f2f2f2;
}
}

0 comments on commit 7db6fb8

Please sign in to comment.