@nutui/nutui-react-taro 2.7.0 → 2.7.2

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +39 -10
  2. package/dist/esm/ActionSheet.js +1 -1
  3. package/dist/esm/Address.js +1 -1
  4. package/dist/esm/Calendar.js +1 -1
  5. package/dist/esm/Cascader.js +1 -1
  6. package/dist/esm/DatePicker.js +1 -1
  7. package/dist/esm/Elevator.js +1 -1
  8. package/dist/esm/Form/style/style.css +1 -1
  9. package/dist/esm/Form.js +6 -5
  10. package/dist/esm/FormItem/style/style.css +1 -1
  11. package/dist/esm/FormItem.js +1 -1
  12. package/dist/esm/ImagePreview.js +1 -1
  13. package/dist/esm/NumberKeyboard.js +1 -1
  14. package/dist/esm/Picker.js +1 -1
  15. package/dist/esm/Popover.js +1 -1
  16. package/dist/esm/Popup.js +1 -1
  17. package/dist/esm/ShortPassword.js +1 -1
  18. package/dist/esm/SideNavBar.js +1 -1
  19. package/dist/esm/Table/style/style.css +1 -1
  20. package/dist/esm/TextArea.js +1 -1
  21. package/dist/esm/TimeSelect.js +1 -1
  22. package/dist/esm/Toast/style/index.js +1 -1
  23. package/dist/esm/Toast/style/style.css +1 -1
  24. package/dist/esm/Tour.js +1 -1
  25. package/dist/esm/Uploader/style/style.css +1 -1
  26. package/dist/esm/Uploader.js +1 -1
  27. package/dist/esm/{actionsheet.taro-CgfXnK1M.js → actionsheet.taro-kMhbV73n.js} +1 -1
  28. package/dist/esm/{address.taro-CAikNvuu.js → address.taro-C8CsajMW.js} +2 -2
  29. package/dist/esm/{calendar.taro-MkErd99P.js → calendar.taro-CM4yWFlF.js} +1 -1
  30. package/dist/esm/{cascader.taro-DEApf0aF.js → cascader.taro-DRE3asjI.js} +1 -1
  31. package/dist/esm/{datepicker.taro-DibmSueg.js → datepicker.taro-DU4OSraL.js} +1 -1
  32. package/dist/esm/{elevator.taro-Bsc8PcT0.js → elevator.taro-C0Gs93x7.js} +5 -3
  33. package/dist/esm/{formitem.taro-CEWRz5EJ.js → formitem.taro-CU6rrcJD.js} +105 -47
  34. package/dist/esm/{imagepreview.taro-C0yMREHT.js → imagepreview.taro-BE4mZT-S.js} +1 -1
  35. package/dist/esm/{numberkeyboard.taro-CIlStObb.js → numberkeyboard.taro-BvVO_MyJ.js} +1 -1
  36. package/dist/esm/nutui-react.es.js +18 -18
  37. package/dist/esm/{picker.taro-mCnxpFCY.js → picker.taro-CYNZBTE4.js} +1 -1
  38. package/dist/esm/{popover.taro-BHcidbZG.js → popover.taro-o5vHvHsm.js} +1 -1
  39. package/dist/esm/{popup.taro-DV32k5dP.js → popup.taro-JynjcLCn.js} +3 -3
  40. package/dist/esm/{shortpassword.taro-ByEtEDDl.js → shortpassword.taro-CUnXqjab.js} +1 -1
  41. package/dist/esm/{sidenavbar.taro-DNwoQw9u.js → sidenavbar.taro-C-AoUXLA.js} +1 -1
  42. package/dist/esm/{textarea.taro-EJQxRHZR.js → textarea.taro-PsaohYay.js} +2 -2
  43. package/dist/esm/{timeselect.taro-DE_a87DT.js → timeselect.taro-FIl91wiO.js} +1 -1
  44. package/dist/esm/{tour.taro-BvBZa8nq.js → tour.taro-DfOfyyte.js} +1 -1
  45. package/dist/esm/{uploader.taro-CceZ5Y4t.js → uploader.taro-C3hV5Aih.js} +3 -1
  46. package/dist/locales/base.js +1 -1
  47. package/dist/locales/en-US.js +1 -1
  48. package/dist/locales/id-ID.js +1 -1
  49. package/dist/locales/tr-TR.js +1 -1
  50. package/dist/locales/zh-CN.js +1 -1
  51. package/dist/locales/zh-TW.js +1 -1
  52. package/dist/locales/zh-UG.js +1 -1
  53. package/dist/nutui.react.es.js +237 -148
  54. package/dist/nutui.react.umd.js +236 -147
  55. package/dist/packages/form/form.scss +0 -68
  56. package/dist/packages/formitem/formitem.scss +90 -21
  57. package/dist/packages/table/table.scss +1 -0
  58. package/dist/packages/toast/toast.scss +1 -0
  59. package/dist/packages/uploader/uploader.scss +2 -1
  60. package/dist/style.css +1 -1
  61. package/dist/types/packages/form/form.d.ts +2 -0
  62. package/dist/types/packages/form/form.taro.d.ts +10 -0
  63. package/dist/types/packages/form/types.d.ts +2 -1
  64. package/dist/types/packages/formitem/formitem.d.ts +1 -0
  65. package/dist/types/packages/formitem/formitem.taro.d.ts +1 -0
  66. package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +1 -1
  67. package/dist/types/utils/merge.d.ts +1 -0
  68. package/dist/types/utils/to-array.d.ts +1 -0
  69. package/package.json +1 -1
@@ -1,9 +1,31 @@
1
1
  import React__default, { createContext, useRef } from "react";
2
+ import { Text, View } from "@tarojs/components";
2
3
  import { C as Cell } from "./cell.taro-DWLhb5m6.js";
3
4
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
4
5
  import { a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
5
6
  import Schema from "async-validator";
6
7
  const Context = createContext({});
8
+ function merge(...objects) {
9
+ const result = Array.isArray(objects[0]) ? [] : {};
10
+ function mergeHelper(obj, path = []) {
11
+ for (const [key, value] of Object.entries(obj)) {
12
+ const newPath = [...path, key];
13
+ if (Array.isArray(value)) {
14
+ result[key] = [...value];
15
+ } else if (typeof value === "object" && value !== null) {
16
+ if (path.some((p) => p === value))
17
+ continue;
18
+ if (!result[key])
19
+ result[key] = {};
20
+ mergeHelper(value, newPath);
21
+ } else {
22
+ result[key] = value;
23
+ }
24
+ }
25
+ }
26
+ objects.filter((obj) => !!obj).forEach((obj) => mergeHelper(obj));
27
+ return result;
28
+ }
7
29
  const SECRET = "NUT_FORM_INTERNAL";
8
30
  class FormStore {
9
31
  constructor() {
@@ -36,14 +58,16 @@ class FormStore {
36
58
  });
37
59
  return fieldsValue;
38
60
  };
39
- this.setInitialValues = (values, init) => {
61
+ this.setInitialValues = (initialValues, init) => {
62
+ this.initialValues = initialValues || {};
40
63
  if (init) {
41
- this.initialValues = values;
42
- this.store = values;
64
+ const nextStore = merge(initialValues, this.store);
65
+ this.updateStore(nextStore);
43
66
  }
44
67
  };
45
- this.setFieldsValue = (newStore, needValidate = true) => {
46
- this.store = Object.assign(Object.assign({}, this.store), newStore);
68
+ this.setFieldsValue = (newStore) => {
69
+ const nextStore = merge(this.store, newStore);
70
+ this.updateStore(nextStore);
47
71
  this.fieldEntities.forEach((entity) => {
48
72
  const { name } = entity.props;
49
73
  Object.keys(newStore).forEach((key) => {
@@ -61,7 +85,12 @@ class FormStore {
61
85
  item.entity.onStoreChange("update");
62
86
  }
63
87
  });
64
- needValidate && this.validateFields();
88
+ };
89
+ this.setFieldValue = (name, value) => {
90
+ const store = {
91
+ [name]: value
92
+ };
93
+ this.setFieldsValue(store);
65
94
  };
66
95
  this.setCallback = (callback) => {
67
96
  this.callbacks = Object.assign(Object.assign({}, this.callbacks), callback);
@@ -69,6 +98,10 @@ class FormStore {
69
98
  this.validateEntities = (entity, errs) => __awaiter(this, void 0, void 0, function* () {
70
99
  var _a;
71
100
  const { name, rules = [] } = entity.props;
101
+ if (!name) {
102
+ console.warn("Form field missing name property");
103
+ return;
104
+ }
72
105
  const descriptor = {};
73
106
  if (rules.length) {
74
107
  if (rules.length > 1) {
@@ -120,7 +153,8 @@ class FormStore {
120
153
  });
121
154
  this.resetFields = () => {
122
155
  this.errors.length = 0;
123
- this.store = this.initialValues;
156
+ const nextStore = merge({}, this.initialValues);
157
+ this.updateStore(nextStore);
124
158
  this.fieldEntities.forEach((entity) => {
125
159
  entity.onStoreChange("reset");
126
160
  });
@@ -155,6 +189,7 @@ class FormStore {
155
189
  getFieldValue: this.getFieldValue,
156
190
  getFieldsValue: this.getFieldsValue,
157
191
  setFieldsValue: this.setFieldsValue,
192
+ setFieldValue: this.setFieldValue,
158
193
  resetFields: this.resetFields,
159
194
  validateFields: this.validateFields,
160
195
  submit: this.submit,
@@ -169,6 +204,9 @@ class FormStore {
169
204
  }
170
205
  };
171
206
  }
207
+ updateStore(nextStore) {
208
+ this.store = nextStore;
209
+ }
172
210
  }
173
211
  const useForm = (form) => {
174
212
  const formRef = useRef();
@@ -191,20 +229,28 @@ function isForwardRefComponent(component) {
191
229
  }
192
230
  ).$$typeof === component.type.$$typeof;
193
231
  }
194
- const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { required: false, name: "", label: "", rules: [{ required: false, message: "" }], errorMessageAlign: "left", validateTrigger: "onChange", shouldUpdate: false, noStyle: false });
232
+ function toArray(value) {
233
+ if (value === void 0 || value === null) {
234
+ return [];
235
+ }
236
+ return Array.isArray(value) ? value : [value];
237
+ }
238
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { required: false, name: "", label: "", rules: [{ required: false, message: "" }], errorMessageAlign: "left", shouldUpdate: false, noStyle: false });
195
239
  class FormItem extends React__default.Component {
196
240
  constructor(props) {
197
241
  super(props);
198
242
  this.getControlled = (children) => {
199
243
  var _a;
200
- const { setFieldsValue, getFieldValue } = this.context;
201
- const { dispatch } = this.context.getInternal(SECRET);
244
+ const { setFieldsValue, getFieldValue } = this.context.formInstance;
245
+ const { dispatch } = this.context.formInstance.getInternal(SECRET);
202
246
  const { name = "" } = this.props;
203
247
  if ((_a = children === null || children === void 0 ? void 0 : children.props) === null || _a === void 0 ? void 0 : _a.defaultValue) {
204
- console.warn("通过 initialValue 设置初始值");
248
+ if (process.env.NODE_ENV !== "production") {
249
+ console.warn("[NutUI] FormItem:", "请通过 initialValue 设置初始值,而不是 defaultValue");
250
+ }
205
251
  }
206
252
  const fieldValue = getFieldValue(name);
207
- const controlled = Object.assign(Object.assign({}, children.props), { [this.props.valuePropName || "value"]: fieldValue !== void 0 ? fieldValue : this.props.initialValue, [this.props.trigger || "onChange"]: (...args) => {
253
+ const controlled = Object.assign(Object.assign({}, children.props), { className: children.props.className, [this.props.valuePropName || "value"]: fieldValue !== void 0 ? fieldValue : this.props.initialValue, [this.props.trigger || "onChange"]: (...args) => {
208
254
  const originOnChange = children.props[this.props.trigger || "onChange"];
209
255
  if (originOnChange) {
210
256
  originOnChange(...args);
@@ -213,26 +259,24 @@ class FormItem extends React__default.Component {
213
259
  if (this.props.getValueFromEvent) {
214
260
  next = this.props.getValueFromEvent(...args);
215
261
  }
216
- setFieldsValue({ [name]: next }, false);
262
+ setFieldsValue({ [name]: next });
217
263
  } });
218
264
  const { validateTrigger } = this.props;
219
- let validateTriggers = [this.props.trigger || "onChange"];
220
- if (validateTrigger) {
221
- validateTriggers = typeof validateTrigger === "string" ? [validateTrigger] : [...validateTrigger];
222
- validateTriggers.forEach((trigger) => {
223
- const originTrigger = controlled[trigger];
224
- controlled[trigger] = (...args) => {
225
- if (originTrigger) {
226
- originTrigger(...args);
227
- }
228
- if (this.props.rules && this.props.rules.length) {
229
- dispatch({
230
- name: this.props.name
231
- });
232
- }
233
- };
234
- });
235
- }
265
+ const mergedValidateTrigger = validateTrigger || this.context.validateTrigger;
266
+ const validateTriggers = toArray(mergedValidateTrigger);
267
+ validateTriggers.forEach((trigger) => {
268
+ const originTrigger = controlled[trigger];
269
+ controlled[trigger] = (...args) => {
270
+ if (originTrigger) {
271
+ originTrigger(...args);
272
+ }
273
+ if (this.props.rules && this.props.rules.length) {
274
+ dispatch({
275
+ name: this.props.name
276
+ });
277
+ }
278
+ };
279
+ });
236
280
  if (isForwardRefComponent(children)) {
237
281
  controlled.ref = (componentInstance) => {
238
282
  const originRef = children.ref;
@@ -256,7 +300,7 @@ class FormItem extends React__default.Component {
256
300
  };
257
301
  this.onStoreChange = (type) => {
258
302
  if (type === "reset") {
259
- this.context.errors[this.props.name] = [];
303
+ this.context.formInstance.errors[this.props.name] = [];
260
304
  this.refresh();
261
305
  } else {
262
306
  this.forceUpdate();
@@ -264,27 +308,31 @@ class FormItem extends React__default.Component {
264
308
  };
265
309
  this.renderLayout = (childNode) => {
266
310
  var _a;
267
- const { label, name, required, rules, className, style, align, errorMessageAlign } = Object.assign(Object.assign({}, defaultProps), this.props);
311
+ const { label, name, required, rules, className, style, errorMessageAlign, align } = Object.assign(Object.assign({}, defaultProps), this.props);
268
312
  const requiredInRules = rules === null || rules === void 0 ? void 0 : rules.some((rule) => rule.required);
269
- const item = name ? this.context.errors[name] : [];
270
- const { starPosition } = this.context;
271
- const renderStar = (required || requiredInRules) && React__default.createElement("i", { className: "required" });
313
+ const item = name ? this.context.formInstance.errors[name] : [];
314
+ const { starPosition } = this.context.formInstance;
315
+ const renderStar = (required || requiredInRules) && React__default.createElement(Text, { className: "nut-form-item-label-required required" }, "*");
272
316
  const renderLabel = React__default.createElement(
273
317
  React__default.Fragment,
274
318
  null,
275
- starPosition === "left" ? renderStar : null,
276
- label,
319
+ React__default.createElement(
320
+ Text,
321
+ { className: "nut-form-item-labeltxt" },
322
+ starPosition === "left" ? renderStar : null,
323
+ label
324
+ ),
277
325
  starPosition === "right" ? renderStar : null
278
326
  );
279
327
  return React__default.createElement(
280
328
  Cell,
281
- { className: `nut-form-item ${className}`, style, align, onClick: (e) => this.props.onClick && this.props.onClick(e, this.componentRef) },
282
- label ? React__default.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
329
+ { className: `${this.getClassNameWithDirection("nut-form-item")} ${className}`, style, align, onClick: (e) => this.props.onClick && this.props.onClick(e, this.componentRef) },
330
+ label ? React__default.createElement(View, { className: `nut-cell-title ${this.getClassNameWithDirection("nut-form-item-label")}` }, renderLabel) : null,
283
331
  React__default.createElement(
284
- "div",
285
- { className: "nut-cell-value nut-form-item-body" },
286
- React__default.createElement("div", { className: "nut-form-item-body-slots" }, childNode),
287
- React__default.createElement("div", { className: "nut-form-item-body-tips", style: {
332
+ View,
333
+ { className: `nut-cell-value ${this.getClassNameWithDirection("nut-form-item-body")}` },
334
+ React__default.createElement(View, { className: "nut-form-item-body-slots" }, childNode),
335
+ React__default.createElement(View, { className: "nut-form-item-body-tips", style: {
288
336
  textAlign: errorMessageAlign,
289
337
  display: (item === null || item === void 0 ? void 0 : item.length) ? "initial" : "none"
290
338
  } }, (_a = item === null || item === void 0 ? void 0 : item[0]) === null || _a === void 0 ? void 0 : _a.message)
@@ -297,11 +345,11 @@ class FormItem extends React__default.Component {
297
345
  };
298
346
  }
299
347
  componentDidMount() {
300
- const { store = {}, setInitialValues } = this.context.getInternal(SECRET);
348
+ const { store = {}, setInitialValues } = this.context.formInstance.getInternal(SECRET);
301
349
  if (this.props.initialValue && this.props.name && !Object.keys(store).includes(this.props.name)) {
302
350
  setInitialValues(Object.assign(Object.assign({}, store), { [this.props.name]: this.props.initialValue }), true);
303
351
  }
304
- const { registerField, registerUpdate } = this.context.getInternal(SECRET);
352
+ const { registerField, registerUpdate } = this.context.formInstance.getInternal(SECRET);
305
353
  this.cancelRegister = registerField(this);
306
354
  this.eventOff = registerUpdate(this, this.props.shouldUpdate);
307
355
  }
@@ -313,6 +361,12 @@ class FormItem extends React__default.Component {
313
361
  this.eventOff();
314
362
  }
315
363
  }
364
+ getClassNameWithDirection(className) {
365
+ if (className && this.context.labelPosition) {
366
+ return `${className} ${className}-${this.context.labelPosition}`;
367
+ }
368
+ return className;
369
+ }
316
370
  render() {
317
371
  const { children } = this.props;
318
372
  const child = Array.isArray(children) ? children[0] : children;
@@ -320,9 +374,13 @@ class FormItem extends React__default.Component {
320
374
  if (!this.props.shouldUpdate) {
321
375
  returnChildNode = React__default.cloneElement(child, this.getControlled(child));
322
376
  } else {
323
- returnChildNode = child(this.context);
377
+ returnChildNode = child(this.context.formInstance);
324
378
  }
325
- return React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
379
+ return React__default.createElement(
380
+ React__default.Fragment,
381
+ { key: this.state.resetCount },
382
+ React__default.createElement(View, { className: this.context.disabled ? "nut-form-item-disabled" : "", catchMove: this.context.disabled }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode))
383
+ );
326
384
  }
327
385
  }
328
386
  FormItem.defaultProps = defaultProps;
@@ -3,7 +3,7 @@ import Taro from "@tarojs/taro";
3
3
  import { Video, Image } from "@tarojs/components";
4
4
  import classNames from "classnames";
5
5
  import { Close } from "@nutui/icons-react-taro";
6
- import { P as Popup } from "./popup.taro-DV32k5dP.js";
6
+ import { P as Popup } from "./popup.taro-JynjcLCn.js";
7
7
  import InnerSwiper from "./Swiper.js";
8
8
  import { S as SwiperItem } from "./swiperitem.taro-BleF1EOs.js";
9
9
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
@@ -3,7 +3,7 @@ import React__default, { useMemo, useState } from "react";
3
3
  import classNames from "classnames";
4
4
  import { ArrowDown } from "@nutui/icons-react-taro";
5
5
  import { View } from "@tarojs/components";
6
- import { P as Popup } from "./popup.taro-DV32k5dP.js";
6
+ import { P as Popup } from "./popup.taro-JynjcLCn.js";
7
7
  import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
8
8
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
9
9
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { visible: false, rightActions: "", type: "default", custom: [], random: false, onClose: () => {
@@ -14,41 +14,41 @@ import { S } from "./space.taro-B1KsEPZL.js";
14
14
  import { S as S2 } from "./sticky.taro-DC98CdU7.js";
15
15
  import { S as S3 } from "./safearea.taro-BJpvFsMf.js";
16
16
  import { B as B2 } from "./backtop.taro-D3Lo3jFO.js";
17
- import { E } from "./elevator.taro-Bsc8PcT0.js";
17
+ import { E } from "./elevator.taro-C0Gs93x7.js";
18
18
  import { F } from "./fixednav.taro-BodErnYy.js";
19
19
  import { N } from "./navbar.taro-HRFRDGii.js";
20
- import { S as S4 } from "./sidenavbar.taro-DNwoQw9u.js";
20
+ import { S as S4 } from "./sidenavbar.taro-C-AoUXLA.js";
21
21
  import { S as S5 } from "./sidenavbaritem.taro-BKpzXpzG.js";
22
22
  import { S as S6 } from "./subsidenavbar.taro-CSU3DhNq.js";
23
23
  import { T } from "./tabbar.taro-BiQDgZQF.js";
24
24
  import { T as T2 } from "./tabbaritem.taro-BiIVucQz.js";
25
25
  import { T as T3 } from "./tabpane.taro-BAe86j3t.js";
26
26
  import { T as T4 } from "./tabs.taro-CY1VxgF-.js";
27
- import { A } from "./address.taro-CAikNvuu.js";
28
- import { C as C5 } from "./calendar.taro-MkErd99P.js";
27
+ import { A } from "./address.taro-C8CsajMW.js";
28
+ import { C as C5 } from "./calendar.taro-CM4yWFlF.js";
29
29
  import { C as C6 } from "./calendaritem.taro-BGbbuJOS.js";
30
30
  import { C as C7 } from "./calendarcard.taro-CvWyBqnr.js";
31
- import { C as C8 } from "./cascader.taro-DEApf0aF.js";
31
+ import { C as C8 } from "./cascader.taro-DRE3asjI.js";
32
32
  import { C as C9, a as a2 } from "./checkbox.taro-CgqJyhrh.js";
33
- import { D as D2 } from "./datepicker.taro-DibmSueg.js";
33
+ import { D as D2 } from "./datepicker.taro-DU4OSraL.js";
34
34
  import { default as default2 } from "./Form.js";
35
- import { F as F2 } from "./formitem.taro-CEWRz5EJ.js";
35
+ import { F as F2 } from "./formitem.taro-CU6rrcJD.js";
36
36
  import { I as I2 } from "./input.taro-CA9ZpM9a.js";
37
37
  import { I as I3 } from "./inputnumber.taro-CZourWz-.js";
38
38
  import { M } from "./menu.taro-BmjnA_YM.js";
39
39
  import { M as M2 } from "./menuitem.taro-DCqPC4Nu.js";
40
- import { N as N2 } from "./numberkeyboard.taro-CIlStObb.js";
41
- import { P } from "./picker.taro-mCnxpFCY.js";
40
+ import { N as N2 } from "./numberkeyboard.taro-BvVO_MyJ.js";
41
+ import { P } from "./picker.taro-CYNZBTE4.js";
42
42
  import { R as R2, a as a3 } from "./radio.taro-M2in687s.js";
43
43
  import { R as R3 } from "./range.taro-D4U2Q7Wx.js";
44
44
  import { R as R4 } from "./rate.taro-CPGkjYYu.js";
45
45
  import { S as S7 } from "./searchbar.taro-LaO2Xr2t.js";
46
- import { S as S8 } from "./shortpassword.taro-ByEtEDDl.js";
46
+ import { S as S8 } from "./shortpassword.taro-CUnXqjab.js";
47
47
  import { S as S9 } from "./signature.taro-BW4eiGIR.js";
48
48
  import { S as S10 } from "./switch.taro-CdBmDo18.js";
49
- import { T as T5 } from "./textarea.taro-EJQxRHZR.js";
50
- import { U } from "./uploader.taro-CceZ5Y4t.js";
51
- import { A as A2 } from "./actionsheet.taro-CgfXnK1M.js";
49
+ import { T as T5 } from "./textarea.taro-PsaohYay.js";
50
+ import { U } from "./uploader.taro-C3hV5Aih.js";
51
+ import { A as A2 } from "./actionsheet.taro-kMhbV73n.js";
52
52
  import { B as B3 } from "./badge.taro-B42_7q8v.js";
53
53
  import { B as B4 } from "./dialog.taro-yjDaaRHA.js";
54
54
  import { D as D3 } from "./drag.taro-B_sfzmtW.js";
@@ -57,8 +57,8 @@ import { I as I4 } from "./infiniteloading.taro-DzIrZvc0.js";
57
57
  import { L as L2 } from "./loading.taro-n_qoNgCW.js";
58
58
  import { N as N3 } from "./noticebar.taro-BjKDC7We.js";
59
59
  import { N as N4 } from "./notify.taro-BVXg7xTI.js";
60
- import { P as P2 } from "./popover.taro-BHcidbZG.js";
61
- import { P as P3 } from "./popup.taro-DV32k5dP.js";
60
+ import { P as P2 } from "./popover.taro-o5vHvHsm.js";
61
+ import { P as P3 } from "./popup.taro-JynjcLCn.js";
62
62
  import { P as P4 } from "./pulltorefresh.taro-BiSDwLpA.js";
63
63
  import { S as S11 } from "./skeleton.taro-D9Vkgsyx.js";
64
64
  import { S as S12 } from "./swipe.taro-Bsk2fnEl.js";
@@ -73,7 +73,7 @@ import { C as C11 } from "./collapse.taro-wqL6MWZr.js";
73
73
  import { C as C12 } from "./collapseitem.taro-DjUx5Nx8.js";
74
74
  import { C as C13 } from "./countdown.taro-Dyryl4pq.js";
75
75
  import { E as E3 } from "./ellipsis.taro-fvcP85Ir.js";
76
- import { I as I5 } from "./imagepreview.taro-C0yMREHT.js";
76
+ import { I as I5 } from "./imagepreview.taro-BE4mZT-S.js";
77
77
  import { I as I6 } from "./indicator.taro-k8bxJf86.js";
78
78
  import { P as P5 } from "./pagination.taro-BSwytb0-.js";
79
79
  import { P as P6 } from "./price.taro-DUW-OR83.js";
@@ -84,13 +84,13 @@ import { default as default4 } from "./Swiper.js";
84
84
  import { S as S15 } from "./swiperitem.taro-BleF1EOs.js";
85
85
  import { T as T7 } from "./table.taro-1nFkDxbh.js";
86
86
  import { T as T8 } from "./tag.taro-CFt28RLm.js";
87
- import { T as T9 } from "./tour.taro-BvBZa8nq.js";
87
+ import { T as T9 } from "./tour.taro-DfOfyyte.js";
88
88
  import { V } from "./video.taro-CecLv4sr.js";
89
89
  import { V as V2 } from "./virtuallist.taro-BlPW8ibd.js";
90
90
  import { B as B5 } from "./barrage.taro-D2lmvcB-.js";
91
91
  import { C as C14 } from "./card.taro-DxcIi5qH.js";
92
92
  import { T as T10 } from "./timedetail.taro-ya5JNy2L.js";
93
- import { T as T11 } from "./timeselect.taro-DE_a87DT.js";
93
+ import { T as T11 } from "./timeselect.taro-FIl91wiO.js";
94
94
  import { T as T12 } from "./trendarrow.taro-DKx5cGIh.js";
95
95
  import { W } from "./watermark.taro-CbO7mKFD.js";
96
96
  import { A as A7 } from "./avatarcropper.taro-meD2sizv.js";
@@ -3,7 +3,7 @@ import React__default, { useState, useRef, useEffect, useImperativeHandle } from
3
3
  import classNames from "classnames";
4
4
  import Taro from "@tarojs/taro";
5
5
  import { View, PickerView, PickerViewColumn } from "@tarojs/components";
6
- import { P as Popup } from "./popup.taro-DV32k5dP.js";
6
+ import { P as Popup } from "./popup.taro-JynjcLCn.js";
7
7
  import { u as useTouch } from "./use-touch-BeiLHDO9.js";
8
8
  import { g as getRectByTaro } from "./get-rect-by-taro-THaHH07X.js";
9
9
  import { p as passiveSupported } from "./overlay.taro-C8eXSsJH.js";
@@ -2,7 +2,7 @@ import { _ as __rest, a as __awaiter } from "./tslib.es6-iWu3F_1J.js";
2
2
  import React__default, { useRef, useState, useEffect } from "react";
3
3
  import classNames from "classnames";
4
4
  import Taro, { createSelectorQuery } from "@tarojs/taro";
5
- import { P as Popup } from "./popup.taro-DV32k5dP.js";
5
+ import { P as Popup } from "./popup.taro-JynjcLCn.js";
6
6
  import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-THaHH07X.js";
7
7
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
8
  import { a as useRtl } from "./configprovider.taro-C3WyeHSO.js";
@@ -122,10 +122,10 @@ const Popup = (props) => {
122
122
  };
123
123
  const renderNode = () => {
124
124
  return React__default.createElement(
125
- React__default.Fragment,
126
- null,
125
+ View,
126
+ { catchMove: true },
127
127
  overlay ? React__default.createElement(Overlay, { style: overlayStyles, className: overlayClassName, visible: innerVisible, closeOnOverlayClick, lockScroll, duration, onClick: onHandleClickOverlay }) : null,
128
- React__default.createElement(React__default.Fragment, null, renderPop())
128
+ renderPop()
129
129
  );
130
130
  };
131
131
  useEffect(() => {
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
2
2
  import React__default, { useMemo, useImperativeHandle, useEffect } from "react";
3
3
  import { Tips } from "@nutui/icons-react-taro";
4
4
  import classNames from "classnames";
5
- import { P as Popup } from "./popup.taro-DV32k5dP.js";
5
+ import { P as Popup } from "./popup.taro-JynjcLCn.js";
6
6
  import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
7
7
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
8
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
@@ -1,7 +1,7 @@
1
1
  import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
2
2
  import React__default, { useState } from "react";
3
3
  import classNames from "classnames";
4
- import { P as Popup } from "./popup.taro-DV32k5dP.js";
4
+ import { P as Popup } from "./popup.taro-JynjcLCn.js";
5
5
  import { O as OffsetContext } from "./context-4T-L2x0_.js";
6
6
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
7
7
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { position: "left", width: "80%" });
@@ -6,7 +6,7 @@ import { Textarea } from "@tarojs/components";
6
6
  import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
7
7
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
8
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
9
- const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { defaultValue: "", showCount: false, maxLength: 140, placeholder: "", readOnly: false, disabled: false, autoSize: false });
9
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { defaultValue: "", showCount: false, maxLength: 140, readOnly: false, disabled: false, autoSize: false });
10
10
  const TextArea = (props) => {
11
11
  const { locale } = useConfig();
12
12
  const _a = Object.assign(Object.assign({}, defaultProps), props), { className, value, defaultValue, showCount, maxLength, rows, placeholder, readOnly, disabled, autoSize, style, onChange, onBlur, onFocus } = _a, rest = __rest(_a, ["className", "value", "defaultValue", "showCount", "maxLength", "rows", "placeholder", "readOnly", "disabled", "autoSize", "style", "onChange", "onBlur", "onFocus"]);
@@ -75,7 +75,7 @@ const TextArea = (props) => {
75
75
  onFocus: (e) => handleFocus(e),
76
76
  autoHeight: autoSize,
77
77
  maxlength: maxLength,
78
- placeholder: placeholder || locale.placeholder
78
+ placeholder: placeholder === void 0 ? locale.placeholder : placeholder
79
79
  }, rest)),
80
80
  showCount && React__default.createElement(
81
81
  "div",
@@ -1,7 +1,7 @@
1
1
  import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
2
2
  import React__default, { useState } from "react";
3
3
  import classNames from "classnames";
4
- import { P as Popup } from "./popup.taro-DV32k5dP.js";
4
+ import { P as Popup } from "./popup.taro-JynjcLCn.js";
5
5
  import { T as TimeDetail } from "./timedetail.taro-ya5JNy2L.js";
6
6
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
7
7
  import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-iWu3F_1J.js";
2
2
  import React__default, { useState, useEffect } from "react";
3
3
  import { Close } from "@nutui/icons-react-taro";
4
4
  import classNames from "classnames";
5
- import { P as Popover } from "./popover.taro-BHcidbZG.js";
5
+ import { P as Popover } from "./popover.taro-o5vHvHsm.js";
6
6
  import Taro, { createSelectorQuery } from "@tarojs/taro";
7
7
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
8
  import { useConfig } from "./ConfigProvider.js";
@@ -365,6 +365,7 @@ const InternalUploader = (props, ref) => {
365
365
  }
366
366
  };
367
367
  const readFile = (files) => {
368
+ const results = [];
368
369
  files.forEach((file, index) => {
369
370
  var _a2, _b;
370
371
  let fileType = file.type;
@@ -400,8 +401,9 @@ const InternalUploader = (props, ref) => {
400
401
  fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
401
402
  }
402
403
  executeUpload(fileItem, index);
403
- setFileList([...fileList, fileItem]);
404
+ results.push(fileItem);
404
405
  });
406
+ setFileList([...fileList, ...results]);
405
407
  };
406
408
  const filterFiles = (files) => {
407
409
  const maximum = maxCount * 1;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.2 Fri Dec 06 2024 16:22:06 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.2 Fri Dec 06 2024 16:22:06 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.2 Fri Dec 06 2024 16:22:06 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.2 Fri Dec 06 2024 16:22:06 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.2 Fri Dec 06 2024 16:22:06 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.2 Fri Dec 06 2024 16:22:06 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.2 Fri Dec 06 2024 16:22:06 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */