@nutui/nutui-react 2.6.14 → 2.6.15
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 +914 -909
- package/README.md +21 -28
- package/dist/esm/Audio.js +10 -11
- package/dist/esm/CalendarItem.js +3 -1
- package/dist/esm/CheckboxGroup.js +4 -5
- package/dist/esm/DatePicker.js +3 -4
- package/dist/esm/Dialog.js +1 -2
- package/dist/esm/Menu.js +2 -2
- package/dist/esm/PullToRefresh.js +0 -1
- package/dist/esm/RadioGroup.js +0 -1
- package/dist/esm/Sticky.js +24 -30
- package/dist/esm/Swipe.js +0 -1
- package/dist/esm/Swiper.js +0 -1
- package/dist/esm/SwiperItem.js +0 -1
- package/dist/esm/Table.js +6 -5
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +12 -11
- package/dist/esm/WaterMark.js +3 -3
- package/dist/esm/radio2.js +0 -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 +75 -99
- package/dist/nutui.react.umd.js +75 -99
- package/dist/packages/uploader/uploader.scss +3 -1
- package/dist/style.css +1 -1
- package/dist/types/packages/swiperitem/swiperitem.d.ts +0 -1
- package/dist/types/packages/watermark/watermark.d.ts +10 -0
- package/dist/types/packages/watermark/watermark.taro.d.ts +2 -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 +2 -2
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 v2.6.
|
|
2
|
+
* @nutui/nutui-react v2.6.15 Fri Jul 26 2024 15:20:57 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3132,13 +3132,14 @@ const Sticky = (props) => {
|
|
|
3132
3132
|
}, []);
|
|
3133
3133
|
useEffect(() => {
|
|
3134
3134
|
if (position === "top") return;
|
|
3135
|
-
const containerEle = container
|
|
3136
|
-
|
|
3137
|
-
const
|
|
3135
|
+
const containerEle = container && container.current;
|
|
3136
|
+
const rootEle = rootRef.current;
|
|
3137
|
+
const stickyEle = stickyRef.current;
|
|
3138
|
+
if (!rootEle && !containerEle) return;
|
|
3139
|
+
const rootRect = getRect(rootEle);
|
|
3138
3140
|
const containerRect = getRect(containerEle);
|
|
3139
3141
|
const clientHeight = document.documentElement.clientHeight;
|
|
3140
|
-
const
|
|
3141
|
-
const stickyRect = getRect(stCurrent);
|
|
3142
|
+
const stickyRect = getRect(stickyEle);
|
|
3142
3143
|
let fixed = clientHeight - threshold < rootRect.bottom;
|
|
3143
3144
|
if (containerEle) {
|
|
3144
3145
|
fixed = containerRect.bottom > clientHeight - threshold - stickyRect.height && clientHeight - threshold - stickyRect.height > containerRect.top;
|
|
@@ -3153,19 +3154,18 @@ const Sticky = (props) => {
|
|
|
3153
3154
|
setIsFixed(fixed);
|
|
3154
3155
|
}, [position, container, threshold]);
|
|
3155
3156
|
const handleScroll = useCallback(() => {
|
|
3156
|
-
const containerEle = container
|
|
3157
|
-
|
|
3158
|
-
const
|
|
3159
|
-
|
|
3160
|
-
const
|
|
3157
|
+
const containerEle = container && container.current;
|
|
3158
|
+
const rootEle = rootRef.current;
|
|
3159
|
+
const stickyEle = stickyRef.current;
|
|
3160
|
+
if (!rootEle && !containerEle) return;
|
|
3161
|
+
const rootRect = getRect(rootEle);
|
|
3162
|
+
const stickyRect = getRect(stickyEle);
|
|
3161
3163
|
const containerRect = getRect(containerEle);
|
|
3162
3164
|
if (rootRect.height) {
|
|
3163
|
-
setRootStyle((prev) => {
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
};
|
|
3168
|
-
});
|
|
3165
|
+
setRootStyle((prev) => ({
|
|
3166
|
+
...prev,
|
|
3167
|
+
height: rootRect.height
|
|
3168
|
+
}));
|
|
3169
3169
|
}
|
|
3170
3170
|
const getFixed = () => {
|
|
3171
3171
|
let fixed2 = false;
|
|
@@ -3181,22 +3181,16 @@ const Sticky = (props) => {
|
|
|
3181
3181
|
};
|
|
3182
3182
|
};
|
|
3183
3183
|
const getTransform = () => {
|
|
3184
|
-
if (position === "top") {
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3189
|
-
}
|
|
3190
|
-
return {};
|
|
3184
|
+
if (position === "top" && containerEle) {
|
|
3185
|
+
const diff = containerRect.bottom - threshold - stickyRect.height;
|
|
3186
|
+
const transform = diff < 0 ? diff : 0;
|
|
3187
|
+
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3191
3188
|
}
|
|
3192
|
-
if (position === "bottom") {
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3198
|
-
}
|
|
3199
|
-
return {};
|
|
3189
|
+
if (position === "bottom" && containerEle) {
|
|
3190
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
3191
|
+
const diff = containerRect.bottom - (clientHeight - threshold);
|
|
3192
|
+
const transform = diff < 0 ? diff : 0;
|
|
3193
|
+
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3200
3194
|
}
|
|
3201
3195
|
return {};
|
|
3202
3196
|
};
|
|
@@ -3215,9 +3209,9 @@ const Sticky = (props) => {
|
|
|
3215
3209
|
});
|
|
3216
3210
|
useEffect(() => {
|
|
3217
3211
|
const el = getElement();
|
|
3218
|
-
el.addEventListener("scroll", handleScroll, false);
|
|
3212
|
+
el == null ? void 0 : el.addEventListener("scroll", handleScroll, false);
|
|
3219
3213
|
return () => {
|
|
3220
|
-
el.removeEventListener("scroll", handleScroll);
|
|
3214
|
+
el == null ? void 0 : el.removeEventListener("scroll", handleScroll);
|
|
3221
3215
|
};
|
|
3222
3216
|
}, [getElement, handleScroll]);
|
|
3223
3217
|
return /* @__PURE__ */ React__default.createElement(
|
|
@@ -10680,8 +10674,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
10680
10674
|
};
|
|
10681
10675
|
useEffect(() => {
|
|
10682
10676
|
setCurrentDate(resetDefaultValue() || []);
|
|
10683
|
-
popup && resetRender();
|
|
10684
10677
|
}, [defaultValue]);
|
|
10678
|
+
useEffect(() => {
|
|
10679
|
+
popup && resetRender();
|
|
10680
|
+
}, [currentDate]);
|
|
10685
10681
|
const scrollToDate = (date4) => {
|
|
10686
10682
|
if (Utils.compareDate(date4, propStartDate)) {
|
|
10687
10683
|
date4 = propStartDate;
|
|
@@ -11516,15 +11512,15 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
11516
11512
|
className,
|
|
11517
11513
|
disabled,
|
|
11518
11514
|
list,
|
|
11519
|
-
onChange,
|
|
11520
11515
|
value,
|
|
11521
11516
|
defaultValue,
|
|
11522
11517
|
max,
|
|
11523
11518
|
min,
|
|
11524
|
-
onLimit,
|
|
11525
11519
|
labelPosition,
|
|
11526
11520
|
direction,
|
|
11527
11521
|
options: options2,
|
|
11522
|
+
onChange,
|
|
11523
|
+
onLimit,
|
|
11528
11524
|
...rest
|
|
11529
11525
|
} = { ...defaultProps$_, ...props };
|
|
11530
11526
|
useImperativeHandle(ref, () => ({
|
|
@@ -11553,8 +11549,8 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
11553
11549
|
}
|
|
11554
11550
|
}));
|
|
11555
11551
|
const [_value, setValue] = usePropsValue({
|
|
11556
|
-
value
|
|
11557
|
-
defaultValue
|
|
11552
|
+
value,
|
|
11553
|
+
defaultValue,
|
|
11558
11554
|
finalValue: [],
|
|
11559
11555
|
onChange
|
|
11560
11556
|
});
|
|
@@ -11606,7 +11602,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
11606
11602
|
className: classNames(
|
|
11607
11603
|
classPrefix$i,
|
|
11608
11604
|
{
|
|
11609
|
-
[`nut-checkboxgroup-${
|
|
11605
|
+
[`nut-checkboxgroup-${direction}`]: direction,
|
|
11610
11606
|
[`nut-checkboxgroup-list`]: list
|
|
11611
11607
|
},
|
|
11612
11608
|
className
|
|
@@ -11618,7 +11614,6 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
11618
11614
|
);
|
|
11619
11615
|
}
|
|
11620
11616
|
);
|
|
11621
|
-
CheckboxGroup.defaultProps = defaultProps$_;
|
|
11622
11617
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
11623
11618
|
const defaultProps$Z = {
|
|
11624
11619
|
...ComponentDefaults,
|
|
@@ -12439,7 +12434,7 @@ const DatePicker = (props) => {
|
|
|
12439
12434
|
if (!isEqual2) {
|
|
12440
12435
|
setSelectedDate(formatValue(newDate));
|
|
12441
12436
|
}
|
|
12442
|
-
|
|
12437
|
+
onChange == null ? void 0 : onChange(
|
|
12443
12438
|
selectedOptions,
|
|
12444
12439
|
[
|
|
12445
12440
|
String(newDate.getFullYear()),
|
|
@@ -12536,8 +12531,8 @@ const DatePicker = (props) => {
|
|
|
12536
12531
|
}
|
|
12537
12532
|
pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
|
|
12538
12533
|
setPickerValue([...pickerValue]);
|
|
12539
|
-
if (
|
|
12540
|
-
return
|
|
12534
|
+
if (filter == null ? void 0 : filter(type22, arr)) {
|
|
12535
|
+
return filter == null ? void 0 : filter(type22, arr);
|
|
12541
12536
|
}
|
|
12542
12537
|
return arr;
|
|
12543
12538
|
};
|
|
@@ -12595,7 +12590,6 @@ const DatePicker = (props) => {
|
|
|
12595
12590
|
}
|
|
12596
12591
|
));
|
|
12597
12592
|
};
|
|
12598
|
-
DatePicker.defaultProps = defaultProps$X;
|
|
12599
12593
|
DatePicker.displayName = "NutDatePicker";
|
|
12600
12594
|
const Context = createContext({});
|
|
12601
12595
|
function _extends() {
|
|
@@ -14838,14 +14832,10 @@ const Menu = (props) => {
|
|
|
14838
14832
|
return /* @__PURE__ */ React__default.createElement(
|
|
14839
14833
|
"div",
|
|
14840
14834
|
{
|
|
14841
|
-
className: classNames(
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
disabled
|
|
14846
|
-
},
|
|
14847
|
-
className
|
|
14848
|
-
),
|
|
14835
|
+
className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
|
|
14836
|
+
active: showMenuItem[index],
|
|
14837
|
+
disabled
|
|
14838
|
+
}),
|
|
14849
14839
|
style: { color: showMenuItem[index] ? activeColor : "" },
|
|
14850
14840
|
key: index,
|
|
14851
14841
|
onClick: (e2) => {
|
|
@@ -15122,7 +15112,6 @@ const RadioGroup = React__default.forwardRef(
|
|
|
15122
15112
|
);
|
|
15123
15113
|
}
|
|
15124
15114
|
);
|
|
15125
|
-
RadioGroup.defaultProps = defaultProps$Q;
|
|
15126
15115
|
RadioGroup.displayName = "NutRadioGroup";
|
|
15127
15116
|
const defaultProps$P = {
|
|
15128
15117
|
...ComponentDefaults,
|
|
@@ -15250,7 +15239,6 @@ const Radio = (props) => {
|
|
|
15250
15239
|
renderRadioItem()
|
|
15251
15240
|
);
|
|
15252
15241
|
};
|
|
15253
|
-
Radio.defaultProps = defaultProps$P;
|
|
15254
15242
|
Radio.displayName = "NutRadio";
|
|
15255
15243
|
Radio.Group = RadioGroup;
|
|
15256
15244
|
const defaultProps$O = {
|
|
@@ -16629,6 +16617,7 @@ const defaultProps$G = {
|
|
|
16629
16617
|
};
|
|
16630
16618
|
const InternalUploader = (props, ref) => {
|
|
16631
16619
|
const { locale } = useConfig();
|
|
16620
|
+
const fileListRef = useRef([]);
|
|
16632
16621
|
const {
|
|
16633
16622
|
children,
|
|
16634
16623
|
uploadIcon,
|
|
@@ -16681,6 +16670,9 @@ const InternalUploader = (props, ref) => {
|
|
|
16681
16670
|
});
|
|
16682
16671
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
16683
16672
|
const classes = classNames(className, "nut-uploader");
|
|
16673
|
+
useEffect(() => {
|
|
16674
|
+
fileListRef.current = fileList;
|
|
16675
|
+
}, [fileList]);
|
|
16684
16676
|
useImperativeHandle(ref, () => ({
|
|
16685
16677
|
submit: () => {
|
|
16686
16678
|
Promise.all(uploadQueue).then((res) => {
|
|
@@ -16725,7 +16717,7 @@ const InternalUploader = (props, ref) => {
|
|
|
16725
16717
|
uploadOption.onStart = (option) => {
|
|
16726
16718
|
clearUploadQueue(index);
|
|
16727
16719
|
setFileList(
|
|
16728
|
-
|
|
16720
|
+
fileListRef.current.map((item) => {
|
|
16729
16721
|
if (item.uid === fileItem.uid) {
|
|
16730
16722
|
item.status = "ready";
|
|
16731
16723
|
item.message = locale.uploader.readyUpload;
|
|
@@ -16733,23 +16725,23 @@ const InternalUploader = (props, ref) => {
|
|
|
16733
16725
|
return item;
|
|
16734
16726
|
})
|
|
16735
16727
|
);
|
|
16736
|
-
onStart
|
|
16728
|
+
onStart == null ? void 0 : onStart(option);
|
|
16737
16729
|
};
|
|
16738
16730
|
uploadOption.onProgress = (e2, option) => {
|
|
16739
16731
|
setFileList(
|
|
16740
|
-
|
|
16732
|
+
fileListRef.current.map((item) => {
|
|
16741
16733
|
if (item.uid === fileItem.uid) {
|
|
16742
16734
|
item.status = UPLOADING;
|
|
16743
16735
|
item.message = locale.uploader.uploading;
|
|
16744
16736
|
item.percentage = (e2.loaded / e2.total * 100).toFixed(0);
|
|
16745
|
-
onProgress
|
|
16737
|
+
onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
|
|
16746
16738
|
}
|
|
16747
16739
|
return item;
|
|
16748
16740
|
})
|
|
16749
16741
|
);
|
|
16750
16742
|
};
|
|
16751
16743
|
uploadOption.onSuccess = (responseText, option) => {
|
|
16752
|
-
const list =
|
|
16744
|
+
const list = fileListRef.current.map((item) => {
|
|
16753
16745
|
if (item.uid === fileItem.uid) {
|
|
16754
16746
|
item.status = SUCCESS;
|
|
16755
16747
|
item.message = locale.uploader.success;
|
|
@@ -16766,7 +16758,7 @@ const InternalUploader = (props, ref) => {
|
|
|
16766
16758
|
});
|
|
16767
16759
|
};
|
|
16768
16760
|
uploadOption.onFailure = (responseText, option) => {
|
|
16769
|
-
const list =
|
|
16761
|
+
const list = fileListRef.current.map((item) => {
|
|
16770
16762
|
if (item.uid === fileItem.uid) {
|
|
16771
16763
|
item.status = ERROR;
|
|
16772
16764
|
item.message = locale.uploader.error;
|
|
@@ -16828,9 +16820,7 @@ const InternalUploader = (props, ref) => {
|
|
|
16828
16820
|
}
|
|
16829
16821
|
return true;
|
|
16830
16822
|
});
|
|
16831
|
-
|
|
16832
|
-
onOversize && onOversize(files);
|
|
16833
|
-
}
|
|
16823
|
+
oversizes.length && (onOversize == null ? void 0 : onOversize(files));
|
|
16834
16824
|
if (filterFile.length > maximum) {
|
|
16835
16825
|
filterFile.splice(maximum, filterFile.length - maximum);
|
|
16836
16826
|
}
|
|
@@ -16869,7 +16859,6 @@ const InternalUploader = (props, ref) => {
|
|
|
16869
16859
|
const _files = filterFiles(new Array().slice.call(files));
|
|
16870
16860
|
readFile(_files);
|
|
16871
16861
|
}
|
|
16872
|
-
setFileList(fileList);
|
|
16873
16862
|
if (clearInput) {
|
|
16874
16863
|
clearInputValue($el);
|
|
16875
16864
|
}
|
|
@@ -17194,18 +17183,6 @@ const Content = (props) => {
|
|
|
17194
17183
|
);
|
|
17195
17184
|
};
|
|
17196
17185
|
Content.displayName = "NutContent";
|
|
17197
|
-
const defaultDialogProps = {
|
|
17198
|
-
...ComponentDefaults,
|
|
17199
|
-
overlay: true,
|
|
17200
|
-
overlayStyle: {},
|
|
17201
|
-
overlayClassName: "",
|
|
17202
|
-
onCancel: () => {
|
|
17203
|
-
},
|
|
17204
|
-
onClose: () => {
|
|
17205
|
-
},
|
|
17206
|
-
onOverlayClick: (e2) => true,
|
|
17207
|
-
...defaultOverlayProps
|
|
17208
|
-
};
|
|
17209
17186
|
const DialogWrap = (props) => {
|
|
17210
17187
|
const {
|
|
17211
17188
|
visible,
|
|
@@ -17247,7 +17224,6 @@ const DialogWrap = (props) => {
|
|
|
17247
17224
|
/* @__PURE__ */ React__default.createElement(Content, { ...props, visible })
|
|
17248
17225
|
));
|
|
17249
17226
|
};
|
|
17250
|
-
DialogWrap.defaultProps = defaultDialogProps;
|
|
17251
17227
|
DialogWrap.displayName = "NutDialogWrap";
|
|
17252
17228
|
const defaultProps$E = {
|
|
17253
17229
|
...ComponentDefaults,
|
|
@@ -18780,7 +18756,6 @@ const PullToRefresh = (p) => {
|
|
|
18780
18756
|
/* @__PURE__ */ React__default.createElement("div", null, renderStatusText())
|
|
18781
18757
|
)), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, props.children));
|
|
18782
18758
|
};
|
|
18783
|
-
PullToRefresh.defaultProps = defaultProps$x;
|
|
18784
18759
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
18785
18760
|
const AvatarContext = createContext({});
|
|
18786
18761
|
const defaultProps$w = {
|
|
@@ -19164,7 +19139,6 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
19164
19139
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
|
|
19165
19140
|
);
|
|
19166
19141
|
});
|
|
19167
|
-
Swipe.defaultProps = defaultProps$t;
|
|
19168
19142
|
Swipe.displayName = "NutSwipe";
|
|
19169
19143
|
const classPrefix$8 = "nut-toast";
|
|
19170
19144
|
class Notification2 extends React.PureComponent {
|
|
@@ -19564,16 +19538,16 @@ const Audio = (props) => {
|
|
|
19564
19538
|
percent: 0,
|
|
19565
19539
|
duration: "00:00:00",
|
|
19566
19540
|
second: 0,
|
|
19567
|
-
hanMuted:
|
|
19568
|
-
playing:
|
|
19541
|
+
hanMuted: muted,
|
|
19542
|
+
playing: autoPlay,
|
|
19569
19543
|
handPlaying: false
|
|
19570
19544
|
});
|
|
19571
19545
|
const classPrefix2 = "nut-audio";
|
|
19572
19546
|
const handleEnded = (e2) => {
|
|
19573
|
-
if (
|
|
19547
|
+
if (loop2) {
|
|
19574
19548
|
console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
|
|
19575
19549
|
} else {
|
|
19576
|
-
|
|
19550
|
+
onEnd == null ? void 0 : onEnd(e2);
|
|
19577
19551
|
}
|
|
19578
19552
|
};
|
|
19579
19553
|
function watch() {
|
|
@@ -19614,25 +19588,25 @@ const Audio = (props) => {
|
|
|
19614
19588
|
if (statusRef.current.currentTime > 0 && AudioRef.current) {
|
|
19615
19589
|
statusRef.current.currentTime--;
|
|
19616
19590
|
AudioRef.current.currentTime = statusRef.current.currentTime;
|
|
19617
|
-
|
|
19591
|
+
onBack == null ? void 0 : onBack(AudioRef.current);
|
|
19618
19592
|
}
|
|
19619
19593
|
};
|
|
19620
19594
|
const handleForward = () => {
|
|
19621
19595
|
if (AudioRef.current) {
|
|
19622
19596
|
statusRef.current.currentTime++;
|
|
19623
19597
|
AudioRef.current.currentTime = statusRef.current.currentTime;
|
|
19624
|
-
|
|
19598
|
+
onForward == null ? void 0 : onForward(AudioRef.current);
|
|
19625
19599
|
}
|
|
19626
19600
|
};
|
|
19627
19601
|
const handleMute = () => {
|
|
19628
19602
|
if (AudioRef.current) {
|
|
19629
19603
|
AudioRef.current.muted = !AudioRef.current.muted;
|
|
19630
|
-
|
|
19604
|
+
onMute == null ? void 0 : onMute(AudioRef.current);
|
|
19631
19605
|
}
|
|
19632
19606
|
};
|
|
19633
19607
|
const handlePause = (e2) => {
|
|
19634
19608
|
setPlaying(false);
|
|
19635
|
-
|
|
19609
|
+
onPause == null ? void 0 : onPause(e2);
|
|
19636
19610
|
};
|
|
19637
19611
|
const formatSeconds = (value) => {
|
|
19638
19612
|
if (!value) {
|
|
@@ -19721,12 +19695,12 @@ const Audio = (props) => {
|
|
|
19721
19695
|
};
|
|
19722
19696
|
const handleCanplay = (e2) => {
|
|
19723
19697
|
setIsCanPlay(true);
|
|
19724
|
-
if (
|
|
19698
|
+
if (autoPlay && !playing) {
|
|
19725
19699
|
AudioRef && AudioRef.current && AudioRef.current.play();
|
|
19726
19700
|
}
|
|
19727
19701
|
if (AudioRef.current) {
|
|
19728
19702
|
statusRef.current.second = AudioRef.current.duration || 0;
|
|
19729
|
-
|
|
19703
|
+
onCanPlay == null ? void 0 : onCanPlay(e2);
|
|
19730
19704
|
}
|
|
19731
19705
|
};
|
|
19732
19706
|
const onTimeupdate = (e2) => {
|
|
@@ -19755,7 +19729,6 @@ const Audio = (props) => {
|
|
|
19755
19729
|
/* @__PURE__ */ React__default.createElement("track", { kind: "captions" })
|
|
19756
19730
|
));
|
|
19757
19731
|
};
|
|
19758
|
-
Audio.defaultProps = defaultProps$p;
|
|
19759
19732
|
Audio.displayName = "NutAudio";
|
|
19760
19733
|
const defaultProps$o = {
|
|
19761
19734
|
...ComponentDefaults,
|
|
@@ -20951,7 +20924,6 @@ const Swiper = React__default.forwardRef(
|
|
|
20951
20924
|
);
|
|
20952
20925
|
}
|
|
20953
20926
|
);
|
|
20954
|
-
Swiper.defaultProps = defaultProps$h;
|
|
20955
20927
|
Swiper.displayName = "NutSwiper";
|
|
20956
20928
|
const defaultProps$g = {
|
|
20957
20929
|
onClick: (e2) => void 0
|
|
@@ -20962,7 +20934,6 @@ const SwiperItem = (props) => {
|
|
|
20962
20934
|
const classes = classNames(classPrefix2, className);
|
|
20963
20935
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, onClick: props.onClick, style }, children);
|
|
20964
20936
|
};
|
|
20965
|
-
SwiperItem.defaultProps = defaultProps$g;
|
|
20966
20937
|
SwiperItem.displayName = "NutSwiperItem";
|
|
20967
20938
|
const InnerSwiper = Swiper;
|
|
20968
20939
|
InnerSwiper.Item = SwiperItem;
|
|
@@ -21658,10 +21629,6 @@ const Table = (props) => {
|
|
|
21658
21629
|
});
|
|
21659
21630
|
};
|
|
21660
21631
|
const renderBodyTds = (item, rowIndex) => {
|
|
21661
|
-
const { rowRender } = item;
|
|
21662
|
-
if (rowRender && typeof rowRender === "function") {
|
|
21663
|
-
return rowRender(item, rowIndex);
|
|
21664
|
-
}
|
|
21665
21632
|
return sortDataItem().map(([value, render2]) => {
|
|
21666
21633
|
return /* @__PURE__ */ React__default.createElement(
|
|
21667
21634
|
"div",
|
|
@@ -21680,7 +21647,12 @@ const Table = (props) => {
|
|
|
21680
21647
|
};
|
|
21681
21648
|
const renderBodyTrs = () => {
|
|
21682
21649
|
return innerValue.map((item, index) => {
|
|
21683
|
-
|
|
21650
|
+
const inner = renderBodyTds(item, index);
|
|
21651
|
+
const { rowRender } = item;
|
|
21652
|
+
if (rowRender && typeof rowRender === "function") {
|
|
21653
|
+
return rowRender(item, index, { inner });
|
|
21654
|
+
}
|
|
21655
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, inner);
|
|
21684
21656
|
});
|
|
21685
21657
|
};
|
|
21686
21658
|
return /* @__PURE__ */ React__default.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React__default.createElement(
|
|
@@ -22704,6 +22676,8 @@ const defaultProps$1 = {
|
|
|
22704
22676
|
gapY: 48,
|
|
22705
22677
|
width: 120,
|
|
22706
22678
|
height: 64,
|
|
22679
|
+
startX: 0,
|
|
22680
|
+
startY: 0,
|
|
22707
22681
|
image: "",
|
|
22708
22682
|
imageWidth: 120,
|
|
22709
22683
|
imageHeight: 64,
|
|
@@ -22722,6 +22696,8 @@ const WaterMark = (props) => {
|
|
|
22722
22696
|
className,
|
|
22723
22697
|
gapX,
|
|
22724
22698
|
gapY,
|
|
22699
|
+
startX,
|
|
22700
|
+
startY,
|
|
22725
22701
|
width,
|
|
22726
22702
|
height,
|
|
22727
22703
|
image,
|
|
@@ -22784,7 +22760,7 @@ const WaterMark = (props) => {
|
|
|
22784
22760
|
const markSize = Number(fontSize) * ratio;
|
|
22785
22761
|
ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
22786
22762
|
ctx2.fillStyle = color;
|
|
22787
|
-
ctx2.fillText(content,
|
|
22763
|
+
ctx2.fillText(content, startX, startY);
|
|
22788
22764
|
ctx2.restore();
|
|
22789
22765
|
setBase64Url(canvas.toDataURL());
|
|
22790
22766
|
}
|