@nutui/nutui-react-taro 3.0.19-cpp.22-3 → 3.0.19-cpp.22-5

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 (136) hide show
  1. package/dist/cjs/hooks/taro/use-custom-event.js +5 -5
  2. package/dist/cjs/hooks/use-ref-state.js +3 -3
  3. package/dist/cjs/hooks/use-touch.js +2 -1
  4. package/dist/cjs/packages/address/utils.js +3 -3
  5. package/dist/cjs/packages/avatarcropper/avatarcropper.js +28 -16
  6. package/dist/cjs/packages/badge/badge.js +7 -4
  7. package/dist/cjs/packages/barrage/barrage.js +24 -14
  8. package/dist/cjs/packages/calendar/style/calendar.scss +32 -1
  9. package/dist/cjs/packages/calendar/style/style.css +21 -1
  10. package/dist/cjs/packages/calendar/style/style.harmony.css +21 -1
  11. package/dist/cjs/packages/calendar/style-jmapp/calendar.scss +32 -1
  12. package/dist/cjs/packages/calendar/style-jmapp/style.css +21 -1
  13. package/dist/cjs/packages/calendar/style-jrkf/calendar.scss +32 -1
  14. package/dist/cjs/packages/calendar/style-jrkf/style.css +21 -1
  15. package/dist/cjs/packages/calendar/utils.js +8 -8
  16. package/dist/cjs/packages/calendarcard/icon.js +9 -19
  17. package/dist/cjs/packages/calendarcard/style/calendarcard.scss +19 -0
  18. package/dist/cjs/packages/calendarcard/style/style.css +13 -0
  19. package/dist/cjs/packages/calendarcard/style/style.harmony.css +13 -0
  20. package/dist/cjs/packages/calendarcard/style-jmapp/calendarcard.scss +19 -0
  21. package/dist/cjs/packages/calendarcard/style-jmapp/style.css +13 -0
  22. package/dist/cjs/packages/calendarcard/style-jrkf/calendarcard.scss +19 -0
  23. package/dist/cjs/packages/calendarcard/style-jrkf/style.css +13 -0
  24. package/dist/cjs/packages/calendarcard/utils.js +6 -6
  25. package/dist/cjs/packages/cascader/cascader.js +21 -12
  26. package/dist/cjs/packages/cascader/utils.js +3 -3
  27. package/dist/cjs/packages/collapseitem/collapseitem.js +7 -4
  28. package/dist/cjs/packages/configprovider/configprovider.js +7 -7
  29. package/dist/cjs/packages/configprovider/index.js +6 -6
  30. package/dist/cjs/packages/countdown/countdown.js +2 -1
  31. package/dist/cjs/packages/datepicker/utils.js +9 -9
  32. package/dist/cjs/packages/dialog/content.js +3 -3
  33. package/dist/cjs/packages/dialog/dialog.js +11 -8
  34. package/dist/cjs/packages/drag/drag.js +7 -4
  35. package/dist/cjs/packages/elevator/elevator.js +10 -7
  36. package/dist/cjs/packages/ellipsis/ellipsis.js +30 -17
  37. package/dist/cjs/packages/form/index.js +2 -0
  38. package/dist/cjs/packages/form/useform.js +57 -50
  39. package/dist/cjs/packages/infiniteloading/infiniteloading.js +14 -8
  40. package/dist/cjs/packages/inputnumber/inputnumber.js +28 -16
  41. package/dist/cjs/packages/lottie/types.js +2 -0
  42. package/dist/cjs/packages/menuitem/menuitem.js +22 -24
  43. package/dist/cjs/packages/noticebar/noticebar.js +70 -74
  44. package/dist/cjs/packages/notify/notify.js +4 -4
  45. package/dist/cjs/packages/nutui.react.build.js +105 -105
  46. package/dist/cjs/packages/nutui.react.js +105 -105
  47. package/dist/cjs/packages/overlay/overlay.js +3 -3
  48. package/dist/cjs/packages/pickerview/pickerroller.js +7 -4
  49. package/dist/cjs/packages/pickerview/pickerview.js +2 -1
  50. package/dist/cjs/packages/pickerview/utils.js +3 -3
  51. package/dist/cjs/packages/popover/popover.js +77 -75
  52. package/dist/cjs/packages/popup/popup.js +14 -8
  53. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +56 -52
  54. package/dist/cjs/packages/radio/index.js +2 -0
  55. package/dist/cjs/packages/range/range.js +28 -16
  56. package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
  57. package/dist/cjs/packages/sticky/sticky.js +7 -4
  58. package/dist/cjs/packages/swipe/swipe.js +14 -8
  59. package/dist/cjs/packages/swiper/index.js +1 -0
  60. package/dist/cjs/packages/switch/switch.js +7 -4
  61. package/dist/cjs/packages/toast/toast.js +4 -4
  62. package/dist/cjs/packages/uploader/uploader.js +51 -38
  63. package/dist/cjs/packages/virtuallist/utils.js +6 -6
  64. package/dist/cjs/packages/watermark/watermark.js +8 -4
  65. package/dist/cjs/types/spec/address/base.js +2 -0
  66. package/dist/cjs/utils/date.js +5 -5
  67. package/dist/cjs/utils/event-mocker.js +18 -10
  68. package/dist/cjs/utils/get-rect.js +4 -4
  69. package/dist/cjs/utils/get-scroll-parent.js +3 -3
  70. package/dist/cjs/utils/merge-props.js +3 -3
  71. package/dist/cjs/utils/merge.js +6 -6
  72. package/dist/cjs/utils/raf.js +3 -3
  73. package/dist/cjs/utils/render.js +9 -5
  74. package/dist/cjs/utils/rubberband.js +3 -3
  75. package/dist/cjs/utils/should-render-price-raw.js +3 -3
  76. package/dist/cjs/utils/taro/get-rect.js +24 -14
  77. package/dist/cjs/utils/taro/get-system-info.js +4 -4
  78. package/dist/cjs/utils/taro/platform.js +5 -5
  79. package/dist/es/hooks/use-touch.js +1 -1
  80. package/dist/es/packages/avatarcropper/avatarcropper.js +28 -16
  81. package/dist/es/packages/badge/badge.js +7 -4
  82. package/dist/es/packages/barrage/barrage.js +24 -14
  83. package/dist/es/packages/calendar/style/calendar.scss +32 -1
  84. package/dist/es/packages/calendar/style/style.css +21 -1
  85. package/dist/es/packages/calendar/style/style.harmony.css +21 -1
  86. package/dist/es/packages/calendar/style-jmapp/calendar.scss +32 -1
  87. package/dist/es/packages/calendar/style-jmapp/style.css +21 -1
  88. package/dist/es/packages/calendar/style-jrkf/calendar.scss +32 -1
  89. package/dist/es/packages/calendar/style-jrkf/style.css +21 -1
  90. package/dist/es/packages/calendarcard/icon.js +5 -15
  91. package/dist/es/packages/calendarcard/style/calendarcard.scss +19 -0
  92. package/dist/es/packages/calendarcard/style/style.css +13 -0
  93. package/dist/es/packages/calendarcard/style/style.harmony.css +13 -0
  94. package/dist/es/packages/calendarcard/style-jmapp/calendarcard.scss +19 -0
  95. package/dist/es/packages/calendarcard/style-jmapp/style.css +13 -0
  96. package/dist/es/packages/calendarcard/style-jrkf/calendarcard.scss +19 -0
  97. package/dist/es/packages/calendarcard/style-jrkf/style.css +13 -0
  98. package/dist/es/packages/cascader/cascader.js +21 -12
  99. package/dist/es/packages/collapseitem/collapseitem.js +7 -4
  100. package/dist/es/packages/countdown/countdown.js +2 -1
  101. package/dist/es/packages/dialog/dialog.js +7 -4
  102. package/dist/es/packages/drag/drag.js +7 -4
  103. package/dist/es/packages/elevator/elevator.js +7 -4
  104. package/dist/es/packages/ellipsis/ellipsis.js +30 -17
  105. package/dist/es/packages/form/index.js +1 -0
  106. package/dist/es/packages/form/useform.js +53 -46
  107. package/dist/es/packages/infiniteloading/infiniteloading.js +14 -8
  108. package/dist/es/packages/inputnumber/inputnumber.js +28 -16
  109. package/dist/es/packages/lottie/types.js +1 -1
  110. package/dist/es/packages/menuitem/menuitem.js +22 -24
  111. package/dist/es/packages/noticebar/noticebar.js +70 -74
  112. package/dist/es/packages/pickerview/pickerroller.js +7 -4
  113. package/dist/es/packages/pickerview/pickerview.js +2 -1
  114. package/dist/es/packages/popover/popover.js +77 -75
  115. package/dist/es/packages/popup/popup.js +14 -8
  116. package/dist/es/packages/pulltorefresh/pulltorefresh.js +56 -52
  117. package/dist/es/packages/radio/index.js +1 -0
  118. package/dist/es/packages/range/range.js +28 -16
  119. package/dist/es/packages/sticky/sticky.js +7 -4
  120. package/dist/es/packages/swipe/swipe.js +14 -8
  121. package/dist/es/packages/swiper/index.js +1 -0
  122. package/dist/es/packages/switch/switch.js +7 -4
  123. package/dist/es/packages/uploader/uploader.js +51 -38
  124. package/dist/es/packages/watermark/watermark.js +8 -4
  125. package/dist/es/types/spec/address/base.js +1 -1
  126. package/dist/es/utils/event-mocker.js +12 -4
  127. package/dist/es/utils/render.js +6 -2
  128. package/dist/es/utils/taro/get-rect.js +20 -10
  129. package/dist/nutui.react.umd.js +860 -660
  130. package/dist/style-jmapp.css +1 -1
  131. package/dist/style-jmapp.scss +38 -38
  132. package/dist/style-jrkf.css +1 -1
  133. package/dist/style-jrkf.scss +31 -31
  134. package/dist/style.css +1 -1
  135. package/dist/style.scss +26 -26
  136. package/package.json +1 -1
@@ -81,8 +81,8 @@ export var Sticky = function(props) {
81
81
  threshold,
82
82
  zIndex
83
83
  ]);
84
- var handleScroll = function(scrollTop) {
85
- return _async_to_generator(function() {
84
+ var handleScroll = /*#__PURE__*/ function() {
85
+ var _ref = _async_to_generator(function(scrollTop) {
86
86
  var curRootRect, stickyRect, containerRect, difference, curTransform, curFixed, windowHeight;
87
87
  return _ts_generator(this, function(_state) {
88
88
  switch(_state.label){
@@ -150,8 +150,11 @@ export var Sticky = function(props) {
150
150
  ];
151
151
  }
152
152
  });
153
- })();
154
- };
153
+ });
154
+ return function handleScroll(scrollTop) {
155
+ return _ref.apply(this, arguments);
156
+ };
157
+ }();
155
158
  var getElement = useCallback(function() {
156
159
  return getScrollParent(rootRef.current);
157
160
  }, []);
@@ -29,8 +29,8 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
29
29
  var uid = useUuid();
30
30
  var leftId = "swipe-left-".concat(uid);
31
31
  var rightId = "swipe-right-".concat(uid);
32
- var getWidth = function() {
33
- return _async_to_generator(function() {
32
+ var getWidth = /*#__PURE__*/ function() {
33
+ var _ref = _async_to_generator(function() {
34
34
  var leftRect, rightRect;
35
35
  return _ts_generator(this, function(_state) {
36
36
  switch(_state.label){
@@ -74,8 +74,11 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
74
74
  ];
75
75
  }
76
76
  });
77
- })();
78
- };
77
+ });
78
+ return function getWidth() {
79
+ return _ref.apply(this, arguments);
80
+ };
81
+ }();
79
82
  // 获取元素的时候要在页面 onReady 后,需要参考小程序的事件周期
80
83
  useReady(function() {
81
84
  nextTick(function() {
@@ -117,8 +120,8 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
117
120
  state.offset,
118
121
  state.dragging
119
122
  ]);
120
- var onTouchStart = function(event) {
121
- return _async_to_generator(function() {
123
+ var onTouchStart = /*#__PURE__*/ function() {
124
+ var _ref = _async_to_generator(function(event) {
122
125
  var _props_onTouchStart;
123
126
  return _ts_generator(this, function(_state) {
124
127
  if (!props.disabled) {
@@ -132,8 +135,11 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
132
135
  2
133
136
  ];
134
137
  });
135
- })();
136
- };
138
+ });
139
+ return function onTouchStart(event) {
140
+ return _ref.apply(this, arguments);
141
+ };
142
+ }();
137
143
  var onTouchMove = function(event) {
138
144
  var _props_onTouchMove;
139
145
  if (props.disabled) return;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { Swiper } from "./swiper";
2
3
  import SwiperItem from "../swiperitem/index";
3
4
  var InnerSwiper = Swiper;
@@ -63,8 +63,8 @@ export var Switch = function(props) {
63
63
  (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-close"), !value), _define_property(_obj, "".concat(classPrefix, "-disabled"), disabled), _define_property(_obj, "".concat(classPrefix, "-disabled-close"), disabled && !value), _obj)
64
64
  ]);
65
65
  };
66
- var onClick = function() {
67
- return _async_to_generator(function() {
66
+ var onClick = /*#__PURE__*/ function() {
67
+ var _ref = _async_to_generator(function() {
68
68
  var e;
69
69
  return _ts_generator(this, function(_state) {
70
70
  switch(_state.label){
@@ -109,8 +109,11 @@ export var Switch = function(props) {
109
109
  ];
110
110
  }
111
111
  });
112
- })();
113
- };
112
+ });
113
+ return function onClick() {
114
+ return _ref.apply(this, arguments);
115
+ };
116
+ }();
114
117
  var _obj, _obj1;
115
118
  return /*#__PURE__*/ React.createElement(View, _object_spread({
116
119
  className: classes(),
@@ -106,24 +106,22 @@ var InternalUploader = function(props, ref) {
106
106
  var classes = classNames(className, 'nut-uploader');
107
107
  useImperativeHandle(ref, function() {
108
108
  return {
109
- submit: function() {
110
- return _async_to_generator(function() {
111
- return _ts_generator(this, function(_state) {
112
- switch(_state.label){
113
- case 0:
114
- return [
115
- 4,
116
- uploadAction(uploadQueue)
117
- ];
118
- case 1:
119
- _state.sent();
120
- return [
121
- 2
122
- ];
123
- }
124
- });
125
- })();
126
- },
109
+ submit: /*#__PURE__*/ _async_to_generator(function() {
110
+ return _ts_generator(this, function(_state) {
111
+ switch(_state.label){
112
+ case 0:
113
+ return [
114
+ 4,
115
+ uploadAction(uploadQueue)
116
+ ];
117
+ case 1:
118
+ _state.sent();
119
+ return [
120
+ 2
121
+ ];
122
+ }
123
+ });
124
+ }),
127
125
  clear: function() {
128
126
  clearUploadQueue();
129
127
  }
@@ -192,8 +190,8 @@ var InternalUploader = function(props, ref) {
192
190
  });
193
191
  }
194
192
  };
195
- var uploadAction = function(tasks) {
196
- return _async_to_generator(function() {
193
+ var uploadAction = /*#__PURE__*/ function() {
194
+ var _ref = _async_to_generator(function(tasks) {
197
195
  var taskIds, list;
198
196
  return _ts_generator(this, function(_state) {
199
197
  switch(_state.label){
@@ -213,8 +211,8 @@ var InternalUploader = function(props, ref) {
213
211
  setFileList(list);
214
212
  return [
215
213
  4,
216
- Promise.all(tasks.map(function(currentTask, index) {
217
- return _async_to_generator(function() {
214
+ Promise.all(tasks.map(/*#__PURE__*/ function() {
215
+ var _ref = _async_to_generator(function(currentTask, index) {
218
216
  var result, list, e, list1;
219
217
  return _ts_generator(this, function(_state) {
220
218
  switch(_state.label){
@@ -261,8 +259,11 @@ var InternalUploader = function(props, ref) {
261
259
  ];
262
260
  }
263
261
  });
264
- })();
265
- })).catch(function(errs) {
262
+ });
263
+ return function(currentTask, index) {
264
+ return _ref.apply(this, arguments);
265
+ };
266
+ }())).catch(function(errs) {
266
267
  return console.error(errs);
267
268
  })
268
269
  ];
@@ -273,11 +274,14 @@ var InternalUploader = function(props, ref) {
273
274
  ];
274
275
  }
275
276
  });
276
- })();
277
- };
277
+ });
278
+ return function uploadAction(tasks) {
279
+ return _ref.apply(this, arguments);
280
+ };
281
+ }();
278
282
  var idCountRef = useRef(0);
279
- var readFile = function(files) {
280
- return _async_to_generator(function() {
283
+ var readFile = /*#__PURE__*/ function() {
284
+ var _ref = _async_to_generator(function(files) {
281
285
  var tasks;
282
286
  return _ts_generator(this, function(_state) {
283
287
  switch(_state.label){
@@ -335,8 +339,11 @@ var InternalUploader = function(props, ref) {
335
339
  ];
336
340
  }
337
341
  });
338
- })();
339
- };
342
+ });
343
+ return function readFile(files) {
344
+ return _ref.apply(this, arguments);
345
+ };
346
+ }();
340
347
  var filterFiles = function(files) {
341
348
  var maximum = maxCount * 1;
342
349
  var maximize = maxFileSize * 1;
@@ -375,8 +382,8 @@ var InternalUploader = function(props, ref) {
375
382
  }
376
383
  });
377
384
  };
378
- var onChangeMedia = function(res) {
379
- return _async_to_generator(function() {
385
+ var onChangeMedia = /*#__PURE__*/ function() {
386
+ var _ref = _async_to_generator(function(res) {
380
387
  var tempFiles, _files;
381
388
  return _ts_generator(this, function(_state) {
382
389
  // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
@@ -395,10 +402,13 @@ var InternalUploader = function(props, ref) {
395
402
  2
396
403
  ];
397
404
  });
398
- })();
399
- };
400
- var onChangeImage = function(res) {
401
- return _async_to_generator(function() {
405
+ });
406
+ return function onChangeMedia(res) {
407
+ return _ref.apply(this, arguments);
408
+ };
409
+ }();
410
+ var onChangeImage = /*#__PURE__*/ function() {
411
+ var _ref = _async_to_generator(function(res) {
402
412
  var tempFiles, _files;
403
413
  return _ts_generator(this, function(_state) {
404
414
  tempFiles = res.tempFiles;
@@ -416,8 +426,11 @@ var InternalUploader = function(props, ref) {
416
426
  2
417
427
  ];
418
428
  });
419
- })();
420
- };
429
+ });
430
+ return function onChangeImage(res) {
431
+ return _ref.apply(this, arguments);
432
+ };
433
+ }();
421
434
  var handleItemClick = function(file, index) {
422
435
  onFileItemClick === null || onFileItemClick === void 0 ? void 0 : onFileItemClick(file, index);
423
436
  };
@@ -79,16 +79,20 @@ export var WaterMark = function(props) {
79
79
  setBase64Url(canvas.toDataURL());
80
80
  };
81
81
  } else if (content) {
82
- ctx.textBaseline = 'middle'; // 设置或返回在绘制文本时使用的当前文本基线。(正中)
83
- ctx.textAlign = 'center'; // 设置或返回文本内容的当前对齐方式。
82
+ ctx.textBaseline = 'middle' // 设置或返回在绘制文本时使用的当前文本基线。(正中)
83
+ ;
84
+ ctx.textAlign = 'center' // 设置或返回文本内容的当前对齐方式。
85
+ ;
84
86
  // 文字绕中间旋转
85
87
  ctx.translate(markWidth / 2, markHeight / 2);
86
88
  ctx.rotate(Math.PI / 180 * Number(rotate));
87
89
  var markSize = Number(fontSize) * ratio;
88
90
  ctx.font = "".concat(fontStyle, " normal ").concat(fontWeight, " ").concat(markSize, "px/").concat(markHeight, "px ").concat(fontFamily);
89
91
  ctx.fillStyle = color;
90
- ctx.fillText(content, startX, startY); // 在画布上绘制"被填充的"文本。
91
- ctx.restore(); // 返回之前保存过的路径状态和属性。
92
+ ctx.fillText(content, startX, startY) // 在画布上绘制"被填充的"文本。
93
+ ;
94
+ ctx.restore() // 返回之前保存过的路径状态和属性。
95
+ ;
92
96
  setBase64Url(canvas.toDataURL());
93
97
  }
94
98
  } else {
@@ -1 +1 @@
1
- export { };
1
+ import React from "react";
@@ -72,7 +72,10 @@ export function triggerDrag(el) {
72
72
  * @param {number} endY 结束触摸点的 Y 坐标
73
73
  * @param {number} duration 移动持续时间(毫秒)
74
74
  */ export function simulateTouchMove(element, startX, startY, endX, endY, duration) {
75
- return _async_to_generator(function() {
75
+ return _simulateTouchMove.apply(this, arguments);
76
+ }
77
+ function _simulateTouchMove() {
78
+ _simulateTouchMove = _async_to_generator(function(element, startX, startY, endX, endY, duration) {
76
79
  var touch, touchList, distanceX, distanceY, startTime, elapsed, progress, currentX, currentY, currentTouch, currentTouchList;
77
80
  return _ts_generator(this, function(_state) {
78
81
  switch(_state.label){
@@ -125,7 +128,8 @@ export function triggerDrag(el) {
125
128
  ];
126
129
  }
127
130
  });
128
- })();
131
+ });
132
+ return _simulateTouchMove.apply(this, arguments);
129
133
  }
130
134
  /**
131
135
  * 模拟触摸缩放方法
@@ -134,7 +138,10 @@ export function triggerDrag(el) {
134
138
  * @param {number} endDistance 结束触摸点的距离
135
139
  * @param {number} duration 缩放持续时间(毫秒)
136
140
  */ export function simulateTouchZoom(element, startDistance, endDistance, duration) {
137
- return _async_to_generator(function() {
141
+ return _simulateTouchZoom.apply(this, arguments);
142
+ }
143
+ function _simulateTouchZoom() {
144
+ _simulateTouchZoom = _async_to_generator(function(element, startDistance, endDistance, duration) {
138
145
  var centerX, centerY, startScale, endScale, startTouches, endTouches, progress, currentScale, currentDistance, currentTouches;
139
146
  return _ts_generator(this, function(_state) {
140
147
  switch(_state.label){
@@ -194,5 +201,6 @@ export function triggerDrag(el) {
194
201
  ];
195
202
  }
196
203
  });
197
- })();
204
+ });
205
+ return _simulateTouchZoom.apply(this, arguments);
198
206
  }
@@ -45,7 +45,10 @@ function legacyUnmount(container) {
45
45
  return unmountComponentAtNode(container);
46
46
  }
47
47
  function concurrentUnmount(container) {
48
- return _async_to_generator(function() {
48
+ return _concurrentUnmount.apply(this, arguments);
49
+ }
50
+ function _concurrentUnmount() {
51
+ _concurrentUnmount = _async_to_generator(function(container) {
49
52
  return _ts_generator(this, function(_state) {
50
53
  // Delay to unmount to avoid React 18 sync warning
51
54
  return [
@@ -57,7 +60,8 @@ function concurrentUnmount(container) {
57
60
  })
58
61
  ];
59
62
  });
60
- })();
63
+ });
64
+ return _concurrentUnmount.apply(this, arguments);
61
65
  }
62
66
  export function unmount(container) {
63
67
  if (createRoot) {
@@ -15,10 +15,12 @@ export function makeRect(width, height) {
15
15
  height: height
16
16
  };
17
17
  }
18
- export var getRectInMultiPlatform = function(element) {
19
- var harmonyId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
20
- return _async_to_generator(function() {
18
+ export var getRectInMultiPlatform = /*#__PURE__*/ function() {
19
+ var _ref = _async_to_generator(function(element) {
20
+ var harmonyId;
21
+ var _arguments = arguments;
21
22
  return _ts_generator(this, function(_state) {
23
+ harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : '';
22
24
  if (element) {
23
25
  if (inBrowser) {
24
26
  return [
@@ -49,13 +51,18 @@ export var getRectInMultiPlatform = function(element) {
49
51
  Promise.resolve(makeRect(0, 0))
50
52
  ];
51
53
  });
52
- })();
53
- };
54
+ });
55
+ return function getRectInMultiPlatform(element) {
56
+ return _ref.apply(this, arguments);
57
+ };
58
+ }();
54
59
  // 获取元素位置,不走缓存
55
- export var getRectInMultiPlatformWithoutCache = function(element) {
56
- var harmonyId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
57
- return _async_to_generator(function() {
60
+ export var getRectInMultiPlatformWithoutCache = /*#__PURE__*/ function() {
61
+ var _ref = _async_to_generator(function(element) {
62
+ var harmonyId;
63
+ var _arguments = arguments;
58
64
  return _ts_generator(this, function(_state) {
65
+ harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : '';
59
66
  if (element) {
60
67
  if (inBrowser) {
61
68
  return [
@@ -78,5 +85,8 @@ export var getRectInMultiPlatformWithoutCache = function(element) {
78
85
  Promise.resolve(makeRect(0, 0))
79
86
  ];
80
87
  });
81
- })();
82
- };
88
+ });
89
+ return function getRectInMultiPlatformWithoutCache(element) {
90
+ return _ref.apply(this, arguments);
91
+ };
92
+ }();