Skip to content

Commit 9b0d7db

Browse files
committed
fix: 移动端焦点不触发的问题
1 parent 634c879 commit 9b0d7db

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/views/chat/components/Message/index.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { SvgIcon } from '@/components/common'
77
import { copyText } from '@/utils/format'
88
import { useIconRender } from '@/hooks/useIconRender'
99
import { t } from '@/locales'
10+
import { useBasicLayout } from '@/hooks/useBasicLayout'
1011
1112
interface Props {
1213
dateTime?: string
@@ -25,6 +26,8 @@ const props = defineProps<Props>()
2526
2627
const emit = defineEmits<Emit>()
2728
29+
const { isMobile } = useBasicLayout()
30+
2831
const { iconRender } = useIconRender()
2932
3033
const textRef = ref<HTMLElement>()
@@ -113,7 +116,12 @@ function handleRegenerate() {
113116
>
114117
<SvgIcon icon="ri:restart-line" />
115118
</button>
116-
<NDropdown :placement="!inversion ? 'right' : 'left'" :options="options" @select="handleSelect">
119+
<NDropdown
120+
:trigger="isMobile ? 'click' : 'hover'"
121+
:placement="!inversion ? 'right' : 'left'"
122+
:options="options"
123+
@select="handleSelect"
124+
>
117125
<button class="transition text-neutral-300 hover:text-neutral-800 dark:hover:text-neutral-200">
118126
<SvgIcon icon="ri:more-2-fill" />
119127
</button>

0 commit comments

Comments
 (0)