File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/components/common/UserAvatar Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,10 @@ import { useBasicLayout } from '@/hooks/useBasicLayout'
9
9
10
10
const userStore = useUserStore ()
11
11
const authStore = useAuthStore ()
12
- const needPermission = ref (false )
13
-
14
12
const { isMobile } = useBasicLayout ()
15
- if (!! authStore .session ?.auth && ! authStore .token )
16
- needPermission .value = isMobile .value
13
+ const showPermission = ref (false )
14
+
15
+ const needPermission = computed (() => !! authStore .session ?.auth && ! authStore .token && (isMobile .value || showPermission .value ))
17
16
18
17
const userInfo = computed (() => userStore .userInfo )
19
18
</script >
@@ -39,7 +38,7 @@ const userInfo = computed(() => userStore.userInfo)
39
38
</h2 >
40
39
<NButton
41
40
v-else tag =" a" text
42
- @click =" needPermission = true"
41
+ @click =" showPermission = true"
43
42
>
44
43
<span class =" text-xl text-[#ff69b4] dark:text-white" >
45
44
{{ $t('common.notLoggedIn') }}
You can’t perform that action at this time.
0 commit comments