@nutui/nutui-react-taro 2.7.4 → 2.7.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.
- package/CHANGELOG.md +18 -6
- package/dist/esm/Audio.js +1 -1
- package/dist/esm/Barrage.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Drag.js +1 -1
- package/dist/esm/Ellipsis.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/NavBar.js +1 -1
- package/dist/esm/NoticeBar.js +1 -1
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Range.js +1 -1
- package/dist/esm/Rate.js +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/Swipe.js +1 -1
- package/dist/esm/TextArea/style/style.css +1 -1
- package/dist/esm/Tour.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{audio.taro-qK1wq4IH.js → audio.taro-DtIUjg89.js} +1 -1
- package/dist/esm/{barrage.taro-D2lmvcB-.js → barrage.taro-Dc2Wz_3H.js} +1 -1
- package/dist/esm/{datepicker.taro-DU4OSraL.js → datepicker.taro-DicskhhH.js} +1 -1
- package/dist/esm/{drag.taro-BRXhy0yb.js → drag.taro-r5Lmncrq.js} +1 -1
- package/dist/esm/{ellipsis.taro-fvcP85Ir.js → ellipsis.taro-K9VJCTL6.js} +1 -1
- package/dist/esm/{get-rect-by-taro-THaHH07X.js → get-rect-by-taro-D0h6aiDr.js} +37 -0
- package/dist/esm/{menu.taro-BmjnA_YM.js → menu.taro-2APk--BX.js} +1 -1
- package/dist/esm/{menuitem.taro-DCqPC4Nu.js → menuitem.taro-BMlSqBSc.js} +1 -1
- package/dist/esm/{navbar.taro-HRFRDGii.js → navbar.taro-B_9Ezsny.js} +1 -1
- package/dist/esm/{noticebar.taro-BjKDC7We.js → noticebar.taro-B0qm66Cu.js} +1 -1
- package/dist/esm/nutui-react.es.js +17 -17
- package/dist/esm/{picker.taro-CYNZBTE4.js → picker.taro-B7EE52qf.js} +1 -1
- package/dist/esm/{popover.taro-o5vHvHsm.js → popover.taro-C9qhPJCb.js} +1 -1
- package/dist/esm/{range.taro-D4U2Q7Wx.js → range.taro-Bbs4JcXp.js} +1 -1
- package/dist/esm/{rate.taro-CPGkjYYu.js → rate.taro-DsDMiRHd.js} +1 -1
- package/dist/esm/{sticky.taro-DC98CdU7.js → sticky.taro-DtUAawu_.js} +1 -1
- package/dist/esm/{swipe.taro-Bsk2fnEl.js → swipe.taro-CUZSZcIh.js} +1 -1
- package/dist/esm/{tour.taro-DfOfyyte.js → tour.taro-BidQx8Fg.js} +1 -1
- package/dist/esm/{uploader.taro-C3hV5Aih.js → uploader.taro-BBJsHrew.js} +1 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +39 -2
- package/dist/nutui.react.umd.js +39 -2
- package/dist/packages/textarea/textarea.scss +3 -4
- package/dist/style.css +1 -1
- package/dist/styles/variables-jmapp.scss +4 -0
- package/dist/styles/variables.scss +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/uploader/uploader.taro.d.ts +15 -3
- package/dist/types/utils/lru.d.ts +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
# v2.7.
|
|
2
|
-
`
|
|
1
|
+
# v2.7.5
|
|
2
|
+
`2025-01-03`
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
* 🏡 chore(pre-commit): add check-lock-file script (#2916)
|
|
6
|
+
* :sparkles: feat(performance): getRectByTaro 方法在小程序内增加缓存以提升性能 (#2831)
|
|
7
|
+
* :sparkles: feat(uploader): suppport chooseMedia in web (#2902)
|
|
8
|
+
* :bug: fix(textarea): 字数限制文本遮挡输入框的内容 (#2910)
|
|
9
|
+
* :bug: fix: 调整日历日期 (#2914)
|
|
10
|
+
* :bug: fix: update backtop demos (#2865)
|
|
11
|
+
* :bug: fix: scss variables jmapp
|
|
3
12
|
|
|
4
13
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* :bug: fix: update variables-jmapp.scss
|
|
14
|
+
# v2.7.4
|
|
15
|
+
|
|
16
|
+
`2024-12-20`
|
|
9
17
|
|
|
18
|
+
- :bug: fix(form): 修复label字号的css变量 (#2872)
|
|
19
|
+
- :bug: fix: 修改小程序下自动吸边计算逻辑&&解决部分小程序写法不支持问题 (#2855)
|
|
20
|
+
- :bug: fix(countup): 分隔符文字颜色支持css变量修改 (#2869)
|
|
21
|
+
- :bug: fix: update variables-jmapp.scss
|
|
10
22
|
|
|
11
23
|
# v2.7.3
|
|
12
24
|
|
package/dist/esm/Audio.js
CHANGED
package/dist/esm/Barrage.js
CHANGED
package/dist/esm/DatePicker.js
CHANGED
package/dist/esm/Drag.js
CHANGED
package/dist/esm/Ellipsis.js
CHANGED
package/dist/esm/Menu.js
CHANGED
package/dist/esm/MenuItem.js
CHANGED
package/dist/esm/NavBar.js
CHANGED
package/dist/esm/NoticeBar.js
CHANGED
package/dist/esm/Picker.js
CHANGED
package/dist/esm/Popover.js
CHANGED
package/dist/esm/Range.js
CHANGED
package/dist/esm/Rate.js
CHANGED
package/dist/esm/Sticky.js
CHANGED
package/dist/esm/Swipe.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nut-textarea{position:relative;width:100%;box-sizing:border-box;
|
|
1
|
+
.nut-textarea{display:flex;flex-direction:column;position:relative;width:100%;box-sizing:border-box;background:var(--nutui-gray-1, #ffffff);font-size:var(--nutui-textarea-font, var(--nutui-font-size-3, 14px));padding:var(--nutui-textarea-padding, 10px 25px)}.nut-textarea-disabled .nut-textarea-textarea,.nut-textarea-disabled .nut-textarea-limit{cursor:not-allowed;color:var(--nutui-textarea-disabled-color, var(--nutui-color-text-disabled, #bfbfbf))!important}.nut-textarea-limit{font-size:var(--nutui-textarea-font, var(--nutui-font-size-3, 14px));color:var(--nutui-textarea-limit-color, var(--nutui-gray-6, #595959));text-align:var(--nutui-textarea-limit-align, right)}.nut-textarea-textarea{outline:none;display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;font-size:var(--nutui-textarea-font, var(--nutui-font-size-3, 14px));color:var(--nutui-textarea-text-color, var(--nutui-gray-7, #1a1a1a));caret-color:var(--nutui-textarea-text-curror-color, var(--nutui-gray-7, #1a1a1a));text-align:start;background-color:transparent;border:0;resize:none}.nut-textarea-textarea .taro-textarea{background-color:transparent;resize:none}.nut-textarea .cpoyText{position:absolute;top:-999999px;left:-999999px}[dir=rtl] .nut-textarea-limit,.nut-rtl .nut-textarea-limit{right:auto;left:15px}[dir=rtl] .nut-textarea .cpoyText,.nut-rtl .nut-textarea .cpoyText{left:auto;right:-999999px}
|
package/dist/esm/Tour.js
CHANGED
package/dist/esm/Uploader.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useState, useRef } from "react";
|
|
3
3
|
import { createInnerAudioContext } from "@tarojs/taro";
|
|
4
4
|
import { Service } from "@nutui/icons-react-taro";
|
|
5
|
-
import { R as Range } from "./range.taro-
|
|
5
|
+
import { R as Range } from "./range.taro-Bbs4JcXp.js";
|
|
6
6
|
import { B as Button } from "./button.taro-CixO32Hw.js";
|
|
7
7
|
import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
|
|
8
8
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useImperativeHandle, useEffect } from "react";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { View } from "@tarojs/components";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
7
7
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { list: [], interval: 500, loop: true, duration: 3e3, rows: 3, gapY: 10 });
|
|
8
8
|
const classPrefix = `nut-barrage`;
|
|
9
9
|
const InternalBarrage = (props, ref) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
2
2
|
import React__default, { useState, useEffect } from "react";
|
|
3
3
|
import { View } from "@tarojs/components";
|
|
4
|
-
import { P as Picker } from "./picker.taro-
|
|
4
|
+
import { P as Picker } from "./picker.taro-B7EE52qf.js";
|
|
5
5
|
import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
|
|
6
6
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
@@ -2,7 +2,7 @@ import { _ as __rest, a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from "react";
|
|
3
3
|
import { getSystemInfoSync } from "@tarojs/taro";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
5
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
5
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
6
6
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { attract: false, direction: void 0, boundary: {
|
|
7
7
|
top: 0,
|
|
8
8
|
left: 0,
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useState, useEffect } from "react";
|
|
|
3
3
|
import { nextTick, createSelectorQuery } from "@tarojs/taro";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { View } from "@tarojs/components";
|
|
6
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { a as useRtl } from "./configprovider.taro-C3WyeHSO.js";
|
|
9
9
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { content: "", direction: "end", rows: 1, expandText: "", collapseText: "", symbol: "...", lineHeight: "20", width: "auto" });
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
import { a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
|
|
2
2
|
import { createSelectorQuery } from "@tarojs/taro";
|
|
3
|
+
class MiniLru {
|
|
4
|
+
constructor(capacity) {
|
|
5
|
+
if (capacity <= 0) {
|
|
6
|
+
throw new Error("Cache capacity must be a positive number");
|
|
7
|
+
}
|
|
8
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
9
|
+
this.capacity = capacity;
|
|
10
|
+
}
|
|
11
|
+
get(key) {
|
|
12
|
+
if (this.cache.has(key)) {
|
|
13
|
+
const value = this.cache.get(key);
|
|
14
|
+
this.cache.delete(key);
|
|
15
|
+
this.cache.set(key, value);
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
set(key, value) {
|
|
21
|
+
if (this.cache.has(key)) {
|
|
22
|
+
this.cache.delete(key);
|
|
23
|
+
} else if (this.cache.size >= this.capacity) {
|
|
24
|
+
this.cache.delete(this.cache.keys().next().value);
|
|
25
|
+
}
|
|
26
|
+
this.cache.set(key, value);
|
|
27
|
+
}
|
|
28
|
+
has(key) {
|
|
29
|
+
return this.cache.has(key);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
3
32
|
const inBrowser = typeof document !== "undefined" && !!document.scripts;
|
|
4
33
|
function isWindow(val) {
|
|
5
34
|
return val === window;
|
|
@@ -30,6 +59,7 @@ const getRect = (elementRef) => {
|
|
|
30
59
|
height: 0
|
|
31
60
|
};
|
|
32
61
|
};
|
|
62
|
+
const lru = new MiniLru(10);
|
|
33
63
|
function makeRect(width, height) {
|
|
34
64
|
return {
|
|
35
65
|
top: 0,
|
|
@@ -46,7 +76,14 @@ const getRectByTaro = (element) => __awaiter(void 0, void 0, void 0, function* (
|
|
|
46
76
|
return Promise.resolve(getRect(element));
|
|
47
77
|
}
|
|
48
78
|
return new Promise((resolve, reject) => {
|
|
79
|
+
if (lru.has(element)) {
|
|
80
|
+
resolve(lru.get(element));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
49
83
|
createSelectorQuery().select(`#${element.uid}`).boundingClientRect().exec(([rects]) => {
|
|
84
|
+
if (rects) {
|
|
85
|
+
lru.set(element, rects);
|
|
86
|
+
}
|
|
50
87
|
resolve(rects);
|
|
51
88
|
});
|
|
52
89
|
});
|
|
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useRef, useState, useCallback, useEffect } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { ArrowUp, ArrowDown } from "@nutui/icons-react-taro";
|
|
5
|
-
import { M as MenuItem } from "./menuitem.taro-
|
|
5
|
+
import { M as MenuItem } from "./menuitem.taro-BMlSqBSc.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
7
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { activeColor: "", closeOnOverlayClick: true, scrollFixed: false, lockScroll: true, overlay: true, icon: null, onOpen: (index, from) => {
|
|
8
8
|
}, onClose: (index, from) => {
|
|
@@ -6,7 +6,7 @@ import { View } from "@tarojs/components";
|
|
|
6
6
|
import { CSSTransition } from "react-transition-group";
|
|
7
7
|
import { Check } from "@nutui/icons-react-taro";
|
|
8
8
|
import { O as Overlay } from "./overlay.taro-C8eXSsJH.js";
|
|
9
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
9
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
10
10
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
11
11
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
12
12
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { titleIcon: null, columns: 1, direction: "down", icon: null, closeOnClickAway: true, activeTitleClass: "", inactiveTitleClass: "", onChange: (value) => void 0 });
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useState, useEffect } from "react";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { View } from "@tarojs/components";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
7
7
|
import { S as SafeArea } from "./safearea.taro-BJpvFsMf.js";
|
|
8
8
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { left: "", right: "", titleAlign: "center", back: "", fixed: false, safeAreaInsetTop: false, placeholder: false, zIndex: 10 });
|
|
9
9
|
const NavBar = (props) => {
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useState, useMemo, useEffect } from "react";
|
|
|
3
3
|
import { View } from "@tarojs/components";
|
|
4
4
|
import { Notice, Close } from "@nutui/icons-react-taro";
|
|
5
5
|
import classNames from "classnames";
|
|
6
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { a as useRtl } from "./configprovider.taro-C3WyeHSO.js";
|
|
9
9
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { align: "left", direction: "horizontal", list: [], duration: 1e3, height: 40, content: "", closeable: false, wrap: false, leftIcon: React__default.createElement(Notice, { size: 16 }), rightIcon: null, right: null, delay: 1, scrollable: null, speed: 50 });
|
|
@@ -11,12 +11,12 @@ import { G as G2 } from "./griditem.taro-DMvds46i.js";
|
|
|
11
11
|
import { L } from "./layout.taro-DpiuZLLE.js";
|
|
12
12
|
import { R } from "./row.taro-ItEq1Bi5.js";
|
|
13
13
|
import { S } from "./space.taro-B1KsEPZL.js";
|
|
14
|
-
import { S as S2 } from "./sticky.taro-
|
|
14
|
+
import { S as S2 } from "./sticky.taro-DtUAawu_.js";
|
|
15
15
|
import { S as S3 } from "./safearea.taro-BJpvFsMf.js";
|
|
16
16
|
import { B as B2 } from "./backtop.taro-D3Lo3jFO.js";
|
|
17
17
|
import { E } from "./elevator.taro-C0Gs93x7.js";
|
|
18
18
|
import { F } from "./fixednav.taro-BodErnYy.js";
|
|
19
|
-
import { N } from "./navbar.taro-
|
|
19
|
+
import { N } from "./navbar.taro-B_9Ezsny.js";
|
|
20
20
|
import { S as S4 } from "./sidenavbar.taro-C-AoUXLA.js";
|
|
21
21
|
import { S as S5 } from "./sidenavbaritem.taro-BKpzXpzG.js";
|
|
22
22
|
import { S as S6 } from "./subsidenavbar.taro-CSU3DhNq.js";
|
|
@@ -30,49 +30,49 @@ import { C as C6 } from "./calendaritem.taro-BGbbuJOS.js";
|
|
|
30
30
|
import { C as C7 } from "./calendarcard.taro-CvWyBqnr.js";
|
|
31
31
|
import { C as C8 } from "./cascader.taro-DRE3asjI.js";
|
|
32
32
|
import { C as C9, a as a2 } from "./checkbox.taro-CgqJyhrh.js";
|
|
33
|
-
import { D as D2 } from "./datepicker.taro-
|
|
33
|
+
import { D as D2 } from "./datepicker.taro-DicskhhH.js";
|
|
34
34
|
import { default as default2 } from "./Form.js";
|
|
35
35
|
import { F as F2 } from "./formitem.taro-CU6rrcJD.js";
|
|
36
36
|
import { I as I2 } from "./input.taro-CA9ZpM9a.js";
|
|
37
37
|
import { I as I3 } from "./inputnumber.taro-CZourWz-.js";
|
|
38
|
-
import { M } from "./menu.taro-
|
|
39
|
-
import { M as M2 } from "./menuitem.taro-
|
|
38
|
+
import { M } from "./menu.taro-2APk--BX.js";
|
|
39
|
+
import { M as M2 } from "./menuitem.taro-BMlSqBSc.js";
|
|
40
40
|
import { N as N2 } from "./numberkeyboard.taro-BvVO_MyJ.js";
|
|
41
|
-
import { P } from "./picker.taro-
|
|
41
|
+
import { P } from "./picker.taro-B7EE52qf.js";
|
|
42
42
|
import { R as R2, a as a3 } from "./radio.taro-M2in687s.js";
|
|
43
|
-
import { R as R3 } from "./range.taro-
|
|
44
|
-
import { R as R4 } from "./rate.taro-
|
|
43
|
+
import { R as R3 } from "./range.taro-Bbs4JcXp.js";
|
|
44
|
+
import { R as R4 } from "./rate.taro-DsDMiRHd.js";
|
|
45
45
|
import { S as S7 } from "./searchbar.taro-LaO2Xr2t.js";
|
|
46
46
|
import { S as S8 } from "./shortpassword.taro-CUnXqjab.js";
|
|
47
47
|
import { S as S9 } from "./signature.taro-BW4eiGIR.js";
|
|
48
48
|
import { S as S10 } from "./switch.taro-CdBmDo18.js";
|
|
49
49
|
import { T as T5 } from "./textarea.taro-PsaohYay.js";
|
|
50
|
-
import { U } from "./uploader.taro-
|
|
50
|
+
import { U } from "./uploader.taro-BBJsHrew.js";
|
|
51
51
|
import { A as A2 } from "./actionsheet.taro-kMhbV73n.js";
|
|
52
52
|
import { B as B3 } from "./badge.taro-B42_7q8v.js";
|
|
53
53
|
import { B as B4 } from "./dialog.taro-yjDaaRHA.js";
|
|
54
|
-
import { D as D3 } from "./drag.taro-
|
|
54
|
+
import { D as D3 } from "./drag.taro-r5Lmncrq.js";
|
|
55
55
|
import { E as E2 } from "./empty.taro-DhCHSdca.js";
|
|
56
56
|
import { I as I4 } from "./infiniteloading.taro-DzIrZvc0.js";
|
|
57
57
|
import { L as L2 } from "./loading.taro-n_qoNgCW.js";
|
|
58
|
-
import { N as N3 } from "./noticebar.taro-
|
|
58
|
+
import { N as N3 } from "./noticebar.taro-B0qm66Cu.js";
|
|
59
59
|
import { N as N4 } from "./notify.taro-BVXg7xTI.js";
|
|
60
|
-
import { P as P2 } from "./popover.taro-
|
|
60
|
+
import { P as P2 } from "./popover.taro-C9qhPJCb.js";
|
|
61
61
|
import { P as P3 } from "./popup.taro-JynjcLCn.js";
|
|
62
62
|
import { P as P4 } from "./pulltorefresh.taro-BiSDwLpA.js";
|
|
63
63
|
import { S as S11 } from "./skeleton.taro-D9Vkgsyx.js";
|
|
64
|
-
import { S as S12 } from "./swipe.taro-
|
|
64
|
+
import { S as S12 } from "./swipe.taro-CUZSZcIh.js";
|
|
65
65
|
import { T as T6 } from "./toast.taro-Tx0IHbsl.js";
|
|
66
66
|
import { A as A3 } from "./animate.taro-CQVEyDKL.js";
|
|
67
67
|
import { default as default3 } from "./AnimatingNumbers.js";
|
|
68
|
-
import { A as A4 } from "./audio.taro-
|
|
68
|
+
import { A as A4 } from "./audio.taro-DtIUjg89.js";
|
|
69
69
|
import { A as A5 } from "./avatar.taro-9dU2KeWv.js";
|
|
70
70
|
import { A as A6 } from "./avatargroup.taro-ScakjsY1.js";
|
|
71
71
|
import { C as C10 } from "./circleprogress.taro-BTRyQG5T.js";
|
|
72
72
|
import { C as C11 } from "./collapse.taro-wqL6MWZr.js";
|
|
73
73
|
import { C as C12 } from "./collapseitem.taro-DjUx5Nx8.js";
|
|
74
74
|
import { C as C13 } from "./countdown.taro-Dyryl4pq.js";
|
|
75
|
-
import { E as E3 } from "./ellipsis.taro-
|
|
75
|
+
import { E as E3 } from "./ellipsis.taro-K9VJCTL6.js";
|
|
76
76
|
import { I as I5 } from "./imagepreview.taro-BE4mZT-S.js";
|
|
77
77
|
import { I as I6 } from "./indicator.taro-k8bxJf86.js";
|
|
78
78
|
import { P as P5 } from "./pagination.taro-BSwytb0-.js";
|
|
@@ -84,10 +84,10 @@ import { default as default4 } from "./Swiper.js";
|
|
|
84
84
|
import { S as S15 } from "./swiperitem.taro-BleF1EOs.js";
|
|
85
85
|
import { T as T7 } from "./table.taro-1nFkDxbh.js";
|
|
86
86
|
import { T as T8 } from "./tag.taro-CFt28RLm.js";
|
|
87
|
-
import { T as T9 } from "./tour.taro-
|
|
87
|
+
import { T as T9 } from "./tour.taro-BidQx8Fg.js";
|
|
88
88
|
import { V } from "./video.taro-CecLv4sr.js";
|
|
89
89
|
import { V as V2 } from "./virtuallist.taro-BlPW8ibd.js";
|
|
90
|
-
import { B as B5 } from "./barrage.taro-
|
|
90
|
+
import { B as B5 } from "./barrage.taro-Dc2Wz_3H.js";
|
|
91
91
|
import { C as C14 } from "./card.taro-DxcIi5qH.js";
|
|
92
92
|
import { T as T10 } from "./timedetail.taro-ya5JNy2L.js";
|
|
93
93
|
import { T as T11 } from "./timeselect.taro-FIl91wiO.js";
|
|
@@ -5,7 +5,7 @@ import Taro from "@tarojs/taro";
|
|
|
5
5
|
import { View, PickerView, PickerViewColumn } from "@tarojs/components";
|
|
6
6
|
import { P as Popup } from "./popup.taro-JynjcLCn.js";
|
|
7
7
|
import { u as useTouch } from "./use-touch-BeiLHDO9.js";
|
|
8
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
8
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
9
9
|
import { p as passiveSupported } from "./overlay.taro-C8eXSsJH.js";
|
|
10
10
|
import { u as useRefs } from "./use-refs-BeEmziIR.js";
|
|
11
11
|
import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useState, useEffect } from "react";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
5
5
|
import { P as Popup } from "./popup.taro-JynjcLCn.js";
|
|
6
|
-
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
+
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { a as useRtl } from "./configprovider.taro-C3WyeHSO.js";
|
|
9
9
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { list: [], theme: "light", location: "bottom", visible: false, offset: [0, 12], arrowOffset: 0, targetId: "", className: "", showArrow: true, closeOnOutsideClick: true, closeOnActionClick: true, overlay: false, onClick: () => {
|
|
@@ -5,7 +5,7 @@ import { View } from "@tarojs/components";
|
|
|
5
5
|
import { u as useTouch } from "./use-touch-BeiLHDO9.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
7
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
8
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
8
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
9
9
|
import { a as useRtl } from "./configprovider.taro-C3WyeHSO.js";
|
|
10
10
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { range: false, min: 0, max: 100, step: 1, vertical: false, marks: {} });
|
|
11
11
|
const Range = (props) => {
|
|
@@ -5,7 +5,7 @@ import { useReady } from "@tarojs/taro";
|
|
|
5
5
|
import { View } from "@tarojs/components";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
7
7
|
import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
|
|
8
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
8
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
9
9
|
import { u as useRefs } from "./use-refs-BeEmziIR.js";
|
|
10
10
|
const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { count: 5, min: 0, checkedIcon: null, uncheckedIcon: null, disabled: false, readOnly: false, allowHalf: false, touchable: false });
|
|
11
11
|
const Rate = (props) => {
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useEffect, useState, useMemo, useCallback } fro
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { getEnv, usePageScroll, getSystemInfoSync } from "@tarojs/taro";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
6
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
6
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
7
7
|
import { g as getScrollParent } from "./get-scroll-parent-DB1VRg11.js";
|
|
8
8
|
function useWatch(dep, callback, config = { immediate: false }) {
|
|
9
9
|
const { immediate } = config;
|
|
@@ -4,7 +4,7 @@ import classNames from "classnames";
|
|
|
4
4
|
import { View } from "@tarojs/components";
|
|
5
5
|
import { useReady, nextTick } from "@tarojs/taro";
|
|
6
6
|
import { u as useTouch } from "./use-touch-BeiLHDO9.js";
|
|
7
|
-
import { g as getRectByTaro } from "./get-rect-by-taro-
|
|
7
|
+
import { g as getRectByTaro } from "./get-rect-by-taro-D0h6aiDr.js";
|
|
8
8
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
9
9
|
function preventDefault(event, isStopPropagation) {
|
|
10
10
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
|
|
|
2
2
|
import React__default, { useState, useEffect } from "react";
|
|
3
3
|
import { Close } from "@nutui/icons-react-taro";
|
|
4
4
|
import classNames from "classnames";
|
|
5
|
-
import { P as Popover } from "./popover.taro-
|
|
5
|
+
import { P as Popover } from "./popover.taro-C9qhPJCb.js";
|
|
6
6
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
|
|
8
8
|
import { useConfig } from "./ConfigProvider.js";
|
|
@@ -257,7 +257,7 @@ const InternalUploader = (props, ref) => {
|
|
|
257
257
|
document.body.appendChild(obj);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
if (
|
|
260
|
+
if (["WEAPP", "JD", "WEB"].includes(getEnv()) && chooseMedia) {
|
|
261
261
|
chooseMedia({
|
|
262
262
|
count: multiple ? maxCount * 1 - fileList.length : 1,
|
|
263
263
|
/** 文件类型 */
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v2.7.
|
|
2
|
+
* @nutui/nutui-react-taro v2.7.5 Fri Jan 03 2025 17:31:45 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3945,6 +3945,35 @@ function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
|
3945
3945
|
stop.current = true;
|
|
3946
3946
|
};
|
|
3947
3947
|
}
|
|
3948
|
+
class MiniLru {
|
|
3949
|
+
constructor(capacity) {
|
|
3950
|
+
if (capacity <= 0) {
|
|
3951
|
+
throw new Error("Cache capacity must be a positive number");
|
|
3952
|
+
}
|
|
3953
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
3954
|
+
this.capacity = capacity;
|
|
3955
|
+
}
|
|
3956
|
+
get(key) {
|
|
3957
|
+
if (this.cache.has(key)) {
|
|
3958
|
+
const value = this.cache.get(key);
|
|
3959
|
+
this.cache.delete(key);
|
|
3960
|
+
this.cache.set(key, value);
|
|
3961
|
+
return value;
|
|
3962
|
+
}
|
|
3963
|
+
return null;
|
|
3964
|
+
}
|
|
3965
|
+
set(key, value) {
|
|
3966
|
+
if (this.cache.has(key)) {
|
|
3967
|
+
this.cache.delete(key);
|
|
3968
|
+
} else if (this.cache.size >= this.capacity) {
|
|
3969
|
+
this.cache.delete(this.cache.keys().next().value);
|
|
3970
|
+
}
|
|
3971
|
+
this.cache.set(key, value);
|
|
3972
|
+
}
|
|
3973
|
+
has(key) {
|
|
3974
|
+
return this.cache.has(key);
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3948
3977
|
const inBrowser$1 = typeof document !== "undefined" && !!document.scripts;
|
|
3949
3978
|
function isWindow(val) {
|
|
3950
3979
|
return val === window;
|
|
@@ -3975,6 +4004,7 @@ const getRect = (elementRef) => {
|
|
|
3975
4004
|
height: 0
|
|
3976
4005
|
};
|
|
3977
4006
|
};
|
|
4007
|
+
const lru = new MiniLru(10);
|
|
3978
4008
|
function makeRect(width, height) {
|
|
3979
4009
|
return {
|
|
3980
4010
|
top: 0,
|
|
@@ -3991,7 +4021,14 @@ const getRectByTaro = async (element) => {
|
|
|
3991
4021
|
return Promise.resolve(getRect(element));
|
|
3992
4022
|
}
|
|
3993
4023
|
return new Promise((resolve, reject) => {
|
|
4024
|
+
if (lru.has(element)) {
|
|
4025
|
+
resolve(lru.get(element));
|
|
4026
|
+
return;
|
|
4027
|
+
}
|
|
3994
4028
|
createSelectorQuery().select(`#${element.uid}`).boundingClientRect().exec(([rects]) => {
|
|
4029
|
+
if (rects) {
|
|
4030
|
+
lru.set(element, rects);
|
|
4031
|
+
}
|
|
3995
4032
|
resolve(rects);
|
|
3996
4033
|
});
|
|
3997
4034
|
});
|
|
@@ -13124,7 +13161,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13124
13161
|
document.body.appendChild(obj);
|
|
13125
13162
|
}
|
|
13126
13163
|
}
|
|
13127
|
-
if (
|
|
13164
|
+
if (["WEAPP", "JD", "WEB"].includes(getEnv()) && chooseMedia) {
|
|
13128
13165
|
chooseMedia({
|
|
13129
13166
|
count: multiple ? maxCount * 1 - fileList.length : 1,
|
|
13130
13167
|
/** 文件类型 */
|