BUG fix: user watchEffect

This commit is contained in:
KUN1007 2023-10-22 21:12:35 +08:00
parent 0c89063c66
commit 66fed15bcd
2 changed files with 7 additions and 6 deletions

View file

@ -274,6 +274,7 @@ $navNumber: v-bind(navItemNum);
} }
} }
img { img {
margin-left: 30px;
height: 40px; height: 40px;
width: 40px; width: 40px;
cursor: pointer; cursor: pointer;

View file

@ -10,6 +10,12 @@ const currentPageUsername = ref(name)
const currentPageUserAvatar = ref(avatar) const currentPageUserAvatar = ref(avatar)
const props = defineProps<{
name?: string
avatar?: string
moemoepoint?: number
}>()
// watch watchEffect // watch watchEffect
watchEffect(() => { watchEffect(() => {
// //
@ -24,12 +30,6 @@ watchEffect(() => {
} }
}) })
const props = defineProps<{
name?: string
avatar?: string
moemoepoint?: number
}>()
const mpWidth = computed(() => { const mpWidth = computed(() => {
return props.moemoepoint ? `${props.moemoepoint % 100}%` : '0%' return props.moemoepoint ? `${props.moemoepoint % 100}%` : '0%'
}) })