refactor: refactor coding style

This commit is contained in:
Hakadao
2023-08-15 22:13:00 +08:00
parent 2d63d17da8
commit e76369e8d2
2 changed files with 12 additions and 8 deletions

View File

@@ -41,16 +41,18 @@ const avatarImg = ref<HTMLImageElement>() as Ref<HTMLImageElement>
const avatarShadow = ref<HTMLImageElement>() as Ref<HTMLImageElement>
watch(
() => showNotificationsPop,
() => {
getUnreadMessageCount()
showNotificationsPop,
(newVal) => {
if (!newVal)
getUnreadMessageCount()
},
)
watch(
() => showMomentsPop,
() => {
getNewMomentsCount()
showMomentsPop,
(newVal) => {
if (!newVal)
getNewMomentsCount()
},
)
@@ -110,7 +112,9 @@ async function getUserInfo() {
Object.assign(userInfo, res.data)
}
// Account not logged in
else if (res.code === -101) { isLogin.value = false }
else if (res.code === -101) {
isLogin.value = false
}
}
catch (error) {
isLogin.value = false

View File

@@ -175,7 +175,7 @@ function jumpToLoginPage() {
</template>
<!-- skeleton -->
<template v-for="item in (settings.recommendationMode === 'web' ? 30 : 30)" :key="item">
<template v-for="item in 30" :key="item">
<div
v-if="isLoading"
mb-8 pointer-events-none select-none