From dced5471c53ff650347dd97c3559d82ca880f731 Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Fri, 6 Feb 2026 00:07:53 +0800 Subject: [PATCH] fix: make move content --- pages/make/index.vue | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/pages/make/index.vue b/pages/make/index.vue index b4a2beb..b1522c7 100644 --- a/pages/make/index.vue +++ b/pages/make/index.vue @@ -51,6 +51,9 @@ - 点击标题或个人信息可拖动,双指可缩放标题 + 点击标题、祝福语或个人信息可拖动,双指可缩放标题 @@ -510,6 +513,31 @@ const handleUserTouchMove = (e) => { } }; +// 祝福语触摸交互相关 +let startBubbleTouches = []; +let initialBubbleOffsetY = 0; + +const handleBubbleTouchStart = (e) => { + startBubbleTouches = e.touches; + initialBubbleOffsetY = bubbleOffsetY.value; +}; + +const handleBubbleTouchEnd = () => { + startBubbleTouches = []; +}; + +const handleBubbleTouchMove = (e) => { + if (!startBubbleTouches.length) return; + + if (e.touches.length === 1 && startBubbleTouches.length === 1) { + // 单指拖拽 (仅上下) + const moveY = e.touches[0].clientY - startBubbleTouches[0].clientY; + let newY = initialBubbleOffsetY + moveY * pxToRpx; + // 合理范围限制,参考 slider 的 min/max + bubbleOffsetY.value = Math.min(Math.max(newY, -200), 400); + } +}; + const handleTitleTouchMove = (e) => { if (!currentTitle.value || !startTouches.length) return;