From 3282e95db0207ee133d1e98d9771dec9d83b0fc4 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 02 四月 2026 16:24:38 +0800
Subject: [PATCH] 2026.4.2 新增专题管理功能

---
 miniprogram_npm/tdesign-miniprogram/mixins/touch.js |   36 +-----------------------------------
 1 files changed, 1 insertions(+), 35 deletions(-)

diff --git a/miniprogram_npm/tdesign-miniprogram/mixins/touch.js b/miniprogram_npm/tdesign-miniprogram/mixins/touch.js
index cbabccc..0eccd27 100644
--- a/miniprogram_npm/tdesign-miniprogram/mixins/touch.js
+++ b/miniprogram_npm/tdesign-miniprogram/mixins/touch.js
@@ -1,35 +1 @@
-const MinDistance = 10;
-const getDirection = (x, y) => {
-    if (x > y && x > MinDistance) {
-        return 'horizontal';
-    }
-    if (y > x && y > MinDistance) {
-        return 'vertical';
-    }
-    return '';
-};
-export default Behavior({
-    methods: {
-        resetTouchStatus() {
-            this.direction = '';
-            this.deltaX = 0;
-            this.deltaY = 0;
-            this.offsetX = 0;
-            this.offsetY = 0;
-        },
-        touchStart(event) {
-            this.resetTouchStatus();
-            const [touch] = event.touches;
-            this.startX = touch.clientX;
-            this.startY = touch.clientY;
-        },
-        touchMove(event) {
-            const [touch] = event.touches;
-            this.deltaX = touch.clientX - this.startX;
-            this.deltaY = touch.clientY - this.startY;
-            this.offsetX = Math.abs(this.deltaX);
-            this.offsetY = Math.abs(this.deltaY);
-            this.direction = getDirection(this.offsetX, this.offsetY);
-        },
-    },
-});
+const MinDistance=10,getDirection=(t,s)=>t>s&&t>10?"horizontal":s>t&&s>10?"vertical":"";export default Behavior({methods:{resetTouchStatus(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},touchStart(t){this.resetTouchStatus();const[s]=t.touches;this.startX=s.clientX,this.startY=s.clientY},touchMove(t){const[s]=t.touches;this.deltaX=s.clientX-this.startX,this.deltaY=s.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY),this.direction=getDirection(this.offsetX,this.offsetY)}}});
\ No newline at end of file

--
Gitblit v1.9.3