@nutui/nutui-react-taro 2.3.6-beta.0 → 2.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 +35 -0
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +3 -3
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/AvatarCropper.js +2 -2
- package/dist/esm/Button.js +1 -1
- package/dist/esm/CalendarCard.js +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Checkbox.js +1 -1
- package/dist/esm/CheckboxGroup.js +1 -1
- package/dist/esm/CircleProgress/style/style.css +1 -1
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +2 -2
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/Form.js +2 -1245
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +2 -2
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Table/style/style.css +1 -1
- package/dist/esm/Table.js +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tabs.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 +2 -2
- package/dist/esm/{address.taro-sTqrtuxC.js → address.taro-TWHlPzXv.js} +1 -1
- package/dist/esm/{audio.taro-ixcoTq7M.js → audio.taro-UpVxFvGk.js} +1 -1
- package/dist/esm/{avatarcropper.taro-OjudqSeT.js → avatarcropper.taro-_IENn5QL.js} +1 -1
- package/dist/esm/{button.taro-kZJrygfW.js → button.taro-3IIFy1M2.js} +7 -14
- package/dist/esm/{calendarcard.taro-QStCLFET.js → calendarcard.taro-tY-cyh-F.js} +2 -2
- package/dist/esm/{cascader.taro-DYMZD6ik.js → cascader.taro-QW13vwKb.js} +1 -1
- package/dist/esm/{checkbox.taro-doAmyAh6.js → checkbox.taro-xMxWdpyI.js} +14 -7
- package/dist/esm/{dialog.taro-UQN2mJZR.js → dialog.taro-z588FBZJ.js} +25 -4
- package/dist/esm/{empty.taro-vxcxYcB5.js → empty.taro-98NzV-31.js} +1 -1
- package/dist/esm/formitem.taro-atY4A0pS.js +1406 -0
- package/dist/esm/{imagepreview.taro-_dileEvw.js → imagepreview.taro-qDST6Lh4.js} +6 -2
- package/dist/esm/{numberkeyboard.taro-gJhSoXsl.js → numberkeyboard.taro-CyW0s9bI.js} +3 -2
- package/dist/esm/nutui-react.es.js +15 -15
- package/dist/esm/{table.taro-Zyemar_o.js → table.taro-d172EUh9.js} +1 -1
- package/dist/esm/{tabs.taro-uXbRqGVo.js → tabs.taro-aR3XROu9.js} +4 -4
- package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +7 -6
- package/dist/esm/types/src/packages/checkbox/checkbox.taro.d.ts +7 -6
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +3 -1
- package/dist/esm/types/src/packages/checkboxgroup/types.d.ts +3 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/config.d.ts +9 -6
- package/dist/esm/types/src/packages/dialog/confirm.d.ts +3 -3
- package/dist/esm/types/src/packages/dialog/content.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/content.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialogwrap.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/index.d.ts +1 -0
- package/dist/esm/types/src/packages/imagepreview/imagepreview.d.ts +4 -1
- package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +4 -1
- package/dist/esm/types/src/packages/imagepreview/index.d.ts +1 -1
- package/dist/esm/types/src/packages/imagepreview/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/numberkeyboard/numberkeyboard.d.ts +2 -1
- package/dist/esm/types/src/packages/numberkeyboard/numberkeyboard.taro.d.ts +2 -1
- package/dist/esm/types/src/utils/get-scroll-parent.d.ts +1 -0
- package/dist/esm/{uploader.taro-SAahCKRj.js → uploader.taro-a-U18v5C.js} +2 -2
- 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 +129 -59
- package/dist/nutui.react.umd.js +129 -59
- package/dist/packages/circleprogress/circleprogress.scss +3 -1
- package/dist/packages/dialog/dialog.scss +25 -0
- package/dist/packages/imagepreview/imagepreview.scss +24 -0
- package/dist/packages/popover/popover.scss +1 -1
- package/dist/packages/table/table.scss +12 -1
- package/dist/packages/tabs/tabs.scss +16 -1
- package/dist/packages/uploader/uploader.scss +4 -6
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +6 -0
- package/dist/styles/variables.scss +6 -0
- package/dist/types/packages/button/button.taro.d.ts +6 -2
- package/dist/types/packages/checkbox/checkbox.d.ts +7 -6
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +7 -6
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +8 -3
- package/dist/types/packages/checkboxgroup/context.d.ts +3 -1
- package/dist/types/packages/checkboxgroup/types.d.ts +3 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/dialog/config.d.ts +9 -6
- package/dist/types/packages/dialog/confirm.d.ts +3 -3
- package/dist/types/packages/dialog/content.d.ts +1 -0
- package/dist/types/packages/dialog/content.taro.d.ts +1 -0
- package/dist/types/packages/dialog/dialog.d.ts +2 -2
- package/dist/types/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/types/packages/dialog/dialogwrap.d.ts +1 -0
- package/dist/types/packages/dialog/index.d.ts +1 -0
- package/dist/types/packages/imagepreview/imagepreview.d.ts +4 -1
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +12 -1
- package/dist/types/packages/imagepreview/index.d.ts +1 -1
- package/dist/types/packages/imagepreview/index.taro.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +2 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +7 -2
- package/dist/types/utils/get-scroll-parent.d.ts +1 -0
- package/package.json +2 -2
- package/dist/esm/formitem.taro-4ofczzxA.js +0 -165
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.3.
|
|
11
|
+
* @nutui/nutui-react-taro v2.3.7 Fri Jan 19 2024 16:35:51 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -5325,7 +5325,12 @@ var __publicField = (obj, key, value) => {
|
|
|
5325
5325
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
5326
5326
|
components.View,
|
|
5327
5327
|
{
|
|
5328
|
-
className:
|
|
5328
|
+
className: classNames(
|
|
5329
|
+
`${classPrefix$k}-titles-item-line`,
|
|
5330
|
+
{
|
|
5331
|
+
[`${classPrefix$k}-titles-item-line-${direction}`]: true
|
|
5332
|
+
}
|
|
5333
|
+
),
|
|
5329
5334
|
style: tabsActiveStyle
|
|
5330
5335
|
}
|
|
5331
5336
|
),
|
|
@@ -5341,9 +5346,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5341
5346
|
components.View,
|
|
5342
5347
|
{
|
|
5343
5348
|
className: classNames(
|
|
5344
|
-
{
|
|
5345
|
-
ellipsis: true
|
|
5346
|
-
},
|
|
5349
|
+
`${classPrefix$k}-ellipsis`,
|
|
5347
5350
|
`${classPrefix$k}-titles-item-text`
|
|
5348
5351
|
)
|
|
5349
5352
|
},
|
|
@@ -7300,8 +7303,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7300
7303
|
};
|
|
7301
7304
|
const isActive = (day) => {
|
|
7302
7305
|
if (type2 === "single" || type2 === "multiple") {
|
|
7303
|
-
for (const val
|
|
7304
|
-
if (isSameDay(day, val)) {
|
|
7306
|
+
for (const val in innerValue) {
|
|
7307
|
+
if (isSameDay(day, innerValue[val])) {
|
|
7305
7308
|
return true;
|
|
7306
7309
|
}
|
|
7307
7310
|
}
|
|
@@ -7507,28 +7510,33 @@ var __publicField = (obj, key, value) => {
|
|
|
7507
7510
|
const Context$1 = CheckboxGroupContext;
|
|
7508
7511
|
const defaultProps$11 = {
|
|
7509
7512
|
max: void 0,
|
|
7513
|
+
min: void 0,
|
|
7510
7514
|
labelPosition: "right",
|
|
7511
7515
|
direction: "vertical",
|
|
7512
7516
|
onChange: (value) => {
|
|
7513
7517
|
},
|
|
7518
|
+
onLimit: (type2) => {
|
|
7519
|
+
},
|
|
7514
7520
|
options: []
|
|
7515
7521
|
};
|
|
7516
7522
|
const classPrefix$j = "nut-checkboxgroup";
|
|
7517
7523
|
const CheckboxGroup = React.forwardRef(
|
|
7518
7524
|
(props, ref) => {
|
|
7519
|
-
const { children } = { ...defaultProps$11, ...props };
|
|
7520
7525
|
const {
|
|
7526
|
+
children,
|
|
7521
7527
|
className,
|
|
7522
7528
|
disabled,
|
|
7523
7529
|
onChange,
|
|
7524
7530
|
value,
|
|
7525
7531
|
defaultValue,
|
|
7526
7532
|
max,
|
|
7533
|
+
min,
|
|
7534
|
+
onLimit,
|
|
7527
7535
|
labelPosition,
|
|
7528
7536
|
direction,
|
|
7529
7537
|
options,
|
|
7530
7538
|
...rest
|
|
7531
|
-
} = props;
|
|
7539
|
+
} = { ...defaultProps$11, ...props };
|
|
7532
7540
|
React.useImperativeHandle(ref, () => ({
|
|
7533
7541
|
toggle(state) {
|
|
7534
7542
|
if (state === false) {
|
|
@@ -7573,7 +7581,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7573
7581
|
}
|
|
7574
7582
|
);
|
|
7575
7583
|
});
|
|
7576
|
-
}, [options, max]);
|
|
7584
|
+
}, [options, max, min]);
|
|
7577
7585
|
return /* @__PURE__ */ React.createElement(
|
|
7578
7586
|
Context$1.Provider,
|
|
7579
7587
|
{
|
|
@@ -7581,13 +7589,22 @@ var __publicField = (obj, key, value) => {
|
|
|
7581
7589
|
labelPosition: labelPosition || "right",
|
|
7582
7590
|
disabled,
|
|
7583
7591
|
max,
|
|
7592
|
+
onLimit,
|
|
7584
7593
|
value: _value,
|
|
7585
7594
|
check: (value2) => {
|
|
7586
7595
|
const combined = [..._value, value2];
|
|
7596
|
+
if (max !== void 0) {
|
|
7597
|
+
if (combined.length > max) {
|
|
7598
|
+
return onLimit == null ? void 0 : onLimit("max");
|
|
7599
|
+
}
|
|
7600
|
+
}
|
|
7587
7601
|
setValue(combined);
|
|
7588
7602
|
},
|
|
7589
7603
|
uncheck: (value2) => {
|
|
7590
7604
|
const reduced = _value.filter((item) => item !== value2);
|
|
7605
|
+
if (min !== void 0 && reduced.length < min) {
|
|
7606
|
+
return onLimit == null ? void 0 : onLimit("min");
|
|
7607
|
+
}
|
|
7591
7608
|
setValue(reduced);
|
|
7592
7609
|
}
|
|
7593
7610
|
}
|
|
@@ -7723,10 +7740,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7723
7740
|
if (disabled)
|
|
7724
7741
|
return;
|
|
7725
7742
|
const latestChecked = !innerChecked;
|
|
7726
|
-
if (ctx && ctx.max !== void 0) {
|
|
7727
|
-
if (latestChecked && ctx.value.length >= ctx.max)
|
|
7728
|
-
return;
|
|
7729
|
-
}
|
|
7730
7743
|
setChecked(latestChecked);
|
|
7731
7744
|
};
|
|
7732
7745
|
const renderButton = () => {
|
|
@@ -9707,7 +9720,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9707
9720
|
Schema.warning = warning;
|
|
9708
9721
|
Schema.messages = messages;
|
|
9709
9722
|
Schema.validators = validators;
|
|
9710
|
-
const SECRET
|
|
9723
|
+
const SECRET = "NUT_FORM_INTERNAL";
|
|
9711
9724
|
class FormStore {
|
|
9712
9725
|
constructor() {
|
|
9713
9726
|
// 初始化数据
|
|
@@ -9788,10 +9801,37 @@ var __publicField = (obj, key, value) => {
|
|
|
9788
9801
|
...callback
|
|
9789
9802
|
};
|
|
9790
9803
|
});
|
|
9791
|
-
__publicField(this, "
|
|
9804
|
+
__publicField(this, "validateEntities", async (entity, errs) => {
|
|
9792
9805
|
var _a;
|
|
9806
|
+
const { name, rules: rules2 = [] } = entity.props;
|
|
9807
|
+
const descriptor = {};
|
|
9808
|
+
if (rules2.length) {
|
|
9809
|
+
if (rules2.length > 1) {
|
|
9810
|
+
descriptor[name] = [];
|
|
9811
|
+
rules2.forEach((v) => {
|
|
9812
|
+
descriptor[name].push(v);
|
|
9813
|
+
});
|
|
9814
|
+
} else {
|
|
9815
|
+
descriptor[name] = rules2[0];
|
|
9816
|
+
}
|
|
9817
|
+
}
|
|
9818
|
+
const validator = new Schema(descriptor);
|
|
9819
|
+
try {
|
|
9820
|
+
await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
|
|
9821
|
+
} catch ({ errors }) {
|
|
9822
|
+
if (errors) {
|
|
9823
|
+
errs.push(...errors);
|
|
9824
|
+
this.errors[name] = errors;
|
|
9825
|
+
}
|
|
9826
|
+
} finally {
|
|
9827
|
+
if (!errs || errs.length === 0) {
|
|
9828
|
+
this.errors[name] = [];
|
|
9829
|
+
}
|
|
9830
|
+
}
|
|
9831
|
+
entity.onStoreChange("validate");
|
|
9832
|
+
});
|
|
9833
|
+
__publicField(this, "validateFields", async (nameList) => {
|
|
9793
9834
|
let filterEntities = [];
|
|
9794
|
-
const errs = [];
|
|
9795
9835
|
this.errors.length = 0;
|
|
9796
9836
|
if (!nameList || nameList.length === 0) {
|
|
9797
9837
|
filterEntities = this.fieldEntities;
|
|
@@ -9800,34 +9840,10 @@ var __publicField = (obj, key, value) => {
|
|
|
9800
9840
|
({ props: { name } }) => nameList.includes(name)
|
|
9801
9841
|
);
|
|
9802
9842
|
}
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
if (rules2.length > 1) {
|
|
9808
|
-
descriptor[name] = [];
|
|
9809
|
-
rules2.forEach((v) => {
|
|
9810
|
-
descriptor[name].push(v);
|
|
9811
|
-
});
|
|
9812
|
-
} else {
|
|
9813
|
-
descriptor[name] = rules2[0];
|
|
9814
|
-
}
|
|
9815
|
-
}
|
|
9816
|
-
const validator = new Schema(descriptor);
|
|
9817
|
-
try {
|
|
9818
|
-
await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
|
|
9819
|
-
} catch ({ errors }) {
|
|
9820
|
-
if (errors) {
|
|
9821
|
-
errs.push(...errors);
|
|
9822
|
-
this.errors[name] = errors;
|
|
9823
|
-
}
|
|
9824
|
-
} finally {
|
|
9825
|
-
if (!errs || errs.length === 0) {
|
|
9826
|
-
this.errors[name] = [];
|
|
9827
|
-
}
|
|
9828
|
-
}
|
|
9829
|
-
entity.onStoreChange("validate");
|
|
9830
|
-
}
|
|
9843
|
+
const errs = [];
|
|
9844
|
+
filterEntities.forEach((entity) => {
|
|
9845
|
+
this.validateEntities(entity, errs);
|
|
9846
|
+
});
|
|
9831
9847
|
return errs;
|
|
9832
9848
|
});
|
|
9833
9849
|
__publicField(this, "submit", async () => {
|
|
@@ -9850,7 +9866,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9850
9866
|
this.validateFields([name]);
|
|
9851
9867
|
});
|
|
9852
9868
|
__publicField(this, "getInternal", (key) => {
|
|
9853
|
-
if (key === SECRET
|
|
9869
|
+
if (key === SECRET) {
|
|
9854
9870
|
return {
|
|
9855
9871
|
registerField: this.registerField,
|
|
9856
9872
|
setCallback: this.setCallback,
|
|
@@ -9936,7 +9952,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9936
9952
|
React.useImperativeHandle(ref, () => formInstance);
|
|
9937
9953
|
formInstance.starPosition = starPosition;
|
|
9938
9954
|
const { submit, resetFields } = formInstance;
|
|
9939
|
-
const { setCallback, setInitialValues } = formInstance.getInternal(SECRET
|
|
9955
|
+
const { setCallback, setInitialValues } = formInstance.getInternal(SECRET);
|
|
9940
9956
|
setCallback({
|
|
9941
9957
|
onFinish,
|
|
9942
9958
|
onFinishFailed
|
|
@@ -9981,7 +9997,6 @@ var __publicField = (obj, key, value) => {
|
|
|
9981
9997
|
}
|
|
9982
9998
|
).$$typeof === component.type.$$typeof;
|
|
9983
9999
|
}
|
|
9984
|
-
const SECRET = "NUT_FORM_INTERNAL";
|
|
9985
10000
|
const defaultProps$Y = {
|
|
9986
10001
|
...ComponentDefaults,
|
|
9987
10002
|
required: false,
|
|
@@ -10953,6 +10968,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10953
10968
|
const defaultProps$T = {
|
|
10954
10969
|
...ComponentDefaults,
|
|
10955
10970
|
visible: false,
|
|
10971
|
+
rightActions: "",
|
|
10956
10972
|
type: "default",
|
|
10957
10973
|
custom: [],
|
|
10958
10974
|
random: false,
|
|
@@ -10963,6 +10979,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10963
10979
|
const { locale } = useConfig$1();
|
|
10964
10980
|
const {
|
|
10965
10981
|
title,
|
|
10982
|
+
rightActions,
|
|
10966
10983
|
confirmText,
|
|
10967
10984
|
visible,
|
|
10968
10985
|
type: type2,
|
|
@@ -11072,7 +11089,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11072
11089
|
className: `${classPrefix2}-header-close`,
|
|
11073
11090
|
onClick: onConfirm
|
|
11074
11091
|
},
|
|
11075
|
-
locale.done
|
|
11092
|
+
rightActions || locale.done
|
|
11076
11093
|
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-body` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-body-keys` }, keysList == null ? void 0 : keysList.map((item) => {
|
|
11077
11094
|
return /* @__PURE__ */ React.createElement(NumberKeyboardKey, { key: item.id, item });
|
|
11078
11095
|
})), type2 === "rightColumn" && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-sidebar` }, /* @__PURE__ */ React.createElement(
|
|
@@ -12570,7 +12587,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12570
12587
|
className: `nut-uploader-preview ${previewType}`,
|
|
12571
12588
|
key: item.uid
|
|
12572
12589
|
},
|
|
12573
|
-
previewType === "picture" && deletable && /* @__PURE__ */ React.createElement(
|
|
12590
|
+
previewType === "picture" && !children && deletable && /* @__PURE__ */ React.createElement(
|
|
12574
12591
|
j$3,
|
|
12575
12592
|
{
|
|
12576
12593
|
color: "rgba(0,0,0,0.6)",
|
|
@@ -13056,7 +13073,16 @@ var __publicField = (obj, key, value) => {
|
|
|
13056
13073
|
ActionSheet.defaultProps = defaultProps$H;
|
|
13057
13074
|
ActionSheet.displayName = "NutActionSheet";
|
|
13058
13075
|
const Content = (props) => {
|
|
13059
|
-
const {
|
|
13076
|
+
const {
|
|
13077
|
+
visible,
|
|
13078
|
+
title,
|
|
13079
|
+
header,
|
|
13080
|
+
footer,
|
|
13081
|
+
close: close2,
|
|
13082
|
+
footerDirection,
|
|
13083
|
+
onClick,
|
|
13084
|
+
children
|
|
13085
|
+
} = props;
|
|
13060
13086
|
const classPrefix2 = "nut-dialog";
|
|
13061
13087
|
const renderHeader = () => {
|
|
13062
13088
|
return title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-header` }, title) : null;
|
|
@@ -13082,6 +13108,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13082
13108
|
style: props.style,
|
|
13083
13109
|
onClick: (e2) => handleClick(e2)
|
|
13084
13110
|
},
|
|
13111
|
+
close2,
|
|
13085
13112
|
header,
|
|
13086
13113
|
/* @__PURE__ */ React.createElement(
|
|
13087
13114
|
"div",
|
|
@@ -13150,6 +13177,8 @@ var __publicField = (obj, key, value) => {
|
|
|
13150
13177
|
disableConfirmButton: false,
|
|
13151
13178
|
footerDirection: "horizontal",
|
|
13152
13179
|
lockScroll: true,
|
|
13180
|
+
closeIconPosition: "top-right",
|
|
13181
|
+
closeIcon: false,
|
|
13153
13182
|
beforeCancel: () => true,
|
|
13154
13183
|
beforeClose: () => true,
|
|
13155
13184
|
onOverlayClick: () => true
|
|
@@ -13178,6 +13207,8 @@ var __publicField = (obj, key, value) => {
|
|
|
13178
13207
|
confirmText,
|
|
13179
13208
|
cancelText,
|
|
13180
13209
|
overlay,
|
|
13210
|
+
closeIconPosition,
|
|
13211
|
+
closeIcon,
|
|
13181
13212
|
onClose,
|
|
13182
13213
|
onCancel,
|
|
13183
13214
|
onConfirm,
|
|
@@ -13235,6 +13266,23 @@ var __publicField = (obj, key, value) => {
|
|
|
13235
13266
|
confirmText || locale.confirm
|
|
13236
13267
|
));
|
|
13237
13268
|
};
|
|
13269
|
+
const renderCloseIcon = () => {
|
|
13270
|
+
if (!closeIcon)
|
|
13271
|
+
return null;
|
|
13272
|
+
const handleCancel = () => {
|
|
13273
|
+
if (!(beforeCancel == null ? void 0 : beforeCancel()))
|
|
13274
|
+
return;
|
|
13275
|
+
if (!(beforeClose == null ? void 0 : beforeClose()))
|
|
13276
|
+
return;
|
|
13277
|
+
onClose == null ? void 0 : onClose();
|
|
13278
|
+
onCancel == null ? void 0 : onCancel();
|
|
13279
|
+
};
|
|
13280
|
+
const closeClasses = classNames({
|
|
13281
|
+
[`${classPrefix2}-close`]: true,
|
|
13282
|
+
[`${classPrefix2}-close-${closeIconPosition}`]: true
|
|
13283
|
+
});
|
|
13284
|
+
return /* @__PURE__ */ React.createElement(components.View, { className: closeClasses, onClick: handleCancel }, React.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ React.createElement(A$1, null));
|
|
13285
|
+
};
|
|
13238
13286
|
const onHandleClickOverlay = (e2) => {
|
|
13239
13287
|
if (closeOnOverlayClick && visible && e2.target === e2.currentTarget) {
|
|
13240
13288
|
const closed = onOverlayClick && onOverlayClick();
|
|
@@ -13274,6 +13322,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13274
13322
|
style,
|
|
13275
13323
|
title,
|
|
13276
13324
|
header,
|
|
13325
|
+
close: renderCloseIcon(),
|
|
13277
13326
|
footer: renderFooter(),
|
|
13278
13327
|
footerDirection,
|
|
13279
13328
|
visible
|
|
@@ -16581,6 +16630,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16581
16630
|
closeOnContentClick: false,
|
|
16582
16631
|
indicator: false,
|
|
16583
16632
|
indicatorColor: "#fff",
|
|
16633
|
+
closeIcon: false,
|
|
16634
|
+
closeIconPosition: "top-right",
|
|
16584
16635
|
showMenuByLongpress: false,
|
|
16585
16636
|
onChange: (value) => {
|
|
16586
16637
|
},
|
|
@@ -16599,6 +16650,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16599
16650
|
indicator,
|
|
16600
16651
|
autoPlay,
|
|
16601
16652
|
closeOnContentClick,
|
|
16653
|
+
closeIcon,
|
|
16654
|
+
closeIconPosition,
|
|
16602
16655
|
showMenuByLongpress,
|
|
16603
16656
|
onClose
|
|
16604
16657
|
} = props;
|
|
@@ -16814,7 +16867,15 @@ var __publicField = (obj, key, value) => {
|
|
|
16814
16867
|
)
|
|
16815
16868
|
)
|
|
16816
16869
|
),
|
|
16817
|
-
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
16870
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)),
|
|
16871
|
+
closeIcon !== false ? /* @__PURE__ */ React.createElement(
|
|
16872
|
+
"div",
|
|
16873
|
+
{
|
|
16874
|
+
className: `${classPrefix2}-close ${closeIconPosition}`,
|
|
16875
|
+
onClick: onCloseInner
|
|
16876
|
+
},
|
|
16877
|
+
closeIcon === true ? /* @__PURE__ */ React.createElement(A$1, null) : closeIcon
|
|
16878
|
+
) : null
|
|
16818
16879
|
);
|
|
16819
16880
|
};
|
|
16820
16881
|
ImagePreview.defaultProps = defaultProps$g;
|
|
@@ -17311,16 +17372,25 @@ var __publicField = (obj, key, value) => {
|
|
|
17311
17372
|
return /* @__PURE__ */ React.createElement("div", { className: bodyClassPrefix, key: index }, renderBodyTds(item, index));
|
|
17312
17373
|
});
|
|
17313
17374
|
};
|
|
17314
|
-
return /* @__PURE__ */ React.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React.createElement(
|
|
17375
|
+
return /* @__PURE__ */ React.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React.createElement(
|
|
17315
17376
|
"div",
|
|
17316
17377
|
{
|
|
17317
|
-
className: classNames(
|
|
17318
|
-
|
|
17319
|
-
|
|
17378
|
+
className: classNames(
|
|
17379
|
+
`${classPrefix2}-wrapper ${isSticky ? `${classPrefix2}-wrapper-sticky` : ""}`
|
|
17380
|
+
),
|
|
17381
|
+
style
|
|
17320
17382
|
},
|
|
17321
|
-
|
|
17322
|
-
|
|
17323
|
-
|
|
17383
|
+
/* @__PURE__ */ React.createElement(
|
|
17384
|
+
"div",
|
|
17385
|
+
{
|
|
17386
|
+
className: classNames(`${classPrefix2}-main`, {
|
|
17387
|
+
[`${classPrefix2}-main-striped`]: striped
|
|
17388
|
+
})
|
|
17389
|
+
},
|
|
17390
|
+
showHeader && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-main-head` }, /* @__PURE__ */ React.createElement("div", { className: headerClassPrefix }, renderHeadCells())),
|
|
17391
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-main-body` }, renderBodyTrs())
|
|
17392
|
+
)
|
|
17393
|
+
), isSticky ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
17324
17394
|
"div",
|
|
17325
17395
|
{
|
|
17326
17396
|
className: `${classPrefix2}-sticky-left`,
|
|
@@ -32,6 +32,31 @@
|
|
|
32
32
|
animation-duration: 0.3s;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
&-close {
|
|
36
|
+
position: absolute !important;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
width: $dialog-close-width;
|
|
40
|
+
height: $dialog-close-height;
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
top: $dialog-close-top;
|
|
45
|
+
color: $dialog-close-color;
|
|
46
|
+
|
|
47
|
+
&-top-right {
|
|
48
|
+
right: $dialog-close-right;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&-top-left {
|
|
52
|
+
left: $dialog-close-left;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:active {
|
|
56
|
+
opacity: 0.7;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
35
60
|
&-header {
|
|
36
61
|
display: block;
|
|
37
62
|
text-align: center;
|
|
@@ -26,6 +26,30 @@
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
&-close {
|
|
30
|
+
position: fixed;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
z-index: 2002;
|
|
35
|
+
background: transparent;
|
|
36
|
+
color: $white;
|
|
37
|
+
&.top-right {
|
|
38
|
+
top: 50px;
|
|
39
|
+
right: 20px;
|
|
40
|
+
}
|
|
41
|
+
&.top-left {
|
|
42
|
+
top: 50px;
|
|
43
|
+
left: 20px;
|
|
44
|
+
}
|
|
45
|
+
&.bottom {
|
|
46
|
+
bottom: 50px;
|
|
47
|
+
left: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
text-align: center;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
29
53
|
&-pop {
|
|
30
54
|
height: 100%;
|
|
31
55
|
background: transparent !important;
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
font-size: $font-size-base;
|
|
10
10
|
color: $color-title;
|
|
11
|
-
overflow: auto;
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
overflow-x: hidden;
|
|
12
13
|
position: relative;
|
|
13
14
|
border: 1px solid $table-border-color;
|
|
15
|
+
|
|
16
|
+
&-sticky {
|
|
17
|
+
overflow-x: auto;
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
&-main {
|
|
@@ -61,6 +66,7 @@
|
|
|
61
66
|
&-th {
|
|
62
67
|
display: table-cell;
|
|
63
68
|
padding: $table-cols-padding;
|
|
69
|
+
table-layout: fixed;
|
|
64
70
|
background: inherit;
|
|
65
71
|
position: sticky;
|
|
66
72
|
top: 0;
|
|
@@ -77,6 +83,7 @@
|
|
|
77
83
|
&-td {
|
|
78
84
|
display: table-cell;
|
|
79
85
|
padding: $table-cols-padding;
|
|
86
|
+
table-layout: fixed;
|
|
80
87
|
background: inherit;
|
|
81
88
|
|
|
82
89
|
&:last-child {
|
|
@@ -149,6 +156,10 @@
|
|
|
149
156
|
&-fixed-right {
|
|
150
157
|
position: sticky;
|
|
151
158
|
z-index: 2;
|
|
159
|
+
&.h5-div {
|
|
160
|
+
// 临时方案,小程序下,width包含了padding值。
|
|
161
|
+
padding: $table-cols-padding 0;
|
|
162
|
+
}
|
|
152
163
|
}
|
|
153
164
|
&-fixed-left-last {
|
|
154
165
|
border-right: none;
|
|
@@ -198,6 +198,12 @@
|
|
|
198
198
|
flex-direction: row;
|
|
199
199
|
width: 100%;
|
|
200
200
|
|
|
201
|
+
.nut-tabs-ellipsis {
|
|
202
|
+
text-overflow: ellipsis;
|
|
203
|
+
white-space: nowrap;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
}
|
|
206
|
+
|
|
201
207
|
.nut-tabs-titles {
|
|
202
208
|
box-sizing: border-box;
|
|
203
209
|
flex-direction: column;
|
|
@@ -212,6 +218,12 @@
|
|
|
212
218
|
flex-direction: column;
|
|
213
219
|
flex-shrink: 0;
|
|
214
220
|
}
|
|
221
|
+
|
|
222
|
+
&-line {
|
|
223
|
+
.nut-tabs-titles-item {
|
|
224
|
+
padding-left: 14px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
215
227
|
}
|
|
216
228
|
|
|
217
229
|
.nut-tabs-titles-scrollable {
|
|
@@ -235,6 +247,9 @@
|
|
|
235
247
|
height: 0;
|
|
236
248
|
transform: translate(0, -50%);
|
|
237
249
|
transition: height 0.3s ease;
|
|
250
|
+
&-vertical {
|
|
251
|
+
top: 50%;
|
|
252
|
+
}
|
|
238
253
|
}
|
|
239
254
|
|
|
240
255
|
&-active {
|
|
@@ -248,7 +263,7 @@
|
|
|
248
263
|
}
|
|
249
264
|
|
|
250
265
|
.nut-tabs-titles-item-smile {
|
|
251
|
-
right: -
|
|
266
|
+
right: -12px;
|
|
252
267
|
bottom: -2%;
|
|
253
268
|
left: auto;
|
|
254
269
|
width: 40px;
|
|
@@ -117,9 +117,11 @@
|
|
|
117
117
|
|
|
118
118
|
.nut-uploader-preview-img-file-name {
|
|
119
119
|
display: flex;
|
|
120
|
+
align-items: center;
|
|
120
121
|
-webkit-line-clamp: 1;
|
|
121
122
|
padding: 2px;
|
|
122
123
|
height: 24px;
|
|
124
|
+
@include text-ellipsis();
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
.nut-progress {
|
|
@@ -200,12 +202,8 @@
|
|
|
200
202
|
color: #1890ff !important;
|
|
201
203
|
}
|
|
202
204
|
|
|
203
|
-
.nut-icon-
|
|
204
|
-
|
|
205
|
-
margin-left: -45%;
|
|
206
|
-
margin-top: -45%;
|
|
207
|
-
transform: none;
|
|
208
|
-
}
|
|
205
|
+
.nut-icon-Link {
|
|
206
|
+
flex-shrink: 0;
|
|
209
207
|
}
|
|
210
208
|
|
|
211
209
|
@include moreline-ellipsis();
|