fix: disable selecting elements in user switcher (#1219)

zio/stable
sechi 2023-01-17 04:17:47 +08:00 committed by GitHub
parent 5354e58c2d
commit c4c15cf1c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@ const error = $ref(false)
:key="account.avatar" :key="account.avatar"
width="400" width="400"
height="400" height="400"
select-none
:src="(error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar" :src="(error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar"
:alt="$t('account.avatar_description', [account.username])" :alt="$t('account.avatar_description', [account.username])"
loading="lazy" loading="lazy"

View File

@ -20,7 +20,7 @@ defineOptions({
<AccountHoverWrapper :disabled="!hoverCard" :account="account"> <AccountHoverWrapper :disabled="!hoverCard" :account="account">
<AccountBigAvatar :account="account" shrink-0 :square="square" /> <AccountBigAvatar :account="account" shrink-0 :square="square" />
</AccountHoverWrapper> </AccountHoverWrapper>
<div flex="~ col" shrink pt-1 h-full overflow-hidden justify-center leading-none> <div flex="~ col" shrink pt-1 h-full overflow-hidden justify-center leading-none select-none>
<div flex="~" gap-2> <div flex="~" gap-2>
<AccountDisplayName :account="account" font-bold line-clamp-1 ws-pre-wrap break-all text-lg /> <AccountDisplayName :account="account" font-bold line-clamp-1 ws-pre-wrap break-all text-lg />
<AccountBotIndicator v-if="account.bot" text-xs /> <AccountBotIndicator v-if="account.bot" text-xs />

View File

@ -42,6 +42,7 @@ useCommand({
<div <div
v-bind="$attrs" ref="el" v-bind="$attrs" ref="el"
flex gap-3 items-center cursor-pointer px4 py3 flex gap-3 items-center cursor-pointer px4 py3
select-none
hover-bg-active hover-bg-active
:aria-label="text" :aria-label="text"
@click="handleClick" @click="handleClick"