@nutui/nutui-react-taro 2.7.15 → 2.7.16-beta.0

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/CHANGELOG.md CHANGED
@@ -1,13 +1,12 @@
1
1
  # v2.7.15
2
- `2026-03-09`
3
-
4
2
 
5
- * 🏡 chore: 升级版本
6
- * :sparkles: feat: 调整button圆角、dialog内边间距 (#3321)
7
- * :bug: fix: uploader上传组件taro版本h5端支持文件选择 (#3424)
8
- * :bug: fix(uploader): 修复H5上传 (#3421)
9
- * :bug: fix(form): setFieldValue与setFieldsValue 重复触发notifyWatch (#3228)
3
+ `2026-03-09`
10
4
 
5
+ - 🏡 chore: 升级版本
6
+ - :sparkles: feat: 调整button圆角、dialog内边间距 (#3321)
7
+ - :bug: fix: uploader上传组件taro版本h5端支持文件选择 (#3424)
8
+ - :bug: fix(uploader): 修复H5上传 (#3421)
9
+ - :bug: fix(form): setFieldValue与setFieldsValue 重复触发notifyWatch (#3228)
11
10
 
12
11
  # v2.7.14
13
12
 
@@ -1,4 +1,4 @@
1
- import { C as Calendar } from "./calendar.taro-C-5Lmq9i.js";
1
+ import { C as Calendar } from "./calendar.taro-DzEStrql.js";
2
2
  export {
3
3
  Calendar as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { C as CalendarItem } from "./calendaritem.taro-B0QA0q4N.js";
1
+ import { C as CalendarItem } from "./calendaritem.taro-DT5xXwyk.js";
2
2
  export {
3
3
  CalendarItem as default
4
4
  };
package/dist/esm/Radio.js CHANGED
@@ -1,4 +1,4 @@
1
- import { R as Radio } from "./radio.taro-M2in687s.js";
1
+ import { R as Radio } from "./radio.taro-BCsQcVdu.js";
2
2
  export {
3
3
  Radio as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { a as RadioGroup } from "./radio.taro-M2in687s.js";
1
+ import { a as RadioGroup } from "./radio.taro-BCsQcVdu.js";
2
2
  export {
3
3
  RadioGroup as default
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import React__default, { useState, useRef, useEffect } from "react";
2
2
  import { P as Popup } from "./popup.taro-JynjcLCn.js";
3
- import { s as splitDate, g as getPreMonths, a as getMonths, b as getPreQuarters, c as getQuarters, d as getNextQuarters, C as CalendarItem } from "./calendaritem.taro-B0QA0q4N.js";
3
+ import { s as splitDate, g as getPreMonths, a as getMonths, b as getPreQuarters, c as getQuarters, d as getNextQuarters, C as CalendarItem } from "./calendaritem.taro-DT5xXwyk.js";
4
4
  import classNames from "classnames";
5
5
  import Taro from "@tarojs/taro";
6
6
  import { View, ScrollView } from "@tarojs/components";
@@ -246,6 +246,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
246
246
  const [state] = useState({
247
247
  currDateArray: []
248
248
  });
249
+ const isSameRange = (range, start, end) => {
250
+ return range[0] === start && range[1] === end;
251
+ };
249
252
  const resetDefaultValue = () => {
250
253
  if (defaultValue || Array.isArray(defaultValue) && defaultValue.length > 0) {
251
254
  return type !== "single" ? [...defaultValue] : defaultValue;
@@ -323,7 +326,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
323
326
  start = 0;
324
327
  end = monthNum + 2;
325
328
  }
326
- setMonthDefaultRange([start, end]);
329
+ setMonthDefaultRange((range) => {
330
+ return isSameRange(range, start, end) ? range : [start, end];
331
+ });
327
332
  setTranslateY(monthsData[start].scrollTop);
328
333
  setReachedYearMonthInfo(current);
329
334
  };
@@ -462,8 +467,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
462
467
  viewHeight = getMonthsRef().clientHeight;
463
468
  getMonthsPanel().style.height = `${containerHeight}px`;
464
469
  const currTop = monthsData[current].scrollTop;
465
- getMonthsRef().scrollTop = currTop;
466
- setScrollTop(currTop);
470
+ const maxScrollTop = getMonthsRef().scrollHeight - getMonthsRef().clientHeight;
471
+ const targetScrollTop = Math.min(currTop, maxScrollTop);
472
+ getMonthsRef().scrollTop = targetScrollTop;
473
+ setScrollTop(targetScrollTop);
467
474
  nextTick(() => setScrollWithAnimation(true));
468
475
  }
469
476
  });
@@ -543,6 +550,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
543
550
  if (monthsData.length <= 1)
544
551
  return;
545
552
  const scrollTop2 = e.target.scrollTop;
553
+ console.log("🚀 ~ monthsViewScroll ~ scrollTop:", scrollTop2);
546
554
  Taro.getEnv() === "WEB" && setScrollTop(scrollTop2);
547
555
  let current = Math.floor(scrollTop2 / avgHeight);
548
556
  if (current < 0)
@@ -25,8 +25,8 @@ import { T as T2 } from "./tabbaritem.taro-BPe2bsMQ.js";
25
25
  import { T as T3 } from "./tabpane.taro-B8CBhFle.js";
26
26
  import { T as T4 } from "./tabs.taro-xLGG_Fux.js";
27
27
  import { A } from "./address.taro-C1ibsNFa.js";
28
- import { C as C5 } from "./calendar.taro-C-5Lmq9i.js";
29
- import { C as C6 } from "./calendaritem.taro-B0QA0q4N.js";
28
+ import { C as C5 } from "./calendar.taro-DzEStrql.js";
29
+ import { C as C6 } from "./calendaritem.taro-DT5xXwyk.js";
30
30
  import { C as C7 } from "./calendarcard.taro-Cp3yzc6h.js";
31
31
  import { C as C8 } from "./cascader.taro-D8z5VSBF.js";
32
32
  import { C as C9, a as a2 } from "./checkbox.taro-CgqJyhrh.js";
@@ -39,7 +39,7 @@ import { M } from "./menu.taro-9N8A5UoN.js";
39
39
  import { M as M2 } from "./menuitem.taro-CnsORm5-.js";
40
40
  import { N as N2 } from "./numberkeyboard.taro-blGUntGo.js";
41
41
  import { P } from "./picker.taro-Ctc0Wt4S.js";
42
- import { R as R2, a as a3 } from "./radio.taro-M2in687s.js";
42
+ import { R as R2, a as a3 } from "./radio.taro-BCsQcVdu.js";
43
43
  import { R as R3 } from "./range.taro-C5SuX_2b.js";
44
44
  import { R as R4 } from "./rate.taro-DsDMiRHd.js";
45
45
  import { S as S7 } from "./searchbar.taro-B7UhNlBh.js";
@@ -16,7 +16,7 @@ const classPrefix = "nut-radiogroup";
16
16
  const RadioGroup = React__default.forwardRef((props, ref) => {
17
17
  const _a = Object.assign(Object.assign({}, defaultProps$1), props), { children, className, value, defaultValue, onChange, shape, labelPosition, direction, options, disabled } = _a, rest = __rest(_a, ["children", "className", "value", "defaultValue", "onChange", "shape", "labelPosition", "direction", "options", "disabled"]);
18
18
  const cls = classNames(classPrefix, {
19
- [`${classPrefix}-${props.direction}`]: props.direction
19
+ [`${classPrefix}-${direction}`]: direction
20
20
  }, className);
21
21
  const [val2State, setVal2State] = usePropsValue({
22
22
  defaultValue: props.defaultValue,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:29:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:55 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:29:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:55 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:29:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:55 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:29:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:55 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:29:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:55 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:29:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:55 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:29:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:55 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.15 Mon Mar 09 2026 10:28:24 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:20 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -6584,6 +6584,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6584
6584
  const [state] = useState({
6585
6585
  currDateArray: []
6586
6586
  });
6587
+ const isSameRange = (range3, start, end) => {
6588
+ return range3[0] === start && range3[1] === end;
6589
+ };
6587
6590
  const resetDefaultValue = () => {
6588
6591
  if (defaultValue || Array.isArray(defaultValue) && defaultValue.length > 0) {
6589
6592
  return type4 !== "single" ? [...defaultValue] : defaultValue;
@@ -6666,7 +6669,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6666
6669
  start = 0;
6667
6670
  end = monthNum + 2;
6668
6671
  }
6669
- setMonthDefaultRange([start, end]);
6672
+ setMonthDefaultRange((range3) => {
6673
+ return isSameRange(range3, start, end) ? range3 : [start, end];
6674
+ });
6670
6675
  setTranslateY(monthsData[start].scrollTop);
6671
6676
  setReachedYearMonthInfo(current);
6672
6677
  };
@@ -6813,8 +6818,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6813
6818
  viewHeight = getMonthsRef().clientHeight;
6814
6819
  getMonthsPanel().style.height = `${containerHeight}px`;
6815
6820
  const currTop = monthsData[current].scrollTop;
6816
- getMonthsRef().scrollTop = currTop;
6817
- setScrollTop(currTop);
6821
+ const maxScrollTop = getMonthsRef().scrollHeight - getMonthsRef().clientHeight;
6822
+ const targetScrollTop = Math.min(currTop, maxScrollTop);
6823
+ getMonthsRef().scrollTop = targetScrollTop;
6824
+ setScrollTop(targetScrollTop);
6818
6825
  nextTick(() => setScrollWithAnimation(true));
6819
6826
  }
6820
6827
  });
@@ -6891,6 +6898,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6891
6898
  const monthsViewScroll = (e2) => {
6892
6899
  if (monthsData.length <= 1) return;
6893
6900
  const scrollTop2 = e2.target.scrollTop;
6901
+ console.log("🚀 ~ monthsViewScroll ~ scrollTop:", scrollTop2);
6894
6902
  Taro.getEnv() === "WEB" && setScrollTop(scrollTop2);
6895
6903
  let current = Math.floor(scrollTop2 / avgHeight);
6896
6904
  if (current < 0) return;
@@ -11849,7 +11857,7 @@ const RadioGroup = React__default.forwardRef(
11849
11857
  const cls = classNames(
11850
11858
  classPrefix$g,
11851
11859
  {
11852
- [`${classPrefix$g}-${props.direction}`]: props.direction
11860
+ [`${classPrefix$g}-${direction}`]: direction
11853
11861
  },
11854
11862
  className
11855
11863
  );
@@ -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.7.15 Mon Mar 09 2026 10:28:24 GMT+0800 (中国标准时间)
5
+ * @nutui/nutui-react-taro v2.7.16-beta.0 Fri May 22 2026 21:54:20 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -6600,6 +6600,9 @@
6600
6600
  const [state] = React.useState({
6601
6601
  currDateArray: []
6602
6602
  });
6603
+ const isSameRange = (range2, start, end) => {
6604
+ return range2[0] === start && range2[1] === end;
6605
+ };
6603
6606
  const resetDefaultValue = () => {
6604
6607
  if (defaultValue || Array.isArray(defaultValue) && defaultValue.length > 0) {
6605
6608
  return type2 !== "single" ? [...defaultValue] : defaultValue;
@@ -6682,7 +6685,9 @@
6682
6685
  start = 0;
6683
6686
  end = monthNum + 2;
6684
6687
  }
6685
- setMonthDefaultRange([start, end]);
6688
+ setMonthDefaultRange((range2) => {
6689
+ return isSameRange(range2, start, end) ? range2 : [start, end];
6690
+ });
6686
6691
  setTranslateY(monthsData[start].scrollTop);
6687
6692
  setReachedYearMonthInfo(current);
6688
6693
  };
@@ -6829,8 +6834,10 @@
6829
6834
  viewHeight = getMonthsRef().clientHeight;
6830
6835
  getMonthsPanel().style.height = `${containerHeight}px`;
6831
6836
  const currTop = monthsData[current].scrollTop;
6832
- getMonthsRef().scrollTop = currTop;
6833
- setScrollTop(currTop);
6837
+ const maxScrollTop = getMonthsRef().scrollHeight - getMonthsRef().clientHeight;
6838
+ const targetScrollTop = Math.min(currTop, maxScrollTop);
6839
+ getMonthsRef().scrollTop = targetScrollTop;
6840
+ setScrollTop(targetScrollTop);
6834
6841
  Taro.nextTick(() => setScrollWithAnimation(true));
6835
6842
  }
6836
6843
  });
@@ -6907,6 +6914,7 @@
6907
6914
  const monthsViewScroll = (e2) => {
6908
6915
  if (monthsData.length <= 1) return;
6909
6916
  const scrollTop2 = e2.target.scrollTop;
6917
+ console.log("🚀 ~ monthsViewScroll ~ scrollTop:", scrollTop2);
6910
6918
  Taro.getEnv() === "WEB" && setScrollTop(scrollTop2);
6911
6919
  let current = Math.floor(scrollTop2 / avgHeight);
6912
6920
  if (current < 0) return;
@@ -11865,7 +11873,7 @@
11865
11873
  const cls = classNames(
11866
11874
  classPrefix$g,
11867
11875
  {
11868
- [`${classPrefix$g}-${props.direction}`]: props.direction
11876
+ [`${classPrefix$g}-${direction}`]: direction
11869
11877
  },
11870
11878
  className
11871
11879
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "2.7.15",
3
+ "version": "2.7.16-beta.0",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",