@kdcloudjs/kdesign 1.8.51 → 1.8.53

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
@@ -121,7 +121,14 @@ var Tabs = function Tabs(props) {
121
121
  isDragging.current = true;
122
122
  };
123
123
  var handleTouchMove = function handleTouchMove(e) {
124
+ var _a, _b;
124
125
  if (!isDragging.current || ListWidth <= boxWidth) return;
126
+ var path = ((_b = (_a = e.nativeEvent).composedPath) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
127
+ var isFromTabList = path.some(function (el) {
128
+ var _a, _b, _c;
129
+ 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"));
130
+ });
131
+ if (!isFromTabList) return;
125
132
  var currentX = e.touches[0].clientX;
126
133
  var deltaX = currentX - touchStartX.current;
127
134
  var newPosition = lastListPosition.current + deltaX;
package/lib/tabs/tabs.js CHANGED
@@ -137,7 +137,14 @@ var Tabs = function Tabs(props) {
137
137
  isDragging.current = true;
138
138
  };
139
139
  var handleTouchMove = function handleTouchMove(e) {
140
+ var _a, _b;
140
141
  if (!isDragging.current || ListWidth <= boxWidth) return;
142
+ var path = ((_b = (_a = e.nativeEvent).composedPath) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
143
+ var isFromTabList = path.some(function (el) {
144
+ var _a, _b, _c;
145
+ 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"));
146
+ });
147
+ if (!isFromTabList) return;
141
148
  var currentX = e.touches[0].clientX;
142
149
  var deltaX = currentX - touchStartX.current;
143
150
  var newPosition = lastListPosition.current + deltaX;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.8.51",
3
+ "version": "1.8.53",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [
@@ -78,7 +78,7 @@
78
78
  "@babel/runtime-corejs3": "^7.11.2",
79
79
  "@babel/standalone": "^7.14.3",
80
80
  "@kdcloudjs/kdesign-icons": "^1.0.5",
81
- "@kdcloudjs/table": "1.2.2-canary.15",
81
+ "@kdcloudjs/table": "1.2.2-canary.16",
82
82
  "@popperjs/core": "^2.11.8",
83
83
  "@types/js-cookie": "^3.0.3",
84
84
  "async-validator": "^3.5.1",