@nutui/nutui-react-taro 2.0.19 → 2.0.20
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 +11 -0
- package/dist/esm/ActionSheet.js +2 -2
- package/dist/esm/Address.js +3 -3
- package/dist/esm/Avatar.js +3 -2
- package/dist/esm/Calendar.js +2 -2
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/DatePicker.js +3 -3
- package/dist/esm/Form.js +21 -45
- package/dist/esm/Grid.js +3 -2
- package/dist/esm/GridItem.js +2 -1
- package/dist/esm/Image.js +3 -1
- package/dist/esm/ImagePreview.js +4 -2
- package/dist/esm/NumberKeyboard.js +2 -2
- package/dist/esm/Picker.js +2 -2
- package/dist/esm/Popover.js +2 -2
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/ShortPassword.js +2 -2
- package/dist/esm/SideNavBar.js +2 -2
- package/dist/esm/Skeleton.js +4 -3
- package/dist/esm/Swiper.js +7 -6
- package/dist/esm/TimeSelect.js +2 -2
- package/dist/esm/Tour.js +3 -3
- package/dist/esm/{actionsheet.taro-374745a3.js → actionsheet.taro-4ce9962a.js} +1 -1
- package/dist/esm/{address.taro-7b3ad807.js → address.taro-33910001.js} +2 -2
- package/dist/esm/{avatar.taro-0e574535.js → avatar.taro-1743c7c3.js} +1 -1
- package/dist/esm/{calendar.taro-2c342d6b.js → calendar.taro-45a9c705.js} +1 -1
- package/dist/esm/{cascader.taro-6ee25349.js → cascader.taro-505e8467.js} +1 -1
- package/dist/esm/{datepicker.taro-de668a19.js → datepicker.taro-725e96f0.js} +1 -1
- package/dist/esm/{grid.taro-f72acab8.js → grid.taro-13674639.js} +2 -1
- package/dist/esm/{griditem.taro-b7abc653.js → griditem.taro-9e1c493c.js} +2 -5
- package/dist/esm/{image.taro-a7ad2272.js → image.taro-fa4a92a1.js} +6 -5
- package/dist/esm/{imagepreview.taro-78c0a7b8.js → imagepreview.taro-fcd29363.js} +4 -3
- package/dist/esm/{numberkeyboard.taro-bd6a9439.js → numberkeyboard.taro-ec8f8435.js} +1 -1
- package/dist/esm/nutui-react.es.js +20 -19
- package/dist/esm/{picker.taro-e08d99a3.js → picker.taro-5f86e72b.js} +1 -1
- package/dist/esm/{popover.taro-6b946803.js → popover.taro-539d15e4.js} +1 -1
- package/dist/esm/{popup.taro-1636100a.js → popup.taro-3273aa87.js} +3 -1
- package/dist/esm/px-check-f83a9dc3.js +6 -0
- package/dist/esm/{shortpassword.taro-331d270c.js → shortpassword.taro-8e8c4102.js} +1 -1
- package/dist/esm/{sidenavbar.taro-39fb8ac6.js → sidenavbar.taro-97230c40.js} +1 -1
- package/dist/esm/{skeleton.taro-1f829d87.js → skeleton.taro-5a621338.js} +1 -1
- package/dist/esm/{timeselect.taro-e02f6bf9.js → timeselect.taro-892ca807.js} +1 -1
- package/dist/esm/{tour.taro-88cf1ba9.js → tour.taro-b38e06a5.js} +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 +45 -65
- package/dist/nutui.react.umd.js +45 -65
- package/dist/style.mjs +1 -1
- package/dist/types/packages/calendar/calendar.taro.d.ts +4 -4
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@ import { B } from "./button.taro-25f559e1.js";
|
|
|
2
2
|
import { C } from "./cell.taro-010b73ed.js";
|
|
3
3
|
import { C as C2 } from "./cellgroup.taro-9dc59f11.js";
|
|
4
4
|
import { C as C3 } from "./configprovider.taro-c5ff4877.js";
|
|
5
|
-
import { I } from "./image.taro-
|
|
5
|
+
import { I } from "./image.taro-fa4a92a1.js";
|
|
6
6
|
import { O } from "./overlay.taro-626840fc.js";
|
|
7
7
|
import { C as C4 } from "./col.taro-23d5f6bd.js";
|
|
8
8
|
import { D } from "./divider.taro-c61ab869.js";
|
|
9
|
-
import { G } from "./grid.taro-
|
|
10
|
-
import { G as G2 } from "./griditem.taro-
|
|
9
|
+
import { G } from "./grid.taro-13674639.js";
|
|
10
|
+
import { G as G2 } from "./griditem.taro-9e1c493c.js";
|
|
11
11
|
import { L } from "./layout.taro-7711a89c.js";
|
|
12
12
|
import { R } from "./row.taro-a71fbf76.js";
|
|
13
13
|
import { S } from "./space.taro-a7e4ced4.js";
|
|
@@ -16,37 +16,37 @@ import { B as B2 } from "./backtop.taro-910bbef1.js";
|
|
|
16
16
|
import { E } from "./elevator.taro-cdf3dba7.js";
|
|
17
17
|
import { F } from "./fixednav.taro-0d998d65.js";
|
|
18
18
|
import { N } from "./navbar.taro-23394f73.js";
|
|
19
|
-
import { S as S3 } from "./sidenavbar.taro-
|
|
19
|
+
import { S as S3 } from "./sidenavbar.taro-97230c40.js";
|
|
20
20
|
import { S as S4 } from "./sidenavbaritem.taro-69b0784d.js";
|
|
21
21
|
import { S as S5 } from "./subsidenavbar.taro-797ce379.js";
|
|
22
22
|
import { T } from "./tabbar.taro-2bcdca7c.js";
|
|
23
23
|
import { T as T2 } from "./tabbaritem.taro-c7113661.js";
|
|
24
24
|
import { T as T3 } from "./tabpane.taro-d0eea168.js";
|
|
25
25
|
import { T as T4 } from "./tabs.taro-3ece2221.js";
|
|
26
|
-
import { A } from "./address.taro-
|
|
27
|
-
import { C as C5 } from "./calendar.taro-
|
|
26
|
+
import { A } from "./address.taro-33910001.js";
|
|
27
|
+
import { C as C5 } from "./calendar.taro-45a9c705.js";
|
|
28
28
|
import { C as C6 } from "./calendaritem.taro-bc06f40f.js";
|
|
29
|
-
import { C as C7 } from "./cascader.taro-
|
|
29
|
+
import { C as C7 } from "./cascader.taro-505e8467.js";
|
|
30
30
|
import { C as C8, a } from "./checkbox.taro-22cd35c4.js";
|
|
31
|
-
import { D as D2 } from "./datepicker.taro-
|
|
31
|
+
import { D as D2 } from "./datepicker.taro-725e96f0.js";
|
|
32
32
|
import { default as default2 } from "./Form.js";
|
|
33
33
|
import { F as F2 } from "./formitem.taro-0dc81538.js";
|
|
34
34
|
import { I as I2 } from "./input.taro-fbcb7090.js";
|
|
35
35
|
import { I as I3 } from "./inputnumber.taro-d2fc26bd.js";
|
|
36
36
|
import { M } from "./menu.taro-cf8d7d5b.js";
|
|
37
37
|
import { M as M2 } from "./menuitem.taro-b73e5ed3.js";
|
|
38
|
-
import { N as N2 } from "./numberkeyboard.taro-
|
|
39
|
-
import { P } from "./picker.taro-
|
|
38
|
+
import { N as N2 } from "./numberkeyboard.taro-ec8f8435.js";
|
|
39
|
+
import { P } from "./picker.taro-5f86e72b.js";
|
|
40
40
|
import { R as R2, a as a2 } from "./radio.taro-d1d370be.js";
|
|
41
41
|
import { R as R3 } from "./range.taro-4028c748.js";
|
|
42
42
|
import { R as R4 } from "./rate.taro-61bbf5a7.js";
|
|
43
43
|
import { S as S6 } from "./searchbar.taro-7daf43fc.js";
|
|
44
|
-
import { S as S7 } from "./shortpassword.taro-
|
|
44
|
+
import { S as S7 } from "./shortpassword.taro-8e8c4102.js";
|
|
45
45
|
import { S as S8 } from "./signature.taro-3e0c2694.js";
|
|
46
46
|
import { S as S9 } from "./switch.taro-74b2bd0a.js";
|
|
47
47
|
import { T as T5 } from "./textarea.taro-6ebe789c.js";
|
|
48
48
|
import { U } from "./uploader.taro-da0414ba.js";
|
|
49
|
-
import { A as A2 } from "./actionsheet.taro-
|
|
49
|
+
import { A as A2 } from "./actionsheet.taro-4ce9962a.js";
|
|
50
50
|
import { B as B3 } from "./badge.taro-ffca952e.js";
|
|
51
51
|
import { B as B4 } from "./dialog.taro-ffad380a.js";
|
|
52
52
|
import { D as D3 } from "./drag.taro-ce333e51.js";
|
|
@@ -55,23 +55,23 @@ import { I as I4 } from "./infiniteloading.taro-cb3b949e.js";
|
|
|
55
55
|
import { L as L2 } from "./loading.taro-0799622f.js";
|
|
56
56
|
import { N as N3 } from "./noticebar.taro-4e1d882b.js";
|
|
57
57
|
import { N as N4 } from "./notify.taro-6798c31f.js";
|
|
58
|
-
import { P as P2 } from "./popover.taro-
|
|
59
|
-
import { P as P3 } from "./popup.taro-
|
|
58
|
+
import { P as P2 } from "./popover.taro-539d15e4.js";
|
|
59
|
+
import { P as P3 } from "./popup.taro-3273aa87.js";
|
|
60
60
|
import { P as P4 } from "./pulltorefresh.taro-f3ab76c2.js";
|
|
61
|
-
import { S as S10 } from "./skeleton.taro-
|
|
61
|
+
import { S as S10 } from "./skeleton.taro-5a621338.js";
|
|
62
62
|
import { S as S11 } from "./swipe.taro-385eece1.js";
|
|
63
63
|
import { T as T6 } from "./toast.taro-50ee73e6.js";
|
|
64
64
|
import { A as A3 } from "./animate.taro-37bf4eab.js";
|
|
65
65
|
import { default as default3 } from "./AnimatingNumbers.js";
|
|
66
66
|
import { A as A4 } from "./audio.taro-f0ec6410.js";
|
|
67
|
-
import { A as A5 } from "./avatar.taro-
|
|
67
|
+
import { A as A5 } from "./avatar.taro-1743c7c3.js";
|
|
68
68
|
import { A as A6 } from "./avatargroup.taro-1f8b7174.js";
|
|
69
69
|
import { C as C9 } from "./circleprogress.taro-417e1d3f.js";
|
|
70
70
|
import { C as C10 } from "./collapse.taro-4a3e417c.js";
|
|
71
71
|
import { C as C11 } from "./collapseitem.taro-e99fb1a2.js";
|
|
72
72
|
import { C as C12 } from "./countdown.taro-7caa9578.js";
|
|
73
73
|
import { E as E3 } from "./ellipsis.taro-cd36ab2d.js";
|
|
74
|
-
import { I as I5 } from "./imagepreview.taro-
|
|
74
|
+
import { I as I5 } from "./imagepreview.taro-fcd29363.js";
|
|
75
75
|
import { I as I6 } from "./indicator.taro-092f9f4e.js";
|
|
76
76
|
import { P as P5 } from "./pagination.taro-47fad28d.js";
|
|
77
77
|
import { P as P6 } from "./price.taro-0bd3f07a.js";
|
|
@@ -82,13 +82,13 @@ import { default as default4 } from "./Swiper.js";
|
|
|
82
82
|
import { S as S14 } from "./swiperitem.taro-da39a67b.js";
|
|
83
83
|
import { T as T7 } from "./table.taro-a7dcb564.js";
|
|
84
84
|
import { T as T8 } from "./tag.taro-518b9c70.js";
|
|
85
|
-
import { T as T9 } from "./tour.taro-
|
|
85
|
+
import { T as T9 } from "./tour.taro-b38e06a5.js";
|
|
86
86
|
import { V } from "./video.taro-672ca6b8.js";
|
|
87
87
|
import { V as V2 } from "./virtuallist.taro-c75a4e71.js";
|
|
88
88
|
import { B as B5 } from "./barrage.taro-d77c34b4.js";
|
|
89
89
|
import { C as C13 } from "./card.taro-c0e9cfba.js";
|
|
90
90
|
import { T as T10 } from "./timedetail.taro-958b8c07.js";
|
|
91
|
-
import { T as T11 } from "./timeselect.taro-
|
|
91
|
+
import { T as T11 } from "./timeselect.taro-892ca807.js";
|
|
92
92
|
import { T as T12 } from "./trendarrow.taro-e6b635ae.js";
|
|
93
93
|
import { W } from "./watermark.taro-311b59d2.js";
|
|
94
94
|
import "react";
|
|
@@ -98,6 +98,7 @@ import "@tarojs/taro";
|
|
|
98
98
|
import "./typings-11d83a22.js";
|
|
99
99
|
import "./index-21e61675.js";
|
|
100
100
|
import "@tarojs/components";
|
|
101
|
+
import "./px-check-f83a9dc3.js";
|
|
101
102
|
import "react-transition-group";
|
|
102
103
|
import "./UserContext-ab42ba7f.js";
|
|
103
104
|
import "./get-rect-by-taro-fe02fe2b.js";
|
|
@@ -2,7 +2,7 @@ import React__default, { useState, useRef, useEffect, useImperativeHandle } from
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import Taro from "@tarojs/taro";
|
|
4
4
|
import { View, PickerView, PickerViewColumn } from "@tarojs/components";
|
|
5
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
+
import { P as Popup } from "./popup.taro-3273aa87.js";
|
|
6
6
|
import { u as useTouch } from "./use-touch-ff43512c.js";
|
|
7
7
|
import { g as getRectByTaro } from "./get-rect-by-taro-fe02fe2b.js";
|
|
8
8
|
import { c as canUseDom } from "./can-use-dom-0e539bd3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-3273aa87.js";
|
|
5
5
|
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-fe02fe2b.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
7
|
const defaultProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useMemo, useEffect } from "react";
|
|
2
2
|
import { Tips } from "@nutui/icons-react-taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-3273aa87.js";
|
|
5
5
|
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
7
|
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-
|
|
3
|
+
import { P as Popup } from "./popup.taro-3273aa87.js";
|
|
4
4
|
import { O as OffsetContext } from "./context-f32a9246.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
const defaultProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { A as Avatar } from "./avatar.taro-
|
|
3
|
+
import { A as Avatar } from "./avatar.taro-1743c7c3.js";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
5
5
|
const defaultProps = {
|
|
6
6
|
...ComponentDefaults,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-
|
|
3
|
+
import { P as Popup } from "./popup.taro-3273aa87.js";
|
|
4
4
|
import { T as TimeDetail } from "./timedetail.taro-958b8c07.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useEffect } from "react";
|
|
2
2
|
import { Close } from "@nutui/icons-react-taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popover } from "./popover.taro-
|
|
4
|
+
import { P as Popover } from "./popover.taro-539d15e4.js";
|
|
5
5
|
import Taro from "@tarojs/taro";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
7
|
import { useConfig } from "./ConfigProvider.js";
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v2.0.
|
|
8
|
+
* @nutui/nutui-react-taro v2.0.20 Fri Oct 13 2023 13:54:07 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -3222,6 +3222,9 @@ const ConfigProvider = (props) => {
|
|
|
3222
3222
|
));
|
|
3223
3223
|
};
|
|
3224
3224
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
3225
|
+
const pxCheck = (value) => {
|
|
3226
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
3227
|
+
};
|
|
3225
3228
|
const defaultProps$1r = {
|
|
3226
3229
|
src: "",
|
|
3227
3230
|
error: true,
|
|
@@ -3256,14 +3259,13 @@ const Image$1 = (props) => {
|
|
|
3256
3259
|
onError && onError(e);
|
|
3257
3260
|
}
|
|
3258
3261
|
};
|
|
3259
|
-
const pxCheck2 = (value) => {
|
|
3260
|
-
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
3261
|
-
};
|
|
3262
3262
|
const containerStyle = {
|
|
3263
|
-
|
|
3264
|
-
|
|
3263
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3264
|
+
height: height ? pxCheck(height) : Taro.getEnv() === "WEB" ? "" : "100px",
|
|
3265
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3266
|
+
width: width ? pxCheck(width) : Taro.getEnv() === "WEB" ? "" : "100%",
|
|
3265
3267
|
overflow: radius !== void 0 && radius !== null ? "hidden" : "",
|
|
3266
|
-
borderRadius: radius !== void 0 && radius !== null ?
|
|
3268
|
+
borderRadius: radius !== void 0 && radius !== null ? pxCheck(radius) : ""
|
|
3267
3269
|
};
|
|
3268
3270
|
const imgStyle = {
|
|
3269
3271
|
...style
|
|
@@ -5208,9 +5210,6 @@ const gridContext = {
|
|
|
5208
5210
|
}
|
|
5209
5211
|
};
|
|
5210
5212
|
const GridContext = React__default.createContext(gridContext);
|
|
5211
|
-
const pxCheck = (value) => {
|
|
5212
|
-
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
5213
|
-
};
|
|
5214
5213
|
const defaultProps$1o = {
|
|
5215
5214
|
text: "",
|
|
5216
5215
|
columns: 4,
|
|
@@ -6175,7 +6174,9 @@ const Popup = (props) => {
|
|
|
6175
6174
|
const open2 = () => {
|
|
6176
6175
|
if (!innerVisible) {
|
|
6177
6176
|
setInnerVisible(true);
|
|
6178
|
-
|
|
6177
|
+
if (props.zIndex === void 0) {
|
|
6178
|
+
setIndex(++_zIndex);
|
|
6179
|
+
}
|
|
6179
6180
|
}
|
|
6180
6181
|
if (destroyOnClose) {
|
|
6181
6182
|
setShowChildren(true);
|
|
@@ -10926,11 +10927,11 @@ class FormStore {
|
|
|
10926
10927
|
...this.store,
|
|
10927
10928
|
...newStore
|
|
10928
10929
|
};
|
|
10929
|
-
this.fieldEntities.forEach((
|
|
10930
|
-
const { name } =
|
|
10930
|
+
this.fieldEntities.forEach((entity) => {
|
|
10931
|
+
const { name } = entity.props;
|
|
10931
10932
|
Object.keys(newStore).forEach((key) => {
|
|
10932
10933
|
if (key === name) {
|
|
10933
|
-
|
|
10934
|
+
entity.onStoreChange("update");
|
|
10934
10935
|
}
|
|
10935
10936
|
});
|
|
10936
10937
|
});
|
|
@@ -10941,44 +10942,19 @@ class FormStore {
|
|
|
10941
10942
|
...callback
|
|
10942
10943
|
};
|
|
10943
10944
|
});
|
|
10944
|
-
__publicField(this, "
|
|
10945
|
-
|
|
10945
|
+
__publicField(this, "validateFields", async (nameList) => {
|
|
10946
|
+
var _a;
|
|
10947
|
+
let filterEntitys = [];
|
|
10948
|
+
const errs = [];
|
|
10946
10949
|
this.errors.length = 0;
|
|
10947
|
-
this.fieldEntities.forEach((entity) => {
|
|
10948
|
-
var _a;
|
|
10949
|
-
const { name, rules: rules2 = [] } = entity.props;
|
|
10950
|
-
const descriptor = {};
|
|
10951
|
-
if (rules2.length) {
|
|
10952
|
-
if (rules2.length > 1) {
|
|
10953
|
-
descriptor[name] = [];
|
|
10954
|
-
rules2.forEach((v) => {
|
|
10955
|
-
descriptor[name].push(v);
|
|
10956
|
-
});
|
|
10957
|
-
} else {
|
|
10958
|
-
descriptor[name] = rules2[0];
|
|
10959
|
-
}
|
|
10960
|
-
}
|
|
10961
|
-
const validator = new Schema(descriptor);
|
|
10962
|
-
validator.messages();
|
|
10963
|
-
validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] }, (errors) => {
|
|
10964
|
-
if (errors) {
|
|
10965
|
-
err.push(...errors);
|
|
10966
|
-
this.errors[name] = errors;
|
|
10967
|
-
}
|
|
10968
|
-
entity.onStoreChange("validate");
|
|
10969
|
-
});
|
|
10970
|
-
});
|
|
10971
|
-
return err;
|
|
10972
|
-
});
|
|
10973
|
-
__publicField(this, "validateFields", (nameList) => {
|
|
10974
10950
|
if (!nameList || nameList.length === 0) {
|
|
10975
|
-
this.
|
|
10976
|
-
|
|
10951
|
+
filterEntitys = this.fieldEntities;
|
|
10952
|
+
} else {
|
|
10953
|
+
filterEntitys = this.fieldEntities.filter(
|
|
10954
|
+
({ props: { name } }) => nameList.includes(name)
|
|
10955
|
+
);
|
|
10977
10956
|
}
|
|
10978
|
-
|
|
10979
|
-
return nameList.includes(name);
|
|
10980
|
-
}).forEach((entity) => {
|
|
10981
|
-
var _a;
|
|
10957
|
+
for (const entity of filterEntitys) {
|
|
10982
10958
|
const { name, rules: rules2 = [] } = entity.props;
|
|
10983
10959
|
const descriptor = {};
|
|
10984
10960
|
if (rules2.length) {
|
|
@@ -10992,19 +10968,22 @@ class FormStore {
|
|
|
10992
10968
|
}
|
|
10993
10969
|
}
|
|
10994
10970
|
const validator = new Schema(descriptor);
|
|
10995
|
-
|
|
10996
|
-
validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] }, (errors) => {
|
|
10971
|
+
try {
|
|
10997
10972
|
this.errors[name] = [];
|
|
10973
|
+
await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
|
|
10974
|
+
} catch ({ errors }) {
|
|
10998
10975
|
if (errors) {
|
|
10976
|
+
errs.push(...errors);
|
|
10999
10977
|
this.errors[name] = errors;
|
|
11000
10978
|
}
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
}
|
|
10979
|
+
}
|
|
10980
|
+
entity.onStoreChange("validate");
|
|
10981
|
+
}
|
|
10982
|
+
return errs;
|
|
11004
10983
|
});
|
|
11005
|
-
__publicField(this, "submit", () => {
|
|
10984
|
+
__publicField(this, "submit", async () => {
|
|
11006
10985
|
var _a, _b, _c, _d;
|
|
11007
|
-
const errors = this.
|
|
10986
|
+
const errors = await this.validateFields();
|
|
11008
10987
|
if (errors.length === 0) {
|
|
11009
10988
|
(_b = (_a = this.callbacks).onFinish) == null ? void 0 : _b.call(_a, this.store);
|
|
11010
10989
|
} else if (errors.length > 0) {
|
|
@@ -17585,8 +17564,8 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
17585
17564
|
{
|
|
17586
17565
|
className: classNames(classPrefix$3, className),
|
|
17587
17566
|
style: {
|
|
17588
|
-
width: !width ? "100%" :
|
|
17589
|
-
height: !height ? "150px" :
|
|
17567
|
+
width: !width ? "100%" : pxCheck(width),
|
|
17568
|
+
height: !height ? "150px" : pxCheck(height)
|
|
17590
17569
|
}
|
|
17591
17570
|
},
|
|
17592
17571
|
/* @__PURE__ */ React__default.createElement(
|
|
@@ -17594,8 +17573,8 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
17594
17573
|
{
|
|
17595
17574
|
className: "nut-swiper__inner",
|
|
17596
17575
|
style: {
|
|
17597
|
-
width: !width ? "100%" :
|
|
17598
|
-
height: !height ? "150px" :
|
|
17576
|
+
width: !width ? "100%" : pxCheck(width),
|
|
17577
|
+
height: !height ? "150px" : pxCheck(height)
|
|
17599
17578
|
}
|
|
17600
17579
|
},
|
|
17601
17580
|
/* @__PURE__ */ React__default.createElement(
|
|
@@ -17612,8 +17591,8 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
17612
17591
|
(_a = props.onChange) == null ? void 0 : _a.call(props, e);
|
|
17613
17592
|
},
|
|
17614
17593
|
style: {
|
|
17615
|
-
width: !width ? "100%" :
|
|
17616
|
-
height: !height ? "150px" :
|
|
17594
|
+
width: !width ? "100%" : pxCheck(width),
|
|
17595
|
+
height: !height ? "150px" : pxCheck(height)
|
|
17617
17596
|
},
|
|
17618
17597
|
...rest
|
|
17619
17598
|
},
|
|
@@ -17853,13 +17832,14 @@ const ImagePreview = (props) => {
|
|
|
17853
17832
|
));
|
|
17854
17833
|
}) : []).concat(
|
|
17855
17834
|
images && images.length > 0 ? images.map((item, index) => {
|
|
17856
|
-
return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, Taro.getEnv() === "WEB" ? /* @__PURE__ */ React__default.createElement(
|
|
17857
|
-
Image$
|
|
17835
|
+
return /* @__PURE__ */ React__default.createElement(SwiperItem, { key: index }, Taro.getEnv() === "WEB" ? /* @__PURE__ */ React__default.createElement(Image$1, { src: item.src, mode: "aspectFit" }) : /* @__PURE__ */ React__default.createElement(
|
|
17836
|
+
Image$1,
|
|
17858
17837
|
{
|
|
17859
17838
|
src: item.src,
|
|
17860
17839
|
mode: "aspectFit",
|
|
17861
17840
|
showMenuByLongpress: true,
|
|
17862
|
-
|
|
17841
|
+
width: "100%",
|
|
17842
|
+
height: "100%"
|
|
17863
17843
|
}
|
|
17864
17844
|
));
|
|
17865
17845
|
}) : []
|