@nutui/nutui-react-taro 2.6.13 → 2.6.15-beta.0
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 +24 -0
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/CalendarItem.js +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/Empty/style/style.css +1 -1
- package/dist/esm/Form.js +1 -1
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/InfiniteLoading.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/WaterMark.js +1 -1
- package/dist/esm/{address.taro-CtVpobLw.js → address.taro-BYzOGUEN.js} +1 -1
- package/dist/esm/{calendar.taro-Bf5owfGd.js → calendar.taro-BXrHr8bg.js} +1 -1
- package/dist/esm/{calendaritem.taro-PLHReAvU.js → calendaritem.taro-CRultyrO.js} +3 -1
- package/dist/esm/{cascader.taro-y9_hSUSJ.js → cascader.taro-jxe42b68.js} +2 -2
- package/dist/esm/{formitem.taro-tLWeQ0P5.js → formitem.taro-Dmt5-wxG.js} +3 -2
- package/dist/esm/{infiniteloading.taro-g1RbqnSS.js → infiniteloading.taro-TbcBB0Qr.js} +7 -7
- package/dist/esm/{menu.taro-JDg_-XpO.js → menu.taro-CrPdDbYM.js} +1 -1
- package/dist/esm/{menuitem.taro-BFfGgTms.js → menuitem.taro-DMV3j4DK.js} +4 -2
- package/dist/esm/nutui-react.es.js +11 -11
- package/dist/esm/{sticky.taro-DZzgkigZ.js → sticky.taro-Zbz7wQH8.js} +29 -31
- package/dist/esm/{uploader.taro-CiamsRGo.js → uploader.taro-DfO2HWvy.js} +13 -11
- package/dist/esm/{watermark.taro-BR12yZQt.js → watermark.taro-CZ6R5FlJ.js} +3 -3
- 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 +61 -50
- package/dist/nutui.react.umd.js +61 -50
- package/dist/packages/empty/empty.scss +1 -1
- package/dist/packages/uploader/uploader.scss +3 -1
- package/dist/style.css +1 -1
- package/dist/styles/variables-jmapp.scss +1 -0
- package/dist/styles/variables.scss +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/form/types.d.ts +1 -0
- package/dist/types/packages/griditem/types.d.ts +13 -0
- package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +2 -1
- package/dist/types/packages/watermark/watermark.d.ts +2 -0
- package/dist/types/packages/watermark/watermark.taro.d.ts +10 -0
- package/dist/types/utils/get-scroll-parent.d.ts +1 -1
- package/dist/types/utils/use-client-rect.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/packages/form/usewatch.d.ts +0 -2
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v2.6.
|
|
2
|
+
* @nutui/nutui-react-taro v2.6.14 Wed Jul 24 2024 13:29:51 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3961,13 +3961,10 @@ const Sticky = (props) => {
|
|
|
3961
3961
|
width: ""
|
|
3962
3962
|
};
|
|
3963
3963
|
}
|
|
3964
|
-
const style2 = {
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
}
|
|
3968
|
-
if (rootRect.width) {
|
|
3969
|
-
style2.width = rootRect.width;
|
|
3970
|
-
}
|
|
3964
|
+
const style2 = {
|
|
3965
|
+
height: rootRect.height ?? "",
|
|
3966
|
+
width: rootRect.width ?? ""
|
|
3967
|
+
};
|
|
3971
3968
|
return style2;
|
|
3972
3969
|
}, [fixed, rootRect.height, rootRect.width]);
|
|
3973
3970
|
const stickyStyle = useMemo$1(() => {
|
|
@@ -3978,36 +3975,37 @@ const Sticky = (props) => {
|
|
|
3978
3975
|
[position]: ""
|
|
3979
3976
|
};
|
|
3980
3977
|
}
|
|
3981
|
-
const style2 = {
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3978
|
+
const style2 = {
|
|
3979
|
+
height: rootRect.height ?? "",
|
|
3980
|
+
width: rootRect.width ?? "",
|
|
3981
|
+
transform: `translate3d(0, ${transform}px, 0)`,
|
|
3982
|
+
[position]: threshold,
|
|
3983
|
+
zIndex
|
|
3984
|
+
};
|
|
3987
3985
|
return style2;
|
|
3988
3986
|
}, [fixed, rootRect.height, rootRect.width, transform, position]);
|
|
3989
3987
|
const handleScroll = async (scrollTop) => {
|
|
3990
3988
|
const curRootRect = await getRectByTaro(rootRef.current);
|
|
3991
3989
|
const stickyRect = await getRectByTaro(stickyRef.current);
|
|
3992
|
-
if (curRootRect
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
3990
|
+
if (!curRootRect || !stickyRect) {
|
|
3991
|
+
console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
|
|
3992
|
+
return;
|
|
3993
|
+
}
|
|
3994
|
+
setRootRect(curRootRect);
|
|
3995
|
+
if (position === "top") {
|
|
3996
|
+
if (container) {
|
|
3997
|
+
const containerRect = await getRectByTaro(container.current);
|
|
3998
|
+
const difference = containerRect.bottom - threshold - curRootRect.height;
|
|
3999
|
+
const curTransform = difference < 0 ? difference : 0;
|
|
4000
|
+
setTransform(curTransform);
|
|
4001
|
+
const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
|
|
4002
|
+
setFixed(curFixed);
|
|
4005
4003
|
} else {
|
|
4006
|
-
|
|
4007
|
-
setFixed(windowHeight - threshold < curRootRect.bottom);
|
|
4004
|
+
setFixed(threshold > curRootRect.top);
|
|
4008
4005
|
}
|
|
4009
4006
|
} else {
|
|
4010
|
-
|
|
4007
|
+
const windowHeight = getSystemInfoSync().windowHeight;
|
|
4008
|
+
setFixed(windowHeight - threshold < curRootRect.bottom);
|
|
4011
4009
|
}
|
|
4012
4010
|
};
|
|
4013
4011
|
const getElement = useCallback(() => {
|
|
@@ -5720,7 +5718,7 @@ const InternalCascader = (props, ref) => {
|
|
|
5720
5718
|
};
|
|
5721
5719
|
const syncValue = async () => {
|
|
5722
5720
|
const currentValue = innerValue;
|
|
5723
|
-
if (currentValue === void 0 || currentValue
|
|
5721
|
+
if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
|
|
5724
5722
|
return;
|
|
5725
5723
|
}
|
|
5726
5724
|
if (currentValue.length === 0) {
|
|
@@ -5752,7 +5750,7 @@ const InternalCascader = (props, ref) => {
|
|
|
5752
5750
|
state.initLoading = false;
|
|
5753
5751
|
}
|
|
5754
5752
|
}
|
|
5755
|
-
if (needToSync.length && currentValue
|
|
5753
|
+
if (needToSync.length && [defaultValue, value].includes(currentValue)) {
|
|
5756
5754
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
5757
5755
|
pathNodes.forEach((node, index) => {
|
|
5758
5756
|
state.tabsCursor = index;
|
|
@@ -6730,8 +6728,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
6730
6728
|
};
|
|
6731
6729
|
useEffect(() => {
|
|
6732
6730
|
setCurrentDate(resetDefaultValue() || []);
|
|
6733
|
-
popup && resetRender();
|
|
6734
6731
|
}, [defaultValue]);
|
|
6732
|
+
useEffect(() => {
|
|
6733
|
+
popup && resetRender();
|
|
6734
|
+
}, [currentDate]);
|
|
6735
6735
|
const scrollToDate = (date4) => {
|
|
6736
6736
|
if (Utils.compareDate(date4, propStartDate)) {
|
|
6737
6737
|
date4 = propStartDate;
|
|
@@ -9793,7 +9793,7 @@ class FormStore {
|
|
|
9793
9793
|
this.store = values;
|
|
9794
9794
|
}
|
|
9795
9795
|
};
|
|
9796
|
-
this.setFieldsValue = (newStore) => {
|
|
9796
|
+
this.setFieldsValue = (newStore, needValidate = true) => {
|
|
9797
9797
|
this.store = {
|
|
9798
9798
|
...this.store,
|
|
9799
9799
|
...newStore
|
|
@@ -9815,6 +9815,7 @@ class FormStore {
|
|
|
9815
9815
|
item.entity.onStoreChange("update");
|
|
9816
9816
|
}
|
|
9817
9817
|
});
|
|
9818
|
+
needValidate && this.validateFields();
|
|
9818
9819
|
};
|
|
9819
9820
|
this.setCallback = (callback) => {
|
|
9820
9821
|
this.callbacks = {
|
|
@@ -10064,7 +10065,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
10064
10065
|
if (this.props.getValueFromEvent) {
|
|
10065
10066
|
next = this.props.getValueFromEvent(...args);
|
|
10066
10067
|
}
|
|
10067
|
-
setFieldsValue({ [name]: next });
|
|
10068
|
+
setFieldsValue({ [name]: next }, false);
|
|
10068
10069
|
}
|
|
10069
10070
|
};
|
|
10070
10071
|
const { validateTrigger } = this.props;
|
|
@@ -10797,18 +10798,20 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
10797
10798
|
handleClick(item);
|
|
10798
10799
|
}
|
|
10799
10800
|
},
|
|
10800
|
-
item.value === innerValue ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon
|
|
10801
|
+
item.value === innerValue ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon ? React__default.cloneElement(icon, {
|
|
10802
|
+
className: `nut-menu-container-item-icon ${icon.props.className || ""}`
|
|
10803
|
+
}) : /* @__PURE__ */ React__default.createElement(
|
|
10801
10804
|
g$3,
|
|
10802
10805
|
{
|
|
10803
10806
|
color: activeColor,
|
|
10804
10807
|
size: 16,
|
|
10805
|
-
className: getIconCName(item.value, value)
|
|
10808
|
+
className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}`
|
|
10806
10809
|
}
|
|
10807
10810
|
)) : null,
|
|
10808
10811
|
/* @__PURE__ */ React__default.createElement(
|
|
10809
10812
|
View,
|
|
10810
10813
|
{
|
|
10811
|
-
className: getIconCName(item.value, value)
|
|
10814
|
+
className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
|
|
10812
10815
|
style: {
|
|
10813
10816
|
color: `${item.value === innerValue ? activeColor : ""}`
|
|
10814
10817
|
}
|
|
@@ -12882,6 +12885,10 @@ const InternalUploader = (props, ref) => {
|
|
|
12882
12885
|
clearUploadQueue();
|
|
12883
12886
|
}
|
|
12884
12887
|
}));
|
|
12888
|
+
const fileListRef = useRef([]);
|
|
12889
|
+
useEffect(() => {
|
|
12890
|
+
fileListRef.current = fileList;
|
|
12891
|
+
}, [fileList]);
|
|
12885
12892
|
const clearUploadQueue = (index = -1) => {
|
|
12886
12893
|
if (index > -1) {
|
|
12887
12894
|
uploadQueue.splice(index, 1);
|
|
@@ -12961,7 +12968,7 @@ const InternalUploader = (props, ref) => {
|
|
|
12961
12968
|
uploadOption.onStart = (option) => {
|
|
12962
12969
|
clearUploadQueue(index);
|
|
12963
12970
|
setFileList(
|
|
12964
|
-
|
|
12971
|
+
fileListRef.current.map((item) => {
|
|
12965
12972
|
if (item.uid === fileItem.uid) {
|
|
12966
12973
|
item.status = "ready";
|
|
12967
12974
|
item.message = locale.uploader.readyUpload;
|
|
@@ -12969,23 +12976,23 @@ const InternalUploader = (props, ref) => {
|
|
|
12969
12976
|
return item;
|
|
12970
12977
|
})
|
|
12971
12978
|
);
|
|
12972
|
-
onStart
|
|
12979
|
+
onStart == null ? void 0 : onStart(option);
|
|
12973
12980
|
};
|
|
12974
12981
|
uploadOption.onProgress = (e2, option) => {
|
|
12975
12982
|
setFileList(
|
|
12976
|
-
|
|
12983
|
+
fileListRef.current.map((item) => {
|
|
12977
12984
|
if (item.uid === fileItem.uid) {
|
|
12978
12985
|
item.status = UPLOADING;
|
|
12979
12986
|
item.message = locale.uploader.uploading;
|
|
12980
12987
|
item.percentage = e2.progress;
|
|
12981
|
-
onProgress
|
|
12988
|
+
onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
|
|
12982
12989
|
}
|
|
12983
12990
|
return item;
|
|
12984
12991
|
})
|
|
12985
12992
|
);
|
|
12986
12993
|
};
|
|
12987
12994
|
uploadOption.onSuccess = (responseText, option) => {
|
|
12988
|
-
const list =
|
|
12995
|
+
const list = fileListRef.current.map((item) => {
|
|
12989
12996
|
if (item.uid === fileItem.uid) {
|
|
12990
12997
|
item.status = SUCCESS;
|
|
12991
12998
|
item.message = locale.uploader.success;
|
|
@@ -13001,7 +13008,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13001
13008
|
});
|
|
13002
13009
|
};
|
|
13003
13010
|
uploadOption.onFailure = (responseText, option) => {
|
|
13004
|
-
const list =
|
|
13011
|
+
const list = fileListRef.current.map((item) => {
|
|
13005
13012
|
if (item.uid === fileItem.uid) {
|
|
13006
13013
|
item.status = ERROR;
|
|
13007
13014
|
item.message = locale.uploader.error;
|
|
@@ -13063,8 +13070,8 @@ const InternalUploader = (props, ref) => {
|
|
|
13063
13070
|
if (preview) {
|
|
13064
13071
|
fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
|
|
13065
13072
|
}
|
|
13066
|
-
setFileList([...fileList, fileItem]);
|
|
13067
13073
|
executeUpload(fileItem, index);
|
|
13074
|
+
setFileList([...fileList, fileItem]);
|
|
13068
13075
|
});
|
|
13069
13076
|
};
|
|
13070
13077
|
const filterFiles = (files) => {
|
|
@@ -13078,9 +13085,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13078
13085
|
}
|
|
13079
13086
|
return true;
|
|
13080
13087
|
});
|
|
13081
|
-
|
|
13082
|
-
onOversize && onOversize(files);
|
|
13083
|
-
}
|
|
13088
|
+
oversizes.length && (onOversize == null ? void 0 : onOversize(files));
|
|
13084
13089
|
const currentFileLength = filterFile.length + fileList.length;
|
|
13085
13090
|
if (currentFileLength > maximum) {
|
|
13086
13091
|
filterFile.splice(filterFile.length - (currentFileLength - maximum));
|
|
@@ -13728,7 +13733,8 @@ const InfiniteLoading = (props) => {
|
|
|
13728
13733
|
className,
|
|
13729
13734
|
onRefresh,
|
|
13730
13735
|
onLoadMore,
|
|
13731
|
-
onScroll
|
|
13736
|
+
onScroll,
|
|
13737
|
+
...rest
|
|
13732
13738
|
} = {
|
|
13733
13739
|
...defaultProps$D,
|
|
13734
13740
|
...props
|
|
@@ -13822,6 +13828,7 @@ const InfiniteLoading = (props) => {
|
|
|
13822
13828
|
return /* @__PURE__ */ React__default.createElement(
|
|
13823
13829
|
ScrollView,
|
|
13824
13830
|
{
|
|
13831
|
+
...rest,
|
|
13825
13832
|
className: classes,
|
|
13826
13833
|
scrollY: true,
|
|
13827
13834
|
id: "scroller",
|
|
@@ -18591,6 +18598,8 @@ const defaultProps$1 = {
|
|
|
18591
18598
|
gapY: 48,
|
|
18592
18599
|
width: 120,
|
|
18593
18600
|
height: 64,
|
|
18601
|
+
startX: 0,
|
|
18602
|
+
startY: 0,
|
|
18594
18603
|
image: "",
|
|
18595
18604
|
imageWidth: 120,
|
|
18596
18605
|
imageHeight: 64,
|
|
@@ -18609,6 +18618,8 @@ const WaterMark = (props) => {
|
|
|
18609
18618
|
className,
|
|
18610
18619
|
gapX,
|
|
18611
18620
|
gapY,
|
|
18621
|
+
startX,
|
|
18622
|
+
startY,
|
|
18612
18623
|
width,
|
|
18613
18624
|
height,
|
|
18614
18625
|
image,
|
|
@@ -18689,7 +18700,7 @@ const WaterMark = (props) => {
|
|
|
18689
18700
|
const markSize = Number(fontSize) * ratio;
|
|
18690
18701
|
ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
18691
18702
|
ctx.fillStyle = color;
|
|
18692
|
-
ctx.fillText(content,
|
|
18703
|
+
ctx.fillText(content, startX, startY);
|
|
18693
18704
|
ctx.restore();
|
|
18694
18705
|
setBase64Url(canvas.toDataURL());
|
|
18695
18706
|
}
|
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.6.
|
|
5
|
+
* @nutui/nutui-react-taro v2.6.14 Wed Jul 24 2024 13:29:51 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -3977,13 +3977,10 @@
|
|
|
3977
3977
|
width: ""
|
|
3978
3978
|
};
|
|
3979
3979
|
}
|
|
3980
|
-
const style2 = {
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
}
|
|
3984
|
-
if (rootRect.width) {
|
|
3985
|
-
style2.width = rootRect.width;
|
|
3986
|
-
}
|
|
3980
|
+
const style2 = {
|
|
3981
|
+
height: rootRect.height ?? "",
|
|
3982
|
+
width: rootRect.width ?? ""
|
|
3983
|
+
};
|
|
3987
3984
|
return style2;
|
|
3988
3985
|
}, [fixed, rootRect.height, rootRect.width]);
|
|
3989
3986
|
const stickyStyle = React.useMemo(() => {
|
|
@@ -3994,36 +3991,37 @@
|
|
|
3994
3991
|
[position]: ""
|
|
3995
3992
|
};
|
|
3996
3993
|
}
|
|
3997
|
-
const style2 = {
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
3994
|
+
const style2 = {
|
|
3995
|
+
height: rootRect.height ?? "",
|
|
3996
|
+
width: rootRect.width ?? "",
|
|
3997
|
+
transform: `translate3d(0, ${transform}px, 0)`,
|
|
3998
|
+
[position]: threshold,
|
|
3999
|
+
zIndex
|
|
4000
|
+
};
|
|
4003
4001
|
return style2;
|
|
4004
4002
|
}, [fixed, rootRect.height, rootRect.width, transform, position]);
|
|
4005
4003
|
const handleScroll = async (scrollTop) => {
|
|
4006
4004
|
const curRootRect = await getRectByTaro(rootRef.current);
|
|
4007
4005
|
const stickyRect = await getRectByTaro(stickyRef.current);
|
|
4008
|
-
if (curRootRect
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4006
|
+
if (!curRootRect || !stickyRect) {
|
|
4007
|
+
console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
|
|
4008
|
+
return;
|
|
4009
|
+
}
|
|
4010
|
+
setRootRect(curRootRect);
|
|
4011
|
+
if (position === "top") {
|
|
4012
|
+
if (container) {
|
|
4013
|
+
const containerRect = await getRectByTaro(container.current);
|
|
4014
|
+
const difference = containerRect.bottom - threshold - curRootRect.height;
|
|
4015
|
+
const curTransform = difference < 0 ? difference : 0;
|
|
4016
|
+
setTransform(curTransform);
|
|
4017
|
+
const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
|
|
4018
|
+
setFixed(curFixed);
|
|
4021
4019
|
} else {
|
|
4022
|
-
|
|
4023
|
-
setFixed(windowHeight - threshold < curRootRect.bottom);
|
|
4020
|
+
setFixed(threshold > curRootRect.top);
|
|
4024
4021
|
}
|
|
4025
4022
|
} else {
|
|
4026
|
-
|
|
4023
|
+
const windowHeight = Taro.getSystemInfoSync().windowHeight;
|
|
4024
|
+
setFixed(windowHeight - threshold < curRootRect.bottom);
|
|
4027
4025
|
}
|
|
4028
4026
|
};
|
|
4029
4027
|
const getElement = React.useCallback(() => {
|
|
@@ -5736,7 +5734,7 @@
|
|
|
5736
5734
|
};
|
|
5737
5735
|
const syncValue = async () => {
|
|
5738
5736
|
const currentValue = innerValue;
|
|
5739
|
-
if (currentValue === void 0 || currentValue
|
|
5737
|
+
if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
|
|
5740
5738
|
return;
|
|
5741
5739
|
}
|
|
5742
5740
|
if (currentValue.length === 0) {
|
|
@@ -5768,7 +5766,7 @@
|
|
|
5768
5766
|
state.initLoading = false;
|
|
5769
5767
|
}
|
|
5770
5768
|
}
|
|
5771
|
-
if (needToSync.length && currentValue
|
|
5769
|
+
if (needToSync.length && [defaultValue, value].includes(currentValue)) {
|
|
5772
5770
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
5773
5771
|
pathNodes.forEach((node, index) => {
|
|
5774
5772
|
state.tabsCursor = index;
|
|
@@ -6746,8 +6744,10 @@
|
|
|
6746
6744
|
};
|
|
6747
6745
|
React.useEffect(() => {
|
|
6748
6746
|
setCurrentDate(resetDefaultValue() || []);
|
|
6749
|
-
popup && resetRender();
|
|
6750
6747
|
}, [defaultValue]);
|
|
6748
|
+
React.useEffect(() => {
|
|
6749
|
+
popup && resetRender();
|
|
6750
|
+
}, [currentDate]);
|
|
6751
6751
|
const scrollToDate = (date2) => {
|
|
6752
6752
|
if (Utils.compareDate(date2, propStartDate)) {
|
|
6753
6753
|
date2 = propStartDate;
|
|
@@ -9809,7 +9809,7 @@
|
|
|
9809
9809
|
this.store = values;
|
|
9810
9810
|
}
|
|
9811
9811
|
};
|
|
9812
|
-
this.setFieldsValue = (newStore) => {
|
|
9812
|
+
this.setFieldsValue = (newStore, needValidate = true) => {
|
|
9813
9813
|
this.store = {
|
|
9814
9814
|
...this.store,
|
|
9815
9815
|
...newStore
|
|
@@ -9831,6 +9831,7 @@
|
|
|
9831
9831
|
item.entity.onStoreChange("update");
|
|
9832
9832
|
}
|
|
9833
9833
|
});
|
|
9834
|
+
needValidate && this.validateFields();
|
|
9834
9835
|
};
|
|
9835
9836
|
this.setCallback = (callback) => {
|
|
9836
9837
|
this.callbacks = {
|
|
@@ -10080,7 +10081,7 @@
|
|
|
10080
10081
|
if (this.props.getValueFromEvent) {
|
|
10081
10082
|
next = this.props.getValueFromEvent(...args);
|
|
10082
10083
|
}
|
|
10083
|
-
setFieldsValue({ [name]: next });
|
|
10084
|
+
setFieldsValue({ [name]: next }, false);
|
|
10084
10085
|
}
|
|
10085
10086
|
};
|
|
10086
10087
|
const { validateTrigger } = this.props;
|
|
@@ -10813,18 +10814,20 @@
|
|
|
10813
10814
|
handleClick(item);
|
|
10814
10815
|
}
|
|
10815
10816
|
},
|
|
10816
|
-
item.value === innerValue ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon
|
|
10817
|
+
item.value === innerValue ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon ? React.cloneElement(icon, {
|
|
10818
|
+
className: `nut-menu-container-item-icon ${icon.props.className || ""}`
|
|
10819
|
+
}) : /* @__PURE__ */ React.createElement(
|
|
10817
10820
|
g$3,
|
|
10818
10821
|
{
|
|
10819
10822
|
color: activeColor,
|
|
10820
10823
|
size: 16,
|
|
10821
|
-
className: getIconCName(item.value, value)
|
|
10824
|
+
className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}`
|
|
10822
10825
|
}
|
|
10823
10826
|
)) : null,
|
|
10824
10827
|
/* @__PURE__ */ React.createElement(
|
|
10825
10828
|
components.View,
|
|
10826
10829
|
{
|
|
10827
|
-
className: getIconCName(item.value, value)
|
|
10830
|
+
className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
|
|
10828
10831
|
style: {
|
|
10829
10832
|
color: `${item.value === innerValue ? activeColor : ""}`
|
|
10830
10833
|
}
|
|
@@ -12898,6 +12901,10 @@
|
|
|
12898
12901
|
clearUploadQueue();
|
|
12899
12902
|
}
|
|
12900
12903
|
}));
|
|
12904
|
+
const fileListRef = React.useRef([]);
|
|
12905
|
+
React.useEffect(() => {
|
|
12906
|
+
fileListRef.current = fileList;
|
|
12907
|
+
}, [fileList]);
|
|
12901
12908
|
const clearUploadQueue = (index = -1) => {
|
|
12902
12909
|
if (index > -1) {
|
|
12903
12910
|
uploadQueue.splice(index, 1);
|
|
@@ -12977,7 +12984,7 @@
|
|
|
12977
12984
|
uploadOption.onStart = (option) => {
|
|
12978
12985
|
clearUploadQueue(index);
|
|
12979
12986
|
setFileList(
|
|
12980
|
-
|
|
12987
|
+
fileListRef.current.map((item) => {
|
|
12981
12988
|
if (item.uid === fileItem.uid) {
|
|
12982
12989
|
item.status = "ready";
|
|
12983
12990
|
item.message = locale.uploader.readyUpload;
|
|
@@ -12985,23 +12992,23 @@
|
|
|
12985
12992
|
return item;
|
|
12986
12993
|
})
|
|
12987
12994
|
);
|
|
12988
|
-
onStart
|
|
12995
|
+
onStart == null ? void 0 : onStart(option);
|
|
12989
12996
|
};
|
|
12990
12997
|
uploadOption.onProgress = (e2, option) => {
|
|
12991
12998
|
setFileList(
|
|
12992
|
-
|
|
12999
|
+
fileListRef.current.map((item) => {
|
|
12993
13000
|
if (item.uid === fileItem.uid) {
|
|
12994
13001
|
item.status = UPLOADING;
|
|
12995
13002
|
item.message = locale.uploader.uploading;
|
|
12996
13003
|
item.percentage = e2.progress;
|
|
12997
|
-
onProgress
|
|
13004
|
+
onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
|
|
12998
13005
|
}
|
|
12999
13006
|
return item;
|
|
13000
13007
|
})
|
|
13001
13008
|
);
|
|
13002
13009
|
};
|
|
13003
13010
|
uploadOption.onSuccess = (responseText, option) => {
|
|
13004
|
-
const list =
|
|
13011
|
+
const list = fileListRef.current.map((item) => {
|
|
13005
13012
|
if (item.uid === fileItem.uid) {
|
|
13006
13013
|
item.status = SUCCESS;
|
|
13007
13014
|
item.message = locale.uploader.success;
|
|
@@ -13017,7 +13024,7 @@
|
|
|
13017
13024
|
});
|
|
13018
13025
|
};
|
|
13019
13026
|
uploadOption.onFailure = (responseText, option) => {
|
|
13020
|
-
const list =
|
|
13027
|
+
const list = fileListRef.current.map((item) => {
|
|
13021
13028
|
if (item.uid === fileItem.uid) {
|
|
13022
13029
|
item.status = ERROR;
|
|
13023
13030
|
item.message = locale.uploader.error;
|
|
@@ -13079,8 +13086,8 @@
|
|
|
13079
13086
|
if (preview) {
|
|
13080
13087
|
fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
|
|
13081
13088
|
}
|
|
13082
|
-
setFileList([...fileList, fileItem]);
|
|
13083
13089
|
executeUpload(fileItem, index);
|
|
13090
|
+
setFileList([...fileList, fileItem]);
|
|
13084
13091
|
});
|
|
13085
13092
|
};
|
|
13086
13093
|
const filterFiles = (files) => {
|
|
@@ -13094,9 +13101,7 @@
|
|
|
13094
13101
|
}
|
|
13095
13102
|
return true;
|
|
13096
13103
|
});
|
|
13097
|
-
|
|
13098
|
-
onOversize && onOversize(files);
|
|
13099
|
-
}
|
|
13104
|
+
oversizes.length && (onOversize == null ? void 0 : onOversize(files));
|
|
13100
13105
|
const currentFileLength = filterFile.length + fileList.length;
|
|
13101
13106
|
if (currentFileLength > maximum) {
|
|
13102
13107
|
filterFile.splice(filterFile.length - (currentFileLength - maximum));
|
|
@@ -13744,7 +13749,8 @@
|
|
|
13744
13749
|
className,
|
|
13745
13750
|
onRefresh,
|
|
13746
13751
|
onLoadMore,
|
|
13747
|
-
onScroll
|
|
13752
|
+
onScroll,
|
|
13753
|
+
...rest
|
|
13748
13754
|
} = {
|
|
13749
13755
|
...defaultProps$D,
|
|
13750
13756
|
...props
|
|
@@ -13838,6 +13844,7 @@
|
|
|
13838
13844
|
return /* @__PURE__ */ React.createElement(
|
|
13839
13845
|
components.ScrollView,
|
|
13840
13846
|
{
|
|
13847
|
+
...rest,
|
|
13841
13848
|
className: classes,
|
|
13842
13849
|
scrollY: true,
|
|
13843
13850
|
id: "scroller",
|
|
@@ -18607,6 +18614,8 @@
|
|
|
18607
18614
|
gapY: 48,
|
|
18608
18615
|
width: 120,
|
|
18609
18616
|
height: 64,
|
|
18617
|
+
startX: 0,
|
|
18618
|
+
startY: 0,
|
|
18610
18619
|
image: "",
|
|
18611
18620
|
imageWidth: 120,
|
|
18612
18621
|
imageHeight: 64,
|
|
@@ -18625,6 +18634,8 @@
|
|
|
18625
18634
|
className,
|
|
18626
18635
|
gapX,
|
|
18627
18636
|
gapY,
|
|
18637
|
+
startX,
|
|
18638
|
+
startY,
|
|
18628
18639
|
width,
|
|
18629
18640
|
height,
|
|
18630
18641
|
image,
|
|
@@ -18705,7 +18716,7 @@
|
|
|
18705
18716
|
const markSize = Number(fontSize) * ratio;
|
|
18706
18717
|
ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
18707
18718
|
ctx.fillStyle = color;
|
|
18708
|
-
ctx.fillText(content,
|
|
18719
|
+
ctx.fillText(content, startX, startY);
|
|
18709
18720
|
ctx.restore();
|
|
18710
18721
|
setBase64Url(canvas.toDataURL());
|
|
18711
18722
|
}
|