@kdcloudjs/kdesign 1.7.33-stable.12-hotfix.2 → 1.7.33-stable.12-hotfix.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/tabs/tabs.js CHANGED
@@ -119,7 +119,14 @@ var Tabs = function Tabs(props) {
119
119
  isDragging.current = true;
120
120
  };
121
121
  var handleTouchMove = function handleTouchMove(e) {
122
+ var _a, _b;
122
123
  if (!isDragging.current || ListWidth <= boxWidth) return;
124
+ var path = ((_b = (_a = e.nativeEvent).composedPath) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
125
+ var isFromTabList = path.some(function (el) {
126
+ var _a, _b, _c;
127
+ return (_c = (_b = (_a = el) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains) === null || _c === void 0 ? void 0 : _c.call(_b, "".concat(tabsPrefixCls, "-tab-list"));
128
+ });
129
+ if (!isFromTabList) return; // 阻止非 tab 区域触发移动逻辑
123
130
  var currentX = e.touches[0].clientX;
124
131
  var deltaX = currentX - touchStartX.current;
125
132
  var newPosition = lastListPosition.current + deltaX;
package/lib/tabs/tabs.js CHANGED
@@ -130,7 +130,14 @@ var Tabs = function Tabs(props) {
130
130
  isDragging.current = true;
131
131
  };
132
132
  var handleTouchMove = function handleTouchMove(e) {
133
+ var _a, _b;
133
134
  if (!isDragging.current || ListWidth <= boxWidth) return;
135
+ var path = ((_b = (_a = e.nativeEvent).composedPath) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
136
+ var isFromTabList = path.some(function (el) {
137
+ var _a, _b, _c;
138
+ return (_c = (_b = (_a = el) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains) === null || _c === void 0 ? void 0 : _c.call(_b, "".concat(tabsPrefixCls, "-tab-list"));
139
+ });
140
+ if (!isFromTabList) return; // 阻止非 tab 区域触发移动逻辑
134
141
  var currentX = e.touches[0].clientX;
135
142
  var deltaX = currentX - touchStartX.current;
136
143
  var newPosition = lastListPosition.current + deltaX;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.7.33-stable.12-hotfix.2",
3
+ "version": "1.7.33-stable.12-hotfix.3",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [