@nutui/nutui-react-taro 2.6.12 → 2.6.13

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.
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("@tarojs/components"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "@tarojs/components", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.components, global2.ReactDOM));
3
3
  })(this, function(exports2, React, Taro, components, ReactDOM) {
4
4
  "use strict";/*!
5
- * @nutui/nutui-react-taro v2.6.12 Fri Jul 05 2024 14:50:21 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react-taro v2.6.13 Fri Jul 12 2024 13:57:50 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -6791,6 +6791,7 @@
6791
6791
  const scrollTop2 = e2.target.scrollTop;
6792
6792
  Taro.getEnv() === "WEB" && setScrollTop(scrollTop2);
6793
6793
  let current = Math.floor(scrollTop2 / avgHeight);
6794
+ if (current < 0) return;
6794
6795
  if (!monthsData[current + 1]) return;
6795
6796
  const nextTop = monthsData[current + 1].scrollTop;
6796
6797
  const nextHeight = monthsData[current + 1].cssHeight;
@@ -9830,7 +9831,6 @@
9830
9831
  item.entity.onStoreChange("update");
9831
9832
  }
9832
9833
  });
9833
- this.validateFields();
9834
9834
  };
9835
9835
  this.setCallback = (callback) => {
9836
9836
  this.callbacks = {
@@ -13526,7 +13526,18 @@
13526
13526
  className: "myDrag"
13527
13527
  };
13528
13528
  const Drag = (props) => {
13529
- const { attract, direction, boundary, children, className, style, ...reset } = {
13529
+ const {
13530
+ attract,
13531
+ direction,
13532
+ boundary,
13533
+ onDrag,
13534
+ onDragStart,
13535
+ onDragEnd,
13536
+ children,
13537
+ className,
13538
+ style,
13539
+ ...reset
13540
+ } = {
13530
13541
  ...defaultProps$F,
13531
13542
  ...props
13532
13543
  };
@@ -13561,7 +13572,7 @@
13561
13572
  }
13562
13573
  };
13563
13574
  const touchStart = (e2) => {
13564
- e2.currentTarget;
13575
+ onDragStart == null ? void 0 : onDragStart();
13565
13576
  const touches = e2.touches[0];
13566
13577
  axisCache.current = { x: touches.clientX, y: touches.clientY };
13567
13578
  transformCache.current = { x: translateX.current, y: translateY.current };
@@ -13573,6 +13584,9 @@
13573
13584
  const y = touch.clientY - axisCache.current.y;
13574
13585
  translateX.current = x + transformCache.current.x;
13575
13586
  translateY.current = y + transformCache.current.y;
13587
+ onDrag == null ? void 0 : onDrag({
13588
+ offset: [translateX.current, translateY.current]
13589
+ });
13576
13590
  if (translateX.current < boundaryState.left) {
13577
13591
  translateX.current = boundaryState.left;
13578
13592
  } else if (translateX.current > boundaryState.right) {
@@ -13588,6 +13602,9 @@
13588
13602
  }
13589
13603
  };
13590
13604
  const touchEnd = (e2) => {
13605
+ onDragEnd == null ? void 0 : onDragEnd({
13606
+ offset: [translateX.current, translateY.current]
13607
+ });
13591
13608
  if (direction !== "y" && attract && dragRef.current) {
13592
13609
  if (translateX.current < middleLine.current) {
13593
13610
  translateX.current = boundaryState.left;
@@ -17005,7 +17022,6 @@
17005
17022
  className: classNames(classPrefix2, className),
17006
17023
  style,
17007
17024
  ref,
17008
- onClick: closeOnImg,
17009
17025
  onTouchStart
17010
17026
  },
17011
17027
  /* @__PURE__ */ React.createElement(
@@ -17037,6 +17053,7 @@
17037
17053
  components.Video,
17038
17054
  {
17039
17055
  src: item.source.src,
17056
+ onClick: closeOnImg,
17040
17057
  controls: item.options.controls,
17041
17058
  autoplay: false,
17042
17059
  loop: false,
@@ -17052,14 +17069,20 @@
17052
17069
  key: index,
17053
17070
  className: "nut-imagepreview-swiper-item"
17054
17071
  },
17055
- Taro.getEnv() === "WEB" ? /* @__PURE__ */ React.createElement(Image$1, { src: item.src, mode: "aspectFit" }) : /* @__PURE__ */ React.createElement(
17056
- Image$1,
17072
+ "(",
17073
+ /* @__PURE__ */ React.createElement(
17074
+ components.Image,
17057
17075
  {
17058
17076
  src: item.src,
17059
- mode: "aspectFit",
17060
- showMenuByLongpress: !!showMenuByLongpress
17077
+ mode: "widthFix",
17078
+ onClick: closeOnImg,
17079
+ style: { width: "100%" },
17080
+ ...Taro.getEnv() !== "WEB" && {
17081
+ showMenuByLongpress
17082
+ }
17061
17083
  }
17062
- )
17084
+ ),
17085
+ ")"
17063
17086
  );
17064
17087
  }) : []
17065
17088
  )
@@ -11,6 +11,7 @@
11
11
  user-select: none;
12
12
  overflow: hidden;
13
13
  background: $tabs-titles-background-color;
14
+ scrollbar-width: none;
14
15
 
15
16
  &::-webkit-scrollbar {
16
17
  display: none;