判断逻辑有问题
parent
aa32579a37
commit
e6c10aa306
|
@ -21,7 +21,8 @@ const props = defineProps({
|
|||
})
|
||||
|
||||
const userStore = useUserStore()
|
||||
const avatar = computed(() => userStore.user.avatar ?? avatarImg)
|
||||
const avatar = computed(() => (userStore.user?.avatar != null && userStore.user?.avatar != '') ?
|
||||
userStore.user?.avatar : avatarImg)
|
||||
const userName = computed(() => userStore.user.nickname ?? 'Admin')
|
||||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
|
|
@ -22,7 +22,8 @@ const showDate = ref(true)
|
|||
const { getPrefixCls } = useDesign()
|
||||
const prefixCls = getPrefixCls('lock-page')
|
||||
|
||||
const avatar = computed(() => userStore.user.avatar ?? avatarImg)
|
||||
const avatar = computed(() => (userStore.user?.avatar != null && userStore.user?.avatar != '') ?
|
||||
userStore.user?.avatar : avatarImg)
|
||||
const userName = computed(() => userStore.user.nickname ?? 'Admin')
|
||||
|
||||
const lockStore = useLockStore()
|
||||
|
|
Loading…
Reference in New Issue