@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/dist/nutui.react.umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("@tarojs/components"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "@tarojs/components", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.components, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, Taro, components, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react-taro v2.7.
|
|
5
|
+
* @nutui/nutui-react-taro v2.7.5 Fri Jan 03 2025 17:31:45 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -3961,6 +3961,35 @@
|
|
|
3961
3961
|
stop.current = true;
|
|
3962
3962
|
};
|
|
3963
3963
|
}
|
|
3964
|
+
class MiniLru {
|
|
3965
|
+
constructor(capacity) {
|
|
3966
|
+
if (capacity <= 0) {
|
|
3967
|
+
throw new Error("Cache capacity must be a positive number");
|
|
3968
|
+
}
|
|
3969
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
3970
|
+
this.capacity = capacity;
|
|
3971
|
+
}
|
|
3972
|
+
get(key) {
|
|
3973
|
+
if (this.cache.has(key)) {
|
|
3974
|
+
const value = this.cache.get(key);
|
|
3975
|
+
this.cache.delete(key);
|
|
3976
|
+
this.cache.set(key, value);
|
|
3977
|
+
return value;
|
|
3978
|
+
}
|
|
3979
|
+
return null;
|
|
3980
|
+
}
|
|
3981
|
+
set(key, value) {
|
|
3982
|
+
if (this.cache.has(key)) {
|
|
3983
|
+
this.cache.delete(key);
|
|
3984
|
+
} else if (this.cache.size >= this.capacity) {
|
|
3985
|
+
this.cache.delete(this.cache.keys().next().value);
|
|
3986
|
+
}
|
|
3987
|
+
this.cache.set(key, value);
|
|
3988
|
+
}
|
|
3989
|
+
has(key) {
|
|
3990
|
+
return this.cache.has(key);
|
|
3991
|
+
}
|
|
3992
|
+
}
|
|
3964
3993
|
const inBrowser$1 = typeof document !== "undefined" && !!document.scripts;
|
|
3965
3994
|
function isWindow(val) {
|
|
3966
3995
|
return val === window;
|
|
@@ -3991,6 +4020,7 @@
|
|
|
3991
4020
|
height: 0
|
|
3992
4021
|
};
|
|
3993
4022
|
};
|
|
4023
|
+
const lru = new MiniLru(10);
|
|
3994
4024
|
function makeRect(width, height) {
|
|
3995
4025
|
return {
|
|
3996
4026
|
top: 0,
|
|
@@ -4007,7 +4037,14 @@
|
|
|
4007
4037
|
return Promise.resolve(getRect(element));
|
|
4008
4038
|
}
|
|
4009
4039
|
return new Promise((resolve, reject) => {
|
|
4040
|
+
if (lru.has(element)) {
|
|
4041
|
+
resolve(lru.get(element));
|
|
4042
|
+
return;
|
|
4043
|
+
}
|
|
4010
4044
|
Taro.createSelectorQuery().select(`#${element.uid}`).boundingClientRect().exec(([rects]) => {
|
|
4045
|
+
if (rects) {
|
|
4046
|
+
lru.set(element, rects);
|
|
4047
|
+
}
|
|
4011
4048
|
resolve(rects);
|
|
4012
4049
|
});
|
|
4013
4050
|
});
|
|
@@ -13140,7 +13177,7 @@
|
|
|
13140
13177
|
document.body.appendChild(obj);
|
|
13141
13178
|
}
|
|
13142
13179
|
}
|
|
13143
|
-
if (
|
|
13180
|
+
if (["WEAPP", "JD", "WEB"].includes(Taro.getEnv()) && Taro.chooseMedia) {
|
|
13144
13181
|
Taro.chooseMedia({
|
|
13145
13182
|
count: multiple ? maxCount * 1 - fileList.length : 1,
|
|
13146
13183
|
/** 文件类型 */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
.nut-textarea {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
2
4
|
position: relative;
|
|
3
5
|
width: 100%;
|
|
4
6
|
box-sizing: border-box;
|
|
5
|
-
display: flex;
|
|
6
7
|
background: $color-background-overlay;
|
|
7
8
|
font-size: $textarea-font;
|
|
8
9
|
padding: $textarea-padding;
|
|
@@ -16,11 +17,9 @@
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
&-limit {
|
|
19
|
-
position: absolute;
|
|
20
|
-
right: 15px;
|
|
21
|
-
bottom: 12px;
|
|
22
20
|
font-size: $textarea-font;
|
|
23
21
|
color: $textarea-limit-color;
|
|
22
|
+
text-align: $textarea-limit-align;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
&-textarea {
|