@nutui/nutui-react-taro 2.6.13 → 2.6.14

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/Address.js +1 -1
  3. package/dist/esm/Cascader.js +1 -1
  4. package/dist/esm/Empty/style/style.css +1 -1
  5. package/dist/esm/Form.js +1 -1
  6. package/dist/esm/FormItem.js +1 -1
  7. package/dist/esm/InfiniteLoading.js +1 -1
  8. package/dist/esm/Menu.js +1 -1
  9. package/dist/esm/MenuItem.js +1 -1
  10. package/dist/esm/{address.taro-CtVpobLw.js → address.taro-BYzOGUEN.js} +1 -1
  11. package/dist/esm/{cascader.taro-y9_hSUSJ.js → cascader.taro-jxe42b68.js} +2 -2
  12. package/dist/esm/{formitem.taro-tLWeQ0P5.js → formitem.taro-Dmt5-wxG.js} +3 -2
  13. package/dist/esm/{infiniteloading.taro-g1RbqnSS.js → infiniteloading.taro-DmDQKk_d.js} +7 -7
  14. package/dist/esm/{menu.taro-JDg_-XpO.js → menu.taro-CrPdDbYM.js} +1 -1
  15. package/dist/esm/{menuitem.taro-BFfGgTms.js → menuitem.taro-DMV3j4DK.js} +4 -2
  16. package/dist/esm/nutui-react.es.js +6 -6
  17. package/dist/locales/base.js +1 -1
  18. package/dist/locales/en-US.js +1 -1
  19. package/dist/locales/id-ID.js +1 -1
  20. package/dist/locales/tr-TR.js +1 -1
  21. package/dist/locales/zh-CN.js +1 -1
  22. package/dist/locales/zh-TW.js +1 -1
  23. package/dist/locales/zh-UG.js +1 -1
  24. package/dist/nutui.react.es.js +15 -10
  25. package/dist/nutui.react.umd.js +15 -10
  26. package/dist/packages/empty/empty.scss +1 -1
  27. package/dist/style.css +1 -1
  28. package/dist/styles/variables-jmapp.scss +1 -0
  29. package/dist/styles/variables.scss +1 -0
  30. package/dist/types/packages/configprovider/types.d.ts +1 -1
  31. package/dist/types/packages/form/types.d.ts +1 -0
  32. package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +2 -1
  33. package/package.json +1 -1
  34. package/dist/types/packages/form/usewatch.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v2.6.14
2
+ `2024-07-19`
3
+
4
+
5
+ * :sparkles: feat(menuitem): 新增css类名,增强自定义样式能力 (#2443) @Alex-huxiyang
6
+ * :sparkles: feat(empty): add css variable nutui-empty-background-color (#2451) @Alex-huxiyang
7
+ * :sparkles: feat(infiniteLoading): 继承 scrollView 的 props 类型 (#2441) @oasis-cloud
8
+ * :bug: fix(cascader): 初始化设置value未成功选中 (#2435) @Alex-huxiyang
9
+ * :bug: fix(swiper): display abnormal when dir = 'rtl' (#2454) @Alex-huxiyang
10
+ * :bug: fix(form): 兼容校验时机 (#2437) @Alex-huxiyang
11
+ * :bug: fix(form): 在FromInstance增加validateFields方法的定义 (#2450) @jinjl
12
+
13
+
14
+ # v2.6.13
15
+ `2024-07-12`
16
+
17
+
18
+ * :sparkles: feat: tabs滚动条兼容火狐浏览器 (#2431) @JoanneXu6677
19
+ * :sparkles: feat(drag): add the ability to support onDrag, onDragStart, onDragEnd callbacks (#2418) @Alex-huxiyang
20
+ * :bug: fix(formItem): validateTrigger无法正确触发校验 (#2433) @Alex-huxiyang
21
+ * :bug: fix: 日历组件滚动到顶部时 出现空白问题 (#2409) @522109452
22
+ * :bug: fix(imagepreview): 无法在预期情景正确关闭图片的异常 (#2421) @Alex-huxiyang
23
+
24
+
1
25
  # v2.6.12
2
26
  `2024-07-05`
3
27
 
@@ -1,4 +1,4 @@
1
- import { A as Address } from "./address.taro-CtVpobLw.js";
1
+ import { A as Address } from "./address.taro-BYzOGUEN.js";
2
2
  export {
3
3
  Address as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { C as Cascader } from "./cascader.taro-y9_hSUSJ.js";
1
+ import { C as Cascader } from "./cascader.taro-jxe42b68.js";
2
2
  export {
3
3
  Cascader as default
4
4
  };
@@ -1 +1 @@
1
- .nut-empty{box-sizing:border-box;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:var(--nutui-empty-padding, 32px 40px);background-color:var(--nutui-gray-1, #ffffff)}.nut-empty-image{width:var(--nutui-empty-image-size, 160px);height:var(--nutui-empty-image-size, 160px)}.nut-empty-image .img{width:100%;height:100%}.nut-empty-image img,.nut-empty-image image{width:100%;height:100%}.nut-empty-title{margin-top:var(--nutui-empty-title-margin-top, 0px);margin-bottom:var(--nutui-empty-title-margin-bottom, 8px);color:var(--nutui-gray-7, #1a1a1a);font-size:var(--nutui-font-size-3, 14px);line-height:var(--nutui-empty-title-line-height, var(--nutui-font-size-3, 14px))}.nut-empty-description{margin-top:var(--nutui-empty-description-margin-top, 0px);color:var(--nutui-gray-5, #8c8c8c);font-size:var(--nutui-font-size-2, 12px);line-height:var(--nutui-empty-description-line-height, 1.2)}.nut-empty-small .nut-empty-image{width:var(--nutui-empty-image-small-size, 120px);height:var(--nutui-empty-image-small-size, 120px)}.nut-empty-actions{display:flex;margin-top:16px}.nut-empty-actions .nut-button.nut-empty-actions-left,.nut-empty-actions .nut-button.nut-empty-actions-right{height:28px;padding:0 12px;font-weight:400}.nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:16px}[dir=rtl] .nut-empty-actions .nut-button.nut-empty-actions-left,.nut-rtl .nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:0;margin-left:16px}
1
+ .nut-empty{box-sizing:border-box;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:var(--nutui-empty-padding, 32px 40px);background-color:var(--nutui-empty-background-color, #fff)}.nut-empty-image{width:var(--nutui-empty-image-size, 160px);height:var(--nutui-empty-image-size, 160px)}.nut-empty-image .img{width:100%;height:100%}.nut-empty-image img,.nut-empty-image image{width:100%;height:100%}.nut-empty-title{margin-top:var(--nutui-empty-title-margin-top, 0px);margin-bottom:var(--nutui-empty-title-margin-bottom, 8px);color:var(--nutui-gray-7, #1a1a1a);font-size:var(--nutui-font-size-3, 14px);line-height:var(--nutui-empty-title-line-height, var(--nutui-font-size-3, 14px))}.nut-empty-description{margin-top:var(--nutui-empty-description-margin-top, 0px);color:var(--nutui-gray-5, #8c8c8c);font-size:var(--nutui-font-size-2, 12px);line-height:var(--nutui-empty-description-line-height, 1.2)}.nut-empty-small .nut-empty-image{width:var(--nutui-empty-image-small-size, 120px);height:var(--nutui-empty-image-small-size, 120px)}.nut-empty-actions{display:flex;margin-top:16px}.nut-empty-actions .nut-button.nut-empty-actions-left,.nut-empty-actions .nut-button.nut-empty-actions-right{height:28px;padding:0 12px;font-weight:400}.nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:16px}[dir=rtl] .nut-empty-actions .nut-button.nut-empty-actions-left,.nut-rtl .nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:0;margin-left:16px}
package/dist/esm/Form.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React__default from "react";
2
2
  import classNames from "classnames";
3
- import { u as useForm, S as SECRET, C as Context, F as FormItem } from "./formitem.taro-tLWeQ0P5.js";
3
+ import { u as useForm, S as SECRET, C as Context, F as FormItem } from "./formitem.taro-Dmt5-wxG.js";
4
4
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
5
5
  import { C as Cell } from "./cell.taro-CVFlcls2.js";
6
6
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { labelPosition: "right", starPosition: "left", divider: false, onFinish: (values) => {
@@ -1,4 +1,4 @@
1
- import { F as FormItem } from "./formitem.taro-tLWeQ0P5.js";
1
+ import { F as FormItem } from "./formitem.taro-Dmt5-wxG.js";
2
2
  export {
3
3
  FormItem as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { I as InfiniteLoading } from "./infiniteloading.taro-g1RbqnSS.js";
1
+ import { I as InfiniteLoading } from "./infiniteloading.taro-DmDQKk_d.js";
2
2
  export {
3
3
  InfiniteLoading as default
4
4
  };
package/dist/esm/Menu.js CHANGED
@@ -1,4 +1,4 @@
1
- import { M as Menu } from "./menu.taro-JDg_-XpO.js";
1
+ import { M as Menu } from "./menu.taro-CrPdDbYM.js";
2
2
  export {
3
3
  Menu as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { M as MenuItem } from "./menuitem.taro-BFfGgTms.js";
1
+ import { M as MenuItem } from "./menuitem.taro-DMV3j4DK.js";
2
2
  export {
3
3
  MenuItem as default
4
4
  };
@@ -4,7 +4,7 @@ import { Check, Location, ArrowLeft } from "@nutui/icons-react-taro";
4
4
  import { P as Popup } from "./popup.taro-CR3JyuJV.js";
5
5
  import { ScrollView } from "@tarojs/components";
6
6
  import { u as useConfig } from "./configprovider.taro-DA4GDDFu.js";
7
- import { C as Cascader } from "./cascader.taro-y9_hSUSJ.js";
7
+ import { C as Cascader } from "./cascader.taro-jxe42b68.js";
8
8
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
9
9
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
10
10
  const defaultProps$2 = {
@@ -209,7 +209,7 @@ const InternalCascader = (props, ref) => {
209
209
  });
210
210
  const syncValue = () => __awaiter(void 0, void 0, void 0, function* () {
211
211
  const currentValue = innerValue;
212
- if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
212
+ if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
213
213
  return;
214
214
  }
215
215
  if (currentValue.length === 0) {
@@ -237,7 +237,7 @@ const InternalCascader = (props, ref) => {
237
237
  state.initLoading = false;
238
238
  }
239
239
  }
240
- if (needToSync.length && currentValue === defaultValue) {
240
+ if (needToSync.length && [defaultValue, value].includes(currentValue)) {
241
241
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
242
242
  pathNodes.forEach((node, index) => {
243
243
  state.tabsCursor = index;
@@ -42,7 +42,7 @@ class FormStore {
42
42
  this.store = values;
43
43
  }
44
44
  };
45
- this.setFieldsValue = (newStore) => {
45
+ this.setFieldsValue = (newStore, needValidate = true) => {
46
46
  this.store = Object.assign(Object.assign({}, this.store), newStore);
47
47
  this.fieldEntities.forEach((entity) => {
48
48
  const { name } = entity.props;
@@ -61,6 +61,7 @@ class FormStore {
61
61
  item.entity.onStoreChange("update");
62
62
  }
63
63
  });
64
+ needValidate && this.validateFields();
64
65
  };
65
66
  this.setCallback = (callback) => {
66
67
  this.callbacks = Object.assign(Object.assign({}, this.callbacks), callback);
@@ -212,7 +213,7 @@ class FormItem extends React__default.Component {
212
213
  if (this.props.getValueFromEvent) {
213
214
  next = this.props.getValueFromEvent(...args);
214
215
  }
215
- setFieldsValue({ [name]: next });
216
+ setFieldsValue({ [name]: next }, false);
216
217
  } });
217
218
  const { validateTrigger } = this.props;
218
219
  let validateTriggers = [this.props.trigger || "onChange"];
@@ -1,4 +1,4 @@
1
- import { a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
1
+ import { _ as __rest, a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
2
2
  import React__default, { useState, useRef, useEffect } from "react";
3
3
  import classNames from "classnames";
4
4
  import { ScrollView } from "@tarojs/components";
@@ -9,7 +9,7 @@ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { type:
9
9
  const classPrefix = `nut-infiniteloading`;
10
10
  const InfiniteLoading = (props) => {
11
11
  const { locale } = useConfig();
12
- const { children, type, hasMore, threshold, target, pullRefresh, pullingText, loadingText, loadMoreText, className, onRefresh, onLoadMore, onScroll } = Object.assign(Object.assign({}, defaultProps), props);
12
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { children, type, hasMore, threshold, target, pullRefresh, pullingText, loadingText, loadMoreText, className, onRefresh, onLoadMore, onScroll } = _a, rest = __rest(_a, ["children", "type", "hasMore", "threshold", "target", "pullRefresh", "pullingText", "loadingText", "loadMoreText", "className", "onRefresh", "onLoadMore", "onScroll"]);
13
13
  const [isInfiniting, setIsInfiniting] = useState(false);
14
14
  const [topDisScoll, setTopDisScoll] = useState(0);
15
15
  const refreshTop = useRef(null);
@@ -29,8 +29,8 @@ const InfiniteLoading = (props) => {
29
29
  const getScrollHeight = () => {
30
30
  const parentElement = getParentElement("scroller");
31
31
  parentElement.boundingClientRect((rect) => {
32
- var _a;
33
- scrollHeight.current = (_a = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _a !== void 0 ? _a : 0;
32
+ var _a2;
33
+ scrollHeight.current = (_a2 = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _a2 !== void 0 ? _a2 : 0;
34
34
  }).exec();
35
35
  };
36
36
  const getStyle = () => {
@@ -51,8 +51,8 @@ const InfiniteLoading = (props) => {
51
51
  isTouching.current = false;
52
52
  };
53
53
  const scrollAction = (e) => {
54
- var _a;
55
- scrollTop.current = (_a = e.target) === null || _a === void 0 ? void 0 : _a.scrollTop;
54
+ var _a2;
55
+ scrollTop.current = (_a2 = e.target) === null || _a2 === void 0 ? void 0 : _a2.scrollTop;
56
56
  if (e.target.scrollTop <= 0) {
57
57
  e.target.scrollTop = 0;
58
58
  }
@@ -99,7 +99,7 @@ const InfiniteLoading = (props) => {
99
99
  });
100
100
  return React__default.createElement(
101
101
  ScrollView,
102
- { className: classes, scrollY: true, id: "scroller", type: "list", style: { height: "100%" }, onScroll: scrollAction, onScrollToLower: lower, onTouchStart: touchStart, onTouchMove: touchMove, onTouchEnd: touchEnd },
102
+ Object.assign({ className: classes, scrollY: true, id: "scroller", type: "list", style: { height: "100%" }, onScroll: scrollAction, onScrollToLower: lower, onTouchStart: touchStart, onTouchMove: touchMove, onTouchEnd: touchEnd }, rest),
103
103
  React__default.createElement(
104
104
  "div",
105
105
  { className: "nut-infinite-top", ref: refreshTop, style: getStyle() },
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
2
2
  import React__default, { useRef, useState, useEffect } from "react";
3
3
  import classNames from "classnames";
4
4
  import { ArrowUp, ArrowDown } from "@nutui/icons-react-taro";
5
- import { M as MenuItem } from "./menuitem.taro-BFfGgTms.js";
5
+ import { M as MenuItem } from "./menuitem.taro-DMV3j4DK.js";
6
6
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
7
7
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { activeColor: "", closeOnOverlayClick: true, scrollFixed: false, lockScroll: true, overlay: true, icon: null, onOpen: (index, from) => {
8
8
  }, onClose: (index, from) => {
@@ -132,8 +132,10 @@ const MenuItem = forwardRef((props, ref) => {
132
132
  }, onClick: () => {
133
133
  handleClick(item);
134
134
  } },
135
- item.value === innerValue ? React__default.createElement(React__default.Fragment, null, icon || React__default.createElement(Check, { color: activeColor, size: 16, className: getIconCName(item.value, value) })) : null,
136
- React__default.createElement(View, { className: getIconCName(item.value, value), style: {
135
+ item.value === innerValue ? React__default.createElement(React__default.Fragment, null, icon ? React__default.cloneElement(icon, {
136
+ className: `nut-menu-container-item-icon ${icon.props.className || ""}`
137
+ }) : React__default.createElement(Check, { color: activeColor, size: 16, className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}` })) : null,
138
+ React__default.createElement(View, { className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`, style: {
137
139
  color: `${item.value === innerValue ? activeColor : ""}`
138
140
  } }, item.text)
139
141
  );
@@ -24,19 +24,19 @@ import { T } from "./tabbar.taro-CXk0zLdz.js";
24
24
  import { T as T2 } from "./tabbaritem.taro-BZNabTBp.js";
25
25
  import { T as T3 } from "./tabpane.taro-BAe86j3t.js";
26
26
  import { T as T4 } from "./tabs.taro-B2D3AtVV.js";
27
- import { A } from "./address.taro-CtVpobLw.js";
27
+ import { A } from "./address.taro-BYzOGUEN.js";
28
28
  import { C as C5 } from "./calendar.taro-Bf5owfGd.js";
29
29
  import { C as C6 } from "./calendaritem.taro-PLHReAvU.js";
30
30
  import { C as C7 } from "./calendarcard.taro-CbvCWF1k.js";
31
- import { C as C8 } from "./cascader.taro-y9_hSUSJ.js";
31
+ import { C as C8 } from "./cascader.taro-jxe42b68.js";
32
32
  import { C as C9, a as a2 } from "./checkbox.taro-Dc054oRo.js";
33
33
  import { D as D2 } from "./datepicker.taro-DTyJrlhD.js";
34
34
  import { default as default2 } from "./Form.js";
35
- import { F as F2 } from "./formitem.taro-tLWeQ0P5.js";
35
+ import { F as F2 } from "./formitem.taro-Dmt5-wxG.js";
36
36
  import { I as I2 } from "./input.taro-B_B1lJq2.js";
37
37
  import { I as I3 } from "./inputnumber.taro-WN5Drnyz.js";
38
- import { M } from "./menu.taro-JDg_-XpO.js";
39
- import { M as M2 } from "./menuitem.taro-BFfGgTms.js";
38
+ import { M } from "./menu.taro-CrPdDbYM.js";
39
+ import { M as M2 } from "./menuitem.taro-DMV3j4DK.js";
40
40
  import { N as N2 } from "./numberkeyboard.taro-BA0iCeGP.js";
41
41
  import { P } from "./picker.taro-CafNRRO5.js";
42
42
  import { R as R2, a as a3 } from "./radio.taro-BNSceequ.js";
@@ -53,7 +53,7 @@ import { B as B3 } from "./badge.taro-BGaxpEYi.js";
53
53
  import { B as B4 } from "./dialog.taro-BW9D2Gsr.js";
54
54
  import { D as D3 } from "./drag.taro-B_TO4Nnu.js";
55
55
  import { E as E2 } from "./empty.taro-CnwDznke.js";
56
- import { I as I4 } from "./infiniteloading.taro-g1RbqnSS.js";
56
+ import { I as I4 } from "./infiniteloading.taro-DmDQKk_d.js";
57
57
  import { L as L2 } from "./loading.taro-n_qoNgCW.js";
58
58
  import { N as N3 } from "./noticebar.taro-CGUTg60Q.js";
59
59
  import { N as N4 } from "./notify.taro-jP7y9zMU.js";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.6.13 Fri Jul 12 2024 13:58:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:24:05 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.6.13 Fri Jul 12 2024 13:58:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:24:05 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.6.13 Fri Jul 12 2024 13:58:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:24:05 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.6.13 Fri Jul 12 2024 13:58:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:24:05 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.6.13 Fri Jul 12 2024 13:58:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:24:05 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.6.13 Fri Jul 12 2024 13:58:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:24:05 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.6.13 Fri Jul 12 2024 13:58:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:24:05 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.6.13 Fri Jul 12 2024 13:57:50 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:23:26 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -5720,7 +5720,7 @@ const InternalCascader = (props, ref) => {
5720
5720
  };
5721
5721
  const syncValue = async () => {
5722
5722
  const currentValue = innerValue;
5723
- if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
5723
+ if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
5724
5724
  return;
5725
5725
  }
5726
5726
  if (currentValue.length === 0) {
@@ -5752,7 +5752,7 @@ const InternalCascader = (props, ref) => {
5752
5752
  state.initLoading = false;
5753
5753
  }
5754
5754
  }
5755
- if (needToSync.length && currentValue === defaultValue) {
5755
+ if (needToSync.length && [defaultValue, value].includes(currentValue)) {
5756
5756
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
5757
5757
  pathNodes.forEach((node, index) => {
5758
5758
  state.tabsCursor = index;
@@ -9793,7 +9793,7 @@ class FormStore {
9793
9793
  this.store = values;
9794
9794
  }
9795
9795
  };
9796
- this.setFieldsValue = (newStore) => {
9796
+ this.setFieldsValue = (newStore, needValidate = true) => {
9797
9797
  this.store = {
9798
9798
  ...this.store,
9799
9799
  ...newStore
@@ -9815,6 +9815,7 @@ class FormStore {
9815
9815
  item.entity.onStoreChange("update");
9816
9816
  }
9817
9817
  });
9818
+ needValidate && this.validateFields();
9818
9819
  };
9819
9820
  this.setCallback = (callback) => {
9820
9821
  this.callbacks = {
@@ -10064,7 +10065,7 @@ const _FormItem = class _FormItem extends React__default.Component {
10064
10065
  if (this.props.getValueFromEvent) {
10065
10066
  next = this.props.getValueFromEvent(...args);
10066
10067
  }
10067
- setFieldsValue({ [name]: next });
10068
+ setFieldsValue({ [name]: next }, false);
10068
10069
  }
10069
10070
  };
10070
10071
  const { validateTrigger } = this.props;
@@ -10797,18 +10798,20 @@ const MenuItem = forwardRef((props, ref) => {
10797
10798
  handleClick(item);
10798
10799
  }
10799
10800
  },
10800
- item.value === innerValue ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || /* @__PURE__ */ React__default.createElement(
10801
+ item.value === innerValue ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon ? React__default.cloneElement(icon, {
10802
+ className: `nut-menu-container-item-icon ${icon.props.className || ""}`
10803
+ }) : /* @__PURE__ */ React__default.createElement(
10801
10804
  g$3,
10802
10805
  {
10803
10806
  color: activeColor,
10804
10807
  size: 16,
10805
- className: getIconCName(item.value, value)
10808
+ className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}`
10806
10809
  }
10807
10810
  )) : null,
10808
10811
  /* @__PURE__ */ React__default.createElement(
10809
10812
  View,
10810
10813
  {
10811
- className: getIconCName(item.value, value),
10814
+ className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
10812
10815
  style: {
10813
10816
  color: `${item.value === innerValue ? activeColor : ""}`
10814
10817
  }
@@ -13728,7 +13731,8 @@ const InfiniteLoading = (props) => {
13728
13731
  className,
13729
13732
  onRefresh,
13730
13733
  onLoadMore,
13731
- onScroll
13734
+ onScroll,
13735
+ ...rest
13732
13736
  } = {
13733
13737
  ...defaultProps$D,
13734
13738
  ...props
@@ -13831,7 +13835,8 @@ const InfiniteLoading = (props) => {
13831
13835
  onScrollToLower: lower,
13832
13836
  onTouchStart: touchStart,
13833
13837
  onTouchMove: touchMove,
13834
- onTouchEnd: touchEnd
13838
+ onTouchEnd: touchEnd,
13839
+ ...rest
13835
13840
  },
13836
13841
  /* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-top-tips" }, pullingText || locale.infiniteloading.pullRefreshText)),
13837
13842
  /* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-container" }, children),
@@ -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.13 Fri Jul 12 2024 13:57:50 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:23:26 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -5736,7 +5736,7 @@
5736
5736
  };
5737
5737
  const syncValue = async () => {
5738
5738
  const currentValue = innerValue;
5739
- if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
5739
+ if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
5740
5740
  return;
5741
5741
  }
5742
5742
  if (currentValue.length === 0) {
@@ -5768,7 +5768,7 @@
5768
5768
  state.initLoading = false;
5769
5769
  }
5770
5770
  }
5771
- if (needToSync.length && currentValue === defaultValue) {
5771
+ if (needToSync.length && [defaultValue, value].includes(currentValue)) {
5772
5772
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
5773
5773
  pathNodes.forEach((node, index) => {
5774
5774
  state.tabsCursor = index;
@@ -9809,7 +9809,7 @@
9809
9809
  this.store = values;
9810
9810
  }
9811
9811
  };
9812
- this.setFieldsValue = (newStore) => {
9812
+ this.setFieldsValue = (newStore, needValidate = true) => {
9813
9813
  this.store = {
9814
9814
  ...this.store,
9815
9815
  ...newStore
@@ -9831,6 +9831,7 @@
9831
9831
  item.entity.onStoreChange("update");
9832
9832
  }
9833
9833
  });
9834
+ needValidate && this.validateFields();
9834
9835
  };
9835
9836
  this.setCallback = (callback) => {
9836
9837
  this.callbacks = {
@@ -10080,7 +10081,7 @@
10080
10081
  if (this.props.getValueFromEvent) {
10081
10082
  next = this.props.getValueFromEvent(...args);
10082
10083
  }
10083
- setFieldsValue({ [name]: next });
10084
+ setFieldsValue({ [name]: next }, false);
10084
10085
  }
10085
10086
  };
10086
10087
  const { validateTrigger } = this.props;
@@ -10813,18 +10814,20 @@
10813
10814
  handleClick(item);
10814
10815
  }
10815
10816
  },
10816
- item.value === innerValue ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon || /* @__PURE__ */ React.createElement(
10817
+ item.value === innerValue ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon ? React.cloneElement(icon, {
10818
+ className: `nut-menu-container-item-icon ${icon.props.className || ""}`
10819
+ }) : /* @__PURE__ */ React.createElement(
10817
10820
  g$3,
10818
10821
  {
10819
10822
  color: activeColor,
10820
10823
  size: 16,
10821
- className: getIconCName(item.value, value)
10824
+ className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}`
10822
10825
  }
10823
10826
  )) : null,
10824
10827
  /* @__PURE__ */ React.createElement(
10825
10828
  components.View,
10826
10829
  {
10827
- className: getIconCName(item.value, value),
10830
+ className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
10828
10831
  style: {
10829
10832
  color: `${item.value === innerValue ? activeColor : ""}`
10830
10833
  }
@@ -13744,7 +13747,8 @@
13744
13747
  className,
13745
13748
  onRefresh,
13746
13749
  onLoadMore,
13747
- onScroll
13750
+ onScroll,
13751
+ ...rest
13748
13752
  } = {
13749
13753
  ...defaultProps$D,
13750
13754
  ...props
@@ -13847,7 +13851,8 @@
13847
13851
  onScrollToLower: lower,
13848
13852
  onTouchStart: touchStart,
13849
13853
  onTouchMove: touchMove,
13850
- onTouchEnd: touchEnd
13854
+ onTouchEnd: touchEnd,
13855
+ ...rest
13851
13856
  },
13852
13857
  /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top-tips" }, pullingText || locale.infiniteloading.pullRefreshText)),
13853
13858
  /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-container" }, children),
@@ -5,7 +5,7 @@
5
5
  flex-direction: column;
6
6
  justify-content: center;
7
7
  padding: $empty-padding;
8
- background-color: $color-background-overlay;
8
+ background-color: $empty-background-color;
9
9
 
10
10
  &-image {
11
11
  width: $empty-image-size;