@arco-design/mobile-react 2.27.3 → 2.27.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/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.27.4](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.27.3...@arco-design/mobile-react@2.27.4) (2023-05-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * `IndexBar` remove redundant children judgement ([#123](https://github.com/arco-design/arco-design-mobile/issues/123)) ([cbba80d](https://github.com/arco-design/arco-design-mobile/commit/cbba80dcdb7d7b58e893ab9bd08cc3388008a6f3))
12
+ * `ShowMonitor` fix disable observe when remount ([#125](https://github.com/arco-design/arco-design-mobile/issues/125)) ([73a5572](https://github.com/arco-design/arco-design-mobile/commit/73a5572961c7c2d6956c6c9406e486412b99e1c8))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [2.27.3](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.27.2...@arco-design/mobile-react@2.27.3) (2023-05-16)
7
19
 
8
20
 
package/README.en-US.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.2/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.27.2/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.3/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.27.3/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## Full import
package/README.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.2/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.27.2/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.27.3/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.27.3/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## 引入全部
package/cjs/form/type.js CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.ValidateStatus = exports.FormInternalComponentType = void 0;
5
+ // 注意:自动识别form关联组件的依据,请勿轻易改变代码结构
6
+ // Notice: Automatically identify the basis of the associated component of the form, DO NOT change the code structure.
5
7
  var FormInternalComponentType;
6
8
  exports.FormInternalComponentType = FormInternalComponentType;
7
9
 
@@ -8,13 +8,11 @@ exports.isValidIndex = isValidIndex;
8
8
 
9
9
  var _react = require("react");
10
10
 
11
- var _group = require("./group");
12
-
13
11
  function filterValidIndexBarChild(children) {
14
12
  var validChildren = [];
15
13
 
16
14
  _react.Children.forEach(children, function (child) {
17
- if (! /*#__PURE__*/(0, _react.isValidElement)(child) || child.type !== _group.IndexBarGroup) {
15
+ if (! /*#__PURE__*/(0, _react.isValidElement)(child)) {
18
16
  console.warn('<IndexBar /> only accept <IndexBar.Group /> as the children');
19
17
  return;
20
18
  }
@@ -232,8 +232,9 @@ var ShowMonitor = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
232
232
  onOnceEmittedListeners[key] = [];
233
233
  }, []);
234
234
 
235
- function handleCheckChildrenExist() {
236
- return isChildrenExist.current && domRef.current && domRef.current.children.length;
235
+ function handleCheckChildrenExist(target) {
236
+ var dom = target || domRef.current;
237
+ return isChildrenExist.current && (dom == null ? void 0 : dom.children.length);
237
238
  }
238
239
 
239
240
  function handleObserverStatusChange(entries) {
@@ -253,7 +254,7 @@ var ShowMonitor = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
253
254
  * @en Callback when the visible status of current element changes before the comparison
254
255
  */
255
256
 
256
- isIntersecting !== curVisible && handleCheckChildrenExist() && onCompVisibleChange(isIntersecting, target);
257
+ isIntersecting !== curVisible && handleCheckChildrenExist(target) && onCompVisibleChange(isIntersecting, target);
257
258
  /**
258
259
  * 当前元素状态由不可见变为可见,且只触发一次
259
260
  * @en The current element is invisible -> visible, and once, triggers the callback
package/dist/index.js CHANGED
@@ -12507,6 +12507,8 @@
12507
12507
  layout: 'horizontal'
12508
12508
  });
12509
12509
 
12510
+ // 注意:自动识别form关联组件的依据,请勿轻易改变代码结构
12511
+ // Notice: Automatically identify the basis of the associated component of the form, DO NOT change the code structure.
12510
12512
  var FormInternalComponentType;
12511
12513
 
12512
12514
  (function (FormInternalComponentType) {
@@ -15413,8 +15415,9 @@
15413
15415
  onOnceEmittedListeners[key] = [];
15414
15416
  }, []);
15415
15417
 
15416
- function handleCheckChildrenExist() {
15417
- return isChildrenExist.current && domRef.current && domRef.current.children.length;
15418
+ function handleCheckChildrenExist(target) {
15419
+ var dom = target || domRef.current;
15420
+ return isChildrenExist.current && (dom === null || dom === void 0 ? void 0 : dom.children.length);
15418
15421
  }
15419
15422
 
15420
15423
  function handleObserverStatusChange(entries) {
@@ -15434,7 +15437,7 @@
15434
15437
  * @en Callback when the visible status of current element changes before the comparison
15435
15438
  */
15436
15439
 
15437
- isIntersecting !== curVisible && handleCheckChildrenExist() && onCompVisibleChange(isIntersecting, target);
15440
+ isIntersecting !== curVisible && handleCheckChildrenExist(target) && onCompVisibleChange(isIntersecting, target);
15438
15441
  /**
15439
15442
  * 当前元素状态由不可见变为可见,且只触发一次
15440
15443
  * @en The current element is invisible -> visible, and once, triggers the callback
@@ -21045,7 +21048,7 @@
21045
21048
  function filterValidIndexBarChild(children) {
21046
21049
  var validChildren = [];
21047
21050
  React.Children.forEach(children, function (child) {
21048
- if (! /*#__PURE__*/React.isValidElement(child) || child.type !== IndexBarGroup) {
21051
+ if (! /*#__PURE__*/React.isValidElement(child)) {
21049
21052
  console.warn('<IndexBar /> only accept <IndexBar.Group /> as the children');
21050
21053
  return;
21051
21054
  }