@nutui/nutui-react-taro 1.4.5-beta.0 → 1.4.6-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.
Files changed (158) hide show
  1. package/CHANGELOG.md +8 -8
  2. package/dist/esm/ActionSheet.js +6 -5
  3. package/dist/esm/Address.js +8 -8
  4. package/dist/esm/Audio.js +8 -8
  5. package/dist/esm/Avatar.js +3 -3
  6. package/dist/esm/BackTop.js +3 -3
  7. package/dist/esm/Badge.js +3 -3
  8. package/dist/esm/Barrage.js +2 -2
  9. package/dist/esm/Button.js +3 -3
  10. package/dist/esm/Calendar.js +8 -7
  11. package/dist/esm/CalendarItem.js +3 -3
  12. package/dist/esm/Card.js +4 -4
  13. package/dist/esm/Cascader.js +7 -6
  14. package/dist/esm/Cell.js +3 -3
  15. package/dist/esm/Checkbox.js +3 -3
  16. package/dist/esm/CheckboxGroup.js +3 -3
  17. package/dist/esm/CollapseItem.js +3 -3
  18. package/dist/esm/DatePicker.js +8 -7
  19. package/dist/esm/Dialog.js +4 -4
  20. package/dist/esm/Drag.js +2 -2
  21. package/dist/esm/Elevator.js +2 -2
  22. package/dist/esm/Ellipsis.js +3 -3
  23. package/dist/esm/FixedNav.js +5 -4
  24. package/dist/esm/Form.js +5 -5
  25. package/dist/esm/FormItem.js +4 -4
  26. package/dist/esm/GridItem.js +3 -3
  27. package/dist/esm/Icon.js +2 -2
  28. package/dist/esm/Image.js +3 -3
  29. package/dist/esm/ImagePreview.js +6 -5
  30. package/dist/esm/Infiniteloading.js +3 -3
  31. package/dist/esm/Input.js +3 -3
  32. package/dist/esm/InputNumber.js +3 -3
  33. package/dist/esm/Menu.js +3 -3
  34. package/dist/esm/MenuItem.js +5 -4
  35. package/dist/esm/NavBar.js +3 -3
  36. package/dist/esm/NoticeBar.js +4 -4
  37. package/dist/esm/NumberKeyboard.js +6 -5
  38. package/dist/esm/Overlay.js +3 -2
  39. package/dist/esm/Picker.js +7 -6
  40. package/dist/esm/Popover.js +6 -5
  41. package/dist/esm/Popup.js +5 -4
  42. package/dist/esm/Progress.js +3 -3
  43. package/dist/esm/PullToRefresh.js +3 -2
  44. package/dist/esm/Radio.js +2 -2
  45. package/dist/esm/RadioGroup.js +3 -3
  46. package/dist/esm/Range.js +5 -5
  47. package/dist/esm/Rate.js +3 -3
  48. package/dist/esm/SearchBar.js +3 -3
  49. package/dist/esm/ShortPassword.js +6 -5
  50. package/dist/esm/SideNavBar.js +6 -5
  51. package/dist/esm/Signature.js +4 -4
  52. package/dist/esm/Skeleton.js +4 -4
  53. package/dist/esm/Step.js +3 -3
  54. package/dist/esm/Sticky.js +5 -5
  55. package/dist/esm/Swipe.js +3 -3
  56. package/dist/esm/TabbarItem.js +3 -3
  57. package/dist/esm/Table.js +3 -3
  58. package/dist/esm/Tabs.js +3 -3
  59. package/dist/esm/Tag.js +3 -3
  60. package/dist/esm/TimeSelect.js +6 -5
  61. package/dist/esm/Toast.js +3 -3
  62. package/dist/esm/TrendArrow.js +3 -3
  63. package/dist/esm/Uploader.js +7 -7
  64. package/dist/esm/VirtualList.js +2 -2
  65. package/dist/esm/{actionsheet.taro-a58d3d12.js → actionsheet.taro-27121a38.js} +1 -1
  66. package/dist/esm/{address.taro-79cc7c96.js → address.taro-dd602937.js} +12 -12
  67. package/dist/esm/{audio.taro-4fadc583.js → audio.taro-cf530b91.js} +5 -5
  68. package/dist/esm/{avatar.taro-85ced995.js → avatar.taro-1d2bf09a.js} +1 -2
  69. package/dist/esm/{backtop.taro-99107c30.js → backtop.taro-e53236c7.js} +3 -3
  70. package/dist/esm/{badge.taro-fe9171ec.js → badge.taro-11e2ec95.js} +1 -1
  71. package/dist/esm/{barrage.taro-0e157b5e.js → barrage.taro-e4fe81ae.js} +2 -2
  72. package/dist/esm/{button.taro-4ce133b9.js → button.taro-b7c5f5a7.js} +1 -1
  73. package/dist/esm/{calendar.taro-4ed72058.js → calendar.taro-05c40d76.js} +2 -2
  74. package/dist/esm/{calendaritem.taro-1ebe428d.js → calendaritem.taro-3cfd4186.js} +1 -1
  75. package/dist/esm/{card.taro-39055e82.js → card.taro-7e85c3da.js} +1 -1
  76. package/dist/esm/{cascader.taro-d8cb1c3e.js → cascader.taro-66462c03.js} +3 -3
  77. package/dist/esm/{cell.taro-9a04a92e.js → cell.taro-e877cf12.js} +3 -3
  78. package/dist/esm/{checkbox.taro-0bda9796.js → checkbox.taro-04da7151.js} +1 -1
  79. package/dist/esm/{collapseitem-ce1849d2.js → collapseitem-2e864527.js} +1 -1
  80. package/dist/esm/{datepicker.taro-7220e495.js → datepicker.taro-8507d826.js} +1 -1
  81. package/dist/esm/{dialog.taro-1c03960e.js → dialog.taro-0f64e21a.js} +1 -1
  82. package/dist/esm/{drag.taro-82b6b27a.js → drag.taro-703560c4.js} +3 -3
  83. package/dist/esm/{elevator.taro-d7d65470.js → elevator.taro-68cfaaee.js} +4 -4
  84. package/dist/esm/{ellipsis.taro-49b6db0c.js → ellipsis.taro-71021671.js} +1 -1
  85. package/dist/esm/{fixednav.taro-5ad15202.js → fixednav.taro-84930e08.js} +2 -2
  86. package/dist/esm/{form.taro-71d32671.js → form.taro-ce791a58.js} +1 -1
  87. package/dist/esm/{formitem.taro-3089489b.js → formitem.taro-f2ed02d4.js} +1 -1
  88. package/dist/esm/get-scroll-parent-3dcd3f53.js +28 -0
  89. package/dist/esm/{griditem.taro-4cade72e.js → griditem.taro-5406bd2c.js} +1 -1
  90. package/dist/esm/{icon-8dc4de10.js → icon-2242973e.js} +13 -4
  91. package/dist/esm/{icon.taro-1d0d4fb7.js → icon.taro-c9254a81.js} +13 -4
  92. package/dist/esm/{image.taro-e6dc5867.js → image.taro-1d867416.js} +1 -1
  93. package/dist/esm/{imagepreview.taro-3400ea03.js → imagepreview.taro-83481e13.js} +1 -1
  94. package/dist/esm/{index.taro-a36f96fb.js → index.taro-cd52b23f.js} +1 -1
  95. package/dist/esm/{infiniteloading.taro-6c2a2e95.js → infiniteloading.taro-e5be6795.js} +1 -1
  96. package/dist/esm/{input.taro-fd566407.js → input.taro-991945d1.js} +1 -1
  97. package/dist/esm/{inputnumber.taro-dc39b853.js → inputnumber.taro-e909d932.js} +1 -1
  98. package/dist/esm/{menu.taro-4abed328.js → menu.taro-e5b84501.js} +1 -1
  99. package/dist/esm/{menuitem.taro-6e8b27c3.js → menuitem.taro-f2129be6.js} +2 -2
  100. package/dist/esm/{navbar.taro-c931c078.js → navbar.taro-70514adf.js} +1 -1
  101. package/dist/esm/{noticebar.taro-69ea7673.js → noticebar.taro-22486646.js} +2 -4
  102. package/dist/esm/{numberkeyboard.taro-194519e4.js → numberkeyboard.taro-d2ccbce5.js} +1 -1
  103. package/dist/esm/nutui-react.es.js +66 -65
  104. package/dist/esm/{overlay.taro-98367bc1.js → overlay.taro-1e74a71d.js} +5 -4
  105. package/dist/esm/{picker.taro-2a8ded7c.js → picker.taro-6128297f.js} +2 -2
  106. package/dist/esm/{popover.taro-46d813e8.js → popover.taro-fc7b9a73.js} +3 -3
  107. package/dist/esm/{popup.taro-cb777e09.js → popup.taro-89809b25.js} +6 -7
  108. package/dist/esm/{progress.taro-623bc807.js → progress.taro-18e015e4.js} +1 -1
  109. package/dist/esm/{pulltorefresh.taro-cab7b51c.js → pulltorefresh.taro-2b50fdf3.js} +1 -27
  110. package/dist/esm/{range.taro-5d6ff217.js → range.taro-b628f1ed.js} +2 -2
  111. package/dist/esm/{rate.taro-10197384.js → rate.taro-17b84a51.js} +1 -1
  112. package/dist/esm/{searchbar.taro-839dd622.js → searchbar.taro-141827e2.js} +5 -5
  113. package/dist/esm/{shortpassword.taro-182d46f7.js → shortpassword.taro-e1f53ee7.js} +2 -2
  114. package/dist/esm/{sidenavbar.taro-006cf38b.js → sidenavbar.taro-f44d12ac.js} +1 -1
  115. package/dist/esm/{signature.taro-33632585.js → signature.taro-d3416fcd.js} +1 -1
  116. package/dist/esm/{skeleton.taro-853ce460.js → skeleton.taro-6821b2c6.js} +1 -1
  117. package/dist/esm/{step.taro-1c94e067.js → step.taro-891c020b.js} +1 -1
  118. package/dist/esm/sticky.taro-2d9b2804.js +133 -0
  119. package/dist/esm/{swipe.taro-83bc248f.js → swipe.taro-e6c2b808.js} +1 -1
  120. package/dist/esm/{tabbaritem.taro-8dfb8055.js → tabbaritem.taro-f4a91070.js} +1 -1
  121. package/dist/esm/{table.taro-cb4dd2c3.js → table.taro-d9b2794b.js} +1 -1
  122. package/dist/esm/{tabs.taro-e71875fa.js → tabs.taro-5030ce68.js} +1 -1
  123. package/dist/esm/{tag.taro-00fe554d.js → tag.taro-213ec444.js} +1 -1
  124. package/dist/esm/{timeselect.taro-3ecce65d.js → timeselect.taro-b04b1538.js} +1 -1
  125. package/dist/esm/{toast.taro-0804b6b4.js → toast.taro-0f972a92.js} +1 -1
  126. package/dist/esm/{trendarrow.taro-5a7153e4.js → trendarrow.taro-d79fc8e2.js} +1 -1
  127. package/dist/esm/types/src/packages/audio/audio.taro.d.ts +6 -6
  128. package/dist/esm/types/src/packages/image/image.d.ts +3 -0
  129. package/dist/esm/types/src/packages/overlay/overlay.taro.d.ts +3 -1
  130. package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -1
  131. package/dist/esm/types/src/packages/popup/popup.taro.d.ts +3 -3
  132. package/dist/esm/types/src/packages/sticky/sticky.taro.d.ts +11 -2
  133. package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +1 -1
  134. package/dist/esm/{uploader.taro-f80d76d9.js → uploader.taro-1d745f4a.js} +17 -17
  135. package/dist/esm/{useClientRect-bf69d7b3.js → useClientRect-4506e52f.js} +5 -2
  136. package/dist/esm/{virtuallist.taro-e3345ced.js → virtuallist.taro-1688484f.js} +7 -8
  137. package/dist/locales/base.js +1 -1
  138. package/dist/locales/en-US.js +1 -1
  139. package/dist/locales/id-ID.js +1 -1
  140. package/dist/locales/zh-CN.js +1 -1
  141. package/dist/locales/zh-TW.js +1 -1
  142. package/dist/locales/zh-UG.js +1 -1
  143. package/dist/nutui.react.es.js +256 -111
  144. package/dist/nutui.react.umd.js +252 -107
  145. package/dist/packages/calendar/calendar.scss +19 -1
  146. package/dist/packages/image/image.scss +2 -0
  147. package/dist/packages/input/input.scss +3 -18
  148. package/dist/packages/notify/notify.scss +23 -19
  149. package/dist/packages/popup/popup.scss +130 -93
  150. package/dist/packages/searchbar/searchbar.scss +6 -20
  151. package/dist/packages/sticky/sticky.scss +3 -0
  152. package/dist/packages/tag/tag.scss +6 -1
  153. package/dist/style.css +1 -1
  154. package/dist/style.es.js +1 -1
  155. package/dist/styles/variables.scss +1 -3
  156. package/dist/types/index.d.ts +22 -15
  157. package/package.json +2 -2
  158. package/dist/esm/sticky.taro-d0553f48.js +0 -13
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.4.5-beta.0 Wed Feb 01 2023 15:12:48 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.4.6-beta.0 Wed Feb 08 2023 14:26:14 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import * as React from "react";
7
7
  import React__default, { useCallback, useState, useEffect, createContext, useContext, useMemo, useRef, forwardRef, useImperativeHandle, useLayoutEffect, Component, memo } from "react";
8
- import Taro, { usePageScroll, nextTick, useReady, createSelectorQuery } from "@tarojs/taro";
8
+ import Taro, { redirectTo, navigateTo, getEnv, usePageScroll, getSystemInfoSync, nextTick, createSelectorQuery, uploadFile, chooseImage, pageScrollTo, createInnerAudioContext, useReady } from "@tarojs/taro";
9
9
  import ReactDOM, { createPortal, unstable_batchedUpdates } from "react-dom";
10
10
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
11
11
  function getAugmentedNamespace(n) {
@@ -73,7 +73,13 @@ const defaultProps$1v = {
73
73
  className: ""
74
74
  };
75
75
  function pxCheck$3(value) {
76
- return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
76
+ if (value === "") {
77
+ return value;
78
+ }
79
+ if (Number.isNaN(Number(value))) {
80
+ return String(value);
81
+ }
82
+ return `${value}px`;
77
83
  }
78
84
  function Icon$1(props) {
79
85
  const {
@@ -105,15 +111,18 @@ function Icon$1(props) {
105
111
  return { src: name };
106
112
  return {};
107
113
  };
114
+ const styles = {};
115
+ const checkedSize = pxCheck$3(size);
116
+ if (checkedSize) {
117
+ styles.width = styles.height = styles.fontSize = checkedSize;
118
+ }
108
119
  return React__default.createElement(
109
120
  type,
110
121
  {
111
122
  className: isImage ? `${b2("img")} ${className || ""} ` : `${fontClassName} ${b2(null)} ${classPrefix}-${name} ${className || ""}`,
112
123
  style: {
113
124
  color,
114
- fontSize: pxCheck$3(size),
115
- width: pxCheck$3(size),
116
- height: pxCheck$3(size),
125
+ ...styles,
117
126
  ...style
118
127
  },
119
128
  ...rest,
@@ -297,7 +306,7 @@ const Cell = (props) => {
297
306
  onClick(event);
298
307
  const link = to2 || url;
299
308
  if (link) {
300
- replace ? Taro.redirectTo({ url: link }) : Taro.navigateTo({ url: link });
309
+ replace ? redirectTo({ url: link }) : navigateTo({ url: link });
301
310
  }
302
311
  };
303
312
  const baseStyle = {
@@ -958,6 +967,11 @@ var classnames = { exports: {} };
958
967
  })();
959
968
  })(classnames);
960
969
  var classNames = classnames.exports;
970
+ var index_cjs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
971
+ __proto__: null
972
+ }, Symbol.toStringTag, { value: "Module" }));
973
+ var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
974
+ var index_cjs = require$$0;
961
975
  const defaultOverlayProps = {
962
976
  zIndex: 2e3,
963
977
  duration: 0.3,
@@ -977,6 +991,7 @@ const Overlay = (props) => {
977
991
  visible,
978
992
  lockScroll,
979
993
  overlayStyle,
994
+ onClick,
980
995
  ...rest
981
996
  } = {
982
997
  ...defaultOverlayProps,
@@ -1018,9 +1033,9 @@ const Overlay = (props) => {
1018
1033
  document.body.classList.remove("nut-overflow-hidden");
1019
1034
  }
1020
1035
  };
1021
- const handleClick = (e2) => {
1036
+ const handleClick = (event) => {
1022
1037
  if (closeOnClickOverlay) {
1023
- props.onClick && props.onClick(e2);
1038
+ onClick && onClick(event);
1024
1039
  renderRef.current = false;
1025
1040
  const id = window.setTimeout(() => {
1026
1041
  setShow(!visible);
@@ -1028,10 +1043,11 @@ const Overlay = (props) => {
1028
1043
  intervalRef.current = id;
1029
1044
  }
1030
1045
  };
1031
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
1046
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(index_cjs.View, {
1032
1047
  className: classes,
1033
1048
  style: styles,
1034
1049
  ...rest,
1050
+ catchMove: lockScroll,
1035
1051
  onClick: handleClick
1036
1052
  }, children));
1037
1053
  };
@@ -1518,8 +1534,6 @@ const defaultProps$1p = {
1518
1534
  },
1519
1535
  onClose: () => {
1520
1536
  },
1521
- onClick: (e2) => {
1522
- },
1523
1537
  onOpened: (e2) => {
1524
1538
  },
1525
1539
  onClosed: (e2) => {
@@ -1583,15 +1597,15 @@ const Popup = (props) => {
1583
1597
  const classes = classNames(
1584
1598
  {
1585
1599
  round,
1586
- [`popup-${position}`]: true,
1600
+ [`nut-popup-${position}`]: true,
1587
1601
  [`${popClass}`]: true,
1588
1602
  [`${className}`]: true
1589
1603
  },
1590
1604
  b2("")
1591
1605
  );
1592
1606
  const closeClasses = classNames({
1593
- "nutui-popup__close-icon": true,
1594
- [`nutui-popup__close-icon--${closeIconPosition}`]: true
1607
+ "nut-popup__close-icon": true,
1608
+ [`nut-popup__close-icon--${closeIconPosition}`]: true
1595
1609
  });
1596
1610
  const open = () => {
1597
1611
  if (!innerVisible) {
@@ -1683,7 +1697,7 @@ const Popup = (props) => {
1683
1697
  !visible && close();
1684
1698
  }, [visible]);
1685
1699
  useEffect(() => {
1686
- setTransitionName(transition || `popup-slide-${position}`);
1700
+ setTransitionName(transition || `nut-popup-slide-${position}`);
1687
1701
  }, [position]);
1688
1702
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
1689
1703
  };
@@ -2031,34 +2045,173 @@ const Row = (props) => {
2031
2045
  };
2032
2046
  Row.defaultProps = defaultProps$1j;
2033
2047
  Row.displayName = "NutRow";
2034
- const defaultConfigRef = {
2035
- current: {
2036
- locale: zhCN
2048
+ function useWatch(dep, callback, config2 = { immediate: false }) {
2049
+ const { immediate } = config2;
2050
+ const prev = useRef();
2051
+ const inited = useRef(false);
2052
+ const stop2 = useRef(false);
2053
+ useEffect(() => {
2054
+ const execute = () => callback(prev.current);
2055
+ if (!stop2.current) {
2056
+ if (!inited.current) {
2057
+ inited.current = true;
2058
+ if (immediate) {
2059
+ execute();
2060
+ }
2061
+ } else {
2062
+ execute();
2063
+ }
2064
+ prev.current = dep;
2065
+ }
2066
+ }, [dep]);
2067
+ return () => {
2068
+ stop2.current = true;
2069
+ };
2070
+ }
2071
+ const getRectByTaro = async (element) => {
2072
+ if (element) {
2073
+ const res = await element.getBoundingClientRect();
2074
+ return res;
2037
2075
  }
2076
+ return Promise.resolve({});
2038
2077
  };
2039
- const getDefaultConfig = () => {
2040
- return defaultConfigRef.current;
2041
- };
2042
- const ConfigContext = createContext(null);
2043
- const useConfig = () => {
2044
- var _a;
2045
- return (_a = useContext(ConfigContext)) != null ? _a : getDefaultConfig();
2078
+ const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
2079
+ const defaultRoot = canUseDom ? window : void 0;
2080
+ const overflowStylePatterns = ["scroll", "auto", "overlay"];
2081
+ function isElement(node) {
2082
+ const ELEMENT_NODE_TYPE = 1;
2083
+ return node.nodeType === ELEMENT_NODE_TYPE;
2084
+ }
2085
+ function getScrollParent(el, root2 = defaultRoot) {
2086
+ let node = el;
2087
+ while (node && node !== root2 && isElement(node)) {
2088
+ if (node === document.body) {
2089
+ return root2;
2090
+ }
2091
+ const { overflowY } = window.getComputedStyle(node);
2092
+ if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
2093
+ return node;
2094
+ }
2095
+ node = node.parentNode;
2096
+ }
2097
+ return root2;
2098
+ }
2099
+ const defaultProps$1i = {
2100
+ position: "top",
2101
+ top: 0,
2102
+ bottom: 0,
2103
+ zIndex: 2e3
2046
2104
  };
2047
- const defaultProps$1i = {};
2048
2105
  const Sticky = (props) => {
2049
- useConfig();
2050
- ({ ...defaultProps$1i, ...props });
2106
+ const {
2107
+ position = "top",
2108
+ top = 0,
2109
+ bottom = 0,
2110
+ zIndex = 2e3,
2111
+ children,
2112
+ container,
2113
+ className,
2114
+ onChange,
2115
+ ...rest
2116
+ } = props;
2117
+ const stickyRef = useRef(null);
2118
+ const rootRef = useRef(null);
2119
+ const offset = position === "top" ? top : bottom;
2120
+ const [rootRect, setRootRect] = useState({});
2121
+ const [fixed, setFixed] = useState(false);
2122
+ const [transform, setTransform] = useState(0);
2123
+ useWatch(fixed, () => {
2124
+ onChange && onChange(fixed);
2125
+ });
2126
+ const rootStyle = useMemo(() => {
2127
+ if (!fixed) {
2128
+ return {
2129
+ height: "",
2130
+ width: ""
2131
+ };
2132
+ }
2133
+ const style = {};
2134
+ if (rootRect.height) {
2135
+ style.height = rootRect.height;
2136
+ }
2137
+ if (rootRect.width) {
2138
+ style.width = rootRect.width;
2139
+ }
2140
+ return style;
2141
+ }, [fixed, rootRect.height, rootRect.width]);
2142
+ const stickyStyle = useMemo(() => {
2143
+ if (!fixed) {
2144
+ return {
2145
+ height: "",
2146
+ width: "",
2147
+ [position]: ""
2148
+ };
2149
+ }
2150
+ let style = {};
2151
+ if (rootRect.height)
2152
+ style.height = rootRect.height;
2153
+ if (rootRect.width)
2154
+ style.width = rootRect.width;
2155
+ style.transform = `translate3d(0, ${transform}px, 0)`;
2156
+ style[position] = offset;
2157
+ style.zIndex = zIndex;
2158
+ return style;
2159
+ }, [fixed, rootRect.height, rootRect.width, transform, position]);
2160
+ const handleScroll = async (scrollTop) => {
2161
+ const curRootRect = await getRectByTaro(rootRef.current);
2162
+ const stickyRect = await getRectByTaro(stickyRef.current);
2163
+ if (curRootRect && stickyRect) {
2164
+ setRootRect(curRootRect);
2165
+ if (position === "top") {
2166
+ if (container) {
2167
+ const containerRect = await getRectByTaro(container.current);
2168
+ const difference = containerRect.bottom - top - curRootRect.height;
2169
+ const curTransform = difference < 0 ? difference : 0;
2170
+ setTransform(curTransform);
2171
+ const curFixed = top > curRootRect.top && containerRect.bottom > 0;
2172
+ setFixed(curFixed);
2173
+ } else {
2174
+ setFixed(top > curRootRect.top);
2175
+ }
2176
+ } else {
2177
+ const windowHeight = getSystemInfoSync().windowHeight;
2178
+ setFixed(windowHeight - offset < curRootRect.bottom);
2179
+ }
2180
+ } else {
2181
+ console.log("getRectByTaro\u83B7\u53D6\u5931\u8D25", { stickyRect, curRootRect });
2182
+ }
2183
+ };
2184
+ const getElement = useCallback(() => {
2185
+ return getScrollParent(rootRef.current);
2186
+ }, []);
2187
+ useEffect(() => {
2188
+ if (getEnv() === "WEB" && getElement() !== window) {
2189
+ window.addEventListener("touchmove", handleScroll, true);
2190
+ window.addEventListener("scroll", handleScroll, true);
2191
+ return () => {
2192
+ window.removeEventListener("touchmove", handleScroll);
2193
+ window.removeEventListener("scroll", handleScroll);
2194
+ };
2195
+ }
2196
+ }, []);
2197
+ usePageScroll((res) => {
2198
+ if (getEnv() === "WEAPP") {
2199
+ handleScroll(res.scrollTop);
2200
+ }
2201
+ });
2051
2202
  return /* @__PURE__ */ React__default.createElement("div", {
2052
- className: "nut-sticky"
2053
- }, "Sticky");
2203
+ ref: rootRef,
2204
+ style: rootStyle,
2205
+ className: `nut-sticky ${className}`,
2206
+ ...rest
2207
+ }, /* @__PURE__ */ React__default.createElement("div", {
2208
+ className: `nut-sticky-box ${fixed ? "nut-sticky-fixed" : ""}`,
2209
+ ref: stickyRef,
2210
+ style: stickyStyle
2211
+ }, children));
2054
2212
  };
2055
2213
  Sticky.defaultProps = defaultProps$1i;
2056
2214
  Sticky.displayName = "NutSticky";
2057
- var index_cjs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2058
- __proto__: null
2059
- }, Symbol.toStringTag, { value: "Module" }));
2060
- var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
2061
- var index_cjs = require$$0;
2062
2215
  const elevatorContext = createContext({});
2063
2216
  const defaultProps$1h = {
2064
2217
  height: "200px",
@@ -2126,7 +2279,7 @@ const Elevator = (props) => {
2126
2279
  let height2 = 0;
2127
2280
  state.current.listHeight.push(height2);
2128
2281
  for (let i = 0; i < state.current.listGroup.length; i++) {
2129
- const query = Taro.createSelectorQuery();
2282
+ const query = createSelectorQuery();
2130
2283
  query.selectAll(`.${className} .elevator__item__${i}`).boundingClientRect();
2131
2284
  query.exec((res) => {
2132
2285
  if (res[0][0])
@@ -2184,7 +2337,7 @@ const Elevator = (props) => {
2184
2337
  };
2185
2338
  const setListGroup = () => {
2186
2339
  if (listview.current) {
2187
- Taro.createSelectorQuery().selectAll(`.${className} .nut-elevator__list__item`).node((el) => {
2340
+ createSelectorQuery().selectAll(`.${className} .nut-elevator__list__item`).node((el) => {
2188
2341
  state.current.listGroup = [...Object.keys(el)];
2189
2342
  calculateHeight();
2190
2343
  }).exec();
@@ -2212,7 +2365,7 @@ const Elevator = (props) => {
2212
2365
  };
2213
2366
  useEffect(() => {
2214
2367
  if (listview.current) {
2215
- Taro.nextTick(() => {
2368
+ nextTick(() => {
2216
2369
  setListGroup();
2217
2370
  });
2218
2371
  }
@@ -3507,10 +3660,6 @@ function requestAniFrame() {
3507
3660
  };
3508
3661
  }
3509
3662
  var requestAniFrame$1 = requestAniFrame();
3510
- const getRectByTaro = async (element) => {
3511
- const res = await element.getBoundingClientRect();
3512
- return res;
3513
- };
3514
3663
  const defaultProps$14 = {
3515
3664
  type: "one",
3516
3665
  isAutoBackFill: false,
@@ -6735,7 +6884,13 @@ const defaultProps$S = {
6735
6884
  className: ""
6736
6885
  };
6737
6886
  function pxCheck(value) {
6738
- return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
6887
+ if (value === "") {
6888
+ return value;
6889
+ }
6890
+ if (Number.isNaN(Number(value))) {
6891
+ return String(value);
6892
+ }
6893
+ return `${value}px`;
6739
6894
  }
6740
6895
  function Icon(props) {
6741
6896
  const {
@@ -6767,15 +6922,18 @@ function Icon(props) {
6767
6922
  return { src: name };
6768
6923
  return {};
6769
6924
  };
6925
+ const styles = {};
6926
+ const checkedSize = pxCheck(size);
6927
+ if (checkedSize) {
6928
+ styles.width = styles.height = styles.fontSize = checkedSize;
6929
+ }
6770
6930
  return React__default.createElement(
6771
6931
  type,
6772
6932
  {
6773
6933
  className: isImage ? `${b2("img")} ${className || ""} ` : `${fontClassName} ${b2(null)} ${classPrefix}-${name} ${className || ""}`,
6774
6934
  style: {
6775
6935
  color,
6776
- fontSize: pxCheck(size),
6777
- width: pxCheck(size),
6778
- height: pxCheck(size),
6936
+ ...styles,
6779
6937
  ...style
6780
6938
  },
6781
6939
  ...rest,
@@ -7499,7 +7657,7 @@ const SearchBar = (props) => {
7499
7657
  return /* @__PURE__ */ React__default.createElement("input", {
7500
7658
  className: `${searchbarBem("input")} ${searchbarBem(alignClass)} ${shape === "round" ? searchbarBem("round") : ""} ${clearable ? searchbarBem("input-clear") : ""}`,
7501
7659
  ref: searchRef,
7502
- style: { ...props.style, background: props.inputBackground },
7660
+ style: { ...props.style },
7503
7661
  value: value || "",
7504
7662
  placeholder: placeholder || locale.placeholder,
7505
7663
  disabled,
@@ -7609,13 +7767,14 @@ const SearchBar = (props) => {
7609
7767
  return null;
7610
7768
  };
7611
7769
  const envClass = () => {
7612
- return Taro.getEnv() === "WEB" ? "nut-searchbar-taro" : "";
7770
+ return getEnv() === "WEB" ? "nut-searchbar-taro" : "";
7613
7771
  };
7614
7772
  return /* @__PURE__ */ React__default.createElement("div", {
7615
7773
  className: `${searchbarBem()} ${envClass()} ${disabled ? searchbarBem("disabled") : ""} ${className || ""}`,
7616
7774
  style: { ...props.style, background: props.background }
7617
7775
  }, renderLeftoutIcon(), renderLabel(), /* @__PURE__ */ React__default.createElement("div", {
7618
- className: `${searchbarBem("content")}`
7776
+ className: `${searchbarBem("content")}`,
7777
+ style: { background: props.inputBackground }
7619
7778
  }, renderLeftinIcon(), /* @__PURE__ */ React__default.createElement("div", {
7620
7779
  className: "nut-searchbar__input-box"
7621
7780
  }, renderField()), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
@@ -8070,15 +8229,15 @@ class Upload {
8070
8229
  console.warn("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 XMLHttpRequest");
8071
8230
  }
8072
8231
  }
8073
- uploadTaro(uploadFile, env) {
8232
+ uploadTaro(uploadFile2, env) {
8074
8233
  var _a;
8075
8234
  const options = this.options;
8076
8235
  if (env === "WEB") {
8077
8236
  this.upload();
8078
8237
  } else if (options.beforeXhrUpload) {
8079
- options.beforeXhrUpload(uploadFile, options);
8238
+ options.beforeXhrUpload(uploadFile2, options);
8080
8239
  } else {
8081
- const uploadTask = uploadFile({
8240
+ const uploadTask = uploadFile2({
8082
8241
  url: options.url,
8083
8242
  filePath: options.taroFilePath,
8084
8243
  fileType: options.fileType,
@@ -8196,7 +8355,7 @@ const InternalUploader = (props, ref) => {
8196
8355
  useImperativeHandle(ref, () => ({
8197
8356
  submit: () => {
8198
8357
  Promise.all(uploadQueue).then((res) => {
8199
- res.forEach((i) => i.uploadTaro(Taro.uploadFile, Taro.getEnv()));
8358
+ res.forEach((i) => i.uploadTaro(uploadFile, getEnv()));
8200
8359
  });
8201
8360
  }
8202
8361
  }));
@@ -8208,11 +8367,11 @@ const InternalUploader = (props, ref) => {
8208
8367
  setUploadQueue([]);
8209
8368
  }
8210
8369
  };
8211
- const chooseImage = () => {
8370
+ const _chooseImage = () => {
8212
8371
  if (disabled) {
8213
8372
  return;
8214
8373
  }
8215
- Taro.chooseImage({
8374
+ chooseImage({
8216
8375
  count: maximum * 1 - fileList.length,
8217
8376
  sizeType,
8218
8377
  sourceType,
@@ -8290,7 +8449,7 @@ const InternalUploader = (props, ref) => {
8290
8449
  };
8291
8450
  const task = new Upload(uploadOption);
8292
8451
  if (props.autoUpload) {
8293
- task.uploadTaro(Taro.uploadFile, Taro.getEnv());
8452
+ task.uploadTaro(uploadFile, getEnv());
8294
8453
  } else {
8295
8454
  uploadQueue.push(
8296
8455
  new Promise((resolve, reject) => {
@@ -8315,7 +8474,7 @@ const InternalUploader = (props, ref) => {
8315
8474
  fileItem.status = "ready";
8316
8475
  fileItem.message = locale.uploader.readyUpload;
8317
8476
  fileItem.type = fileType;
8318
- if (Taro.getEnv() == "WEB") {
8477
+ if (getEnv() === "WEB") {
8319
8478
  const formData = new FormData();
8320
8479
  for (const [key, value] of Object.entries(data)) {
8321
8480
  formData.append(key, value);
@@ -8349,7 +8508,7 @@ const InternalUploader = (props, ref) => {
8349
8508
  if (oversizes.length) {
8350
8509
  onOversize && onOversize(files);
8351
8510
  }
8352
- let currentFileLength = filterFile.length + fileList.length;
8511
+ const currentFileLength = filterFile.length + fileList.length;
8353
8512
  if (currentFileLength > maximum2) {
8354
8513
  filterFile.splice(filterFile.length - (currentFileLength - maximum2));
8355
8514
  }
@@ -8388,12 +8547,12 @@ const InternalUploader = (props, ref) => {
8388
8547
  className: "nut-uploader__slot"
8389
8548
  }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children, maximum > fileList.length && /* @__PURE__ */ React__default.createElement(Button, {
8390
8549
  className: "nut-uploader__input",
8391
- onClick: chooseImage
8550
+ onClick: _chooseImage
8392
8551
  }))), fileList.length !== 0 && fileList.map((item, index) => {
8393
8552
  return /* @__PURE__ */ React__default.createElement("div", {
8394
8553
  className: `nut-uploader__preview ${listType}`,
8395
8554
  key: item.uid
8396
- }, listType == "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
8555
+ }, listType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
8397
8556
  className: "nut-uploader__preview-img"
8398
8557
  }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", {
8399
8558
  className: "nut-uploader__preview__progress"
@@ -8405,7 +8564,7 @@ const InternalUploader = (props, ref) => {
8405
8564
  classPrefix: props.iconClassPrefix,
8406
8565
  fontClassName: props.iconFontClassName,
8407
8566
  color: "#fff",
8408
- name: `${item.status == "error" ? "failure" : "loading"}`
8567
+ name: `${item.status === "error" ? "failure" : "loading"}`
8409
8568
  }), /* @__PURE__ */ React__default.createElement("div", {
8410
8569
  className: "nut-uploader__preview__progress__msg"
8411
8570
  }, item.message)), isDeletable && /* @__PURE__ */ React__default.createElement(Icon$1, {
@@ -8418,10 +8577,12 @@ const InternalUploader = (props, ref) => {
8418
8577
  }), item.type.includes("image") ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement("img", {
8419
8578
  className: "nut-uploader__preview-img__c",
8420
8579
  src: item.url,
8580
+ alt: "",
8421
8581
  onClick: () => handleItemClick(item)
8422
8582
  })) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, defaultImg ? /* @__PURE__ */ React__default.createElement("img", {
8423
8583
  className: "nut-uploader__preview-img__c",
8424
8584
  src: defaultImg,
8585
+ alt: "",
8425
8586
  onClick: () => handleItemClick(item)
8426
8587
  }) : /* @__PURE__ */ React__default.createElement("div", {
8427
8588
  className: "nut-uploader__preview-img__file"
@@ -8467,7 +8628,7 @@ const InternalUploader = (props, ref) => {
8467
8628
  name: uploadIcon
8468
8629
  }), /* @__PURE__ */ React__default.createElement(Button, {
8469
8630
  className: "nut-uploader__input",
8470
- onClick: chooseImage
8631
+ onClick: _chooseImage
8471
8632
  })));
8472
8633
  };
8473
8634
  const Uploader = React__default.forwardRef(InternalUploader);
@@ -8589,7 +8750,7 @@ const BackTop = (props) => {
8589
8750
  });
8590
8751
  const goTop = (e2) => {
8591
8752
  onClick && onClick(e2);
8592
- Taro.pageScrollTo({
8753
+ pageScrollTo({
8593
8754
  scrollTop: 0,
8594
8755
  duration: isAnimation && duration > 0 ? duration : 0
8595
8756
  });
@@ -8824,8 +8985,8 @@ const Drag = (props) => {
8824
8985
  const el = myDrag.current;
8825
8986
  if (el) {
8826
8987
  const { top, left, bottom, right } = boundary;
8827
- const { screenWidth, windowHeight } = Taro.getSystemInfoSync();
8828
- Taro.createSelectorQuery().select(`.${className}`).boundingClientRect((rec) => {
8988
+ const { screenWidth, windowHeight } = getSystemInfoSync();
8989
+ createSelectorQuery().select(`.${className}`).boundingClientRect((rec) => {
8829
8990
  setBoundaryState({
8830
8991
  top: -rec.top + top,
8831
8992
  left: -rec.left + left,
@@ -13642,27 +13803,6 @@ const host = createHost(primitives, {
13642
13803
  }
13643
13804
  });
13644
13805
  const animated = host.animated;
13645
- const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
13646
- const defaultRoot = canUseDom ? window : void 0;
13647
- const overflowStylePatterns = ["scroll", "auto", "overlay"];
13648
- function isElement(node) {
13649
- const ELEMENT_NODE_TYPE = 1;
13650
- return node.nodeType === ELEMENT_NODE_TYPE;
13651
- }
13652
- function getScrollParent(el, root2 = defaultRoot) {
13653
- let node = el;
13654
- while (node && node !== root2 && isElement(node)) {
13655
- if (node === document.body) {
13656
- return root2;
13657
- }
13658
- const { overflowY } = window.getComputedStyle(node);
13659
- if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
13660
- return node;
13661
- }
13662
- node = node.parentNode;
13663
- }
13664
- return root2;
13665
- }
13666
13806
  function bound(position, min, max) {
13667
13807
  let ret = position;
13668
13808
  if (min !== void 0) {
@@ -14297,7 +14437,7 @@ const Audio = (props) => {
14297
14437
  currentDuration: "00:00:00",
14298
14438
  percent: 0
14299
14439
  });
14300
- const audioRef = useRef(Taro.createInnerAudioContext());
14440
+ const audioRef = useRef(createInnerAudioContext());
14301
14441
  const audioCtx = audioRef.current;
14302
14442
  audioCtx.src = url;
14303
14443
  audioCtx.autoplay = autoplay || false;
@@ -14462,7 +14602,7 @@ const defaultProps$w = {
14462
14602
  url: ""
14463
14603
  };
14464
14604
  const Avatar = (props) => {
14465
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
14605
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
14466
14606
  const {
14467
14607
  children,
14468
14608
  prefixCls,
@@ -14542,18 +14682,13 @@ const Avatar = (props) => {
14542
14682
  activeAvatar && activeAvatar(e2);
14543
14683
  onActiveAvatar && onActiveAvatar(e2);
14544
14684
  };
14545
- console.log(
14546
- "!parent?.propAvatarGroup?.maxCount",
14547
- !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxCount),
14548
- showMax
14549
- );
14550
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (showMax || !((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount) || avatarIndex <= ((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.maxCount)) && /* @__PURE__ */ React__default.createElement("div", {
14685
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxCount) || avatarIndex <= ((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount)) && /* @__PURE__ */ React__default.createElement("div", {
14551
14686
  className: cls,
14552
14687
  ...rest,
14553
14688
  style: !showMax ? styles : maxStyles,
14554
14689
  onClick: clickAvatar,
14555
14690
  ref: avatarRef
14556
- }, (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, url && /* @__PURE__ */ React__default.createElement(index_cjs.Image, {
14691
+ }, (!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.maxCount) || avatarIndex <= ((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount)) && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, url && /* @__PURE__ */ React__default.createElement(index_cjs.Image, {
14557
14692
  className: "avatar-img",
14558
14693
  src: url,
14559
14694
  onError: errorEvent
@@ -14567,10 +14702,23 @@ const Avatar = (props) => {
14567
14702
  className: "text"
14568
14703
  }, children)), showMax && /* @__PURE__ */ React__default.createElement("div", {
14569
14704
  className: "text"
14570
- }, ((_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent) ? (_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxContent : `+ ${avatarIndex - ((_o = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _o.maxCount)}`)));
14705
+ }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxCount)}`)));
14571
14706
  };
14572
14707
  Avatar.defaultProps = defaultProps$w;
14573
14708
  Avatar.displayName = "NutAvatar";
14709
+ const defaultConfigRef = {
14710
+ current: {
14711
+ locale: zhCN
14712
+ }
14713
+ };
14714
+ const getDefaultConfig = () => {
14715
+ return defaultConfigRef.current;
14716
+ };
14717
+ const ConfigContext = createContext(null);
14718
+ const useConfig = () => {
14719
+ var _a;
14720
+ return (_a = useContext(ConfigContext)) != null ? _a : getDefaultConfig();
14721
+ };
14574
14722
  const defaultProps$v = {
14575
14723
  maxContent: "",
14576
14724
  maxCount: "",
@@ -16304,8 +16452,6 @@ const NoticeBar = (props) => {
16304
16452
  }
16305
16453
  return () => {
16306
16454
  clearInterval(timer);
16307
- startRoll();
16308
- startRollEasy();
16309
16455
  };
16310
16456
  }, []);
16311
16457
  useEffect(() => {
@@ -17631,8 +17777,8 @@ const defaultProps$a = {
17631
17777
  itemEqualSize: true,
17632
17778
  overscan: 2
17633
17779
  };
17634
- const clientHeight = Taro.getSystemInfoSync().windowHeight - 5 || 667;
17635
- Taro.getSystemInfoSync().windowWidth || 375;
17780
+ const clientHeight = getSystemInfoSync().windowHeight - 5 || 667;
17781
+ getSystemInfoSync().windowWidth || 375;
17636
17782
  const VirtualList = (props) => {
17637
17783
  const {
17638
17784
  sourceData = [],
@@ -17692,8 +17838,7 @@ const VirtualList = (props) => {
17692
17838
  }, [itemSize, sourceData]);
17693
17839
  const getContainerHeight = () => {
17694
17840
  const initH = itemSize * sourceData.length;
17695
- let containerH = initH < clientHeight ? initH + overscan * itemSize - 5 : Math.min(containerSize, clientHeight);
17696
- return containerH;
17841
+ return initH < clientHeight ? initH + overscan * itemSize - 5 : Math.min(containerSize, clientHeight);
17697
17842
  };
17698
17843
  const visibleCount = () => {
17699
17844
  return Math.ceil(getContainerHeight() / itemSize) + overscan;
@@ -17909,7 +18054,7 @@ const defaultProps$8 = {
17909
18054
  defaultIcon: "location2",
17910
18055
  selectedIcon: "Check",
17911
18056
  isShowCustomAddress: true,
17912
- customAndExistTitle: "\u9009\u62E9\u5176\u4ED6\u5730\u5740"
18057
+ customAndExistTitle: ""
17913
18058
  };
17914
18059
  const ExistRender = (props) => {
17915
18060
  const { locale } = useConfig();
@@ -17984,7 +18129,7 @@ const ExistRender = (props) => {
17984
18129
  onClick: switchModule
17985
18130
  }, /* @__PURE__ */ React__default.createElement("div", {
17986
18131
  className: b2("choose-other-btn")
17987
- }, locale.address.chooseAnotherAddress || customAndExistTitle)));
18132
+ }, customAndExistTitle || locale.address.chooseAnotherAddress)));
17988
18133
  };
17989
18134
  const defaultProps$7 = {
17990
18135
  modelValue: [],
@@ -18261,15 +18406,15 @@ const defaultProps$6 = {
18261
18406
  modelValue: false,
18262
18407
  modelSelect: [],
18263
18408
  type: "custom",
18264
- customAddressTitle: "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A",
18409
+ customAddressTitle: "",
18265
18410
  province: [],
18266
18411
  city: [],
18267
18412
  country: [],
18268
18413
  town: [],
18269
18414
  isShowCustomAddress: true,
18270
18415
  existAddress: [],
18271
- existAddressTitle: "\u914D\u9001\u81F3",
18272
- customAndExistTitle: "\u9009\u62E9\u5176\u4ED6\u5730\u5740",
18416
+ existAddressTitle: "",
18417
+ customAndExistTitle: "",
18273
18418
  height: "200px",
18274
18419
  defaultIcon: "location2",
18275
18420
  selectedIcon: "Check",
@@ -18410,7 +18555,7 @@ const Address = (props) => {
18410
18555
  color: "#cccccc"
18411
18556
  })), /* @__PURE__ */ React__default.createElement("div", {
18412
18557
  className: b2("header__title")
18413
- }, privateType === "custom" ? locale.address.selectRegion || customAddressTitle : locale.address.deliveryTo || existAddressTitle), /* @__PURE__ */ React__default.createElement("div", {
18558
+ }, privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo), /* @__PURE__ */ React__default.createElement("div", {
18414
18559
  onClick: () => handClose()
18415
18560
  }, closeBtnIcon && /* @__PURE__ */ React__default.createElement(Icon$1, {
18416
18561
  classPrefix: iconClassPrefix,
@@ -18460,7 +18605,7 @@ const Address = (props) => {
18460
18605
  selectedIcon,
18461
18606
  defaultIcon,
18462
18607
  isShowCustomAddress,
18463
- customAndExistTitle: locale.address.chooseAnotherAddress || customAndExistTitle,
18608
+ customAndExistTitle: customAndExistTitle || locale.address.chooseAnotherAddress,
18464
18609
  onSelected: selectedExist,
18465
18610
  onSwitchModule
18466
18611
  }))));
@@ -18520,7 +18665,7 @@ const InternalBarrage = (props, ref) => {
18520
18665
  el.innerHTML = barrageList[_index];
18521
18666
  el.classList.add("barrage-item");
18522
18667
  barrageContainer.current.appendChild(el);
18523
- Taro.createSelectorQuery().select(".barrage-item").boundingClientRect((res) => {
18668
+ createSelectorQuery().select(".barrage-item").boundingClientRect((res) => {
18524
18669
  console.log("res", res);
18525
18670
  const height = res == null ? void 0 : res.height;
18526
18671
  el.classList.add("move");