@kdcloudjs/kdesign 1.8.50 → 1.8.52

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/dist/kdesign.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/kdesign v1.8.50
3
+ * @kdcloudjs/kdesign v1.8.52
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -11818,7 +11818,8 @@ var defaultConfig = {
11818
11818
  getLangMsg: _locale__WEBPACK_IMPORTED_MODULE_1__["getLangMsg"],
11819
11819
  getCompLangMsg: _locale__WEBPACK_IMPORTED_MODULE_1__["getCompLangMsg"]
11820
11820
  },
11821
- direction: 'ltr'
11821
+ direction: 'ltr',
11822
+ isMobile: false
11822
11823
  };
11823
11824
  /* harmony default export */ __webpack_exports__["default"] = (defaultConfig);
11824
11825
 
@@ -38422,7 +38423,8 @@ var TabPane = function TabPane(props) {
38422
38423
  var tabPaneRef = Object(react__WEBPACK_IMPORTED_MODULE_10__["useRef"])(null);
38423
38424
  var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_10__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_12__["default"]),
38424
38425
  getPrefixCls = _useContext.getPrefixCls,
38425
- prefixCls = _useContext.prefixCls;
38426
+ prefixCls = _useContext.prefixCls,
38427
+ isMobile = _useContext.isMobile;
38426
38428
  var tab = props.tab,
38427
38429
  id = props.id,
38428
38430
  className = props.className,
@@ -38438,8 +38440,8 @@ var TabPane = function TabPane(props) {
38438
38440
  tabPaneProps.disabled = context.disabled || disabled;
38439
38441
  }
38440
38442
  var tabPanePrefixCls = getPrefixCls(prefixCls, 'tab-pane');
38441
- var tabPaneBoxClasses = classnames__WEBPACK_IMPORTED_MODULE_11___default()(tabPanePrefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-box-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-type-").concat(tabPaneProps.type), tabPaneProps.type), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-").concat(tabPaneProps.position), tabPaneProps.position), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-").concat(tabPaneProps.size), tabPaneProps.size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-disabled"), tabPaneProps.disabled), _classNames));
38442
- var tabPaneTextClasses = classnames__WEBPACK_IMPORTED_MODULE_11___default()("".concat(tabPanePrefixCls, "-text"), (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames2, "".concat(tabPanePrefixCls, "-text-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames2, "".concat(tabPanePrefixCls, "-text-disabled"), tabPaneProps.disabled), _classNames2));
38443
+ var tabPaneBoxClasses = classnames__WEBPACK_IMPORTED_MODULE_11___default()(tabPanePrefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-box-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-type-dynamic-notMobile"), !isMobile), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-type-").concat(tabPaneProps.type), tabPaneProps.type), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-").concat(tabPaneProps.position), tabPaneProps.position), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-").concat(tabPaneProps.size), tabPaneProps.size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-disabled"), tabPaneProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-notMobile"), !isMobile), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames, "".concat(tabPanePrefixCls, "-isMobile"), isMobile), _classNames));
38444
+ var tabPaneTextClasses = classnames__WEBPACK_IMPORTED_MODULE_11___default()("".concat(tabPanePrefixCls, "-text"), (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames2, "".concat(tabPanePrefixCls, "-text-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames2, "".concat(tabPanePrefixCls, "-text-disabled"), tabPaneProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_classNames2, "".concat(tabPanePrefixCls, "-text-notMobile"), !isMobile), _classNames2));
38443
38445
  var operationsClasses = classnames__WEBPACK_IMPORTED_MODULE_11___default()("".concat(tabPanePrefixCls, "-operations"), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()({}, "".concat(tabPanePrefixCls, "-operations-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled));
38444
38446
  var handleClick = function handleClick(e) {
38445
38447
  if (tabPaneProps.disabled) return;
@@ -38665,7 +38667,15 @@ var Tabs = function Tabs(props) {
38665
38667
  isDragging.current = true;
38666
38668
  };
38667
38669
  var handleTouchMove = function handleTouchMove(e) {
38670
+ var _e$nativeEvent$compos, _e$nativeEvent;
38668
38671
  if (!isDragging.current || ListWidth <= boxWidth) return;
38672
+ var path = ((_e$nativeEvent$compos = (_e$nativeEvent = e.nativeEvent).composedPath) === null || _e$nativeEvent$compos === void 0 ? void 0 : _e$nativeEvent$compos.call(_e$nativeEvent)) || [];
38673
+ var isFromTabList = path.some(function (el) {
38674
+ var _classList, _classList$contains;
38675
+ return el === null || el === void 0 ? void 0 : (_classList = el.classList) === null || _classList === void 0 ? void 0 : (_classList$contains = _classList.contains) === null || _classList$contains === void 0 ? void 0 : _classList$contains.call(_classList, "".concat(tabsPrefixCls, "-tab-list"));
38676
+ });
38677
+ if (!isFromTabList) return; // 阻止非 tab 区域触发移动逻辑
38678
+
38669
38679
  var currentX = e.touches[0].clientX;
38670
38680
  var deltaX = currentX - touchStartX.current;
38671
38681
  var newPosition = lastListPosition.current + deltaX;