@nutui/nutui-react 2.0.18-beta.0 → 2.0.18-beta.1
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 +17 -0
- package/dist/esm/Avatar/style/index.js +2 -1
- package/dist/esm/Avatar/style/style.css +1 -1
- package/dist/esm/BackTop.js +1 -1
- package/dist/esm/Badge/style/style.css +1 -1
- package/dist/esm/Button.js +5 -84
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/FixedNav/style/style.css +1 -1
- package/dist/esm/Form.js +8 -1235
- package/dist/esm/ImagePreview/style/index.js +2 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/Indicator.js +3 -54
- package/dist/esm/Menu/style/style.css +1 -1
- package/dist/esm/Menu.js +11 -4
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/MenuItem.js +3 -0
- package/dist/esm/Skeleton/style/style.css +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/Swiper/style/index.js +2 -1
- package/dist/esm/Swiper/style/style.css +1 -1
- package/dist/esm/Swiper.js +5 -5
- package/dist/esm/Tabbar/style/style.css +1 -1
- package/dist/esm/TabbarItem/style/style.css +1 -1
- package/dist/esm/Toast/style/style.css +1 -1
- package/dist/esm/Tour/style/index.js +1 -1
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +12 -8
- package/dist/esm/badge2.js +2 -2
- package/dist/esm/button2.js +87 -0
- package/dist/esm/date.js +4 -6
- package/dist/esm/formitem2.js +1288 -51
- package/dist/esm/indicator2.js +57 -0
- package/dist/esm/menuitem2.js +29 -8
- package/dist/esm/popup2.js +1 -1
- package/dist/esm/types/src/packages/badge/badge.d.ts +2 -2
- package/dist/esm/types/src/packages/badge/badge.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/form/types.d.ts +4 -4
- package/dist/esm/types/src/packages/form/useform.d.ts +2 -1
- package/dist/esm/types/src/packages/form/useform.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/menu/menu.d.ts +1 -0
- package/dist/esm/types/src/packages/menu/menu.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +1 -0
- package/dist/esm/types/src/packages/menuitem/menuitem.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +1 -1
- package/dist/esm/types/src/utils/date.d.ts +1 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +73 -40
- package/dist/nutui.react.umd.js +73 -40
- package/dist/packages/badge/badge.scss +1 -0
- package/dist/packages/dialog/dialog.scss +7 -1
- package/dist/packages/fixednav/fixednav.scss +1 -8
- package/dist/packages/menuitem/menuitem.scss +2 -2
- package/dist/packages/toast/toast.scss +2 -1
- package/dist/packages/tour/tour.scss +1 -0
- package/dist/packages/uploader/uploader.scss +12 -12
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +9 -3
- package/dist/styles/variables.scss +10 -3
- package/dist/types/packages/badge/badge.d.ts +6 -6
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/form/types.d.ts +4 -4
- package/dist/types/packages/form/useform.d.ts +2 -1
- package/dist/types/packages/menu/menu.d.ts +1 -0
- package/dist/types/packages/menuitem/menuitem.d.ts +6 -1
- package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
- package/dist/types/utils/date.d.ts +1 -1
- package/package.json +1 -1
package/dist/nutui.react.es.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
/*!
|
|
9
|
-
* @nutui/nutui-react v2.0.18
|
|
9
|
+
* @nutui/nutui-react v2.0.18 Wed Sep 20 2023 14:59:05 GMT+0800 (China Standard Time)
|
|
10
10
|
* (c) 2023 @jdf2e.
|
|
11
11
|
* Released under the MIT License.
|
|
12
12
|
*/
|
|
@@ -6111,7 +6111,7 @@ const defaultProps$1h = {
|
|
|
6111
6111
|
...ComponentDefaults,
|
|
6112
6112
|
position: "top",
|
|
6113
6113
|
threshold: 0,
|
|
6114
|
-
zIndex:
|
|
6114
|
+
zIndex: 900
|
|
6115
6115
|
};
|
|
6116
6116
|
const classPrefix$j = "nut-sticky";
|
|
6117
6117
|
const Sticky = (props) => {
|
|
@@ -6247,7 +6247,7 @@ const defaultProps$1g = {
|
|
|
6247
6247
|
...ComponentDefaults,
|
|
6248
6248
|
target: "",
|
|
6249
6249
|
threshold: 200,
|
|
6250
|
-
zIndex:
|
|
6250
|
+
zIndex: 900,
|
|
6251
6251
|
duration: 1e3
|
|
6252
6252
|
};
|
|
6253
6253
|
const BackTop = (props) => {
|
|
@@ -11846,7 +11846,7 @@ const defaultProps$1c = {
|
|
|
11846
11846
|
onCloseIconClick: (e) => true,
|
|
11847
11847
|
...defaultOverlayProps
|
|
11848
11848
|
};
|
|
11849
|
-
let _zIndex =
|
|
11849
|
+
let _zIndex = 1100;
|
|
11850
11850
|
const Popup = (props) => {
|
|
11851
11851
|
const {
|
|
11852
11852
|
children,
|
|
@@ -12214,8 +12214,8 @@ const Badge = (props) => {
|
|
|
12214
12214
|
}
|
|
12215
12215
|
const getStyle = () => {
|
|
12216
12216
|
const style2 = {};
|
|
12217
|
-
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
12218
|
-
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
12217
|
+
style2.top = `${Number(top) || parseFloat(String(top)) || 0}px`;
|
|
12218
|
+
style2.right = `${Number(right) || parseFloat(String(right)) || 0}px`;
|
|
12219
12219
|
style2.background = color;
|
|
12220
12220
|
return style2;
|
|
12221
12221
|
};
|
|
@@ -13293,7 +13293,7 @@ const Utils = {
|
|
|
13293
13293
|
* @return {Boolse} true|false
|
|
13294
13294
|
*/
|
|
13295
13295
|
isLeapYear(y2) {
|
|
13296
|
-
return y2 % 4
|
|
13296
|
+
return y2 % 4 === 0 && y2 % 100 !== 0 || y2 % 400 === 0;
|
|
13297
13297
|
},
|
|
13298
13298
|
/**
|
|
13299
13299
|
* 返回星期数
|
|
@@ -13396,9 +13396,9 @@ const Utils = {
|
|
|
13396
13396
|
* 时间是否相等
|
|
13397
13397
|
* @return {Boolean}
|
|
13398
13398
|
*/
|
|
13399
|
-
isEqual(date1
|
|
13400
|
-
const startTime = new Date(date1.replace(
|
|
13401
|
-
const endTime = new Date(date22.replace(
|
|
13399
|
+
isEqual(date1, date22) {
|
|
13400
|
+
const startTime = new Date((date1 || "").replace(/-/g, "/")).getTime();
|
|
13401
|
+
const endTime = new Date(date22.replace(/-/g, "/")).getTime();
|
|
13402
13402
|
if (startTime === endTime) {
|
|
13403
13403
|
return true;
|
|
13404
13404
|
}
|
|
@@ -16395,6 +16395,7 @@ Schema.register = function register(type4, validator) {
|
|
|
16395
16395
|
Schema.warning = warning;
|
|
16396
16396
|
Schema.messages = messages;
|
|
16397
16397
|
Schema.validators = validators;
|
|
16398
|
+
const SECRET = "NUT_FORM_INTERNAL";
|
|
16398
16399
|
class FormStore {
|
|
16399
16400
|
constructor() {
|
|
16400
16401
|
// 初始化数据
|
|
@@ -16430,12 +16431,12 @@ class FormStore {
|
|
|
16430
16431
|
/**
|
|
16431
16432
|
* 获取全部字段
|
|
16432
16433
|
*/
|
|
16433
|
-
__publicField(this, "getFieldsValue", (
|
|
16434
|
-
if (typeof
|
|
16434
|
+
__publicField(this, "getFieldsValue", (nameList) => {
|
|
16435
|
+
if (typeof nameList === "boolean") {
|
|
16435
16436
|
return JSON.parse(JSON.stringify(this.store));
|
|
16436
16437
|
}
|
|
16437
16438
|
const fieldsValue = {};
|
|
16438
|
-
|
|
16439
|
+
nameList.forEach((field) => {
|
|
16439
16440
|
fieldsValue[field] = this.getFieldValue(field);
|
|
16440
16441
|
});
|
|
16441
16442
|
return fieldsValue;
|
|
@@ -16555,20 +16556,27 @@ class FormStore {
|
|
|
16555
16556
|
__publicField(this, "dispatch", ({ name }) => {
|
|
16556
16557
|
this.validateFields([name]);
|
|
16557
16558
|
});
|
|
16559
|
+
__publicField(this, "getInternal", (key) => {
|
|
16560
|
+
if (key === SECRET) {
|
|
16561
|
+
return {
|
|
16562
|
+
registerField: this.registerField,
|
|
16563
|
+
setCallback: this.setCallback,
|
|
16564
|
+
setInitialValues: this.setInitialValues,
|
|
16565
|
+
dispatch: this.dispatch,
|
|
16566
|
+
store: this.store,
|
|
16567
|
+
fieldEntities: this.fieldEntities
|
|
16568
|
+
};
|
|
16569
|
+
}
|
|
16570
|
+
});
|
|
16558
16571
|
__publicField(this, "getForm", () => {
|
|
16559
16572
|
return {
|
|
16560
|
-
dispatch: this.dispatch,
|
|
16561
|
-
setInitialValues: this.setInitialValues,
|
|
16562
|
-
setCallback: this.setCallback,
|
|
16563
|
-
registerField: this.registerField,
|
|
16564
16573
|
getFieldValue: this.getFieldValue,
|
|
16565
16574
|
getFieldsValue: this.getFieldsValue,
|
|
16566
16575
|
setFieldsValue: this.setFieldsValue,
|
|
16567
16576
|
resetFields: this.resetFields,
|
|
16568
16577
|
submit: this.submit,
|
|
16569
|
-
store: this.store,
|
|
16570
16578
|
errors: this.errors,
|
|
16571
|
-
|
|
16579
|
+
getInternal: this.getInternal
|
|
16572
16580
|
};
|
|
16573
16581
|
});
|
|
16574
16582
|
this.callbacks = {
|
|
@@ -16633,7 +16641,8 @@ const Form = React__default.forwardRef(
|
|
|
16633
16641
|
}
|
|
16634
16642
|
React__default.useImperativeHandle(ref, () => formInstance);
|
|
16635
16643
|
formInstance.starPosition = starPosition;
|
|
16636
|
-
const {
|
|
16644
|
+
const { submit, resetFields } = formInstance;
|
|
16645
|
+
const { setCallback, setInitialValues } = formInstance.getInternal(SECRET);
|
|
16637
16646
|
setCallback({
|
|
16638
16647
|
onFinish,
|
|
16639
16648
|
onFinishFailed
|
|
@@ -16695,7 +16704,8 @@ class FormItem extends React__default.Component {
|
|
|
16695
16704
|
// children添加value属性和onChange事件
|
|
16696
16705
|
__publicField(this, "getControlled", (children) => {
|
|
16697
16706
|
var _a2;
|
|
16698
|
-
const { setFieldsValue, getFieldValue
|
|
16707
|
+
const { setFieldsValue, getFieldValue } = this.context;
|
|
16708
|
+
const { dispatch } = this.context.getInternal(SECRET);
|
|
16699
16709
|
const { name = "" } = this.props;
|
|
16700
16710
|
if ((_a2 = children == null ? void 0 : children.props) == null ? void 0 : _a2.defaultValue) {
|
|
16701
16711
|
console.warn("通过 initialValue 设置初始值");
|
|
@@ -16804,7 +16814,8 @@ class FormItem extends React__default.Component {
|
|
|
16804
16814
|
};
|
|
16805
16815
|
}
|
|
16806
16816
|
componentDidMount() {
|
|
16807
|
-
|
|
16817
|
+
const { registerField } = this.context.getInternal(SECRET);
|
|
16818
|
+
this.cancelRegister = registerField(this);
|
|
16808
16819
|
}
|
|
16809
16820
|
componentWillUnmount() {
|
|
16810
16821
|
if (this.cancelRegister) {
|
|
@@ -17313,6 +17324,7 @@ const defaultProps$S = {
|
|
|
17313
17324
|
columns: 1,
|
|
17314
17325
|
direction: "down",
|
|
17315
17326
|
icon: null,
|
|
17327
|
+
closeOnClickAway: true,
|
|
17316
17328
|
activeTitleClass: "",
|
|
17317
17329
|
inactiveTitleClass: "",
|
|
17318
17330
|
onChange: (value) => void 0
|
|
@@ -17323,6 +17335,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17323
17335
|
style,
|
|
17324
17336
|
options: options2,
|
|
17325
17337
|
value,
|
|
17338
|
+
defaultValue,
|
|
17326
17339
|
columns,
|
|
17327
17340
|
title,
|
|
17328
17341
|
icon,
|
|
@@ -17341,7 +17354,15 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17341
17354
|
...props
|
|
17342
17355
|
};
|
|
17343
17356
|
const [showPopup, setShowPopup] = useState(show2);
|
|
17344
|
-
const [innerValue, setValue] =
|
|
17357
|
+
const [innerValue, setValue] = usePropsValue({
|
|
17358
|
+
defaultValue,
|
|
17359
|
+
value,
|
|
17360
|
+
finalValue: void 0,
|
|
17361
|
+
onChange: (v) => {
|
|
17362
|
+
const [option] = options2.filter((o) => o.value === v);
|
|
17363
|
+
onChange == null ? void 0 : onChange(option);
|
|
17364
|
+
}
|
|
17365
|
+
});
|
|
17345
17366
|
useEffect(() => {
|
|
17346
17367
|
setShowPopup(show2);
|
|
17347
17368
|
}, [show2]);
|
|
@@ -17368,7 +17389,6 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17368
17389
|
parent.toggleMenuItem(index);
|
|
17369
17390
|
setTitle(item.text);
|
|
17370
17391
|
setValue(item.value);
|
|
17371
|
-
onChange && onChange(item);
|
|
17372
17392
|
};
|
|
17373
17393
|
const isShow = () => {
|
|
17374
17394
|
if (showPopup)
|
|
@@ -17379,6 +17399,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17379
17399
|
top: 0,
|
|
17380
17400
|
height: 0
|
|
17381
17401
|
});
|
|
17402
|
+
const scrollParent = useMemo$1(() => {
|
|
17403
|
+
return getScrollParent(parent.menuRef, window);
|
|
17404
|
+
}, [parent.menuRef]);
|
|
17382
17405
|
const getParentOffset = () => {
|
|
17383
17406
|
setTimeout(() => {
|
|
17384
17407
|
const p = parent.menuRef.current;
|
|
@@ -17389,6 +17412,12 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17389
17412
|
});
|
|
17390
17413
|
});
|
|
17391
17414
|
};
|
|
17415
|
+
useEffect(() => {
|
|
17416
|
+
scrollParent == null ? void 0 : scrollParent.addEventListener("scroll", getParentOffset, false);
|
|
17417
|
+
return () => {
|
|
17418
|
+
scrollParent == null ? void 0 : scrollParent.removeEventListener("scroll", getParentOffset, false);
|
|
17419
|
+
};
|
|
17420
|
+
}, []);
|
|
17392
17421
|
const getPosition = () => {
|
|
17393
17422
|
return direction === "down" ? {
|
|
17394
17423
|
top: `${position.top + position.height}px`,
|
|
@@ -17420,7 +17449,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17420
17449
|
className: "nut-menu-item-container",
|
|
17421
17450
|
ref: micRef
|
|
17422
17451
|
},
|
|
17423
|
-
/* @__PURE__ */ React__default.createElement(
|
|
17452
|
+
parent.overlay ? /* @__PURE__ */ React__default.createElement(
|
|
17424
17453
|
Overlay,
|
|
17425
17454
|
{
|
|
17426
17455
|
className: "nut-menu__overlay",
|
|
@@ -17432,7 +17461,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17432
17461
|
parent.closeOnOverlayClick && parent.toggleMenuItem(index);
|
|
17433
17462
|
}
|
|
17434
17463
|
}
|
|
17435
|
-
),
|
|
17464
|
+
) : null,
|
|
17436
17465
|
/* @__PURE__ */ React__default.createElement(
|
|
17437
17466
|
"div",
|
|
17438
17467
|
{
|
|
@@ -17498,6 +17527,7 @@ const defaultProps$R = {
|
|
|
17498
17527
|
closeOnOverlayClick: true,
|
|
17499
17528
|
scrollFixed: false,
|
|
17500
17529
|
lockScroll: true,
|
|
17530
|
+
overlay: true,
|
|
17501
17531
|
icon: null,
|
|
17502
17532
|
onOpen: (index) => {
|
|
17503
17533
|
},
|
|
@@ -17510,6 +17540,7 @@ const Menu = (props) => {
|
|
|
17510
17540
|
icon,
|
|
17511
17541
|
scrollFixed,
|
|
17512
17542
|
lockScroll,
|
|
17543
|
+
overlay,
|
|
17513
17544
|
closeOnOverlayClick,
|
|
17514
17545
|
children,
|
|
17515
17546
|
activeColor,
|
|
@@ -17569,6 +17600,7 @@ const Menu = (props) => {
|
|
|
17569
17600
|
activeColor,
|
|
17570
17601
|
parent: {
|
|
17571
17602
|
closeOnOverlayClick,
|
|
17603
|
+
overlay,
|
|
17572
17604
|
lockScroll,
|
|
17573
17605
|
toggleMenuItem,
|
|
17574
17606
|
updateTitle,
|
|
@@ -17581,9 +17613,9 @@ const Menu = (props) => {
|
|
|
17581
17613
|
const menuTitle = () => {
|
|
17582
17614
|
return React__default.Children.map(children, (child, index) => {
|
|
17583
17615
|
if (React__default.isValidElement(child)) {
|
|
17584
|
-
const { title, options: options2, value, disabled, direction } = child.props;
|
|
17616
|
+
const { title, options: options2, value, defaultValue, disabled, direction } = child.props;
|
|
17585
17617
|
const selected = options2 == null ? void 0 : options2.filter(
|
|
17586
|
-
(option) => option.value === value
|
|
17618
|
+
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
17587
17619
|
);
|
|
17588
17620
|
const finallyTitle = () => {
|
|
17589
17621
|
if (title)
|
|
@@ -17605,6 +17637,8 @@ const Menu = (props) => {
|
|
|
17605
17637
|
key: index,
|
|
17606
17638
|
onClick: (e) => {
|
|
17607
17639
|
e.stopPropagation();
|
|
17640
|
+
if ((!options2 || !options2.length) && !child.props.children)
|
|
17641
|
+
return;
|
|
17608
17642
|
!disabled && toggleMenuItem(index);
|
|
17609
17643
|
}
|
|
17610
17644
|
},
|
|
@@ -19458,7 +19492,7 @@ const InternalUploader = (props, ref) => {
|
|
|
19458
19492
|
const handleItemClick = (file) => {
|
|
19459
19493
|
onFileItemClick && onFileItemClick(file);
|
|
19460
19494
|
};
|
|
19461
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children, maxCount > fileList.length && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, capture ? /* @__PURE__ */ React__default.createElement(
|
|
19495
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children || /* @__PURE__ */ React__default.createElement(Button, { size: "small", type: "primary" }, "上传文件"), maxCount > fileList.length && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, capture ? /* @__PURE__ */ React__default.createElement(
|
|
19462
19496
|
"input",
|
|
19463
19497
|
{
|
|
19464
19498
|
className: "nut-uploader__input",
|
|
@@ -19488,14 +19522,15 @@ const InternalUploader = (props, ref) => {
|
|
|
19488
19522
|
className: `nut-uploader__preview ${previewType}`,
|
|
19489
19523
|
key: item.uid
|
|
19490
19524
|
},
|
|
19491
|
-
previewType === "picture" &&
|
|
19525
|
+
previewType === "picture" && deletable && /* @__PURE__ */ React__default.createElement(
|
|
19492
19526
|
x$9,
|
|
19493
19527
|
{
|
|
19494
19528
|
color: "rgba(0,0,0,0.6)",
|
|
19495
19529
|
className: "close",
|
|
19496
19530
|
onClick: () => onDeleteItem(item, index)
|
|
19497
19531
|
}
|
|
19498
|
-
),
|
|
19532
|
+
),
|
|
19533
|
+
previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview-img" }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress__msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress" }, item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ React__default.createElement(x$9, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ React__default.createElement(
|
|
19499
19534
|
k$3,
|
|
19500
19535
|
{
|
|
19501
19536
|
className: "nut-icon-loading",
|
|
@@ -19525,8 +19560,7 @@ const InternalUploader = (props, ref) => {
|
|
|
19525
19560
|
className: "nut-uploader__preview-img__file__name"
|
|
19526
19561
|
},
|
|
19527
19562
|
/* @__PURE__ */ React__default.createElement(x$6, { color: "#808080" }),
|
|
19528
|
-
" ",
|
|
19529
|
-
item.name
|
|
19563
|
+
/* @__PURE__ */ React__default.createElement("span", null, " ", item.name)
|
|
19530
19564
|
))), item.status === "success" ? /* @__PURE__ */ React__default.createElement("div", { className: "tips" }, item.name) : null),
|
|
19531
19565
|
previewType === "list" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview-list" }, /* @__PURE__ */ React__default.createElement(
|
|
19532
19566
|
"div",
|
|
@@ -19535,8 +19569,7 @@ const InternalUploader = (props, ref) => {
|
|
|
19535
19569
|
onClick: () => handleItemClick(item)
|
|
19536
19570
|
},
|
|
19537
19571
|
/* @__PURE__ */ React__default.createElement(x$6, null),
|
|
19538
|
-
" ",
|
|
19539
|
-
item.name
|
|
19572
|
+
/* @__PURE__ */ React__default.createElement("span", null, " ", item.name)
|
|
19540
19573
|
), deletable && /* @__PURE__ */ React__default.createElement(
|
|
19541
19574
|
y$8,
|
|
19542
19575
|
{
|
|
@@ -19878,7 +19911,7 @@ const DialogWrap = (props) => {
|
|
|
19878
19911
|
Overlay,
|
|
19879
19912
|
{
|
|
19880
19913
|
style: overlayStyle,
|
|
19881
|
-
className: overlayClassName,
|
|
19914
|
+
className: classNames("nut-dialog-overlay", overlayClassName),
|
|
19882
19915
|
visible,
|
|
19883
19916
|
closeOnOverlayClick,
|
|
19884
19917
|
lockScroll,
|
|
@@ -23412,10 +23445,6 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
23412
23445
|
target.style.transform = `translate3D${!isVertical ? `(${_offset}px,0,0)` : `(0,${_offset}px,0)`}`;
|
|
23413
23446
|
};
|
|
23414
23447
|
const onTouchStart = (e) => {
|
|
23415
|
-
if (props.preventDefault)
|
|
23416
|
-
e.preventDefault();
|
|
23417
|
-
if (props.stopPropagation)
|
|
23418
|
-
e.stopPropagation();
|
|
23419
23448
|
if (!props.touchable)
|
|
23420
23449
|
return;
|
|
23421
23450
|
touchStart(e);
|
|
@@ -23424,6 +23453,10 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
23424
23453
|
resetPosition();
|
|
23425
23454
|
};
|
|
23426
23455
|
const onTouchMove = (e) => {
|
|
23456
|
+
if (props.preventDefault)
|
|
23457
|
+
e.preventDefault();
|
|
23458
|
+
if (props.stopPropagation)
|
|
23459
|
+
e.stopPropagation();
|
|
23427
23460
|
if (props.touchable && swiperRef.current.moving) {
|
|
23428
23461
|
handleTouchMove(e);
|
|
23429
23462
|
if (touch.stateDirection === props.direction) {
|