Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

退出登录时menu定位错误 #170

Open
cyb233 opened this issue Apr 18, 2023 · 2 comments
Open

退出登录时menu定位错误 #170

cyb233 opened this issue Apr 18, 2023 · 2 comments

Comments

@cyb233
Copy link
Contributor

cyb233 commented Apr 18, 2023

在进行退出登录操作后,布局变化时menu

<q-menu
class="avatar-popover"
:offset="[-30, 5]"
anchor="bottom left"
self="top right"
style="border-radius: 8px"
>
的坐标依然是个人中心的左上角,重新点开后正常,估计原因是
<q-list class="avatar-panel-popover" v-if="user">
<div v-else class="q-pa-sm">
的大小不同,所以
:offset="[-30, 5]"
的偏移量不会动态变化

image

@wuyu8512
Copy link
Member

我估计这个menu里面再套一层div,在div里面做v-if,这个问题可能就解决了

@01101sam
Copy link

01101sam commented Jan 2, 2024

function logout() {
  userMenu.value = false  // 必须放头
  ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants