@nutui/nutui-react 1.3.5 → 1.3.7
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 +14 -0
- package/dist/esm/ActionSheet.js +15 -25
- package/dist/esm/Address.js +151 -221
- package/dist/esm/AnimatingNumbers.js +7 -31
- package/dist/esm/Audio.js +31 -66
- package/dist/esm/Avatar.js +25 -51
- package/dist/esm/AvatarGroup.js +2 -9
- package/dist/esm/BackTop.js +29 -55
- package/dist/esm/Badge.js +9 -20
- package/dist/esm/Barrage.js +8 -20
- package/dist/esm/Button.js +22 -37
- package/dist/esm/Calendar.js +23 -37
- package/dist/esm/CalendarItem.js +86 -186
- package/dist/esm/Card.js +14 -20
- package/dist/esm/Cascader.js +77 -197
- package/dist/esm/Cell.js +20 -30
- package/dist/esm/CellGroup.js +6 -12
- package/dist/esm/Checkbox.js +27 -48
- package/dist/esm/CheckboxGroup.js +12 -30
- package/dist/esm/CircleProgress.js +11 -28
- package/dist/esm/Col.js +11 -22
- package/dist/esm/Collapse.js +11 -27
- package/dist/esm/CollapseItem.js +33 -47
- package/dist/esm/ConfigProvider.js +4 -15
- package/dist/esm/CountDown.js +37 -74
- package/dist/esm/DatePicker.js +44 -106
- package/dist/esm/Dialog.js +31 -89
- package/dist/esm/Divider.js +8 -15
- package/dist/esm/Drag.js +30 -45
- package/dist/esm/Elevator.js +37 -74
- package/dist/esm/Empty.js +11 -24
- package/dist/esm/FixedNav.js +18 -29
- package/dist/esm/Grid.js +13 -28
- package/dist/esm/GridItem.js +18 -34
- package/dist/esm/ImagePreview.js +36 -71
- package/dist/esm/Indicator.js +9 -20
- package/dist/esm/Infiniteloading.js +26 -55
- package/dist/esm/Input.js +62 -106
- package/dist/esm/InputNumber.js +25 -52
- package/dist/esm/Layout.js +0 -6
- package/dist/esm/Menu.js +27 -49
- package/dist/esm/MenuItem.js +32 -56
- package/dist/esm/NavBar.js +18 -34
- package/dist/esm/NoticeBar.js +54 -102
- package/dist/esm/Notify.js +9 -38
- package/dist/esm/NumberKeyboard.js +21 -52
- package/dist/esm/Pagination.js +38 -71
- package/dist/esm/Picker.js +91 -178
- package/dist/esm/Popover.js +32 -72
- package/dist/esm/Popup.js +40 -72
- package/dist/esm/Price.js +7 -24
- package/dist/esm/Progress.js +35 -50
- package/dist/esm/PullToRefresh.js +28 -83
- package/dist/esm/Radio.js +24 -47
- package/dist/esm/RadioGroup.js +14 -24
- package/dist/esm/Range.js +44 -116
- package/dist/esm/Rate.js +21 -39
- package/dist/esm/Row.js +7 -16
- package/dist/esm/SearchBar.js +47 -68
- package/dist/esm/ShortPassword.js +29 -56
- package/dist/esm/SideNavBar.js +9 -16
- package/dist/esm/SideNavBarItem.js +4 -11
- package/dist/esm/Signature.js +13 -43
- package/dist/esm/Skeleton.js +13 -23
- package/dist/esm/Step.js +12 -28
- package/dist/esm/Steps.js +6 -14
- package/dist/esm/Sticky.js +24 -52
- package/dist/esm/SubSideNavBar.js +7 -22
- package/dist/esm/Swipe.js +15 -54
- package/dist/esm/Swiper.js +102 -186
- package/dist/esm/SwiperItem.js +2 -12
- package/dist/esm/Switch.js +13 -27
- package/dist/esm/Tabbar.js +13 -25
- package/dist/esm/TabbarItem.js +15 -23
- package/dist/esm/Table.js +19 -39
- package/dist/esm/Tag.js +19 -36
- package/dist/esm/TextArea.js +19 -43
- package/dist/esm/TimeDetail.js +15 -28
- package/dist/esm/TimePannel.js +5 -12
- package/dist/esm/TimeSelect.js +35 -59
- package/dist/esm/Toast.js +16 -49
- package/dist/esm/Uploader.js +57 -152
- package/dist/esm/Video.js +8 -19
- package/dist/esm/VirtualList.js +84 -118
- package/dist/esm/date-710f8c7c.js +9 -33
- package/dist/esm/get-scroll-parent-3dcd3f53.js +1 -9
- package/dist/esm/icon-8dc4de10.js +11 -21
- package/dist/esm/offsetContext-0e3d04b3.js +0 -3
- package/dist/esm/overlay-ed3eb37d.js +12 -23
- package/dist/esm/render-18227751.js +0 -11
- package/dist/esm/tabpane-c957ab14.js +4 -10
- package/dist/esm/tabs-0896a61b.js +28 -56
- package/dist/esm/types/src/packages/elevator/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +2 -0
- package/dist/esm/useClientRect-839d18c5.js +0 -5
- package/dist/esm/useTouch-a2ea68c6.js +27 -47
- 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/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +429 -413
- package/dist/nutui.react.umd.js +421 -405
- package/dist/packages/menu/menu.scss +4 -0
- package/dist/packages/menuitem/menuitem.scss +27 -2
- package/dist/packages/searchbar/searchbar.scss +20 -3
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.3.
|
|
2
|
+
* @nutui/nutui-react v1.3.7 Wed Oct 19 2022 16:54:53 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -338,8 +338,8 @@
|
|
|
338
338
|
function isAbsolute(pathname) {
|
|
339
339
|
return pathname.charAt(0) === "/";
|
|
340
340
|
}
|
|
341
|
-
function spliceOne(list,
|
|
342
|
-
for (var i =
|
|
341
|
+
function spliceOne(list, index) {
|
|
342
|
+
for (var i = index, k2 = i + 1, n2 = list.length; k2 < n2; i += 1, k2 += 1) {
|
|
343
343
|
list[i] = list[k2];
|
|
344
344
|
}
|
|
345
345
|
list.pop();
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
throw new Error(prefix$1);
|
|
401
401
|
}
|
|
402
402
|
var provided = typeof message === "function" ? message() : message;
|
|
403
|
-
var value = provided ? prefix$1
|
|
403
|
+
var value = provided ? "".concat(prefix$1, ": ").concat(provided) : prefix$1;
|
|
404
404
|
throw new Error(value);
|
|
405
405
|
}
|
|
406
406
|
function parsePath(path) {
|
|
@@ -552,7 +552,7 @@
|
|
|
552
552
|
function createKey() {
|
|
553
553
|
return Math.random().toString(36).substr(2, keyLength);
|
|
554
554
|
}
|
|
555
|
-
var
|
|
555
|
+
var index = clamp$1(initialIndex, 0, initialEntries.length - 1);
|
|
556
556
|
var entries = initialEntries.map(function(entry) {
|
|
557
557
|
return typeof entry === "string" ? createLocation(entry, void 0, createKey()) : createLocation(entry, void 0, entry.key || createKey());
|
|
558
558
|
});
|
|
@@ -630,8 +630,8 @@
|
|
|
630
630
|
var history = {
|
|
631
631
|
length: entries.length,
|
|
632
632
|
action: "POP",
|
|
633
|
-
location: entries[
|
|
634
|
-
index
|
|
633
|
+
location: entries[index],
|
|
634
|
+
index,
|
|
635
635
|
entries,
|
|
636
636
|
createHref,
|
|
637
637
|
push,
|
|
@@ -645,136 +645,6 @@
|
|
|
645
645
|
};
|
|
646
646
|
return history;
|
|
647
647
|
}
|
|
648
|
-
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
649
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
650
|
-
function getUniqueId() {
|
|
651
|
-
var key = "__global_unique_id__";
|
|
652
|
-
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
653
|
-
}
|
|
654
|
-
function objectIs(x2, y2) {
|
|
655
|
-
if (x2 === y2) {
|
|
656
|
-
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
657
|
-
} else {
|
|
658
|
-
return x2 !== x2 && y2 !== y2;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
function createEventEmitter(value) {
|
|
662
|
-
var handlers = [];
|
|
663
|
-
return {
|
|
664
|
-
on: function on(handler) {
|
|
665
|
-
handlers.push(handler);
|
|
666
|
-
},
|
|
667
|
-
off: function off(handler) {
|
|
668
|
-
handlers = handlers.filter(function(h2) {
|
|
669
|
-
return h2 !== handler;
|
|
670
|
-
});
|
|
671
|
-
},
|
|
672
|
-
get: function get() {
|
|
673
|
-
return value;
|
|
674
|
-
},
|
|
675
|
-
set: function set(newValue, changedBits) {
|
|
676
|
-
value = newValue;
|
|
677
|
-
handlers.forEach(function(handler) {
|
|
678
|
-
return handler(value, changedBits);
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
function onlyChild(children) {
|
|
684
|
-
return Array.isArray(children) ? children[0] : children;
|
|
685
|
-
}
|
|
686
|
-
function createReactContext(defaultValue, calculateChangedBits) {
|
|
687
|
-
var _Provider$childContex, _Consumer$contextType;
|
|
688
|
-
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
689
|
-
var Provider = /* @__PURE__ */ function(_Component) {
|
|
690
|
-
_inheritsLoose(Provider2, _Component);
|
|
691
|
-
function Provider2() {
|
|
692
|
-
var _this;
|
|
693
|
-
_this = _Component.apply(this, arguments) || this;
|
|
694
|
-
_this.emitter = createEventEmitter(_this.props.value);
|
|
695
|
-
return _this;
|
|
696
|
-
}
|
|
697
|
-
var _proto = Provider2.prototype;
|
|
698
|
-
_proto.getChildContext = function getChildContext() {
|
|
699
|
-
var _ref;
|
|
700
|
-
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
701
|
-
};
|
|
702
|
-
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
703
|
-
if (this.props.value !== nextProps.value) {
|
|
704
|
-
var oldValue = this.props.value;
|
|
705
|
-
var newValue = nextProps.value;
|
|
706
|
-
var changedBits;
|
|
707
|
-
if (objectIs(oldValue, newValue)) {
|
|
708
|
-
changedBits = 0;
|
|
709
|
-
} else {
|
|
710
|
-
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
711
|
-
changedBits |= 0;
|
|
712
|
-
if (changedBits !== 0) {
|
|
713
|
-
this.emitter.set(nextProps.value, changedBits);
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
};
|
|
718
|
-
_proto.render = function render2() {
|
|
719
|
-
return this.props.children;
|
|
720
|
-
};
|
|
721
|
-
return Provider2;
|
|
722
|
-
}(React.Component);
|
|
723
|
-
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
724
|
-
var Consumer = /* @__PURE__ */ function(_Component2) {
|
|
725
|
-
_inheritsLoose(Consumer2, _Component2);
|
|
726
|
-
function Consumer2() {
|
|
727
|
-
var _this2;
|
|
728
|
-
_this2 = _Component2.apply(this, arguments) || this;
|
|
729
|
-
_this2.state = {
|
|
730
|
-
value: _this2.getValue()
|
|
731
|
-
};
|
|
732
|
-
_this2.onUpdate = function(newValue, changedBits) {
|
|
733
|
-
var observedBits = _this2.observedBits | 0;
|
|
734
|
-
if ((observedBits & changedBits) !== 0) {
|
|
735
|
-
_this2.setState({
|
|
736
|
-
value: _this2.getValue()
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
};
|
|
740
|
-
return _this2;
|
|
741
|
-
}
|
|
742
|
-
var _proto2 = Consumer2.prototype;
|
|
743
|
-
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
744
|
-
var observedBits = nextProps.observedBits;
|
|
745
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
746
|
-
};
|
|
747
|
-
_proto2.componentDidMount = function componentDidMount() {
|
|
748
|
-
if (this.context[contextProp]) {
|
|
749
|
-
this.context[contextProp].on(this.onUpdate);
|
|
750
|
-
}
|
|
751
|
-
var observedBits = this.props.observedBits;
|
|
752
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
753
|
-
};
|
|
754
|
-
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
755
|
-
if (this.context[contextProp]) {
|
|
756
|
-
this.context[contextProp].off(this.onUpdate);
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
_proto2.getValue = function getValue() {
|
|
760
|
-
if (this.context[contextProp]) {
|
|
761
|
-
return this.context[contextProp].get();
|
|
762
|
-
} else {
|
|
763
|
-
return defaultValue;
|
|
764
|
-
}
|
|
765
|
-
};
|
|
766
|
-
_proto2.render = function render2() {
|
|
767
|
-
return onlyChild(this.props.children)(this.state.value);
|
|
768
|
-
};
|
|
769
|
-
return Consumer2;
|
|
770
|
-
}(React.Component);
|
|
771
|
-
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
772
|
-
return {
|
|
773
|
-
Provider,
|
|
774
|
-
Consumer
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
var index = React__default["default"].createContext || createReactContext;
|
|
778
648
|
var pathToRegexp$2 = { exports: {} };
|
|
779
649
|
var isarray$1 = Array.isArray || function(arr) {
|
|
780
650
|
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
@@ -792,7 +662,7 @@
|
|
|
792
662
|
function parse$1(str, options2) {
|
|
793
663
|
var tokens = [];
|
|
794
664
|
var key = 0;
|
|
795
|
-
var
|
|
665
|
+
var index = 0;
|
|
796
666
|
var path = "";
|
|
797
667
|
var defaultDelimiter = options2 && options2.delimiter || "/";
|
|
798
668
|
var res;
|
|
@@ -800,13 +670,13 @@
|
|
|
800
670
|
var m2 = res[0];
|
|
801
671
|
var escaped = res[1];
|
|
802
672
|
var offset = res.index;
|
|
803
|
-
path += str.slice(
|
|
804
|
-
|
|
673
|
+
path += str.slice(index, offset);
|
|
674
|
+
index = offset + m2.length;
|
|
805
675
|
if (escaped) {
|
|
806
676
|
path += escaped[1];
|
|
807
677
|
continue;
|
|
808
678
|
}
|
|
809
|
-
var next = str[
|
|
679
|
+
var next = str[index];
|
|
810
680
|
var prefix2 = res[2];
|
|
811
681
|
var name = res[3];
|
|
812
682
|
var capture = res[4];
|
|
@@ -833,8 +703,8 @@
|
|
|
833
703
|
pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
|
|
834
704
|
});
|
|
835
705
|
}
|
|
836
|
-
if (
|
|
837
|
-
path += str.substr(
|
|
706
|
+
if (index < str.length) {
|
|
707
|
+
path += str.substr(index);
|
|
838
708
|
}
|
|
839
709
|
if (path) {
|
|
840
710
|
tokens.push(path);
|
|
@@ -1148,8 +1018,145 @@
|
|
|
1148
1018
|
var TYPE_STATICS = {};
|
|
1149
1019
|
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
1150
1020
|
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
1021
|
+
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
1022
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
1023
|
+
function getUniqueId() {
|
|
1024
|
+
var key = "__global_unique_id__";
|
|
1025
|
+
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
1026
|
+
}
|
|
1027
|
+
function objectIs(x2, y2) {
|
|
1028
|
+
if (x2 === y2) {
|
|
1029
|
+
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
1030
|
+
} else {
|
|
1031
|
+
return x2 !== x2 && y2 !== y2;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
function createEventEmitter(value) {
|
|
1035
|
+
var handlers = [];
|
|
1036
|
+
return {
|
|
1037
|
+
on: function on(handler) {
|
|
1038
|
+
handlers.push(handler);
|
|
1039
|
+
},
|
|
1040
|
+
off: function off(handler) {
|
|
1041
|
+
handlers = handlers.filter(function(h2) {
|
|
1042
|
+
return h2 !== handler;
|
|
1043
|
+
});
|
|
1044
|
+
},
|
|
1045
|
+
get: function get() {
|
|
1046
|
+
return value;
|
|
1047
|
+
},
|
|
1048
|
+
set: function set(newValue, changedBits) {
|
|
1049
|
+
value = newValue;
|
|
1050
|
+
handlers.forEach(function(handler) {
|
|
1051
|
+
return handler(value, changedBits);
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
function onlyChild(children) {
|
|
1057
|
+
return Array.isArray(children) ? children[0] : children;
|
|
1058
|
+
}
|
|
1059
|
+
function createReactContext(defaultValue, calculateChangedBits) {
|
|
1060
|
+
var _Provider$childContex, _Consumer$contextType;
|
|
1061
|
+
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
1062
|
+
var Provider = /* @__PURE__ */ function(_React$Component) {
|
|
1063
|
+
_inheritsLoose(Provider2, _React$Component);
|
|
1064
|
+
function Provider2() {
|
|
1065
|
+
var _this;
|
|
1066
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1067
|
+
args[_key] = arguments[_key];
|
|
1068
|
+
}
|
|
1069
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
1070
|
+
_this.emitter = createEventEmitter(_this.props.value);
|
|
1071
|
+
return _this;
|
|
1072
|
+
}
|
|
1073
|
+
var _proto = Provider2.prototype;
|
|
1074
|
+
_proto.getChildContext = function getChildContext() {
|
|
1075
|
+
var _ref;
|
|
1076
|
+
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
1077
|
+
};
|
|
1078
|
+
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
1079
|
+
if (this.props.value !== nextProps.value) {
|
|
1080
|
+
var oldValue = this.props.value;
|
|
1081
|
+
var newValue = nextProps.value;
|
|
1082
|
+
var changedBits;
|
|
1083
|
+
if (objectIs(oldValue, newValue)) {
|
|
1084
|
+
changedBits = 0;
|
|
1085
|
+
} else {
|
|
1086
|
+
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
1087
|
+
changedBits |= 0;
|
|
1088
|
+
if (changedBits !== 0) {
|
|
1089
|
+
this.emitter.set(nextProps.value, changedBits);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
_proto.render = function render2() {
|
|
1095
|
+
return this.props.children;
|
|
1096
|
+
};
|
|
1097
|
+
return Provider2;
|
|
1098
|
+
}(React__default["default"].Component);
|
|
1099
|
+
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
1100
|
+
var Consumer = /* @__PURE__ */ function(_React$Component2) {
|
|
1101
|
+
_inheritsLoose(Consumer2, _React$Component2);
|
|
1102
|
+
function Consumer2() {
|
|
1103
|
+
var _this2;
|
|
1104
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1105
|
+
args[_key2] = arguments[_key2];
|
|
1106
|
+
}
|
|
1107
|
+
_this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
|
|
1108
|
+
_this2.observedBits = void 0;
|
|
1109
|
+
_this2.state = {
|
|
1110
|
+
value: _this2.getValue()
|
|
1111
|
+
};
|
|
1112
|
+
_this2.onUpdate = function(newValue, changedBits) {
|
|
1113
|
+
var observedBits = _this2.observedBits | 0;
|
|
1114
|
+
if ((observedBits & changedBits) !== 0) {
|
|
1115
|
+
_this2.setState({
|
|
1116
|
+
value: _this2.getValue()
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
1120
|
+
return _this2;
|
|
1121
|
+
}
|
|
1122
|
+
var _proto2 = Consumer2.prototype;
|
|
1123
|
+
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
1124
|
+
var observedBits = nextProps.observedBits;
|
|
1125
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
1126
|
+
};
|
|
1127
|
+
_proto2.componentDidMount = function componentDidMount() {
|
|
1128
|
+
if (this.context[contextProp]) {
|
|
1129
|
+
this.context[contextProp].on(this.onUpdate);
|
|
1130
|
+
}
|
|
1131
|
+
var observedBits = this.props.observedBits;
|
|
1132
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
1133
|
+
};
|
|
1134
|
+
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
1135
|
+
if (this.context[contextProp]) {
|
|
1136
|
+
this.context[contextProp].off(this.onUpdate);
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
_proto2.getValue = function getValue() {
|
|
1140
|
+
if (this.context[contextProp]) {
|
|
1141
|
+
return this.context[contextProp].get();
|
|
1142
|
+
} else {
|
|
1143
|
+
return defaultValue;
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
_proto2.render = function render2() {
|
|
1147
|
+
return onlyChild(this.props.children)(this.state.value);
|
|
1148
|
+
};
|
|
1149
|
+
return Consumer2;
|
|
1150
|
+
}(React__default["default"].Component);
|
|
1151
|
+
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
1152
|
+
return {
|
|
1153
|
+
Provider,
|
|
1154
|
+
Consumer
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
var createContext = React__default["default"].createContext || createReactContext;
|
|
1151
1158
|
var createNamedContext = function createNamedContext2(name) {
|
|
1152
|
-
var context2 =
|
|
1159
|
+
var context2 = createContext();
|
|
1153
1160
|
context2.displayName = name;
|
|
1154
1161
|
return context2;
|
|
1155
1162
|
};
|
|
@@ -1319,8 +1326,8 @@
|
|
|
1319
1326
|
path: path2,
|
|
1320
1327
|
url: path2 === "/" && url === "" ? "/" : url,
|
|
1321
1328
|
isExact,
|
|
1322
|
-
params: keys.reduce(function(memo, key,
|
|
1323
|
-
memo[key.name] = values[
|
|
1329
|
+
params: keys.reduce(function(memo, key, index) {
|
|
1330
|
+
memo[key.name] = values[index];
|
|
1324
1331
|
return memo;
|
|
1325
1332
|
}, {})
|
|
1326
1333
|
};
|
|
@@ -2207,13 +2214,13 @@
|
|
|
2207
2214
|
iconClassPrefix,
|
|
2208
2215
|
iconFontClassName
|
|
2209
2216
|
} = props;
|
|
2210
|
-
const [
|
|
2217
|
+
const [index, setIndex] = React.useState(zIndex || _zIndex);
|
|
2211
2218
|
const [innerVisible, setInnerVisible] = React.useState(visible);
|
|
2212
2219
|
const [showChildren, setShowChildren] = React.useState(true);
|
|
2213
2220
|
const [transitionName, setTransitionName] = React.useState("");
|
|
2214
2221
|
const b2 = cn("popup");
|
|
2215
2222
|
const baseStyle = {
|
|
2216
|
-
zIndex:
|
|
2223
|
+
zIndex: index,
|
|
2217
2224
|
animationDuration: `${duration}s`
|
|
2218
2225
|
};
|
|
2219
2226
|
const overlayStyles = {
|
|
@@ -2704,7 +2711,7 @@
|
|
|
2704
2711
|
const {
|
|
2705
2712
|
children,
|
|
2706
2713
|
columnNum,
|
|
2707
|
-
index
|
|
2714
|
+
index,
|
|
2708
2715
|
gutter,
|
|
2709
2716
|
square,
|
|
2710
2717
|
text,
|
|
@@ -2736,7 +2743,7 @@
|
|
|
2736
2743
|
style.paddingTop = `${100 / +columnNum}%`;
|
|
2737
2744
|
} else if (gutter) {
|
|
2738
2745
|
style.paddingRight = pxCheck2(gutter);
|
|
2739
|
-
if (
|
|
2746
|
+
if (index >= columnNum) {
|
|
2740
2747
|
style.marginTop = pxCheck2(gutter);
|
|
2741
2748
|
}
|
|
2742
2749
|
}
|
|
@@ -3146,11 +3153,11 @@
|
|
|
3146
3153
|
className: "list"
|
|
3147
3154
|
}, slotList || /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3148
3155
|
className: "nut-fixednav__list"
|
|
3149
|
-
}, navList.map((item,
|
|
3156
|
+
}, navList.map((item, index) => {
|
|
3150
3157
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3151
3158
|
className: "nut-fixednav__list-item",
|
|
3152
3159
|
onClick: (event) => onSelectCb(event, item),
|
|
3153
|
-
key: item.id ||
|
|
3160
|
+
key: item.id || index
|
|
3154
3161
|
}, /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
3155
3162
|
src: item.icon,
|
|
3156
3163
|
alt: ""
|
|
@@ -3265,7 +3272,7 @@
|
|
|
3265
3272
|
active,
|
|
3266
3273
|
activeColor,
|
|
3267
3274
|
unactiveColor,
|
|
3268
|
-
index
|
|
3275
|
+
index,
|
|
3269
3276
|
handleClick: handleClick2,
|
|
3270
3277
|
iconClassPrefix,
|
|
3271
3278
|
iconFontClassName
|
|
@@ -3291,7 +3298,7 @@
|
|
|
3291
3298
|
color: active ? activeColor : unactiveColor
|
|
3292
3299
|
},
|
|
3293
3300
|
onClick: () => {
|
|
3294
|
-
handleClick2(
|
|
3301
|
+
handleClick2(index);
|
|
3295
3302
|
}
|
|
3296
3303
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3297
3304
|
className: `${bIcon()}`
|
|
@@ -5452,8 +5459,8 @@
|
|
|
5452
5459
|
return currentFrame.length > 0;
|
|
5453
5460
|
}
|
|
5454
5461
|
function findIndex(arr, test) {
|
|
5455
|
-
const
|
|
5456
|
-
return
|
|
5462
|
+
const index = arr.findIndex(test);
|
|
5463
|
+
return index < 0 ? arr.length : index;
|
|
5457
5464
|
}
|
|
5458
5465
|
const colors = {
|
|
5459
5466
|
transparent: 0,
|
|
@@ -7905,8 +7912,8 @@
|
|
|
7905
7912
|
each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));
|
|
7906
7913
|
return this;
|
|
7907
7914
|
};
|
|
7908
|
-
const _getProps = function _getProps2(arg, ctrl,
|
|
7909
|
-
return is.fun(arg) ? arg(
|
|
7915
|
+
const _getProps = function _getProps2(arg, ctrl, index) {
|
|
7916
|
+
return is.fun(arg) ? arg(index, ctrl) : arg;
|
|
7910
7917
|
};
|
|
7911
7918
|
SpringRef2._getProps = _getProps;
|
|
7912
7919
|
return SpringRef2;
|
|
@@ -8378,18 +8385,18 @@
|
|
|
8378
8385
|
state.current.listHeight.push(height2);
|
|
8379
8386
|
}
|
|
8380
8387
|
};
|
|
8381
|
-
const scrollTo = (
|
|
8382
|
-
if (!
|
|
8388
|
+
const scrollTo = (index) => {
|
|
8389
|
+
if (!index && index !== 0) {
|
|
8383
8390
|
return;
|
|
8384
8391
|
}
|
|
8385
8392
|
if (!state.current.listHeight.length) {
|
|
8386
8393
|
calculateHeight();
|
|
8387
8394
|
}
|
|
8388
|
-
let cacheIndex =
|
|
8389
|
-
if (
|
|
8395
|
+
let cacheIndex = index;
|
|
8396
|
+
if (index < 0) {
|
|
8390
8397
|
cacheIndex = 0;
|
|
8391
8398
|
}
|
|
8392
|
-
if (
|
|
8399
|
+
if (index > state.current.listHeight.length - 2) {
|
|
8393
8400
|
cacheIndex = state.current.listHeight.length - 2;
|
|
8394
8401
|
}
|
|
8395
8402
|
setCodeIndex(cacheIndex);
|
|
@@ -8400,11 +8407,11 @@
|
|
|
8400
8407
|
const bind = useGesture({
|
|
8401
8408
|
onDragStart: ({ target, offset }) => {
|
|
8402
8409
|
setScrollStart(true);
|
|
8403
|
-
const
|
|
8410
|
+
const index = Number(getData(target, "index"));
|
|
8404
8411
|
touchState.current.y1 = offset[1];
|
|
8405
|
-
state.current.anchorIndex = +
|
|
8406
|
-
setCodeIndex((codeIndex2) => codeIndex2 +
|
|
8407
|
-
scrollTo(
|
|
8412
|
+
state.current.anchorIndex = +index;
|
|
8413
|
+
setCodeIndex((codeIndex2) => codeIndex2 + index);
|
|
8414
|
+
scrollTo(index);
|
|
8408
8415
|
},
|
|
8409
8416
|
onDragEnd: ({ offset }) => {
|
|
8410
8417
|
touchState.current.y2 = offset[1];
|
|
@@ -8509,13 +8516,13 @@
|
|
|
8509
8516
|
className: b2("bars__inner"),
|
|
8510
8517
|
...bind(),
|
|
8511
8518
|
style: { touchAction: "pan-y" }
|
|
8512
|
-
}, indexList.map((item,
|
|
8519
|
+
}, indexList.map((item, index) => {
|
|
8513
8520
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8514
8521
|
className: b2("bars__inner__item", {
|
|
8515
8522
|
active: item[acceptKey] === indexList[currentIndex][acceptKey]
|
|
8516
8523
|
}),
|
|
8517
|
-
"data-index":
|
|
8518
|
-
key:
|
|
8524
|
+
"data-index": index,
|
|
8525
|
+
key: index,
|
|
8519
8526
|
onClick: () => handleClickIndex(item[acceptKey])
|
|
8520
8527
|
}, item[acceptKey]);
|
|
8521
8528
|
}))));
|
|
@@ -8641,9 +8648,9 @@
|
|
|
8641
8648
|
onClick: (e2) => selectPage(Number(currentPage) - 1, true)
|
|
8642
8649
|
}, prevText || locale.pagination.prev), mode === "multi" ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8643
8650
|
className: `${paginationBem("contain")}`
|
|
8644
|
-
}, pages.map((item,
|
|
8651
|
+
}, pages.map((item, index) => {
|
|
8645
8652
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8646
|
-
key: `${
|
|
8653
|
+
key: `${index}pagination`,
|
|
8647
8654
|
className: `${paginationBem("item")} ${item.active ? "active" : ""}`,
|
|
8648
8655
|
onClick: (e2) => !item.active ? selectPage(item.number, true) : ""
|
|
8649
8656
|
}, pageNodeRender ? pageNodeRender(item) : item.text);
|
|
@@ -8750,12 +8757,12 @@
|
|
|
8750
8757
|
color: type === "smile" ? color : "",
|
|
8751
8758
|
background: type === "line" ? color : ""
|
|
8752
8759
|
};
|
|
8753
|
-
const
|
|
8760
|
+
const index = titles.current.findIndex((t2) => t2.paneKey === value);
|
|
8754
8761
|
const contentStyle = {
|
|
8755
|
-
transform: direction === "horizontal" ? `translate3d(-${
|
|
8762
|
+
transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
|
|
8756
8763
|
transitionDuration: `${animatedTime}ms`
|
|
8757
8764
|
};
|
|
8758
|
-
const tabChange = (item,
|
|
8765
|
+
const tabChange = (item, index2) => {
|
|
8759
8766
|
onClick && onClick(item);
|
|
8760
8767
|
if (item.disabled) {
|
|
8761
8768
|
return;
|
|
@@ -8769,7 +8776,7 @@
|
|
|
8769
8776
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8770
8777
|
className: classesTitle,
|
|
8771
8778
|
style: { background }
|
|
8772
|
-
}, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map((item,
|
|
8779
|
+
}, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map((item, index2) => {
|
|
8773
8780
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8774
8781
|
style: titleStyle,
|
|
8775
8782
|
onClick: (e2) => tabChange(item),
|
|
@@ -9074,7 +9081,6 @@
|
|
|
9074
9081
|
const onScroll = () => {
|
|
9075
9082
|
const { scrollFixed: scrollFixed2 } = props;
|
|
9076
9083
|
const scrollTop = getScrollTop(window);
|
|
9077
|
-
console.log(scrollTop);
|
|
9078
9084
|
const isFixed = scrollTop > (typeof scrollFixed2 === "boolean" ? 30 : Number(scrollFixed2));
|
|
9079
9085
|
setIsScrollFixed(isFixed);
|
|
9080
9086
|
};
|
|
@@ -9086,27 +9092,27 @@
|
|
|
9086
9092
|
}, []);
|
|
9087
9093
|
const [itemShow, setItemShow] = React.useState([]);
|
|
9088
9094
|
const [itemTitle, setItemTitle] = React.useState([]);
|
|
9089
|
-
const toggleItemShow = (
|
|
9090
|
-
itemShow[
|
|
9091
|
-
const temp = itemShow.map((i, idx) => idx ===
|
|
9095
|
+
const toggleItemShow = (index) => {
|
|
9096
|
+
itemShow[index] = !itemShow[index];
|
|
9097
|
+
const temp = itemShow.map((i, idx) => idx === index ? i : false);
|
|
9092
9098
|
setItemShow([...temp]);
|
|
9093
9099
|
};
|
|
9094
|
-
const hideItemShow = (
|
|
9095
|
-
itemShow[
|
|
9100
|
+
const hideItemShow = (index) => {
|
|
9101
|
+
itemShow[index] = false;
|
|
9096
9102
|
setItemShow([...itemShow]);
|
|
9097
9103
|
};
|
|
9098
|
-
const updateTitle = (text,
|
|
9099
|
-
itemTitle[
|
|
9104
|
+
const updateTitle = (text, index) => {
|
|
9105
|
+
itemTitle[index] = text;
|
|
9100
9106
|
setItemTitle([...itemTitle]);
|
|
9101
9107
|
};
|
|
9102
9108
|
const parent = () => {
|
|
9103
9109
|
return parentRef;
|
|
9104
9110
|
};
|
|
9105
9111
|
const cloneChildren = () => {
|
|
9106
|
-
return React__default["default"].Children.map(children, (child,
|
|
9112
|
+
return React__default["default"].Children.map(children, (child, index) => {
|
|
9107
9113
|
return React__default["default"].cloneElement(child, {
|
|
9108
|
-
showPopup: itemShow[
|
|
9109
|
-
orderKey:
|
|
9114
|
+
showPopup: itemShow[index],
|
|
9115
|
+
orderKey: index,
|
|
9110
9116
|
activeColor,
|
|
9111
9117
|
parent: {
|
|
9112
9118
|
closeOnClickOverlay,
|
|
@@ -9119,14 +9125,15 @@
|
|
|
9119
9125
|
});
|
|
9120
9126
|
});
|
|
9121
9127
|
};
|
|
9122
|
-
console.log("isScrollFixed", isScrollFixed);
|
|
9123
9128
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9124
9129
|
className: `nut-menu ${className} ${isScrollFixed ? "scroll-fixed" : ""}`,
|
|
9125
9130
|
...rest,
|
|
9126
9131
|
ref: parentRef
|
|
9132
|
+
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9133
|
+
className: "nut-menu-relative"
|
|
9127
9134
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9128
9135
|
className: `nut-menu__bar ${itemShow.includes(true) ? "opened" : ""} ${className}`
|
|
9129
|
-
}, React__default["default"].Children.toArray(children).map((child,
|
|
9136
|
+
}, React__default["default"].Children.toArray(children).map((child, index) => {
|
|
9130
9137
|
if (!child)
|
|
9131
9138
|
return null;
|
|
9132
9139
|
const { disabled, title, value, direction, options: options2 } = child.props;
|
|
@@ -9136,25 +9143,25 @@
|
|
|
9136
9143
|
function finallyTitle() {
|
|
9137
9144
|
if (title)
|
|
9138
9145
|
return title;
|
|
9139
|
-
if (itemTitle && itemTitle[
|
|
9140
|
-
return itemTitle[
|
|
9146
|
+
if (itemTitle && itemTitle[index])
|
|
9147
|
+
return itemTitle[index];
|
|
9141
9148
|
if (currentTitle && currentTitle[0] && currentTitle[0].text)
|
|
9142
9149
|
return currentTitle[0].text;
|
|
9143
9150
|
return "";
|
|
9144
9151
|
}
|
|
9145
9152
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9146
9153
|
className: `nut-menu__item ${classNames({
|
|
9147
|
-
active: itemShow[
|
|
9154
|
+
active: itemShow[index],
|
|
9148
9155
|
disabled
|
|
9149
9156
|
})}`,
|
|
9150
|
-
style: { color: itemShow[
|
|
9151
|
-
key:
|
|
9157
|
+
style: { color: itemShow[index] ? activeColor : "" },
|
|
9158
|
+
key: index,
|
|
9152
9159
|
onClick: () => {
|
|
9153
|
-
!disabled && toggleItemShow(
|
|
9160
|
+
!disabled && toggleItemShow(index);
|
|
9154
9161
|
}
|
|
9155
9162
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9156
9163
|
className: `nut-menu__title ${classNames({
|
|
9157
|
-
active: itemShow[
|
|
9164
|
+
active: itemShow[index],
|
|
9158
9165
|
disabled
|
|
9159
9166
|
})}`
|
|
9160
9167
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -9166,7 +9173,7 @@
|
|
|
9166
9173
|
size: "10",
|
|
9167
9174
|
name: titleIcon || (direction === "up" ? "arrow-up" : "down-arrow")
|
|
9168
9175
|
})));
|
|
9169
|
-
})), cloneChildren());
|
|
9176
|
+
})), cloneChildren()));
|
|
9170
9177
|
};
|
|
9171
9178
|
Menu.defaultProps = defaultProps$_;
|
|
9172
9179
|
Menu.displayName = "NutMenu";
|
|
@@ -9239,7 +9246,6 @@
|
|
|
9239
9246
|
setTimeout(() => {
|
|
9240
9247
|
const p2 = parent.parent().current;
|
|
9241
9248
|
const rect = p2.getBoundingClientRect();
|
|
9242
|
-
console.log(rect, p2.offsetTop, window.screenTop);
|
|
9243
9249
|
setPosition({
|
|
9244
9250
|
height: rect.height,
|
|
9245
9251
|
top: rect.top
|
|
@@ -9285,18 +9291,17 @@
|
|
|
9285
9291
|
parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
|
|
9286
9292
|
}
|
|
9287
9293
|
}), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9288
|
-
className: "nut-menu-item__wrap",
|
|
9294
|
+
className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
|
|
9289
9295
|
style: {
|
|
9290
|
-
...getPosition(),
|
|
9291
9296
|
...isShow()
|
|
9292
9297
|
}
|
|
9293
9298
|
}, /* @__PURE__ */ React__default["default"].createElement(CSSTransition$1, {
|
|
9294
9299
|
in: _showPopup,
|
|
9295
9300
|
timeout: 100,
|
|
9296
|
-
classNames: "menu-item"
|
|
9301
|
+
classNames: direction === "down" ? "menu-item" : "menu-item-up"
|
|
9297
9302
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9298
9303
|
className: "nut-menu-item__content"
|
|
9299
|
-
}, options2 == null ? void 0 : options2.map((item,
|
|
9304
|
+
}, options2 == null ? void 0 : options2.map((item, index) => {
|
|
9300
9305
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9301
9306
|
className: `nut-menu-item__option ${classNames({
|
|
9302
9307
|
active: item.value === _value
|
|
@@ -9920,20 +9925,20 @@
|
|
|
9920
9925
|
})) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9921
9926
|
className: "nut-range-bar",
|
|
9922
9927
|
style: barStyle()
|
|
9923
|
-
}, range ? [0, 1].map((item,
|
|
9928
|
+
}, range ? [0, 1].map((item, index) => {
|
|
9924
9929
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9925
9930
|
role: "slider",
|
|
9926
|
-
key:
|
|
9927
|
-
className: `${
|
|
9928
|
-
${
|
|
9931
|
+
key: index,
|
|
9932
|
+
className: `${index === 0 ? "nut-range-button-wrapper-left" : ""}
|
|
9933
|
+
${index === 1 ? "nut-range-button-wrapper-right" : ""}`,
|
|
9929
9934
|
tabIndex: disabled ? -1 : 0,
|
|
9930
9935
|
"aria-valuemin": +min,
|
|
9931
|
-
"aria-valuenow": curValue(
|
|
9936
|
+
"aria-valuenow": curValue(index),
|
|
9932
9937
|
"aria-valuemax": +max,
|
|
9933
9938
|
"aria-orientation": "horizontal",
|
|
9934
9939
|
onTouchStart: (e2) => {
|
|
9935
|
-
if (typeof
|
|
9936
|
-
SetButtonIndex(
|
|
9940
|
+
if (typeof index === "number") {
|
|
9941
|
+
SetButtonIndex(index);
|
|
9937
9942
|
}
|
|
9938
9943
|
onTouchStart(e2);
|
|
9939
9944
|
},
|
|
@@ -9954,7 +9959,7 @@
|
|
|
9954
9959
|
style: buttonStyle()
|
|
9955
9960
|
}, !hiddenTag ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9956
9961
|
className: "number"
|
|
9957
|
-
}, curValue(
|
|
9962
|
+
}, curValue(index)) : null));
|
|
9958
9963
|
}) : /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9959
9964
|
role: "slider",
|
|
9960
9965
|
className: "nut-range-button-wrapper",
|
|
@@ -9995,7 +10000,7 @@
|
|
|
9995
10000
|
},
|
|
9996
10001
|
getWhatDay(year, month, day) {
|
|
9997
10002
|
const date = new Date(`${year}/${month}/${day}`);
|
|
9998
|
-
const
|
|
10003
|
+
const index = date.getDay();
|
|
9999
10004
|
const dayNames = [
|
|
10000
10005
|
"\u661F\u671F\u65E5",
|
|
10001
10006
|
"\u661F\u671F\u4E00",
|
|
@@ -10005,7 +10010,7 @@
|
|
|
10005
10010
|
"\u661F\u671F\u4E94",
|
|
10006
10011
|
"\u661F\u671F\u516D"
|
|
10007
10012
|
];
|
|
10008
|
-
return dayNames[
|
|
10013
|
+
return dayNames[index];
|
|
10009
10014
|
},
|
|
10010
10015
|
getMonthPreDay(year, month) {
|
|
10011
10016
|
const date = new Date(`${year}/${month}/01`);
|
|
@@ -10249,9 +10254,9 @@
|
|
|
10249
10254
|
if (type2 === "multiple") {
|
|
10250
10255
|
if (state.currDate.length > 0) {
|
|
10251
10256
|
let hasIndex = "";
|
|
10252
|
-
state.currDate.forEach((item,
|
|
10257
|
+
state.currDate.forEach((item, index) => {
|
|
10253
10258
|
if (item === days[3]) {
|
|
10254
|
-
hasIndex =
|
|
10259
|
+
hasIndex = index;
|
|
10255
10260
|
}
|
|
10256
10261
|
});
|
|
10257
10262
|
if (isFirst) {
|
|
@@ -10538,19 +10543,19 @@
|
|
|
10538
10543
|
let current = 0;
|
|
10539
10544
|
let lastCurrent = 0;
|
|
10540
10545
|
if (state.defaultData.length > 0) {
|
|
10541
|
-
state.monthsData.forEach((item,
|
|
10546
|
+
state.monthsData.forEach((item, index) => {
|
|
10542
10547
|
if (item.title === locale.calendaritem.monthTitle(
|
|
10543
10548
|
state.defaultData[0],
|
|
10544
10549
|
state.defaultData[1]
|
|
10545
10550
|
)) {
|
|
10546
|
-
current =
|
|
10551
|
+
current = index;
|
|
10547
10552
|
}
|
|
10548
10553
|
if (props.type === "range") {
|
|
10549
10554
|
if (item.title === locale.calendaritem.monthTitle(
|
|
10550
10555
|
state.defaultData[3],
|
|
10551
10556
|
state.defaultData[4]
|
|
10552
10557
|
)) {
|
|
10553
|
-
lastCurrent =
|
|
10558
|
+
lastCurrent = index;
|
|
10554
10559
|
}
|
|
10555
10560
|
}
|
|
10556
10561
|
});
|
|
@@ -10574,9 +10579,9 @@
|
|
|
10574
10579
|
[...state.currDate].forEach((item) => {
|
|
10575
10580
|
const dateArr = splitDate(item);
|
|
10576
10581
|
let current2 = state.currentIndex;
|
|
10577
|
-
state.monthsData.forEach((item2,
|
|
10582
|
+
state.monthsData.forEach((item2, index) => {
|
|
10578
10583
|
if (item2.title === locale.calendaritem.monthTitle(dateArr[0], dateArr[1])) {
|
|
10579
|
-
current2 =
|
|
10584
|
+
current2 = index;
|
|
10580
10585
|
}
|
|
10581
10586
|
});
|
|
10582
10587
|
chooseDay(
|
|
@@ -10616,10 +10621,10 @@
|
|
|
10616
10621
|
date = state.propEndDate;
|
|
10617
10622
|
}
|
|
10618
10623
|
const dateArr = splitDate(date);
|
|
10619
|
-
state.monthsData.forEach((item,
|
|
10624
|
+
state.monthsData.forEach((item, index) => {
|
|
10620
10625
|
if (item.title === locale.calendaritem.monthTitle(dateArr[0], dateArr[1])) {
|
|
10621
10626
|
if (months.current) {
|
|
10622
|
-
const distance = state.monthsData[
|
|
10627
|
+
const distance = state.monthsData[index].cssScrollHeight - months.current.scrollTop;
|
|
10623
10628
|
if (toDateAnimation) {
|
|
10624
10629
|
let flag = 0;
|
|
10625
10630
|
const interval = setInterval(() => {
|
|
@@ -10631,12 +10636,12 @@
|
|
|
10631
10636
|
if (flag >= 10) {
|
|
10632
10637
|
clearInterval(interval);
|
|
10633
10638
|
if (months.current) {
|
|
10634
|
-
months.current.scrollTop = state.monthsData[
|
|
10639
|
+
months.current.scrollTop = state.monthsData[index].cssScrollHeight;
|
|
10635
10640
|
}
|
|
10636
10641
|
}
|
|
10637
10642
|
}, 40);
|
|
10638
10643
|
} else {
|
|
10639
|
-
months.current.scrollTop = state.monthsData[
|
|
10644
|
+
months.current.scrollTop = state.monthsData[index].cssScrollHeight;
|
|
10640
10645
|
}
|
|
10641
10646
|
}
|
|
10642
10647
|
}
|
|
@@ -11049,8 +11054,8 @@
|
|
|
11049
11054
|
const [startY, setStartY] = React.useState(0);
|
|
11050
11055
|
const transformY = React.useRef(0);
|
|
11051
11056
|
const [scrollDistance, setScrollDistance] = React.useState(0);
|
|
11052
|
-
const isHidden = (
|
|
11053
|
-
if (
|
|
11057
|
+
const isHidden = (index) => {
|
|
11058
|
+
if (index >= currIndex + 8 || index <= currIndex - 8) {
|
|
11054
11059
|
return true;
|
|
11055
11060
|
}
|
|
11056
11061
|
return false;
|
|
@@ -11130,11 +11135,11 @@
|
|
|
11130
11135
|
};
|
|
11131
11136
|
const modifyStatus = (type, val) => {
|
|
11132
11137
|
const value = val || defaultValue;
|
|
11133
|
-
let
|
|
11138
|
+
let index = -1;
|
|
11134
11139
|
if (value) {
|
|
11135
11140
|
listData.some((item, idx) => {
|
|
11136
11141
|
if (item.value === value) {
|
|
11137
|
-
|
|
11142
|
+
index = idx;
|
|
11138
11143
|
return true;
|
|
11139
11144
|
}
|
|
11140
11145
|
return false;
|
|
@@ -11142,12 +11147,12 @@
|
|
|
11142
11147
|
} else {
|
|
11143
11148
|
listData.forEach((item, i) => {
|
|
11144
11149
|
if (item.value === defaultValue) {
|
|
11145
|
-
|
|
11150
|
+
index = i;
|
|
11146
11151
|
}
|
|
11147
11152
|
});
|
|
11148
11153
|
}
|
|
11149
|
-
setCurrIndex(
|
|
11150
|
-
const move =
|
|
11154
|
+
setCurrIndex(index === -1 ? 1 : index + 1);
|
|
11155
|
+
const move = index === -1 ? 0 : index * lineSpacing;
|
|
11151
11156
|
type && setChooseValue(-move);
|
|
11152
11157
|
setMove(-move);
|
|
11153
11158
|
};
|
|
@@ -11199,18 +11204,18 @@
|
|
|
11199
11204
|
ref: rollerRef,
|
|
11200
11205
|
style: threeDimensional ? touchRollerStyle() : touchTileStyle(),
|
|
11201
11206
|
onTransitionEnd: stopMomentum
|
|
11202
|
-
}, threeDimensional && listData.map((item,
|
|
11207
|
+
}, threeDimensional && listData.map((item, index) => {
|
|
11203
11208
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11204
|
-
className: `nut-picker-roller-item ${isHidden(
|
|
11209
|
+
className: `nut-picker-roller-item ${isHidden(index + 1) && "nut-picker-roller-item-hidden"}`,
|
|
11205
11210
|
style: {
|
|
11206
|
-
transform: `rotate3d(1, 0, 0, ${-rotation * (
|
|
11211
|
+
transform: `rotate3d(1, 0, 0, ${-rotation * (index + 1)}deg) translate3d(0px, 0px, 104px)`
|
|
11207
11212
|
},
|
|
11208
|
-
key: item.value ? item.value :
|
|
11213
|
+
key: item.value ? item.value : index
|
|
11209
11214
|
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, item.text ? item.text : item));
|
|
11210
|
-
}), !threeDimensional && listData.map((item,
|
|
11215
|
+
}), !threeDimensional && listData.map((item, index) => {
|
|
11211
11216
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11212
11217
|
className: "nut-picker-roller-item-tile",
|
|
11213
|
-
key: item.value ? item.value :
|
|
11218
|
+
key: item.value ? item.value : index
|
|
11214
11219
|
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, item.text ? item.text : item));
|
|
11215
11220
|
})), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11216
11221
|
className: "nut-picker-mask"
|
|
@@ -11222,9 +11227,9 @@
|
|
|
11222
11227
|
function useRefs() {
|
|
11223
11228
|
const refs = React__default["default"].useRef([]);
|
|
11224
11229
|
const setRefs = React__default["default"].useCallback(
|
|
11225
|
-
(
|
|
11230
|
+
(index) => (el) => {
|
|
11226
11231
|
if (el)
|
|
11227
|
-
refs.current[
|
|
11232
|
+
refs.current[index] = el;
|
|
11228
11233
|
},
|
|
11229
11234
|
[]
|
|
11230
11235
|
);
|
|
@@ -11298,10 +11303,10 @@
|
|
|
11298
11303
|
};
|
|
11299
11304
|
const selectedOptions = () => {
|
|
11300
11305
|
const optins = [];
|
|
11301
|
-
columnsList.map((column,
|
|
11306
|
+
columnsList.map((column, index) => {
|
|
11302
11307
|
let currOptions = [];
|
|
11303
11308
|
currOptions = column.filter(
|
|
11304
|
-
(item) => item.value === chooseValueData[
|
|
11309
|
+
(item) => item.value === chooseValueData[index]
|
|
11305
11310
|
);
|
|
11306
11311
|
if (currOptions[0]) {
|
|
11307
11312
|
optins.push(currOptions[0]);
|
|
@@ -11318,17 +11323,17 @@
|
|
|
11318
11323
|
if (columnsType() === "cascade") {
|
|
11319
11324
|
chooseValueData[columnIndex2] = option.value ? option.value : "";
|
|
11320
11325
|
setchooseValueData([...chooseValueData]);
|
|
11321
|
-
let
|
|
11326
|
+
let index = columnIndex2;
|
|
11322
11327
|
let cursor = option;
|
|
11323
11328
|
while (cursor && cursor.children && cursor.children[0]) {
|
|
11324
|
-
chooseValueData[
|
|
11329
|
+
chooseValueData[index + 1] = cursor.children[0].value;
|
|
11325
11330
|
setchooseValueData([...chooseValueData]);
|
|
11326
|
-
|
|
11331
|
+
index++;
|
|
11327
11332
|
const cc = cursor.children[0];
|
|
11328
11333
|
cursor = cc;
|
|
11329
11334
|
}
|
|
11330
11335
|
if (cursor && cursor.children) {
|
|
11331
|
-
chooseValueData[
|
|
11336
|
+
chooseValueData[index + 1] = "";
|
|
11332
11337
|
setchooseValueData([...chooseValueData]);
|
|
11333
11338
|
}
|
|
11334
11339
|
setColumnsList(normalListData());
|
|
@@ -11380,12 +11385,12 @@
|
|
|
11380
11385
|
while (cursor && cursor.children) {
|
|
11381
11386
|
const options2 = cursor.children;
|
|
11382
11387
|
const value = defaultValues[columnIndex2];
|
|
11383
|
-
let
|
|
11388
|
+
let index = options2.findIndex(
|
|
11384
11389
|
(columnItem) => columnItem.value === value
|
|
11385
11390
|
);
|
|
11386
|
-
if (
|
|
11387
|
-
|
|
11388
|
-
cursor = cursor.children[
|
|
11391
|
+
if (index === -1)
|
|
11392
|
+
index = 0;
|
|
11393
|
+
cursor = cursor.children[index];
|
|
11389
11394
|
columnIndex2++;
|
|
11390
11395
|
formatted.push(options2);
|
|
11391
11396
|
}
|
|
@@ -11429,16 +11434,16 @@
|
|
|
11429
11434
|
}, renderToolbar(), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11430
11435
|
className: b2("panel"),
|
|
11431
11436
|
ref: pickerRef
|
|
11432
|
-
}, columnsList == null ? void 0 : columnsList.map((item,
|
|
11437
|
+
}, columnsList == null ? void 0 : columnsList.map((item, index) => {
|
|
11433
11438
|
return /* @__PURE__ */ React__default["default"].createElement(PickerSlot, {
|
|
11434
|
-
ref: setRefs(
|
|
11435
|
-
defaultValue: chooseValueData == null ? void 0 : chooseValueData[
|
|
11439
|
+
ref: setRefs(index),
|
|
11440
|
+
defaultValue: chooseValueData == null ? void 0 : chooseValueData[index],
|
|
11436
11441
|
listData: item,
|
|
11437
11442
|
threeDimensional,
|
|
11438
|
-
chooseItem: (value,
|
|
11443
|
+
chooseItem: (value, index2) => chooseItem(value, index2),
|
|
11439
11444
|
swipeDuration,
|
|
11440
|
-
key:
|
|
11441
|
-
keyIndex:
|
|
11445
|
+
key: index,
|
|
11446
|
+
keyIndex: index
|
|
11442
11447
|
});
|
|
11443
11448
|
}))));
|
|
11444
11449
|
};
|
|
@@ -11597,7 +11602,7 @@
|
|
|
11597
11602
|
}
|
|
11598
11603
|
return result;
|
|
11599
11604
|
};
|
|
11600
|
-
const updateChooseValueCustmer = (
|
|
11605
|
+
const updateChooseValueCustmer = (index, selectedValue, cacheValueData) => {
|
|
11601
11606
|
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
|
|
11602
11607
|
type.toLocaleLowerCase()
|
|
11603
11608
|
)) {
|
|
@@ -11636,7 +11641,7 @@
|
|
|
11636
11641
|
const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date == null ? void 0 : date.getTime());
|
|
11637
11642
|
date && isDate(date) && !isEqual2 && setCurrentDate(formatValue(date));
|
|
11638
11643
|
}
|
|
11639
|
-
props.onChangeDatePicker && props.onChangeDatePicker(
|
|
11644
|
+
props.onChangeDatePicker && props.onChangeDatePicker(index, selectedValue, cacheValueData);
|
|
11640
11645
|
};
|
|
11641
11646
|
const padZero = (num, targetLength = 2) => {
|
|
11642
11647
|
let str = `${num}`;
|
|
@@ -11662,7 +11667,7 @@
|
|
|
11662
11667
|
const generateValue = (min, max, val, type2, columnIndex) => {
|
|
11663
11668
|
let cmin = min;
|
|
11664
11669
|
const arr = [];
|
|
11665
|
-
let
|
|
11670
|
+
let index = 0;
|
|
11666
11671
|
while (cmin <= max) {
|
|
11667
11672
|
arr.push(formatterOption(type2, cmin));
|
|
11668
11673
|
if (type2 === "minute") {
|
|
@@ -11671,10 +11676,10 @@
|
|
|
11671
11676
|
cmin++;
|
|
11672
11677
|
}
|
|
11673
11678
|
if (cmin <= val) {
|
|
11674
|
-
|
|
11679
|
+
index++;
|
|
11675
11680
|
}
|
|
11676
11681
|
}
|
|
11677
|
-
defaultValue[columnIndex] = arr[
|
|
11682
|
+
defaultValue[columnIndex] = arr[index].value;
|
|
11678
11683
|
setDefaultValue([...defaultValue]);
|
|
11679
11684
|
if (props.filter && props.filter(type2, arr)) {
|
|
11680
11685
|
return props.filter(type2, arr);
|
|
@@ -11736,7 +11741,7 @@
|
|
|
11736
11741
|
onClose: onCloseDatePicker,
|
|
11737
11742
|
defaultValueData: defaultValue,
|
|
11738
11743
|
onConfirm: (values, options2) => onConfirmDatePicker && onConfirmDatePicker(values, options2),
|
|
11739
|
-
onChange: (
|
|
11744
|
+
onChange: (index, value, list) => updateChooseValueCustmer(index, value, list),
|
|
11740
11745
|
threeDimensional,
|
|
11741
11746
|
ref: pickerRef
|
|
11742
11747
|
}));
|
|
@@ -11916,14 +11921,14 @@
|
|
|
11916
11921
|
InputNumber.defaultProps = defaultProps$S;
|
|
11917
11922
|
InputNumber.displayName = "NutInputNumber";
|
|
11918
11923
|
function trimExtraChar(value, char, regExp) {
|
|
11919
|
-
const
|
|
11920
|
-
if (
|
|
11924
|
+
const index = value.indexOf(char);
|
|
11925
|
+
if (index === -1) {
|
|
11921
11926
|
return value;
|
|
11922
11927
|
}
|
|
11923
|
-
if (char === "-" &&
|
|
11924
|
-
return value.slice(0,
|
|
11928
|
+
if (char === "-" && index !== 0) {
|
|
11929
|
+
return value.slice(0, index);
|
|
11925
11930
|
}
|
|
11926
|
-
return value.slice(0,
|
|
11931
|
+
return value.slice(0, index + 1) + value.slice(index).replace(regExp, "");
|
|
11927
11932
|
}
|
|
11928
11933
|
function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
11929
11934
|
if (allowDot) {
|
|
@@ -12275,7 +12280,7 @@
|
|
|
12275
12280
|
return val2State === child.props.value;
|
|
12276
12281
|
}
|
|
12277
12282
|
function cloneChildren() {
|
|
12278
|
-
return React__default["default"].Children.map(children, (child,
|
|
12283
|
+
return React__default["default"].Children.map(children, (child, index) => {
|
|
12279
12284
|
const childChecked = validateChildChecked(child);
|
|
12280
12285
|
if (child.type.displayName !== "NutRadio") {
|
|
12281
12286
|
return React__default["default"].cloneElement(child);
|
|
@@ -12454,14 +12459,14 @@
|
|
|
12454
12459
|
const pxCheck2 = (value) => {
|
|
12455
12460
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
12456
12461
|
};
|
|
12457
|
-
const onClick = (e2,
|
|
12462
|
+
const onClick = (e2, index) => {
|
|
12458
12463
|
e2.preventDefault();
|
|
12459
12464
|
e2.stopPropagation();
|
|
12460
12465
|
if (disabled || readonly)
|
|
12461
12466
|
return;
|
|
12462
12467
|
let value = 0;
|
|
12463
|
-
if (!(
|
|
12464
|
-
value =
|
|
12468
|
+
if (!(index === 1 && score === index)) {
|
|
12469
|
+
value = index;
|
|
12465
12470
|
if (allowHalf) {
|
|
12466
12471
|
if ((e2 == null ? void 0 : e2.target).className.includes("__icon--half")) {
|
|
12467
12472
|
value -= 0.5;
|
|
@@ -12645,11 +12650,11 @@
|
|
|
12645
12650
|
}), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12646
12651
|
className: b2("input-fake"),
|
|
12647
12652
|
onClick: () => focus()
|
|
12648
|
-
}, [...new Array(comLen).keys()].map((item,
|
|
12653
|
+
}, [...new Array(comLen).keys()].map((item, index) => {
|
|
12649
12654
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12650
12655
|
className: b2("input-fake__li"),
|
|
12651
|
-
key:
|
|
12652
|
-
}, String(inputValue).length >
|
|
12656
|
+
key: index
|
|
12657
|
+
}, String(inputValue).length > index ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12653
12658
|
className: b2("input-fake__li__icon")
|
|
12654
12659
|
}) : null);
|
|
12655
12660
|
}))), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -13192,9 +13197,9 @@
|
|
|
13192
13197
|
});
|
|
13193
13198
|
}
|
|
13194
13199
|
}));
|
|
13195
|
-
const clearUploadQueue = (
|
|
13196
|
-
if (
|
|
13197
|
-
uploadQueue.splice(
|
|
13200
|
+
const clearUploadQueue = (index = -1) => {
|
|
13201
|
+
if (index > -1) {
|
|
13202
|
+
uploadQueue.splice(index, 1);
|
|
13198
13203
|
setUploadQueue(uploadQueue);
|
|
13199
13204
|
} else {
|
|
13200
13205
|
setUploadQueue([]);
|
|
@@ -13203,7 +13208,7 @@
|
|
|
13203
13208
|
const clearInputValue = (el) => {
|
|
13204
13209
|
el.value = "";
|
|
13205
13210
|
};
|
|
13206
|
-
const executeUpload = (fileItem,
|
|
13211
|
+
const executeUpload = (fileItem, index) => {
|
|
13207
13212
|
const uploadOption = new UploadOptions();
|
|
13208
13213
|
uploadOption.url = url;
|
|
13209
13214
|
for (const [key, value] of Object.entries(data)) {
|
|
@@ -13221,7 +13226,7 @@
|
|
|
13221
13226
|
} catch (error) {
|
|
13222
13227
|
}
|
|
13223
13228
|
uploadOption.onStart = (option) => {
|
|
13224
|
-
clearUploadQueue(
|
|
13229
|
+
clearUploadQueue(index);
|
|
13225
13230
|
setFileList((fileList2) => {
|
|
13226
13231
|
fileList2.map((item) => {
|
|
13227
13232
|
if (item.uid === fileItem.uid) {
|
|
@@ -13294,7 +13299,7 @@
|
|
|
13294
13299
|
}
|
|
13295
13300
|
};
|
|
13296
13301
|
const readFile = (files) => {
|
|
13297
|
-
files.forEach((file,
|
|
13302
|
+
files.forEach((file, index) => {
|
|
13298
13303
|
const formData = new FormData();
|
|
13299
13304
|
formData.append(name, file);
|
|
13300
13305
|
const fileItem = new FileItem();
|
|
@@ -13304,7 +13309,7 @@
|
|
|
13304
13309
|
fileItem.formData = formData;
|
|
13305
13310
|
fileItem.uid = file.lastModified + fileItem.uid;
|
|
13306
13311
|
fileItem.message = locale.uploader.readyUpload;
|
|
13307
|
-
executeUpload(fileItem,
|
|
13312
|
+
executeUpload(fileItem, index);
|
|
13308
13313
|
if (isPreview && file.type.includes("image")) {
|
|
13309
13314
|
const reader = new FileReader();
|
|
13310
13315
|
reader.onload = (event) => {
|
|
@@ -13336,15 +13341,15 @@
|
|
|
13336
13341
|
filterFile.splice(maximum2, filterFile.length - maximum2);
|
|
13337
13342
|
}
|
|
13338
13343
|
if (fileList.length !== 0) {
|
|
13339
|
-
const
|
|
13340
|
-
filterFile.splice(
|
|
13344
|
+
const index = maximum2 - fileList.length;
|
|
13345
|
+
filterFile.splice(index, filterFile.length - index);
|
|
13341
13346
|
}
|
|
13342
13347
|
return filterFile;
|
|
13343
13348
|
};
|
|
13344
|
-
const onDelete = (file,
|
|
13345
|
-
clearUploadQueue(
|
|
13349
|
+
const onDelete = (file, index) => {
|
|
13350
|
+
clearUploadQueue(index);
|
|
13346
13351
|
if (onBeforeDelete && onBeforeDelete(file, fileList)) {
|
|
13347
|
-
fileList.splice(
|
|
13352
|
+
fileList.splice(index, 1);
|
|
13348
13353
|
onRemove && onRemove(file, fileList);
|
|
13349
13354
|
setFileList([...fileList]);
|
|
13350
13355
|
} else {
|
|
@@ -13398,7 +13403,7 @@
|
|
|
13398
13403
|
disabled,
|
|
13399
13404
|
multiple,
|
|
13400
13405
|
onChange: fileChange
|
|
13401
|
-
})))), fileList.length !== 0 && fileList.map((item,
|
|
13406
|
+
})))), fileList.length !== 0 && fileList.map((item, index) => {
|
|
13402
13407
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13403
13408
|
className: `nut-uploader__preview ${listType}`,
|
|
13404
13409
|
key: item.uid
|
|
@@ -13423,7 +13428,7 @@
|
|
|
13423
13428
|
color: "rgba(0,0,0,0.6)",
|
|
13424
13429
|
className: "close",
|
|
13425
13430
|
name: "failure",
|
|
13426
|
-
onClick: () => onDelete(item,
|
|
13431
|
+
onClick: () => onDelete(item, index)
|
|
13427
13432
|
}), item.type.includes("image") ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, item.url && /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
13428
13433
|
className: "nut-uploader__preview-img__c",
|
|
13429
13434
|
src: item.url,
|
|
@@ -13461,7 +13466,7 @@
|
|
|
13461
13466
|
color: "#808080",
|
|
13462
13467
|
className: "nut-uploader__preview-img__file__del",
|
|
13463
13468
|
name: "del",
|
|
13464
|
-
onClick: () => onDelete(item,
|
|
13469
|
+
onClick: () => onDelete(item, index)
|
|
13465
13470
|
}), item.status === "uploading" && /* @__PURE__ */ React__default["default"].createElement(Progress, {
|
|
13466
13471
|
size: "small",
|
|
13467
13472
|
percentage: item.percentage,
|
|
@@ -13843,8 +13848,8 @@
|
|
|
13843
13848
|
}
|
|
13844
13849
|
if (needToSync.length && currentValue2 === value) {
|
|
13845
13850
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
13846
|
-
pathNodes.forEach((node,
|
|
13847
|
-
state.tabsCursor =
|
|
13851
|
+
pathNodes.forEach((node, index) => {
|
|
13852
|
+
state.tabsCursor = index;
|
|
13848
13853
|
chooseItem(node, true);
|
|
13849
13854
|
});
|
|
13850
13855
|
}
|
|
@@ -13942,12 +13947,12 @@
|
|
|
13942
13947
|
}, title), /* @__PURE__ */ React__default["default"].createElement(Tabs, {
|
|
13943
13948
|
value: tabvalue,
|
|
13944
13949
|
titleNode: () => {
|
|
13945
|
-
return optiosData.map((pane,
|
|
13950
|
+
return optiosData.map((pane, index) => {
|
|
13946
13951
|
var _a, _b;
|
|
13947
13952
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13948
13953
|
onClick: () => {
|
|
13949
13954
|
setTabvalue(pane.paneKey);
|
|
13950
|
-
state.tabsCursor =
|
|
13955
|
+
state.tabsCursor = index;
|
|
13951
13956
|
},
|
|
13952
13957
|
className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "active" : ""}`,
|
|
13953
13958
|
key: pane.paneKey
|
|
@@ -13963,10 +13968,10 @@
|
|
|
13963
13968
|
paneKey: pane.paneKey
|
|
13964
13969
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13965
13970
|
className: classesPane
|
|
13966
|
-
}, pane.nodes && pane.nodes.map((node,
|
|
13971
|
+
}, pane.nodes && pane.nodes.map((node, index) => {
|
|
13967
13972
|
var _a;
|
|
13968
13973
|
return /* @__PURE__ */ React__default["default"].createElement(CascaderItem, {
|
|
13969
|
-
key:
|
|
13974
|
+
key: index,
|
|
13970
13975
|
...props,
|
|
13971
13976
|
data: node,
|
|
13972
13977
|
checked: ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value,
|
|
@@ -14032,6 +14037,7 @@
|
|
|
14032
14037
|
onFocus,
|
|
14033
14038
|
onBlur,
|
|
14034
14039
|
onClear,
|
|
14040
|
+
onCancel,
|
|
14035
14041
|
onSearch,
|
|
14036
14042
|
onClickInput,
|
|
14037
14043
|
onClickLeftinIcon,
|
|
@@ -14079,6 +14085,7 @@
|
|
|
14079
14085
|
disabled,
|
|
14080
14086
|
readOnly,
|
|
14081
14087
|
maxLength,
|
|
14088
|
+
onKeyPress: onKeypress,
|
|
14082
14089
|
onChange: (e2) => change(e2),
|
|
14083
14090
|
onFocus: (e2) => focus(e2),
|
|
14084
14091
|
onBlur: (e2) => blur(e2),
|
|
@@ -14157,13 +14164,22 @@
|
|
|
14157
14164
|
if (actionText) {
|
|
14158
14165
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14159
14166
|
className: searchbarBem("action-text"),
|
|
14160
|
-
onClick:
|
|
14167
|
+
onClick: cancel
|
|
14161
14168
|
}, actionText);
|
|
14162
14169
|
}
|
|
14163
14170
|
return null;
|
|
14164
14171
|
};
|
|
14165
|
-
const
|
|
14166
|
-
|
|
14172
|
+
const onKeypress = (e2) => {
|
|
14173
|
+
if (e2.key === "Enter") {
|
|
14174
|
+
const event = e2.nativeEvent;
|
|
14175
|
+
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
14176
|
+
event.preventDefault();
|
|
14177
|
+
}
|
|
14178
|
+
onSearch && onSearch(value);
|
|
14179
|
+
}
|
|
14180
|
+
};
|
|
14181
|
+
const cancel = () => {
|
|
14182
|
+
onCancel && onCancel();
|
|
14167
14183
|
};
|
|
14168
14184
|
const renderLabel = () => {
|
|
14169
14185
|
if (label) {
|
|
@@ -14330,9 +14346,9 @@
|
|
|
14330
14346
|
className: b2("body")
|
|
14331
14347
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14332
14348
|
className: b2("body__keys")
|
|
14333
|
-
}, keysList == null ? void 0 : keysList.map((item,
|
|
14349
|
+
}, keysList == null ? void 0 : keysList.map((item, index) => {
|
|
14334
14350
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14335
|
-
key:
|
|
14351
|
+
key: index,
|
|
14336
14352
|
className: classNames({
|
|
14337
14353
|
"key-board-wrapper": true,
|
|
14338
14354
|
"key-board-wrapper-large": item.id === 0 && type === "rightColumn" && Array.isArray(customKey) && customKey.length === 1
|
|
@@ -14424,9 +14440,9 @@
|
|
|
14424
14440
|
const cancelActionSheet = () => {
|
|
14425
14441
|
onCancel && onCancel();
|
|
14426
14442
|
};
|
|
14427
|
-
const chooseItem = (item,
|
|
14443
|
+
const chooseItem = (item, index) => {
|
|
14428
14444
|
if (!item.disable) {
|
|
14429
|
-
onChoose && onChoose(item,
|
|
14445
|
+
onChoose && onChoose(item, index);
|
|
14430
14446
|
}
|
|
14431
14447
|
};
|
|
14432
14448
|
return /* @__PURE__ */ React__default["default"].createElement(Popup, {
|
|
@@ -14446,12 +14462,12 @@
|
|
|
14446
14462
|
className: `${b2("item")} desc`
|
|
14447
14463
|
}, description), menuItems.length ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14448
14464
|
className: b2("menu")
|
|
14449
|
-
}, menuItems.map((item,
|
|
14465
|
+
}, menuItems.map((item, index) => {
|
|
14450
14466
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14451
14467
|
className: `${b2("item")} ${item.disable ? b2("item-disabled") : ""}`,
|
|
14452
14468
|
style: { color: isHighlight(item) },
|
|
14453
|
-
key:
|
|
14454
|
-
onClick: () => chooseItem(item,
|
|
14469
|
+
key: index,
|
|
14470
|
+
onClick: () => chooseItem(item, index)
|
|
14455
14471
|
}, item[optionTag], /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14456
14472
|
className: "subdesc"
|
|
14457
14473
|
}, item[optionSubTag]));
|
|
@@ -15848,9 +15864,9 @@
|
|
|
15848
15864
|
y1: "0%",
|
|
15849
15865
|
x2: "0%",
|
|
15850
15866
|
y2: "0%"
|
|
15851
|
-
}, (_a = stop2()) == null ? void 0 : _a.map((item,
|
|
15867
|
+
}, (_a = stop2()) == null ? void 0 : _a.map((item, index) => {
|
|
15852
15868
|
return /* @__PURE__ */ React__default["default"].createElement("stop", {
|
|
15853
|
-
key:
|
|
15869
|
+
key: index,
|
|
15854
15870
|
offset: item.key,
|
|
15855
15871
|
stopColor: item.value
|
|
15856
15872
|
});
|
|
@@ -15957,8 +15973,8 @@
|
|
|
15957
15973
|
};
|
|
15958
15974
|
}, []);
|
|
15959
15975
|
const cloneChild = (listItem, listIndex) => {
|
|
15960
|
-
return React__default["default"].Children.map(children, function(child,
|
|
15961
|
-
if (child &&
|
|
15976
|
+
return React__default["default"].Children.map(children, function(child, index) {
|
|
15977
|
+
if (child && index === listIndex) {
|
|
15962
15978
|
return React__default["default"].cloneElement(child, {
|
|
15963
15979
|
key: listIndex,
|
|
15964
15980
|
children: listItem
|
|
@@ -16137,16 +16153,16 @@
|
|
|
16137
16153
|
}, children ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16138
16154
|
className: "horseLamp_list",
|
|
16139
16155
|
style: horseLampStyle
|
|
16140
|
-
}, scrollList.current.map((item,
|
|
16141
|
-
return cloneChild(item,
|
|
16156
|
+
}, scrollList.current.map((item, index) => {
|
|
16157
|
+
return cloneChild(item, index);
|
|
16142
16158
|
})) : /* @__PURE__ */ React__default["default"].createElement("ul", {
|
|
16143
16159
|
className: "horseLamp_list",
|
|
16144
16160
|
style: horseLampStyle
|
|
16145
|
-
}, scrollList.current.map((item,
|
|
16161
|
+
}, scrollList.current.map((item, index) => {
|
|
16146
16162
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
16147
16163
|
className: "horseLamp_list_item",
|
|
16148
16164
|
style: { height },
|
|
16149
|
-
key:
|
|
16165
|
+
key: index,
|
|
16150
16166
|
onClick: () => {
|
|
16151
16167
|
go(item);
|
|
16152
16168
|
}
|
|
@@ -16238,10 +16254,10 @@
|
|
|
16238
16254
|
const parent = React.useContext(DataContext$1);
|
|
16239
16255
|
const dot = parent.propSteps.progressDot;
|
|
16240
16256
|
const getCurrentStatus = () => {
|
|
16241
|
-
const
|
|
16242
|
-
if (
|
|
16257
|
+
const index = activeIndex;
|
|
16258
|
+
if (index < +parent.propSteps.current)
|
|
16243
16259
|
return "finish";
|
|
16244
|
-
return
|
|
16260
|
+
return index === +parent.propSteps.current ? "process" : "wait";
|
|
16245
16261
|
};
|
|
16246
16262
|
const handleClickStep = () => {
|
|
16247
16263
|
var _a, _b;
|
|
@@ -16436,17 +16452,17 @@
|
|
|
16436
16452
|
});
|
|
16437
16453
|
});
|
|
16438
16454
|
};
|
|
16439
|
-
const to2 = (
|
|
16455
|
+
const to2 = (index) => {
|
|
16440
16456
|
resettPosition();
|
|
16441
16457
|
touchReset();
|
|
16442
16458
|
requestFrame(() => {
|
|
16443
16459
|
requestFrame(() => {
|
|
16444
16460
|
_swiper.current.moving = false;
|
|
16445
16461
|
let targetIndex;
|
|
16446
|
-
if (props.loop && childCount ===
|
|
16447
|
-
targetIndex = active === 0 ? 0 :
|
|
16462
|
+
if (props.loop && childCount === index) {
|
|
16463
|
+
targetIndex = active === 0 ? 0 : index;
|
|
16448
16464
|
} else {
|
|
16449
|
-
targetIndex =
|
|
16465
|
+
targetIndex = index % childCount;
|
|
16450
16466
|
}
|
|
16451
16467
|
move({
|
|
16452
16468
|
pace: targetIndex - active,
|
|
@@ -16675,14 +16691,14 @@
|
|
|
16675
16691
|
stopAutoPlay();
|
|
16676
16692
|
};
|
|
16677
16693
|
}, []);
|
|
16678
|
-
const itemStyle = (
|
|
16694
|
+
const itemStyle = (index) => {
|
|
16679
16695
|
const style = {};
|
|
16680
16696
|
const _direction = propSwiper.direction || direction;
|
|
16681
16697
|
const _size = size;
|
|
16682
16698
|
if (_size) {
|
|
16683
16699
|
style[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
|
|
16684
16700
|
}
|
|
16685
|
-
const offset2 = childOffset[
|
|
16701
|
+
const offset2 = childOffset[index];
|
|
16686
16702
|
if (offset2) {
|
|
16687
16703
|
style.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
|
|
16688
16704
|
}
|
|
@@ -16702,27 +16718,27 @@
|
|
|
16702
16718
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16703
16719
|
className: contentClass,
|
|
16704
16720
|
ref: innerRef
|
|
16705
|
-
}, React__default["default"].Children.map(childs, (child,
|
|
16721
|
+
}, React__default["default"].Children.map(childs, (child, index) => {
|
|
16706
16722
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16707
16723
|
className: b2("item-wrapper"),
|
|
16708
|
-
style: itemStyle(
|
|
16709
|
-
key:
|
|
16724
|
+
style: itemStyle(index),
|
|
16725
|
+
key: index
|
|
16710
16726
|
}, child);
|
|
16711
16727
|
})), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16712
16728
|
className: classNames({
|
|
16713
16729
|
[`${b2("pagination")}`]: true,
|
|
16714
16730
|
[`${b2("pagination-vertical")}`]: isVertical
|
|
16715
16731
|
})
|
|
16716
|
-
}, React__default["default"].Children.map(childs, (item,
|
|
16732
|
+
}, React__default["default"].Children.map(childs, (item, index) => {
|
|
16717
16733
|
return /* @__PURE__ */ React__default["default"].createElement("i", {
|
|
16718
|
-
style: (active + childCount) % childCount ===
|
|
16734
|
+
style: (active + childCount) % childCount === index ? {
|
|
16719
16735
|
backgroundColor: propSwiper.paginationColor
|
|
16720
16736
|
} : void 0,
|
|
16721
16737
|
className: classNames({
|
|
16722
16738
|
[`${b2("pagination-item")}`]: true,
|
|
16723
|
-
active: (active + childCount) % childCount ===
|
|
16739
|
+
active: (active + childCount) % childCount === index
|
|
16724
16740
|
}),
|
|
16725
|
-
key:
|
|
16741
|
+
key: index
|
|
16726
16742
|
});
|
|
16727
16743
|
})) : /* @__PURE__ */ React__default["default"].createElement("div", null, pageContent)));
|
|
16728
16744
|
});
|
|
@@ -16828,11 +16844,11 @@
|
|
|
16828
16844
|
children2[i].setAttribute("data-index", i + 1);
|
|
16829
16845
|
}
|
|
16830
16846
|
}
|
|
16831
|
-
const
|
|
16847
|
+
const index = Number((_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index);
|
|
16832
16848
|
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.maxCount;
|
|
16833
16849
|
setMaxSum(children2.length);
|
|
16834
|
-
setAvatarIndex(
|
|
16835
|
-
if (
|
|
16850
|
+
setAvatarIndex(index);
|
|
16851
|
+
if (index === children2.length && index !== maxCount && children2.length > maxCount) {
|
|
16836
16852
|
setShowMax(true);
|
|
16837
16853
|
}
|
|
16838
16854
|
};
|
|
@@ -17204,7 +17220,7 @@
|
|
|
17204
17220
|
className: "",
|
|
17205
17221
|
onClick: (e2) => {
|
|
17206
17222
|
},
|
|
17207
|
-
onChoose: (item,
|
|
17223
|
+
onChoose: (item, index) => {
|
|
17208
17224
|
}
|
|
17209
17225
|
};
|
|
17210
17226
|
const Popover = (props) => {
|
|
@@ -17278,9 +17294,9 @@
|
|
|
17278
17294
|
props.onClick(e2);
|
|
17279
17295
|
}
|
|
17280
17296
|
};
|
|
17281
|
-
const handleChoose = (item,
|
|
17297
|
+
const handleChoose = (item, index) => {
|
|
17282
17298
|
if (!item.disabled) {
|
|
17283
|
-
onChoose(item,
|
|
17299
|
+
onChoose(item, index);
|
|
17284
17300
|
}
|
|
17285
17301
|
};
|
|
17286
17302
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -17394,10 +17410,10 @@
|
|
|
17394
17410
|
className: "skeleton-content-line"
|
|
17395
17411
|
}, title && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
17396
17412
|
className: "skeleton-title"
|
|
17397
|
-
}), repeatLines(row).map((item,
|
|
17413
|
+
}), repeatLines(row).map((item, index) => {
|
|
17398
17414
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
17399
17415
|
className: blockClass,
|
|
17400
|
-
key:
|
|
17416
|
+
key: index,
|
|
17401
17417
|
style: { width, height }
|
|
17402
17418
|
});
|
|
17403
17419
|
})))));
|
|
@@ -17999,29 +18015,29 @@
|
|
|
17999
18015
|
Empty.defaultProps = defaultProps$e;
|
|
18000
18016
|
Empty.displayName = "NutEmpty";
|
|
18001
18017
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
18002
|
-
let
|
|
18018
|
+
let index = 0;
|
|
18003
18019
|
const positions = Array(length);
|
|
18004
|
-
while (
|
|
18005
|
-
positions[
|
|
18006
|
-
index
|
|
18020
|
+
while (index < length) {
|
|
18021
|
+
positions[index] = {
|
|
18022
|
+
index,
|
|
18007
18023
|
height: reaItemSize,
|
|
18008
18024
|
width: reaItemSize,
|
|
18009
|
-
top:
|
|
18010
|
-
bottom: (
|
|
18011
|
-
left:
|
|
18012
|
-
right: (
|
|
18025
|
+
top: index * reaItemSize,
|
|
18026
|
+
bottom: (index + 1) * reaItemSize,
|
|
18027
|
+
left: index * reaItemSize,
|
|
18028
|
+
right: (index + 1) * reaItemSize
|
|
18013
18029
|
};
|
|
18014
|
-
|
|
18030
|
+
index++;
|
|
18015
18031
|
}
|
|
18016
18032
|
return positions;
|
|
18017
18033
|
};
|
|
18018
18034
|
const getListTotalSize = (positions, horizontal) => {
|
|
18019
|
-
const
|
|
18035
|
+
const index = positions.length - 1;
|
|
18020
18036
|
let size = 0;
|
|
18021
|
-
if (
|
|
18037
|
+
if (index < 0) {
|
|
18022
18038
|
size = 0;
|
|
18023
18039
|
} else {
|
|
18024
|
-
size = horizontal ? positions[
|
|
18040
|
+
size = horizontal ? positions[index].right : positions[index].bottom;
|
|
18025
18041
|
}
|
|
18026
18042
|
return size;
|
|
18027
18043
|
};
|
|
@@ -18083,25 +18099,25 @@
|
|
|
18083
18099
|
const updateItemSize = (positions, items, sizeKey) => {
|
|
18084
18100
|
const newPos = positions.concat();
|
|
18085
18101
|
Array.from(items).forEach((item) => {
|
|
18086
|
-
const
|
|
18102
|
+
const index = Number(item.getAttribute("data-index"));
|
|
18087
18103
|
const styleVal = item.getAttribute("style");
|
|
18088
18104
|
if (styleVal && styleVal.includes("none"))
|
|
18089
18105
|
return;
|
|
18090
18106
|
const nowSize = item.getBoundingClientRect()[sizeKey];
|
|
18091
|
-
const oldSize = positions[
|
|
18107
|
+
const oldSize = positions[index][sizeKey];
|
|
18092
18108
|
const dValue = oldSize - nowSize;
|
|
18093
18109
|
if (dValue) {
|
|
18094
18110
|
if (sizeKey === "width") {
|
|
18095
|
-
newPos[
|
|
18096
|
-
newPos[
|
|
18097
|
-
for (let k2 =
|
|
18111
|
+
newPos[index].right -= dValue;
|
|
18112
|
+
newPos[index][sizeKey] = nowSize;
|
|
18113
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
18098
18114
|
newPos[k2].left = positions[k2 - 1].right;
|
|
18099
18115
|
newPos[k2].right -= dValue;
|
|
18100
18116
|
}
|
|
18101
18117
|
} else if (sizeKey === "height") {
|
|
18102
|
-
newPos[
|
|
18103
|
-
newPos[
|
|
18104
|
-
for (let k2 =
|
|
18118
|
+
newPos[index].bottom -= dValue;
|
|
18119
|
+
newPos[index][sizeKey] = nowSize;
|
|
18120
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
18105
18121
|
newPos[k2].top = positions[k2 - 1].bottom;
|
|
18106
18122
|
newPos[k2].bottom -= dValue;
|
|
18107
18123
|
}
|
|
@@ -18251,9 +18267,9 @@
|
|
|
18251
18267
|
style: {
|
|
18252
18268
|
transform: horizontal ? `translate3d(${options2.startOffset}px,0,0)` : `translate3d(0,${options2.startOffset}px,0)`
|
|
18253
18269
|
}
|
|
18254
|
-
}, sourceData.slice(options2.overStart, options2.endIndex).map((data,
|
|
18270
|
+
}, sourceData.slice(options2.overStart, options2.endIndex).map((data, index) => {
|
|
18255
18271
|
const { startIndex, overStart } = options2;
|
|
18256
|
-
const dataIndex = overStart +
|
|
18272
|
+
const dataIndex = overStart + index;
|
|
18257
18273
|
const styleVal = dataIndex < startIndex ? "none" : "block";
|
|
18258
18274
|
const keyVal = key && data[key] ? data[key] : dataIndex;
|
|
18259
18275
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
@@ -18330,7 +18346,7 @@
|
|
|
18330
18346
|
return columns.filter((item) => item.key === value)[0];
|
|
18331
18347
|
};
|
|
18332
18348
|
const renderHeadCells = () => {
|
|
18333
|
-
return columns.map((item,
|
|
18349
|
+
return columns.map((item, index) => {
|
|
18334
18350
|
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
18335
18351
|
className: classNames(
|
|
18336
18352
|
"nut-table__main__head__tr__th",
|
|
@@ -18352,7 +18368,7 @@
|
|
|
18352
18368
|
});
|
|
18353
18369
|
};
|
|
18354
18370
|
const renderBodyTds = (item) => {
|
|
18355
|
-
return sortDataItem().map(([value, render2],
|
|
18371
|
+
return sortDataItem().map(([value, render2], index) => {
|
|
18356
18372
|
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
18357
18373
|
className: classNames(
|
|
18358
18374
|
"nut-table__main__body__tr__td",
|
|
@@ -18363,10 +18379,10 @@
|
|
|
18363
18379
|
});
|
|
18364
18380
|
};
|
|
18365
18381
|
const renderBoyTrs = () => {
|
|
18366
|
-
return curData.map((item,
|
|
18382
|
+
return curData.map((item, index) => {
|
|
18367
18383
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18368
18384
|
className: "nut-table__main__body__tr",
|
|
18369
|
-
key:
|
|
18385
|
+
key: index
|
|
18370
18386
|
}, renderBodyTds(item));
|
|
18371
18387
|
});
|
|
18372
18388
|
};
|
|
@@ -18893,17 +18909,17 @@
|
|
|
18893
18909
|
initPage: initNo && (initNo > maxNo ? maxNo - 1 : initNo - 1),
|
|
18894
18910
|
paginationColor,
|
|
18895
18911
|
paginationVisible
|
|
18896
|
-
}, (videos && videos.length > 0 ? videos.map((item,
|
|
18912
|
+
}, (videos && videos.length > 0 ? videos.map((item, index) => {
|
|
18897
18913
|
return /* @__PURE__ */ React__default["default"].createElement(SwiperItem, {
|
|
18898
|
-
key:
|
|
18914
|
+
key: index
|
|
18899
18915
|
}, /* @__PURE__ */ React__default["default"].createElement(Video, {
|
|
18900
18916
|
source: item.source,
|
|
18901
18917
|
options: item.options
|
|
18902
18918
|
}));
|
|
18903
18919
|
}) : []).concat(
|
|
18904
|
-
images && images.length > 0 ? images.map((item,
|
|
18920
|
+
images && images.length > 0 ? images.map((item, index) => {
|
|
18905
18921
|
return /* @__PURE__ */ React__default["default"].createElement(SwiperItem, {
|
|
18906
|
-
key:
|
|
18922
|
+
key: index
|
|
18907
18923
|
}, /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
18908
18924
|
src: item.src,
|
|
18909
18925
|
alt: "",
|
|
@@ -18950,7 +18966,7 @@
|
|
|
18950
18966
|
addressDetail: "",
|
|
18951
18967
|
selectedAddress: false
|
|
18952
18968
|
};
|
|
18953
|
-
copyExistAdd.forEach((list,
|
|
18969
|
+
copyExistAdd.forEach((list, index) => {
|
|
18954
18970
|
if (list && list.selectedAddress) {
|
|
18955
18971
|
prevExistAdd = list;
|
|
18956
18972
|
}
|
|
@@ -18970,10 +18986,10 @@
|
|
|
18970
18986
|
className: b2("exist-group")
|
|
18971
18987
|
}, /* @__PURE__ */ React__default["default"].createElement("ul", {
|
|
18972
18988
|
className: b2("exist-ul")
|
|
18973
|
-
}, existAddress.map((item,
|
|
18989
|
+
}, existAddress.map((item, index) => {
|
|
18974
18990
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
18975
18991
|
className: b2("exist-item"),
|
|
18976
|
-
key:
|
|
18992
|
+
key: index
|
|
18977
18993
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18978
18994
|
onClick: () => selectedExist(item)
|
|
18979
18995
|
}, /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
|
|
@@ -19056,18 +19072,18 @@
|
|
|
19056
19072
|
return a.title.localeCompare(b22.title);
|
|
19057
19073
|
});
|
|
19058
19074
|
data.forEach((item) => {
|
|
19059
|
-
const
|
|
19075
|
+
const index = newData.findIndex(
|
|
19060
19076
|
(value) => value.title === item.title
|
|
19061
19077
|
);
|
|
19062
|
-
if (
|
|
19078
|
+
if (index <= -1) {
|
|
19063
19079
|
newData.push({
|
|
19064
19080
|
title: item.title,
|
|
19065
19081
|
list: [].concat(item)
|
|
19066
19082
|
});
|
|
19067
19083
|
} else {
|
|
19068
|
-
newData[
|
|
19084
|
+
newData[index] = {
|
|
19069
19085
|
title: item.title,
|
|
19070
|
-
list: newData[
|
|
19086
|
+
list: newData[index].list.concat(item)
|
|
19071
19087
|
};
|
|
19072
19088
|
}
|
|
19073
19089
|
});
|
|
@@ -19086,8 +19102,8 @@
|
|
|
19086
19102
|
town: { name: "" }
|
|
19087
19103
|
});
|
|
19088
19104
|
const [lineDistance, setLineDistance] = React.useState(20);
|
|
19089
|
-
const getTabName = (item,
|
|
19090
|
-
if (tabIndex >
|
|
19105
|
+
const getTabName = (item, index) => {
|
|
19106
|
+
if (tabIndex > index) {
|
|
19091
19107
|
return item.name;
|
|
19092
19108
|
}
|
|
19093
19109
|
return locale.select;
|
|
@@ -19098,9 +19114,9 @@
|
|
|
19098
19114
|
country: countryRef,
|
|
19099
19115
|
town: townRef
|
|
19100
19116
|
};
|
|
19101
|
-
const lineAnimation = (
|
|
19117
|
+
const lineAnimation = (index) => {
|
|
19102
19118
|
setTimeout(() => {
|
|
19103
|
-
const name = tabName[
|
|
19119
|
+
const name = tabName[index];
|
|
19104
19120
|
const refD = mapRef;
|
|
19105
19121
|
if (name && refD[name] && refD[name].current) {
|
|
19106
19122
|
const distance = refD[name].current.offsetLeft;
|
|
@@ -19149,10 +19165,10 @@
|
|
|
19149
19165
|
onClose && onClose();
|
|
19150
19166
|
}
|
|
19151
19167
|
};
|
|
19152
|
-
const changeRegionTab = (item,
|
|
19153
|
-
if (getTabName(item,
|
|
19154
|
-
setTabIndex(
|
|
19155
|
-
lineAnimation(
|
|
19168
|
+
const changeRegionTab = (item, index, key) => {
|
|
19169
|
+
if (getTabName(item, index)) {
|
|
19170
|
+
setTabIndex(index);
|
|
19171
|
+
lineAnimation(index);
|
|
19156
19172
|
}
|
|
19157
19173
|
onTabClick && onTabClick(key);
|
|
19158
19174
|
};
|
|
@@ -19160,16 +19176,16 @@
|
|
|
19160
19176
|
if (modelValue.length > 0) {
|
|
19161
19177
|
let tagIndex = 0;
|
|
19162
19178
|
const selectedRegionC = selectedRegion && Object.assign(selectedRegion);
|
|
19163
|
-
for (let
|
|
19164
|
-
if (regionList[tabName[
|
|
19165
|
-
tagIndex =
|
|
19166
|
-
setTabIndex(
|
|
19179
|
+
for (let index = 0; index < modelValue.length; index++) {
|
|
19180
|
+
if (regionList[tabName[index]].length === 0) {
|
|
19181
|
+
tagIndex = index - 1;
|
|
19182
|
+
setTabIndex(index - 1);
|
|
19167
19183
|
break;
|
|
19168
19184
|
} else {
|
|
19169
|
-
const val = modelValue[
|
|
19170
|
-
const arr = regionList[tabName[
|
|
19185
|
+
const val = modelValue[index];
|
|
19186
|
+
const arr = regionList[tabName[index]];
|
|
19171
19187
|
if (privateType === "custom") {
|
|
19172
|
-
selectedRegionC[[tabName[
|
|
19188
|
+
selectedRegionC[[tabName[index]]] = arr.filter(
|
|
19173
19189
|
(item) => item.id === val
|
|
19174
19190
|
)[0];
|
|
19175
19191
|
} else if (privateType === "custom2") {
|
|
@@ -19177,11 +19193,11 @@
|
|
|
19177
19193
|
arr.forEach((item) => {
|
|
19178
19194
|
sumArr.push(...item.list);
|
|
19179
19195
|
});
|
|
19180
|
-
selectedRegionC[[tabName[
|
|
19196
|
+
selectedRegionC[[tabName[index]]] = sumArr.filter(
|
|
19181
19197
|
(item) => item.id === val
|
|
19182
19198
|
)[0];
|
|
19183
19199
|
}
|
|
19184
|
-
tagIndex =
|
|
19200
|
+
tagIndex = index;
|
|
19185
19201
|
setSelectedRegion(selectedRegionC);
|
|
19186
19202
|
}
|
|
19187
19203
|
}
|
|
@@ -19228,19 +19244,19 @@
|
|
|
19228
19244
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19229
19245
|
className: b2("region-tab")
|
|
19230
19246
|
}, selectedRegion && Object.keys(selectedRegion).map(
|
|
19231
|
-
(key,
|
|
19247
|
+
(key, index) => {
|
|
19232
19248
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19233
|
-
className: `${b2("tab-item")} ${
|
|
19234
|
-
key:
|
|
19249
|
+
className: `${b2("tab-item")} ${index === tabIndex ? "active" : ""}`,
|
|
19250
|
+
key: index,
|
|
19235
19251
|
ref: mapRef[key],
|
|
19236
19252
|
onClick: () => changeRegionTab(
|
|
19237
19253
|
selectedRegion[key],
|
|
19238
|
-
|
|
19254
|
+
index,
|
|
19239
19255
|
key
|
|
19240
19256
|
)
|
|
19241
|
-
},
|
|
19257
|
+
}, index <= tabIndex && /* @__PURE__ */ React__default["default"].createElement("div", null, getTabName(
|
|
19242
19258
|
selectedRegion[key],
|
|
19243
|
-
|
|
19259
|
+
index
|
|
19244
19260
|
)));
|
|
19245
19261
|
}
|
|
19246
19262
|
), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -19252,9 +19268,9 @@
|
|
|
19252
19268
|
}, /* @__PURE__ */ React__default["default"].createElement("ul", {
|
|
19253
19269
|
className: b2("region-group")
|
|
19254
19270
|
}, regionList[tabName[tabIndex]].map(
|
|
19255
|
-
(item,
|
|
19271
|
+
(item, index) => {
|
|
19256
19272
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
19257
|
-
key:
|
|
19273
|
+
key: index,
|
|
19258
19274
|
className: b2("region-item")
|
|
19259
19275
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19260
19276
|
onClick: () => {
|
|
@@ -19512,12 +19528,12 @@
|
|
|
19512
19528
|
const barrageContainer = React.useRef(null);
|
|
19513
19529
|
const barrageCWidth = React.useRef(0);
|
|
19514
19530
|
const timer = React.useRef(0);
|
|
19515
|
-
const
|
|
19531
|
+
const index = React.useRef(0);
|
|
19516
19532
|
const b2 = cn("barrage");
|
|
19517
19533
|
const classes = classNames(className, b2(""));
|
|
19518
19534
|
React.useImperativeHandle(ref, () => ({
|
|
19519
19535
|
add: (word) => {
|
|
19520
|
-
const _index =
|
|
19536
|
+
const _index = index.current % barrageList.length;
|
|
19521
19537
|
barrageList.splice(_index, 0, word);
|
|
19522
19538
|
}
|
|
19523
19539
|
}));
|
|
@@ -19538,7 +19554,7 @@
|
|
|
19538
19554
|
}, frequency);
|
|
19539
19555
|
};
|
|
19540
19556
|
const play = () => {
|
|
19541
|
-
const _index = loop2 ?
|
|
19557
|
+
const _index = loop2 ? index.current % barrageList.length : index.current;
|
|
19542
19558
|
const el = document.createElement(`div`);
|
|
19543
19559
|
el.innerHTML = barrageList[_index];
|
|
19544
19560
|
el.classList.add("barrage-item");
|
|
@@ -19554,7 +19570,7 @@
|
|
|
19554
19570
|
el.addEventListener("animationend", () => {
|
|
19555
19571
|
barrageContainer.current.removeChild(el);
|
|
19556
19572
|
});
|
|
19557
|
-
|
|
19573
|
+
index.current++;
|
|
19558
19574
|
};
|
|
19559
19575
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19560
19576
|
className: classes,
|
|
@@ -19804,7 +19820,7 @@
|
|
|
19804
19820
|
};
|
|
19805
19821
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19806
19822
|
className: `${b2()} ${className || ""}`
|
|
19807
|
-
}, renderData.map((item,
|
|
19823
|
+
}, renderData.map((item, index) => /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
19808
19824
|
className: getDetailClass(item),
|
|
19809
19825
|
key: item,
|
|
19810
19826
|
onClick: () => handleTime(item)
|
|
@@ -19936,11 +19952,11 @@
|
|
|
19936
19952
|
className: "nut-timeselect__content"
|
|
19937
19953
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19938
19954
|
className: "nut-timeselect__content-left"
|
|
19939
|
-
}, dates.map((dataItem,
|
|
19955
|
+
}, dates.map((dataItem, index) => /* @__PURE__ */ React__default["default"].createElement(TimePannel, {
|
|
19940
19956
|
date: dataItem.date,
|
|
19941
19957
|
className: getTimePannelClass(dataItem),
|
|
19942
|
-
key: String(dataItem["pannel-key"] ||
|
|
19943
|
-
curKey: String(dataItem["pannel-key"] ||
|
|
19958
|
+
key: String(dataItem["pannel-key"] || index),
|
|
19959
|
+
curKey: String(dataItem["pannel-key"] || index),
|
|
19944
19960
|
change: handleChange
|
|
19945
19961
|
}))), /* @__PURE__ */ React__default["default"].createElement(TimeDetail, {
|
|
19946
19962
|
times,
|