Skip to content

Commit

Permalink
fix: 移动端焦点不触发的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanzhaoyu committed Mar 23, 2023
1 parent ac2e942 commit 7ccd723
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/views/chat/components/Message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { SvgIcon } from '@/components/common'
import { copyText } from '@/utils/format'
import { useIconRender } from '@/hooks/useIconRender'
import { t } from '@/locales'
import { useBasicLayout } from '@/hooks/useBasicLayout'
interface Props {
dateTime?: string
Expand All @@ -25,6 +26,8 @@ const props = defineProps<Props>()
const emit = defineEmits<Emit>()
const { isMobile } = useBasicLayout()
const { iconRender } = useIconRender()
const textRef = ref<HTMLElement>()
Expand Down Expand Up @@ -113,7 +116,12 @@ function handleRegenerate() {
>
<SvgIcon icon="ri:restart-line" />
</button>
<NDropdown :placement="!inversion ? 'right' : 'left'" :options="options" @select="handleSelect">
<NDropdown
:trigger="isMobile ? 'click' : 'hover'"
:placement="!inversion ? 'right' : 'left'"
:options="options"
@select="handleSelect"
>
<button class="transition text-neutral-300 hover:text-neutral-800 dark:hover:text-neutral-200">
<SvgIcon icon="ri:more-2-fill" />
</button>
Expand Down

0 comments on commit 7ccd723

Please sign in to comment.