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'
99
1010const userStore = useUserStore ()
1111const authStore = useAuthStore ()
12- const needPermission = ref (false )
13-
1412const { 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 ))
1716
1817const userInfo = computed (() => userStore .userInfo )
1918 </script >
@@ -39,7 +38,7 @@ const userInfo = computed(() => userStore.userInfo)
3938 </h2 >
4039 <NButton
4140 v-else tag =" a" text
42- @click =" needPermission = true"
41+ @click =" showPermission = true"
4342 >
4443 <span class =" text-xl text-[#ff69b4] dark:text-white" >
4544 {{ $t('common.notLoggedIn') }}
You can’t perform that action at this time.
0 commit comments