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

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.7.33-stable.12-hotfix.1
3
+ * @kdcloudjs/kdesign v1.7.33-stable.12-hotfix.3
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -7558,7 +7558,8 @@ var InternalSelect = function InternalSelect(props, ref) {
7558
7558
  getPrefixCls = _useContext.getPrefixCls,
7559
7559
  prefixCls = _useContext.prefixCls,
7560
7560
  userDefaultProps = _useContext.compDefaultProps,
7561
- locale = _useContext.locale;
7561
+ locale = _useContext.locale,
7562
+ isMobile = _useContext.isMobile;
7562
7563
  var selectProps = Object(_utils__WEBPACK_IMPORTED_MODULE_24__["getCompProps"])('CityPicker', userDefaultProps, props);
7563
7564
  var cityPickerLangMsg = locale.getCompLangMsg({
7564
7565
  componentName: 'CityPicker'
@@ -7763,11 +7764,16 @@ var InternalSelect = function InternalSelect(props, ref) {
7763
7764
  }));
7764
7765
  };
7765
7766
  var handleOption = function handleOption(city) {
7766
- var _searchRef$current;
7767
7767
  handleVisibleChange(false);
7768
7768
  city.type = tabsValue === 'domestic' ? 'domestic' : 'foreign';
7769
7769
  (city === null || city === void 0 ? void 0 : city.id) !== initValue && (onChange === null || onChange === void 0 ? void 0 : onChange(city === null || city === void 0 ? void 0 : city.id, city));
7770
- (_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 || _searchRef$current.focus();
7770
+ if (isMobile) {
7771
+ var _searchRef$current;
7772
+ (_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 || _searchRef$current.blur();
7773
+ } else {
7774
+ var _searchRef$current2;
7775
+ (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 || _searchRef$current2.focus();
7776
+ }
7771
7777
  setAfterChangeFocus(true);
7772
7778
  if (typeof value === 'undefined') {
7773
7779
  setSeletedCity(city);
@@ -7990,12 +7996,12 @@ var InternalSelect = function InternalSelect(props, ref) {
7990
7996
  className: selectionCls,
7991
7997
  tabIndex: disabled ? -1 : 0,
7992
7998
  onFocus: function onFocus() {
7993
- var _searchRef$current2;
7994
- return (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.focus();
7999
+ var _searchRef$current3;
8000
+ return (_searchRef$current3 = searchRef.current) === null || _searchRef$current3 === void 0 ? void 0 : _searchRef$current3.focus();
7995
8001
  },
7996
8002
  onBlur: function onBlur() {
7997
- var _searchRef$current3;
7998
- return (_searchRef$current3 = searchRef.current) === null || _searchRef$current3 === void 0 ? void 0 : _searchRef$current3.blur();
8003
+ var _searchRef$current4;
8004
+ return (_searchRef$current4 = searchRef.current) === null || _searchRef$current4 === void 0 ? void 0 : _searchRef$current4.blur();
7999
8005
  },
8000
8006
  onKeyDown: onInternalKeyDown
8001
8007
  }, renderSingle()));
@@ -33203,7 +33209,15 @@ var Tabs = function Tabs(props) {
33203
33209
  isDragging.current = true;
33204
33210
  };
33205
33211
  var handleTouchMove = function handleTouchMove(e) {
33212
+ var _e$nativeEvent$compos, _e$nativeEvent;
33206
33213
  if (!isDragging.current || ListWidth <= boxWidth) return;
33214
+ var path = ((_e$nativeEvent$compos = (_e$nativeEvent = e.nativeEvent).composedPath) === null || _e$nativeEvent$compos === void 0 ? void 0 : _e$nativeEvent$compos.call(_e$nativeEvent)) || [];
33215
+ var isFromTabList = path.some(function (el) {
33216
+ var _classList, _classList$contains;
33217
+ return el === null || el === void 0 || (_classList = el.classList) === null || _classList === void 0 || (_classList$contains = _classList.contains) === null || _classList$contains === void 0 ? void 0 : _classList$contains.call(_classList, "".concat(tabsPrefixCls, "-tab-list"));
33218
+ });
33219
+ if (!isFromTabList) return; // 阻止非 tab 区域触发移动逻辑
33220
+
33207
33221
  var currentX = e.touches[0].clientX;
33208
33222
  var deltaX = currentX - touchStartX.current;
33209
33223
  var newPosition = lastListPosition.current + deltaX;