@nutui/nutui-react-taro 3.0.8 → 3.0.9-beta.1
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 +13 -14
- package/dist/cjs/hooks/index.d.ts +14 -0
- package/dist/cjs/hooks/index.js +19 -0
- package/dist/cjs/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
- package/dist/cjs/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
- package/dist/cjs/hooks/use-memo.d.ts +1 -1
- package/dist/cjs/hooks/use-memo.js +1 -1
- package/dist/cjs/hooks/use-refs.d.ts +1 -1
- package/dist/cjs/hooks/use-refs.js +1 -1
- package/dist/cjs/hooks/use-uuid.d.ts +1 -1
- package/dist/cjs/hooks/use-uuid.js +1 -1
- package/dist/cjs/hooks/use-watch.d.ts +2 -2
- package/dist/cjs/hooks/use-watch.js +2 -3
- package/dist/cjs/packages/address/address.d.ts +1 -1
- package/dist/cjs/packages/avatar/avatar.js +6 -6
- package/dist/cjs/packages/avatarcropper/avatarcropper.js +1 -1
- package/dist/cjs/packages/badge/badge.js +5 -5
- package/dist/cjs/packages/barrage/barrage.js +3 -3
- package/dist/cjs/packages/button/button.js +3 -3
- package/dist/cjs/packages/cell/cell.js +2 -2
- package/dist/cjs/packages/col/col.js +3 -3
- package/dist/cjs/packages/collapseitem/collapseitem.js +4 -4
- package/dist/cjs/packages/configprovider/configprovider.js +2 -2
- package/dist/cjs/packages/countdown/countdown.js +2 -2
- package/dist/cjs/packages/dialog/dialog.js +5 -5
- package/dist/cjs/packages/drag/drag.js +5 -5
- package/dist/cjs/packages/elevator/elevator.js +4 -4
- package/dist/cjs/packages/ellipsis/ellipsis.js +4 -4
- package/dist/cjs/packages/griditem/griditem.js +4 -4
- package/dist/cjs/packages/hoverbutton/hoverbutton.js +2 -2
- package/dist/cjs/packages/hoverbuttonitem/hoverbuttonitem.js +2 -2
- package/dist/cjs/packages/image/image.js +2 -2
- package/dist/cjs/packages/indicator/indicator.js +2 -2
- package/dist/cjs/packages/infiniteloading/infiniteloading.js +2 -2
- package/dist/cjs/packages/lottie/lottiemp.js +3 -3
- package/dist/cjs/packages/menuitem/menuitem.js +4 -4
- package/dist/cjs/packages/noticebar/noticebar.js +4 -4
- package/dist/cjs/packages/notify/notify.js +5 -5
- package/dist/cjs/packages/nutui.react.build.d.ts +2 -0
- package/dist/cjs/packages/nutui.react.build.js +2 -0
- package/dist/cjs/packages/nutui.react.d.ts +2 -0
- package/dist/cjs/packages/nutui.react.js +2 -0
- package/dist/cjs/packages/overlay/overlay.js +2 -2
- package/dist/cjs/packages/pagination/pagination.js +3 -3
- package/dist/cjs/packages/picker/picker.js +2 -2
- package/dist/cjs/packages/pickerview/pickerroller.js +7 -7
- package/dist/cjs/packages/popover/popover.js +15 -15
- package/dist/cjs/packages/popup/popup.js +4 -4
- package/dist/cjs/packages/price/price.js +2 -2
- package/dist/cjs/packages/progress/progress.js +13 -13
- package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +4 -4
- package/dist/cjs/packages/range/range.js +13 -13
- package/dist/cjs/packages/rate/rate.js +4 -4
- package/dist/cjs/packages/sidebar/sidebar.js +2 -2
- package/dist/cjs/packages/sticky/sticky.js +7 -7
- package/dist/cjs/packages/swipe/swipe.js +10 -10
- package/dist/cjs/packages/swiper/swiper.js +4 -4
- package/dist/cjs/packages/tabs/tabs.js +2 -2
- package/dist/cjs/packages/toast/toast.js +3 -3
- package/dist/cjs/packages/tour/tour.js +2 -2
- package/dist/cjs/packages/trendarrow/trendarrow.js +3 -3
- package/dist/cjs/packages/virtuallist/virtuallist.js +1 -1
- package/dist/cjs/utils/clamp.d.ts +1 -0
- package/dist/cjs/utils/clamp.js +13 -0
- package/dist/cjs/utils/event-mocker.d.ts +21 -0
- package/dist/cjs/utils/index.d.ts +34 -6
- package/dist/cjs/utils/index.js +35 -54
- package/dist/cjs/utils/interceptor.js +2 -2
- package/dist/cjs/utils/is-function.d.ts +1 -0
- package/dist/cjs/utils/is-function.js +14 -0
- package/dist/cjs/utils/is-object.d.ts +1 -0
- package/dist/cjs/utils/is-object.js +14 -0
- package/dist/cjs/utils/is-promise.d.ts +1 -0
- package/dist/cjs/utils/is-promise.js +15 -0
- package/dist/cjs/utils/lru.d.ts +1 -1
- package/dist/cjs/utils/lru.js +1 -1
- package/dist/cjs/utils/merge.d.ts +0 -1
- package/dist/cjs/utils/merge.js +0 -4
- package/dist/cjs/utils/prevent-default.d.ts +1 -0
- package/dist/cjs/utils/prevent-default.js +18 -0
- package/dist/cjs/utils/raf.d.ts +0 -1
- package/dist/cjs/utils/raf.js +3 -6
- package/dist/{es/utils → cjs/utils/taro}/add-color-for-harmony.d.ts +1 -2
- package/dist/cjs/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +5 -11
- package/dist/cjs/utils/taro/get-rect-by-id.d.ts +1 -0
- package/dist/cjs/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +3 -3
- package/dist/cjs/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
- package/dist/cjs/utils/{get-rect-by-taro.js → taro/get-rect.js} +9 -10
- package/dist/cjs/utils/taro/px-transform.d.ts +1 -0
- package/dist/cjs/utils/{px-transform.js → taro/px-transform.js} +3 -3
- package/dist/cjs/utils/upper-case-first.d.ts +1 -0
- package/dist/cjs/utils/upper-case-first.js +17 -0
- package/dist/es/hooks/index.d.ts +14 -0
- package/dist/es/hooks/index.js +14 -0
- package/dist/es/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
- package/dist/es/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
- package/dist/es/hooks/use-memo.d.ts +1 -1
- package/dist/es/hooks/use-memo.js +1 -1
- package/dist/es/hooks/use-refs.d.ts +1 -1
- package/dist/es/hooks/use-refs.js +1 -1
- package/dist/es/hooks/use-uuid.d.ts +1 -1
- package/dist/es/hooks/use-uuid.js +1 -1
- package/dist/es/hooks/use-watch.d.ts +2 -2
- package/dist/es/hooks/use-watch.js +1 -2
- package/dist/es/packages/address/address.d.ts +1 -1
- package/dist/es/packages/avatar/avatar.js +2 -2
- package/dist/es/packages/avatarcropper/avatarcropper.js +1 -1
- package/dist/es/packages/badge/badge.js +2 -2
- package/dist/es/packages/barrage/barrage.js +3 -3
- package/dist/es/packages/button/button.js +1 -1
- package/dist/es/packages/cell/cell.js +1 -1
- package/dist/es/packages/col/col.js +1 -1
- package/dist/es/packages/collapseitem/collapseitem.js +3 -3
- package/dist/es/packages/configprovider/configprovider.js +1 -1
- package/dist/es/packages/countdown/countdown.js +1 -1
- package/dist/es/packages/dialog/dialog.js +3 -3
- package/dist/es/packages/drag/drag.js +4 -4
- package/dist/es/packages/elevator/elevator.js +2 -2
- package/dist/es/packages/ellipsis/ellipsis.js +4 -4
- package/dist/es/packages/griditem/griditem.js +1 -1
- package/dist/es/packages/hoverbutton/hoverbutton.js +1 -1
- package/dist/es/packages/hoverbuttonitem/hoverbuttonitem.js +1 -1
- package/dist/es/packages/image/image.js +1 -1
- package/dist/es/packages/indicator/indicator.js +1 -1
- package/dist/es/packages/infiniteloading/infiniteloading.js +1 -1
- package/dist/es/packages/lottie/lottiemp.js +2 -2
- package/dist/es/packages/menuitem/menuitem.js +4 -4
- package/dist/es/packages/noticebar/noticebar.js +4 -4
- package/dist/es/packages/notify/notify.js +3 -3
- package/dist/es/packages/nutui.react.build.d.ts +2 -0
- package/dist/es/packages/nutui.react.build.js +2 -0
- package/dist/es/packages/overlay/overlay.js +1 -1
- package/dist/es/packages/pagination/pagination.js +1 -1
- package/dist/es/packages/picker/picker.js +1 -1
- package/dist/es/packages/pickerview/pickerroller.js +4 -4
- package/dist/es/packages/popover/popover.js +6 -6
- package/dist/es/packages/popup/popup.js +2 -2
- package/dist/es/packages/price/price.js +1 -1
- package/dist/es/packages/progress/progress.js +3 -3
- package/dist/es/packages/pulltorefresh/pulltorefresh.js +2 -2
- package/dist/es/packages/range/range.js +5 -5
- package/dist/es/packages/rate/rate.js +3 -3
- package/dist/es/packages/sidebar/sidebar.js +1 -1
- package/dist/es/packages/sticky/sticky.js +6 -6
- package/dist/es/packages/swipe/swipe.js +7 -7
- package/dist/es/packages/swiper/swiper.js +1 -1
- package/dist/es/packages/tabs/tabs.js +1 -1
- package/dist/es/packages/toast/toast.js +2 -2
- package/dist/es/packages/tour/tour.js +2 -2
- package/dist/es/packages/trendarrow/trendarrow.js +1 -1
- package/dist/es/packages/virtuallist/virtuallist.js +1 -1
- package/dist/es/utils/clamp.d.ts +1 -0
- package/dist/es/utils/clamp.js +3 -0
- package/dist/es/utils/event-mocker.d.ts +21 -0
- package/dist/es/utils/index.d.ts +34 -6
- package/dist/es/utils/index.js +34 -29
- package/dist/es/utils/interceptor.js +1 -1
- package/dist/es/utils/is-function.d.ts +1 -0
- package/dist/es/utils/is-function.js +4 -0
- package/dist/es/utils/is-object.d.ts +1 -0
- package/dist/es/utils/is-object.js +4 -0
- package/dist/es/utils/is-promise.d.ts +1 -0
- package/dist/es/utils/is-promise.js +5 -0
- package/dist/es/utils/lru.d.ts +1 -1
- package/dist/es/utils/lru.js +1 -2
- package/dist/es/utils/merge.d.ts +0 -1
- package/dist/es/utils/merge.js +0 -1
- package/dist/es/utils/prevent-default.d.ts +1 -0
- package/dist/es/utils/prevent-default.js +8 -0
- package/dist/es/utils/raf.d.ts +0 -1
- package/dist/es/utils/raf.js +1 -1
- package/dist/{cjs/utils → es/utils/taro}/add-color-for-harmony.d.ts +1 -2
- package/dist/es/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +2 -3
- package/dist/es/utils/taro/get-rect-by-id.d.ts +1 -0
- package/dist/es/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +1 -1
- package/dist/es/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
- package/dist/es/utils/{get-rect-by-taro.js → taro/get-rect.js} +4 -4
- package/dist/es/utils/taro/px-transform.d.ts +1 -0
- package/dist/es/utils/{px-transform.js → taro/px-transform.js} +2 -2
- package/dist/es/utils/upper-case-first.d.ts +1 -0
- package/dist/es/utils/upper-case-first.js +7 -0
- package/dist/nutui.react.umd.js +506 -217
- package/dist/style.css +1 -1
- package/dist/style.scss +48 -48
- package/package.json +1 -1
- package/dist/cjs/hooks/use-taro-rect.d.ts +0 -1
- package/dist/cjs/utils/px-transform.d.ts +0 -1
- package/dist/es/hooks/use-taro-rect.d.ts +0 -1
- package/dist/es/utils/px-transform.d.ts +0 -1
- /package/dist/cjs/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
- /package/dist/cjs/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
- /package/dist/cjs/utils/{test/event.js → event-mocker.js} +0 -0
- /package/dist/cjs/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
- /package/dist/cjs/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
- /package/dist/cjs/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
- /package/dist/cjs/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
- /package/dist/cjs/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
- /package/dist/cjs/utils/{platform-taro.js → taro/platform.js} +0 -0
- /package/dist/es/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
- /package/dist/es/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
- /package/dist/es/utils/{test/event.js → event-mocker.js} +0 -0
- /package/dist/es/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
- /package/dist/es/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
- /package/dist/es/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
- /package/dist/es/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
- /package/dist/es/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
- /package/dist/es/utils/{platform-taro.js → taro/platform.js} +0 -0
|
@@ -4,7 +4,7 @@ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_
|
|
|
4
4
|
import React, { useContext } from "react";
|
|
5
5
|
import classNames from "classnames";
|
|
6
6
|
import { View } from "@tarojs/components";
|
|
7
|
-
import pxTransform from "../../utils/px-transform";
|
|
7
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
8
8
|
import GridContext from "../grid/context";
|
|
9
9
|
var defaultProps = {
|
|
10
10
|
text: '',
|
|
@@ -7,7 +7,7 @@ import { ComponentDefaults } from "../../utils/typings";
|
|
|
7
7
|
import { useRtl } from "../configprovider/index";
|
|
8
8
|
import HoverButtonItem from "../hoverbuttonitem/index";
|
|
9
9
|
import SafeArea from "../safearea/index";
|
|
10
|
-
import pxTransform from "../../utils/px-transform";
|
|
10
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
11
11
|
import { UI_BOTTOM_DISTANCE } from "./utils";
|
|
12
12
|
var defaultProps = _object_spread({}, ComponentDefaults);
|
|
13
13
|
var classPrefix = 'nut-hoverbutton';
|
|
@@ -6,7 +6,7 @@ import React, { useMemo, useState } from "react";
|
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { View } from "@tarojs/components";
|
|
8
8
|
import { ComponentDefaults } from "../../utils/typings";
|
|
9
|
-
import { harmony } from "../../utils/platform
|
|
9
|
+
import { harmony } from "../../utils/taro/platform";
|
|
10
10
|
import { getIcon } from "./utils";
|
|
11
11
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
12
12
|
icon: null,
|
|
@@ -8,7 +8,7 @@ import Taro from "@tarojs/taro";
|
|
|
8
8
|
import { Image as TImage, View } from "@tarojs/components";
|
|
9
9
|
import { Image as ImageIcon, ImageError } from "@nutui/icons-react-taro";
|
|
10
10
|
import classNames from "classnames";
|
|
11
|
-
import pxTransform from "../../utils/px-transform";
|
|
11
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
12
12
|
var defaultProps = {
|
|
13
13
|
src: '',
|
|
14
14
|
error: true,
|
|
@@ -4,7 +4,7 @@ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
import classNames from "classnames";
|
|
6
6
|
import { View } from "@tarojs/components";
|
|
7
|
-
import pxTransform from "../../utils/px-transform";
|
|
7
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
8
8
|
var defaultProps = {
|
|
9
9
|
total: 2,
|
|
10
10
|
current: 0,
|
|
@@ -10,7 +10,7 @@ import { ScrollView, View } from "@tarojs/components";
|
|
|
10
10
|
import { createSelectorQuery } from "@tarojs/taro";
|
|
11
11
|
import { useConfig } from "../configprovider/index";
|
|
12
12
|
import { ComponentDefaults } from "../../utils/typings";
|
|
13
|
-
import pxTransform from "../../utils/px-transform";
|
|
13
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
14
14
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
15
15
|
type: 'default',
|
|
16
16
|
hasMore: true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useImperativeHandle, useRef } from "react";
|
|
2
2
|
import { createSelectorQuery, getEnv, useReady, useUnload } from "@tarojs/taro";
|
|
3
3
|
import lottie from "@nutui/lottie-miniprogram";
|
|
4
|
-
import { getWindowInfo } from "../../utils/get-system-info";
|
|
5
|
-
import useUuid from "../../hooks/use-uuid";
|
|
4
|
+
import { getWindowInfo } from "../../utils/taro/get-system-info";
|
|
5
|
+
import { useUuid } from "../../hooks/use-uuid";
|
|
6
6
|
export var Lottie = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
7
7
|
var uuid = useUuid();
|
|
8
8
|
var id = "nutLottie-".concat(uuid);
|
|
@@ -10,9 +10,9 @@ import { usePageScroll } from "@tarojs/taro";
|
|
|
10
10
|
import { View } from "@tarojs/components";
|
|
11
11
|
import { CSSTransition } from "react-transition-group";
|
|
12
12
|
import { Check } from "@nutui/icons-react-taro";
|
|
13
|
-
import { getWindowInfo } from "../../utils/get-system-info";
|
|
13
|
+
import { getWindowInfo } from "../../utils/taro/get-system-info";
|
|
14
14
|
import { Overlay } from "../overlay/overlay";
|
|
15
|
-
import {
|
|
15
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
16
16
|
import { ComponentDefaults } from "../../utils/typings";
|
|
17
17
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
18
18
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -56,7 +56,7 @@ export var MenuItem = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
56
56
|
p = parent.menuRef.current;
|
|
57
57
|
return [
|
|
58
58
|
4,
|
|
59
|
-
|
|
59
|
+
getRectInMultiPlatform(p)
|
|
60
60
|
];
|
|
61
61
|
case 1:
|
|
62
62
|
rect = _state.sent();
|
|
@@ -85,7 +85,7 @@ export var MenuItem = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
85
85
|
var updateItemOffset = useCallback(function() {
|
|
86
86
|
if (!parent.lockScroll) return;
|
|
87
87
|
var p = parent.menuRef.current;
|
|
88
|
-
|
|
88
|
+
getRectInMultiPlatform(p).then(function(rect) {
|
|
89
89
|
if (rect) {
|
|
90
90
|
setPosition({
|
|
91
91
|
height: rect.height,
|
|
@@ -8,7 +8,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
|
8
8
|
import { View } from "@tarojs/components";
|
|
9
9
|
import { Close, Notice } from "@nutui/icons-react-taro";
|
|
10
10
|
import classNames from "classnames";
|
|
11
|
-
import {
|
|
11
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
12
12
|
import { ComponentDefaults } from "../../utils/typings";
|
|
13
13
|
import { useRtl } from "../configprovider/index";
|
|
14
14
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -129,13 +129,13 @@ export var NoticeBar = function(props) {
|
|
|
129
129
|
}
|
|
130
130
|
return [
|
|
131
131
|
4,
|
|
132
|
-
|
|
132
|
+
getRectInMultiPlatform(wrapRef.current)
|
|
133
133
|
];
|
|
134
134
|
case 1:
|
|
135
135
|
warpRes = _state.sent();
|
|
136
136
|
return [
|
|
137
137
|
4,
|
|
138
|
-
|
|
138
|
+
getRectInMultiPlatform(contentRef.current)
|
|
139
139
|
];
|
|
140
140
|
case 2:
|
|
141
141
|
contentRes = _state.sent();
|
|
@@ -228,7 +228,7 @@ export var NoticeBar = function(props) {
|
|
|
228
228
|
case 0:
|
|
229
229
|
return [
|
|
230
230
|
4,
|
|
231
|
-
|
|
231
|
+
getRectInMultiPlatform(container === null || container === void 0 ? void 0 : container.current)
|
|
232
232
|
];
|
|
233
233
|
case 1:
|
|
234
234
|
rects = _state.sent();
|
|
@@ -7,10 +7,10 @@ import classNames from "classnames";
|
|
|
7
7
|
import { CSSTransition } from "react-transition-group";
|
|
8
8
|
import { View } from "@tarojs/components";
|
|
9
9
|
import { Close } from "@nutui/icons-react-taro";
|
|
10
|
-
import { web } from "../../utils/platform
|
|
11
|
-
import pxTransform from "../../utils/px-transform";
|
|
10
|
+
import { web } from "../../utils/taro/platform";
|
|
11
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
12
12
|
import { ComponentDefaults } from "../../utils/typings";
|
|
13
|
-
import { customEvents, useCustomEvent, useCustomEventsPath } from "../../hooks/use-custom-event";
|
|
13
|
+
import { customEvents, useCustomEvent, useCustomEventsPath } from "../../hooks/taro/use-custom-event";
|
|
14
14
|
import { mergeProps } from "../../utils/merge-props";
|
|
15
15
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
16
16
|
id: '',
|
|
@@ -207,4 +207,6 @@ export * from "./trendarrow/index";
|
|
|
207
207
|
import WaterMark from "./watermark/index";
|
|
208
208
|
export * from "./watermark/index";
|
|
209
209
|
export * from "../types";
|
|
210
|
+
export * from "../utils/index";
|
|
211
|
+
export * from "../hooks/index";
|
|
210
212
|
export { Button, Cell, CellGroup, ConfigProvider, Image, Overlay, Divider, Grid, GridItem, Layout, Col, Row, SafeArea, Space, Sticky, BackTop, Elevator, FixedNav, HoverButton, HoverButtonItem, NavBar, SideBar, SideBarItem, Tabbar, TabbarItem, TabPane, Tabs, Address, Calendar, CalendarItem, CalendarCard, Cascader, Checkbox, CheckboxGroup, DatePicker, DatePickerView, Form, FormItem, Input, InputNumber, Menu, MenuItem, NumberKeyboard, Picker, PickerView, Radio, RadioGroup, Range, Rate, SearchBar, ShortPassword, Signature, Switch, TextArea, Uploader, ActionSheet, Badge, Dialog, Drag, Empty, InfiniteLoading, Loading, NoticeBar, Notify, Popover, Popup, PullToRefresh, ResultPage, Skeleton, Swipe, Toast, Animate, AnimatingNumbers, Audio, Avatar, AvatarGroup, CircleProgress, Collapse, CollapseItem, CountDown, Ellipsis, ImagePreview, Indicator, Lottie, Pagination, Price, Progress, Segmented, Step, Steps, Swiper, SwiperItem, Table, Tag, Tour, Video, VirtualList, AvatarCropper, Barrage, Card, TimeDetail, TimeSelect, TrendArrow, WaterMark };
|
|
@@ -207,4 +207,6 @@ export * from "./trendarrow/index";
|
|
|
207
207
|
import WaterMark from "./watermark/index";
|
|
208
208
|
export * from "./watermark/index";
|
|
209
209
|
export * from "../types";
|
|
210
|
+
export * from "../utils/index";
|
|
211
|
+
export * from "../hooks/index";
|
|
210
212
|
export { Button, Cell, CellGroup, ConfigProvider, Image, Overlay, Divider, Grid, GridItem, Layout, Col, Row, SafeArea, Space, Sticky, BackTop, Elevator, FixedNav, HoverButton, HoverButtonItem, NavBar, SideBar, SideBarItem, Tabbar, TabbarItem, TabPane, Tabs, Address, Calendar, CalendarItem, CalendarCard, Cascader, Checkbox, CheckboxGroup, DatePicker, DatePickerView, Form, FormItem, Input, InputNumber, Menu, MenuItem, NumberKeyboard, Picker, PickerView, Radio, RadioGroup, Range, Rate, SearchBar, ShortPassword, Signature, Switch, TextArea, Uploader, ActionSheet, Badge, Dialog, Drag, Empty, InfiniteLoading, Loading, NoticeBar, Notify, Popover, Popup, PullToRefresh, ResultPage, Skeleton, Swipe, Toast, Animate, AnimatingNumbers, Audio, Avatar, AvatarGroup, CircleProgress, Collapse, CollapseItem, CountDown, Ellipsis, ImagePreview, Indicator, Lottie, Pagination, Price, Progress, Segmented, Step, Steps, Swiper, SwiperItem, Table, Tag, Tour, Video, VirtualList, AvatarCropper, Barrage, Card, TimeDetail, TimeSelect, TrendArrow, WaterMark };
|
|
@@ -7,7 +7,7 @@ import { CSSTransition } from "react-transition-group";
|
|
|
7
7
|
import classNames from "classnames";
|
|
8
8
|
import { View } from "@tarojs/components";
|
|
9
9
|
import { ComponentDefaults } from "../../utils/typings";
|
|
10
|
-
import { useLockScrollTaro } from "../../hooks/use-lock-scoll
|
|
10
|
+
import { useLockScrollTaro } from "../../hooks/taro/use-lock-scoll";
|
|
11
11
|
export var defaultOverlayProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
12
12
|
zIndex: 1000,
|
|
13
13
|
duration: 300,
|
|
@@ -9,7 +9,7 @@ import { View } from "@tarojs/components";
|
|
|
9
9
|
import { useConfig } from "../configprovider/index";
|
|
10
10
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
11
11
|
import { ComponentDefaults } from "../../utils/typings";
|
|
12
|
-
import addColorForHarmony from "../../utils/add-color-for-harmony";
|
|
12
|
+
import { addColorForHarmony } from "../../utils/taro/add-color-for-harmony";
|
|
13
13
|
import { usePagination } from "../../hooks/use-pagination";
|
|
14
14
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
15
15
|
defaultValue: 1,
|
|
@@ -10,7 +10,7 @@ import isEqual from "react-fast-compare";
|
|
|
10
10
|
import PickerView from "../pickerview/index";
|
|
11
11
|
import Popup from "../popup/index";
|
|
12
12
|
import SafeArea from "../safearea/index";
|
|
13
|
-
import useRefs from "../../hooks/use-refs";
|
|
13
|
+
import { useRefs } from "../../hooks/use-refs";
|
|
14
14
|
import { useConfig } from "../configprovider/index";
|
|
15
15
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
16
16
|
import { ComponentDefaults } from "../../utils/typings";
|
|
@@ -7,11 +7,11 @@ import classNames from "classnames";
|
|
|
7
7
|
import { View } from "@tarojs/components";
|
|
8
8
|
import { useTouch } from "../../hooks/use-touch";
|
|
9
9
|
import { passiveSupported } from "../../utils/supports-passive";
|
|
10
|
-
import { web } from "../../utils/platform
|
|
10
|
+
import { web } from "../../utils/taro/platform";
|
|
11
11
|
import { preventDefault } from "../../utils";
|
|
12
12
|
import { momentum, useStyles } from "./utils";
|
|
13
|
-
import useUuid from "../../hooks/use-uuid";
|
|
14
|
-
import {
|
|
13
|
+
import { useUuid } from "../../hooks/use-uuid";
|
|
14
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
15
15
|
var InternalPickerRoller = function(props, ref) {
|
|
16
16
|
var _props_keyIndex = props.keyIndex, keyIndex = _props_keyIndex === void 0 ? 0 : _props_keyIndex, _props_options = props.options, options = _props_options === void 0 ? [] : _props_options, _props_threeDimensional = props.threeDimensional, threeDimensional = _props_threeDimensional === void 0 ? true : _props_threeDimensional, _props_duration = props.duration, duration = _props_duration === void 0 ? 1000 : _props_duration, onSelect = props.onSelect, _props_renderLabel = props.renderLabel, renderLabel = _props_renderLabel === void 0 ? function(item) {
|
|
17
17
|
return item.label;
|
|
@@ -125,7 +125,7 @@ var InternalPickerRoller = function(props, ref) {
|
|
|
125
125
|
]);
|
|
126
126
|
return [
|
|
127
127
|
4,
|
|
128
|
-
|
|
128
|
+
getRectInMultiPlatform(placeholderRef.current)
|
|
129
129
|
];
|
|
130
130
|
case 1:
|
|
131
131
|
placeholder = _state.sent();
|
|
@@ -11,11 +11,11 @@ import { nextTick } from "@tarojs/taro";
|
|
|
11
11
|
import { Text, View } from "@tarojs/components";
|
|
12
12
|
import { ArrowRadius } from "@nutui/icons-react-taro";
|
|
13
13
|
import Popup from "../popup/index";
|
|
14
|
-
import {
|
|
14
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
15
15
|
import { ComponentDefaults } from "../../utils/typings";
|
|
16
16
|
import { useRtl } from "../configprovider/index";
|
|
17
|
-
import pxTransform from "../../utils/px-transform";
|
|
18
|
-
import useUuid from "../../hooks/use-uuid";
|
|
17
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
18
|
+
import { useUuid } from "../../hooks/use-uuid";
|
|
19
19
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
20
20
|
list: [],
|
|
21
21
|
theme: 'light',
|
|
@@ -88,7 +88,7 @@ export var Popover = function(props) {
|
|
|
88
88
|
];
|
|
89
89
|
return [
|
|
90
90
|
4,
|
|
91
|
-
|
|
91
|
+
getRectInMultiPlatform(document.querySelector("#".concat(targetId)), targetId)
|
|
92
92
|
];
|
|
93
93
|
case 1:
|
|
94
94
|
_tmp = _state.sent();
|
|
@@ -99,7 +99,7 @@ export var Popover = function(props) {
|
|
|
99
99
|
case 2:
|
|
100
100
|
return [
|
|
101
101
|
4,
|
|
102
|
-
|
|
102
|
+
getRectInMultiPlatform(popoverRef.current, popoverId)
|
|
103
103
|
];
|
|
104
104
|
case 3:
|
|
105
105
|
_tmp = _state.sent();
|
|
@@ -140,7 +140,7 @@ export var Popover = function(props) {
|
|
|
140
140
|
case 0:
|
|
141
141
|
return [
|
|
142
142
|
4,
|
|
143
|
-
|
|
143
|
+
getRectInMultiPlatform(popoverContentRef.current)
|
|
144
144
|
];
|
|
145
145
|
case 1:
|
|
146
146
|
rectContent = _state.sent();
|
|
@@ -10,8 +10,8 @@ import { Close } from "@nutui/icons-react-taro";
|
|
|
10
10
|
import { View } from "@tarojs/components";
|
|
11
11
|
import { defaultOverlayProps } from "../overlay/overlay";
|
|
12
12
|
import Overlay from "../overlay/index";
|
|
13
|
-
import { useLockScrollTaro } from "../../hooks/use-lock-scoll
|
|
14
|
-
import { harmony } from "../../utils/platform
|
|
13
|
+
import { useLockScrollTaro } from "../../hooks/taro/use-lock-scoll";
|
|
14
|
+
import { harmony } from "../../utils/taro/platform";
|
|
15
15
|
var defaultProps = _object_spread_props(_object_spread({}, defaultOverlayProps), {
|
|
16
16
|
position: 'center',
|
|
17
17
|
transition: '',
|
|
@@ -6,7 +6,7 @@ import { Text, View } from "@tarojs/components";
|
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { ComponentDefaults } from "../../utils/typings";
|
|
8
8
|
import { useRtl } from "../configprovider/index";
|
|
9
|
-
import { harmony } from "../../utils/platform
|
|
9
|
+
import { harmony } from "../../utils/taro/platform";
|
|
10
10
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
11
11
|
color: 'primary',
|
|
12
12
|
price: 0,
|
|
@@ -7,11 +7,11 @@ import React, { useEffect, useRef, useState } from "react";
|
|
|
7
7
|
import classNames from "classnames";
|
|
8
8
|
import Taro from "@tarojs/taro";
|
|
9
9
|
import { View } from "@tarojs/components";
|
|
10
|
-
import pxTransform from "../../utils/px-transform";
|
|
10
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
11
11
|
import { ComponentDefaults } from "../../utils/typings";
|
|
12
12
|
import { useRtl } from "../configprovider/index";
|
|
13
|
-
import useUuid from "../../hooks/use-uuid";
|
|
14
|
-
import { harmony, web } from "../../utils/platform
|
|
13
|
+
import { useUuid } from "../../hooks/use-uuid";
|
|
14
|
+
import { harmony, web } from "../../utils/taro/platform";
|
|
15
15
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
16
16
|
percent: 0,
|
|
17
17
|
showText: false,
|
|
@@ -14,8 +14,8 @@ import { useTouch } from "../../hooks/use-touch";
|
|
|
14
14
|
import { rubberbandIfOutOfBounds } from "../../utils/rubberband";
|
|
15
15
|
import { sleep } from "../../utils/sleep";
|
|
16
16
|
import { ComponentDefaults } from "../../utils/typings";
|
|
17
|
-
import pxTransform from "../../utils/px-transform";
|
|
18
|
-
import { getDeviceInfo } from "../../utils/get-system-info";
|
|
17
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
18
|
+
import { getDeviceInfo } from "../../utils/taro/get-system-info";
|
|
19
19
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
20
20
|
type: 'default',
|
|
21
21
|
pullingText: '',
|
|
@@ -7,13 +7,13 @@ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
|
7
7
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import { Text, View } from "@tarojs/components";
|
|
10
|
-
import pxTransform from "../../utils/px-transform";
|
|
10
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
11
11
|
import { useTouch } from "../../hooks/use-touch";
|
|
12
12
|
import { ComponentDefaults } from "../../utils/typings";
|
|
13
13
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
14
|
-
import {
|
|
14
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
15
15
|
import { useRtl } from "../configprovider/index";
|
|
16
|
-
import { harmony } from "../../utils/platform
|
|
16
|
+
import { harmony } from "../../utils/taro/platform";
|
|
17
17
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
18
18
|
range: false,
|
|
19
19
|
min: 0,
|
|
@@ -242,7 +242,7 @@ export var Range = function(props) {
|
|
|
242
242
|
setDragStatus('');
|
|
243
243
|
return [
|
|
244
244
|
4,
|
|
245
|
-
|
|
245
|
+
getRectInMultiPlatform(root.current)
|
|
246
246
|
];
|
|
247
247
|
case 1:
|
|
248
248
|
rect = _state.sent();
|
|
@@ -332,7 +332,7 @@ export var Range = function(props) {
|
|
|
332
332
|
setDragStatus('draging');
|
|
333
333
|
return [
|
|
334
334
|
4,
|
|
335
|
-
|
|
335
|
+
getRectInMultiPlatform(root.current)
|
|
336
336
|
];
|
|
337
337
|
case 1:
|
|
338
338
|
rect = _state.sent();
|
|
@@ -9,8 +9,8 @@ import { useReady } from "@tarojs/taro";
|
|
|
9
9
|
import { Text, View } from "@tarojs/components";
|
|
10
10
|
import { ComponentDefaults } from "../../utils/typings";
|
|
11
11
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
12
|
-
import {
|
|
13
|
-
import useRefs from "../../hooks/use-refs";
|
|
12
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
13
|
+
import { useRefs } from "../../hooks/use-refs";
|
|
14
14
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
15
15
|
size: 'normal',
|
|
16
16
|
showScore: false,
|
|
@@ -88,7 +88,7 @@ export var Rate = function(props) {
|
|
|
88
88
|
var _loop = function(index) {
|
|
89
89
|
var item = refs[index];
|
|
90
90
|
if (item) {
|
|
91
|
-
|
|
91
|
+
getRectInMultiPlatform(item).then(function(res) {
|
|
92
92
|
rateRects.current[index] = res;
|
|
93
93
|
});
|
|
94
94
|
}
|
|
@@ -11,7 +11,7 @@ import { ComponentDefaults } from "../../utils/typings";
|
|
|
11
11
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
12
12
|
import { useForceUpdate } from "../../hooks/use-force-update";
|
|
13
13
|
import raf from "../../utils/raf";
|
|
14
|
-
import useUuid from "../../hooks/use-uuid";
|
|
14
|
+
import { useUuid } from "../../hooks/use-uuid";
|
|
15
15
|
import SideBarItem from "../sidebaritem/index";
|
|
16
16
|
import { mergeProps } from "../../utils/merge-props";
|
|
17
17
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -9,10 +9,10 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
|
|
9
9
|
import classNames from "classnames";
|
|
10
10
|
import { getEnv, usePageScroll } from "@tarojs/taro";
|
|
11
11
|
import { View } from "@tarojs/components";
|
|
12
|
-
import { getWindowInfo } from "../../utils/get-system-info";
|
|
12
|
+
import { getWindowInfo } from "../../utils/taro/get-system-info";
|
|
13
13
|
import { ComponentDefaults } from "../../utils/typings";
|
|
14
|
-
import useWatch from "../../hooks/use-watch";
|
|
15
|
-
import {
|
|
14
|
+
import { useWatch } from "../../hooks/use-watch";
|
|
15
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
16
16
|
import { getScrollParent } from "../../utils/get-scroll-parent";
|
|
17
17
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
18
18
|
position: 'top',
|
|
@@ -89,13 +89,13 @@ export var Sticky = function(props) {
|
|
|
89
89
|
case 0:
|
|
90
90
|
return [
|
|
91
91
|
4,
|
|
92
|
-
|
|
92
|
+
getRectInMultiPlatform(rootRef.current)
|
|
93
93
|
];
|
|
94
94
|
case 1:
|
|
95
95
|
curRootRect = _state.sent();
|
|
96
96
|
return [
|
|
97
97
|
4,
|
|
98
|
-
|
|
98
|
+
getRectInMultiPlatform(stickyRef.current)
|
|
99
99
|
];
|
|
100
100
|
case 2:
|
|
101
101
|
stickyRect = _state.sent();
|
|
@@ -119,7 +119,7 @@ export var Sticky = function(props) {
|
|
|
119
119
|
];
|
|
120
120
|
return [
|
|
121
121
|
4,
|
|
122
|
-
|
|
122
|
+
getRectInMultiPlatform(container.current)
|
|
123
123
|
];
|
|
124
124
|
case 3:
|
|
125
125
|
containerRect = _state.sent();
|
|
@@ -8,11 +8,11 @@ import classNames from "classnames";
|
|
|
8
8
|
import { View } from "@tarojs/components";
|
|
9
9
|
import { nextTick, useReady } from "@tarojs/taro";
|
|
10
10
|
import { useTouch } from "../../hooks/use-touch";
|
|
11
|
-
import {
|
|
11
|
+
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
12
12
|
import { ComponentDefaults } from "../../utils/typings";
|
|
13
|
-
import { harmony } from "../../utils/platform
|
|
13
|
+
import { harmony } from "../../utils/taro/platform";
|
|
14
14
|
import { useRefState } from "../../hooks/use-ref-state";
|
|
15
|
-
import useUuid from "../../hooks/use-uuid";
|
|
15
|
+
import { useUuid } from "../../hooks/use-uuid";
|
|
16
16
|
function preventDefault(event, isStopPropagation) {
|
|
17
17
|
if (typeof event.cancelable !== 'boolean' || event.cancelable) {
|
|
18
18
|
event.preventDefault();
|
|
@@ -44,7 +44,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
44
44
|
];
|
|
45
45
|
return [
|
|
46
46
|
4,
|
|
47
|
-
|
|
47
|
+
getRectInMultiPlatform(leftWrapper.current, leftId)
|
|
48
48
|
];
|
|
49
49
|
case 1:
|
|
50
50
|
leftRect = _state.sent();
|
|
@@ -61,7 +61,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
61
61
|
];
|
|
62
62
|
return [
|
|
63
63
|
4,
|
|
64
|
-
|
|
64
|
+
getRectInMultiPlatform(rightWrapper.current, rightId)
|
|
65
65
|
];
|
|
66
66
|
case 3:
|
|
67
67
|
rightRect = _state.sent();
|
|
@@ -128,7 +128,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
128
128
|
];
|
|
129
129
|
return [
|
|
130
130
|
4,
|
|
131
|
-
|
|
131
|
+
getRectInMultiPlatform(leftWrapper.current, leftId)
|
|
132
132
|
];
|
|
133
133
|
case 1:
|
|
134
134
|
leftRect = _state.sent();
|
|
@@ -145,7 +145,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
|
|
|
145
145
|
];
|
|
146
146
|
return [
|
|
147
147
|
4,
|
|
148
|
-
|
|
148
|
+
getRectInMultiPlatform(rightWrapper.current, rightId)
|
|
149
149
|
];
|
|
150
150
|
case 3:
|
|
151
151
|
rightRect = _state.sent();
|
|
@@ -7,7 +7,7 @@ import React, { Children, useEffect, useImperativeHandle, useMemo, useState } fr
|
|
|
7
7
|
import { Swiper as TaroSwiper, SwiperItem as TSwiperItem, View } from "@tarojs/components";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import Indicator from "../indicator/index";
|
|
10
|
-
import pxTransform from "../../utils/px-transform";
|
|
10
|
+
import { pxTransform } from "../../utils/taro/px-transform";
|
|
11
11
|
var defaultProps = {
|
|
12
12
|
direction: 'horizontal',
|
|
13
13
|
indicator: false,
|
|
@@ -13,7 +13,7 @@ import TabPane from "../tabpane/index";
|
|
|
13
13
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
14
14
|
import { useForceUpdate } from "../../hooks/use-force-update";
|
|
15
15
|
import raf from "../../utils/raf";
|
|
16
|
-
import useUuid from "../../hooks/use-uuid";
|
|
16
|
+
import { useUuid } from "../../hooks/use-uuid";
|
|
17
17
|
import { useRtl } from "../configprovider/configprovider";
|
|
18
18
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
19
19
|
tabStyle: {},
|
|
@@ -8,10 +8,10 @@ import { Text, View } from "@tarojs/components";
|
|
|
8
8
|
import { Failure, Loading, Success, Tips } from "@nutui/icons-react-taro";
|
|
9
9
|
import Overlay from "../overlay/index";
|
|
10
10
|
import { defaultOverlayProps } from "../overlay/overlay";
|
|
11
|
-
import { customEvents, useCustomEvent, useCustomEventsPath, useParams } from "../../hooks/use-custom-event";
|
|
11
|
+
import { customEvents, useCustomEvent, useCustomEventsPath, useParams } from "../../hooks/taro/use-custom-event";
|
|
12
12
|
import { usePropsValue } from "../../hooks/use-props-value";
|
|
13
13
|
import { useRtl } from "../configprovider/index";
|
|
14
|
-
import { harmony } from "../../utils/platform
|
|
14
|
+
import { harmony } from "../../utils/taro/platform";
|
|
15
15
|
import { mergeProps } from "../../utils/merge-props";
|
|
16
16
|
var defaultProps = _object_spread_props(_object_spread({}, defaultOverlayProps), {
|
|
17
17
|
id: '',
|
|
@@ -6,7 +6,7 @@ import { Close } from "@nutui/icons-react-taro";
|
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { View } from "@tarojs/components";
|
|
8
8
|
import Popover from "../popover/index";
|
|
9
|
-
import {
|
|
9
|
+
import { getRectById } from "../../utils/taro/get-rect-by-id";
|
|
10
10
|
import { ComponentDefaults } from "../../utils/typings";
|
|
11
11
|
import { useConfig } from "../configprovider/index";
|
|
12
12
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -62,7 +62,7 @@ export var Tour = function(props) {
|
|
|
62
62
|
active
|
|
63
63
|
]);
|
|
64
64
|
var getRootPosition = function() {
|
|
65
|
-
|
|
65
|
+
getRectById(list[active].target).then(function(rect) {
|
|
66
66
|
setMaskRect({
|
|
67
67
|
top: rect.top,
|
|
68
68
|
left: rect.left,
|
|
@@ -5,7 +5,7 @@ import React, { useRef } from "react";
|
|
|
5
5
|
import { TriangleDown, TriangleUp } from "@nutui/icons-react-taro";
|
|
6
6
|
import { Text, View } from "@tarojs/components";
|
|
7
7
|
import { ComponentDefaults } from "../../utils/typings";
|
|
8
|
-
import { harmony } from "../../utils/platform
|
|
8
|
+
import { harmony } from "../../utils/taro/platform";
|
|
9
9
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
10
10
|
value: 0,
|
|
11
11
|
digits: 2,
|
|
@@ -5,7 +5,7 @@ import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { ScrollView, View } from "@tarojs/components";
|
|
7
7
|
import classNames from "classnames";
|
|
8
|
-
import { getWindowInfo } from "../../utils/get-system-info";
|
|
8
|
+
import { getWindowInfo } from "../../utils/taro/get-system-info";
|
|
9
9
|
import { initPositinoCache, updateItemSize } from "./utils";
|
|
10
10
|
import { ComponentDefaults } from "../../utils/typings";
|
|
11
11
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const clamp: (num: number, min: number, max: number) => number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function trigger(wrapper: any, eventName: string, x?: number, y?: number, options?: any): void;
|
|
2
|
+
export declare function sleep(delay?: number): Promise<void>;
|
|
3
|
+
export declare function triggerDrag(el: any, relativeX?: number, relativeY?: number): void;
|
|
4
|
+
/**
|
|
5
|
+
* 模拟触摸移动方法
|
|
6
|
+
* @param {HTMLElement} element 要进行触摸移动的 HTML 元素
|
|
7
|
+
* @param {number} startX 起始触摸点的 X 坐标
|
|
8
|
+
* @param {number} startY 起始触摸点的 Y 坐标
|
|
9
|
+
* @param {number} endX 结束触摸点的 X 坐标
|
|
10
|
+
* @param {number} endY 结束触摸点的 Y 坐标
|
|
11
|
+
* @param {number} duration 移动持续时间(毫秒)
|
|
12
|
+
*/
|
|
13
|
+
export declare function simulateTouchMove(element: HTMLElement, startX: number, startY: number, endX: number, endY: number, duration: number): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* 模拟触摸缩放方法
|
|
16
|
+
* @param {HTMLElement} element 要进行缩放操作的 HTML 元素
|
|
17
|
+
* @param {number} startDistance 起始触摸点的距离
|
|
18
|
+
* @param {number} endDistance 结束触摸点的距离
|
|
19
|
+
* @param {number} duration 缩放持续时间(毫秒)
|
|
20
|
+
*/
|
|
21
|
+
export declare function simulateTouchZoom(element: HTMLElement, startDistance: number, endDistance: number, duration: number): Promise<void>;
|