This commit is contained in:
icssoa
2025-07-29 22:30:23 +08:00
parent bb4caddc0b
commit c0b5305daa
8 changed files with 46 additions and 42 deletions

View File

@@ -408,14 +408,15 @@ function onTouchEnd() {
* 根据滑动状态动态设置transform属性实现位移动画
*/
const popupStyle = computed(() => {
const style = new Map<string, string>();
const style = {};
// 基础样式
style.set("height", height.value);
style.set("width", width.value);
style["height"] = height.value;
style["width"] = width.value;
// 处于触摸状态时添加位移效果
if (swipe.isTouch) {
style.set("transform", `translateY(${swipe.offsetY}px)`);
style["transform"] = `translateY(${swipe.offsetY}px)`;
}
return style;