From f24f6a7c27f72377b924ad380a5bb434bf154512 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Tue, 7 Apr 2026 01:37:01 +0800 Subject: [PATCH] fix(stage-ui): do not display action menu button on mobile --- .../scenarios/chat/components/action-menu/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/stage-ui/src/components/scenarios/chat/components/action-menu/index.vue b/packages/stage-ui/src/components/scenarios/chat/components/action-menu/index.vue index c75a55f08..072412db8 100644 --- a/packages/stage-ui/src/components/scenarios/chat/components/action-menu/index.vue +++ b/packages/stage-ui/src/components/scenarios/chat/components/action-menu/index.vue @@ -3,7 +3,7 @@ import type { ComponentPublicInstance } from 'vue' import type { ChatActionMenuAction } from '.' -import { useElementVisibility } from '@vueuse/core' +import { isStageCapacitor, isStageWeb } from '@proj-airi/stage-shared' import { clamp } from 'es-toolkit' import { ContextMenuContent, @@ -20,6 +20,7 @@ import { import { computed, inject, shallowRef, useTemplateRef } from 'vue' import { createChatActionMenuItems } from '.' +import { useBreakpoints } from '../../../../../composables/use-breakpoints' import { useElementScroll } from '../../composables/use-element-scroll' import { chatScrollContainerKey } from '../../constants' @@ -71,6 +72,9 @@ const bottomSentinelVisible = useElementVisibility(bottomSentinelRef, { scrollTarget: effectiveScrollTarget, }) +const { isMobile } = useBreakpoints() +const shouldDisableDropdownMenu = computed(() => (isStageWeb() || isStageCapacitor()) && isMobile.value) + const menuItems = computed(() => createChatActionMenuItems({ canCopy: props.canCopy && props.copyText.trim().length > 0, canDelete: props.canDelete, @@ -164,6 +168,7 @@ function setMeasuredElement(element: Element | ComponentPublicInstance | null) {