@nutui/nutui 4.3.0 → 4.3.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 (128) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5980 -6124
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/actionsheet/ActionSheet.js +1 -3
  6. package/dist/packages/address/Address.js +1 -4
  7. package/dist/packages/addresslist/AddressList.js +0 -4
  8. package/dist/packages/animate/Animate.js +51 -44
  9. package/dist/packages/audio/Audio.js +0 -3
  10. package/dist/packages/audiooperate/AudioOperate.js +0 -4
  11. package/dist/packages/avatar/Avatar.js +0 -1
  12. package/dist/packages/avatarcropper/AvatarCropper.js +0 -1
  13. package/dist/packages/calendar/Calendar.js +1 -7
  14. package/dist/packages/calendarcard/CalendarCard.js +0 -2
  15. package/dist/packages/calendaritem/CalendarItem.js +0 -2
  16. package/dist/packages/card/Card.js +2 -3
  17. package/dist/packages/cascader/Cascader.js +1 -10
  18. package/dist/packages/checkbox/Checkbox.js +4 -2
  19. package/dist/packages/col/Col.js +41 -30
  20. package/dist/packages/collapse/Collapse.js +40 -28
  21. package/dist/packages/collapseitem/CollapseItem.js +112 -125
  22. package/dist/packages/comment/Comment.js +0 -5
  23. package/dist/packages/common-FZL3qC99.js +16 -0
  24. package/dist/packages/countdown/Countdown.js +3 -4
  25. package/dist/packages/datepicker/DatePicker.js +0 -4
  26. package/dist/packages/dialog/Dialog.js +1 -5
  27. package/dist/packages/ecard/Ecard.js +0 -4
  28. package/dist/packages/empty/Empty.js +0 -2
  29. package/dist/packages/fixednav/FixedNav.js +0 -2
  30. package/dist/packages/form/Form.js +163 -157
  31. package/dist/packages/formitem/FormItem.js +77 -108
  32. package/dist/packages/grid/Grid.js +0 -1
  33. package/dist/packages/imagepreview/ImagePreview.js +1 -5
  34. package/dist/packages/{index-wY4t0zYt.js → index-BqB5dTeo.js} +29 -17
  35. package/dist/packages/{index.vue_vue_type_script_lang-MJYVRFbp.js → index.vue_vue_type_script_lang-n0HbjvfF.js} +6 -4
  36. package/dist/packages/infiniteloading/InfiniteLoading.js +0 -1
  37. package/dist/packages/input/Input.js +10 -7
  38. package/dist/packages/inputnumber/InputNumber.js +11 -8
  39. package/dist/packages/invoice/Invoice.js +10 -21
  40. package/dist/packages/layout/Layout.js +3 -0
  41. package/dist/packages/locale/lang/index.js +0 -1
  42. package/dist/packages/menuitem/MenuItem.js +1 -3
  43. package/dist/packages/notify/Notify.js +1 -4
  44. package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -5
  45. package/dist/packages/pagination/Pagination.js +0 -2
  46. package/dist/packages/picker/Picker.js +10 -5
  47. package/dist/packages/popover/Popover.js +1 -4
  48. package/dist/packages/popup/Popup.js +1 -5
  49. package/dist/packages/price/Price.js +69 -77
  50. package/dist/packages/pullrefresh/PullRefresh.js +0 -1
  51. package/dist/packages/radio/Radio.js +1 -6
  52. package/dist/packages/radiogroup/RadioGroup.js +0 -3
  53. package/dist/packages/range/Range.js +10 -7
  54. package/dist/packages/rate/Rate.js +6 -3
  55. package/dist/packages/row/Row.js +43 -39
  56. package/dist/packages/searchbar/Searchbar.js +5 -4
  57. package/dist/packages/shortpassword/ShortPassword.js +1 -4
  58. package/dist/packages/signature/Signature.js +0 -4
  59. package/dist/packages/sku/Sku.js +8 -12
  60. package/dist/packages/switch/Switch.js +12 -2
  61. package/dist/packages/switch/index.css +1 -1
  62. package/dist/packages/switch/index.scss +1 -1
  63. package/dist/packages/table/Table.js +0 -2
  64. package/dist/packages/tabs/Tabs.js +0 -1
  65. package/dist/packages/textarea/Textarea.js +7 -6
  66. package/dist/packages/timepannel/TimePannel.js +2 -2
  67. package/dist/packages/timeselect/TimeSelect.js +1 -5
  68. package/dist/packages/toast/Toast.js +3 -3
  69. package/dist/packages/tour/Tour.js +0 -4
  70. package/dist/packages/uploader/Uploader.js +7 -5
  71. package/dist/packages/video/Video.js +0 -2
  72. package/dist/smartips/web-types.json +21 -3
  73. package/dist/style.css +1 -1
  74. package/dist/types/__VUE/address/index.vue.d.ts +43 -3
  75. package/dist/types/__VUE/animate/animate.vue.d.ts +75 -0
  76. package/dist/types/__VUE/animate/index.d.ts +6 -0
  77. package/dist/types/__VUE/col/col.vue.d.ts +53 -0
  78. package/dist/types/__VUE/col/index.d.ts +5 -0
  79. package/dist/types/__VUE/collapse/collapse.vue.d.ts +60 -0
  80. package/dist/types/__VUE/collapse/index.d.ts +6 -0
  81. package/dist/types/__VUE/collapse/types.d.ts +3 -2
  82. package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +201 -0
  83. package/dist/types/__VUE/collapseitem/index.d.ts +5 -0
  84. package/dist/types/__VUE/countdown/index.vue.d.ts +23 -1
  85. package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
  86. package/dist/types/__VUE/form/common.d.ts +4 -30
  87. package/dist/types/__VUE/form/form.vue.d.ts +80 -0
  88. package/dist/types/__VUE/form/index.d.ts +6 -0
  89. package/dist/types/__VUE/form/types.d.ts +12 -5
  90. package/dist/types/__VUE/formitem/form-item.vue.d.ts +97 -0
  91. package/dist/types/__VUE/formitem/index.d.ts +5 -0
  92. package/dist/types/__VUE/input/index.vue.d.ts +1 -0
  93. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -0
  94. package/dist/types/__VUE/layout/index.d.ts +4 -0
  95. package/dist/types/__VUE/layout/layout.vue.d.ts +10 -0
  96. package/dist/types/__VUE/picker/index.vue.d.ts +1 -0
  97. package/dist/types/__VUE/picker/types.d.ts +1 -0
  98. package/dist/types/__VUE/picker/usePicker.d.ts +1 -0
  99. package/dist/types/__VUE/price/index.d.ts +6 -0
  100. package/dist/types/__VUE/price/price.vue.d.ts +83 -0
  101. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  102. package/dist/types/__VUE/rate/index.vue.d.ts +1 -0
  103. package/dist/types/__VUE/row/index.d.ts +5 -0
  104. package/dist/types/__VUE/row/row.vue.d.ts +71 -0
  105. package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -0
  106. package/dist/types/__VUE/skeleton/index.vue.d.ts +3 -3
  107. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
  108. package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
  109. package/dist/types/__VUE/switch/index.vue.d.ts +9 -0
  110. package/dist/types/__VUE/table/index.vue.d.ts +4 -4
  111. package/dist/types/__VUE/tabs/index.vue.d.ts +4 -4
  112. package/dist/types/__VUE/textarea/index.vue.d.ts +1 -0
  113. package/dist/types/__VUE/toast/index.vue.d.ts +21 -1
  114. package/dist/types/index.d.ts +19 -10
  115. package/dist/types/utils/index.d.ts +1 -0
  116. package/package.json +1 -1
  117. package/dist/packages/types-Ynmct7na.js +0 -4
  118. package/dist/types/__VUE/animate/index.vue.d.ts +0 -71
  119. package/dist/types/__VUE/col/index.vue.d.ts +0 -42
  120. package/dist/types/__VUE/collapse/index.vue.d.ts +0 -39
  121. package/dist/types/__VUE/collapseitem/index.vue.d.ts +0 -212
  122. package/dist/types/__VUE/form/index.vue.d.ts +0 -58
  123. package/dist/types/__VUE/formitem/index.vue.d.ts +0 -134
  124. package/dist/types/__VUE/formitem/types.d.ts +0 -11
  125. package/dist/types/__VUE/layout/index.vue.d.ts +0 -12
  126. package/dist/types/__VUE/price/index.vue.d.ts +0 -97
  127. package/dist/types/__VUE/row/index.vue.d.ts +0 -62
  128. /package/dist/types/__VUE/animate/{type.d.ts → types.d.ts} +0 -0
@@ -17,12 +17,13 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode } from "vue";
20
+ import { toRef, ref, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode } from "vue";
21
21
  import { StarFillN } from "@nutui/icons-vue";
22
22
  import { c as createComponent } from "../component-TCzwHGVq.js";
23
23
  import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
24
24
  import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
25
25
  import { u as useTouch } from "../index-084nl_oE.js";
26
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
26
27
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
27
28
  const { create } = createComponent("rate");
28
29
  const _sfc_main = create({
@@ -77,13 +78,14 @@ const _sfc_main = create({
77
78
  components: { StarFillN },
78
79
  emits: ["update:modelValue", "change"],
79
80
  setup(props, { emit, slots }) {
81
+ const disabled = useFormDisabled(toRef(props, "disabled"));
80
82
  const rateRefs = ref([]);
81
83
  const updateVal = (value) => {
82
84
  emit("update:modelValue", value);
83
85
  emit("change", value);
84
86
  };
85
87
  const onClick = (e, index) => {
86
- if (props.disabled || props.readonly)
88
+ if (disabled.value || props.readonly)
87
89
  return;
88
90
  let value = 0;
89
91
  if (index === 1 && props.modelValue === index) {
@@ -137,7 +139,8 @@ const _sfc_main = create({
137
139
  rateRefs,
138
140
  refRandomId,
139
141
  renderIcon,
140
- slots
142
+ slots,
143
+ disabled
141
144
  });
142
145
  }
143
146
  });
@@ -1,33 +1,39 @@
1
- import { provide, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
2
- import { c as createComponent } from "../component-TCzwHGVq.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, provide, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
3
21
  import { L as LAYOUT_KEY } from "../types-Ww4ErYJT.js";
4
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
5
- const { create } = createComponent("row");
6
- const _sfc_main = create({
22
+ import { w as withInstall } from "../with-install-p59gYYU_.js";
23
+ const prefixCls = "nut-row";
24
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
25
+ name: "NutRow"
26
+ }), {
27
+ __name: "row",
7
28
  props: {
8
- type: {
9
- type: String,
10
- default: ""
11
- },
12
- gutter: {
13
- type: [String, Number],
14
- default: ""
15
- },
16
- justify: {
17
- type: String,
18
- default: "start"
19
- },
20
- align: {
21
- type: String,
22
- default: "flex-start"
23
- },
24
- flexWrap: {
25
- type: String,
26
- default: "nowrap"
27
- }
29
+ type: { default: "" },
30
+ gutter: { default: "" },
31
+ justify: { default: "start" },
32
+ align: { default: "flex-start" },
33
+ flexWrap: { default: "nowrap" }
28
34
  },
29
- setup(props) {
30
- const prefixCls = "nut-row";
35
+ setup(__props) {
36
+ const props = __props;
31
37
  provide(LAYOUT_KEY, props.gutter);
32
38
  const getClass = (prefix, type) => {
33
39
  return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
@@ -41,19 +47,17 @@ const _sfc_main = create({
41
47
  getClass("flex", props.flexWrap)
42
48
  ];
43
49
  });
44
- return {
45
- classes
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createElementBlock("view", {
52
+ class: normalizeClass(classes.value)
53
+ }, [
54
+ renderSlot(_ctx.$slots, "default")
55
+ ], 2);
46
56
  };
47
57
  }
48
- });
49
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
50
- return openBlock(), createElementBlock("view", {
51
- class: normalizeClass(_ctx.classes)
52
- }, [
53
- renderSlot(_ctx.$slots, "default")
54
- ], 2);
55
- }
56
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
58
+ }));
59
+ withInstall(_sfc_main);
57
60
  export {
58
- index as default
61
+ _sfc_main as Row,
62
+ _sfc_main as default
59
63
  };
@@ -17,14 +17,13 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
20
+ import { toRef, reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
21
21
  import { c as createComponent } from "../component-TCzwHGVq.js";
22
22
  import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
23
23
  import { CircleClose } from "@nutui/icons-vue";
24
24
  import { u as useLocale } from "../index-s3RgMhc7.js";
25
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
25
26
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
26
- import "@nutui/nutui/dist/packages/locale/lang";
27
- import "../util-4Jkyw4BJ.js";
28
27
  const { create } = createComponent("searchbar");
29
28
  const cN = "NutSearchbar";
30
29
  const _sfc_main = create({
@@ -106,6 +105,7 @@ const _sfc_main = create({
106
105
  "clickRightIcon"
107
106
  ],
108
107
  setup(props, { emit }) {
108
+ const disabled = useFormDisabled(toRef(props, "disabled"));
109
109
  const translate = useLocale(cN);
110
110
  const state = reactive({
111
111
  active: false
@@ -194,7 +194,8 @@ const _sfc_main = create({
194
194
  clickInput,
195
195
  leftIconClick,
196
196
  rightIconClick,
197
- styleSearchbar
197
+ styleSearchbar,
198
+ disabled
198
199
  });
199
200
  }
200
201
  });
@@ -1,12 +1,9 @@
1
1
  import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { N as NutPopup } from "../index-wY4t0zYt.js";
3
+ import { N as NutPopup } from "../index-BqB5dTeo.js";
4
4
  import { Tips } from "@nutui/icons-vue";
5
5
  import { u as useLocale } from "../index-s3RgMhc7.js";
6
6
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
7
- import "../overlay/Overlay.js";
8
- import "../util-4Jkyw4BJ.js";
9
- import "@nutui/nutui/dist/packages/locale/lang";
10
7
  const { create } = createComponent("short-password");
11
8
  const cN = "NutShortPassword";
12
9
  const _sfc_main = create({
@@ -22,10 +22,6 @@ import { c as createComponent } from "../component-TCzwHGVq.js";
22
22
  import { Button as _sfc_main$1 } from "../button/Button.js";
23
23
  import { u as useLocale } from "../index-s3RgMhc7.js";
24
24
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
25
- import "@nutui/icons-vue";
26
- import "../with-install-p59gYYU_.js";
27
- import "@nutui/nutui/dist/packages/locale/lang";
28
- import "../util-4Jkyw4BJ.js";
29
25
  const { create } = createComponent("signature");
30
26
  const cN = "NutSignature";
31
27
  const _sfc_main = create({
@@ -1,15 +1,10 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
2
- import NutPrice from "../price/Price.js";
2
+ import { Price as _sfc_main$5 } from "../price/Price.js";
3
3
  import { c as createComponent } from "../component-TCzwHGVq.js";
4
4
  import { u as useLocale } from "../index-s3RgMhc7.js";
5
5
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
6
- import { T as TypeOfFun } from "../util-4Jkyw4BJ.js";
7
6
  import NutInputNumber from "../inputnumber/InputNumber.js";
8
- import { N as NutPopup } from "../index-wY4t0zYt.js";
9
- import "@nutui/nutui/dist/packages/locale/lang";
10
- import "../pxCheck-OnXlN1NC.js";
11
- import "@nutui/icons-vue";
12
- import "../overlay/Overlay.js";
7
+ import { N as NutPopup } from "../index-BqB5dTeo.js";
13
8
  const { create: create$4 } = createComponent("sku-header");
14
9
  const cN$1 = "NutSkuHeader";
15
10
  const _sfc_main$4 = create$4({
@@ -20,7 +15,7 @@ const _sfc_main$4 = create$4({
20
15
  }
21
16
  },
22
17
  components: {
23
- NutPrice
18
+ NutPrice: _sfc_main$5
24
19
  },
25
20
  setup(props, { slots }) {
26
21
  const translate = useLocale(cN$1);
@@ -158,10 +153,11 @@ const _sfc_main$2 = create$2({
158
153
  });
159
154
  const getExtraText = () => {
160
155
  const { stepperExtraText } = props;
161
- if (stepperExtraText && TypeOfFun(stepperExtraText) == "function") {
162
- return stepperExtraText();
163
- } else {
164
- return "";
156
+ if (stepperExtraText) {
157
+ if (stepperExtraText === true) {
158
+ return "";
159
+ }
160
+ return stepperExtraText == null ? void 0 : stepperExtraText();
165
161
  }
166
162
  };
167
163
  const add = (value) => {
@@ -1,6 +1,7 @@
1
1
  import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
3
  import { Loading1 } from "@nutui/icons-vue";
4
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
4
5
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
5
6
  const { componentName, create } = createComponent("switch");
6
7
  const _sfc_main = create({
@@ -10,6 +11,13 @@ const _sfc_main = create({
10
11
  type: [String, Number, Boolean],
11
12
  default: false
12
13
  },
14
+ disabled: {
15
+ type: Boolean,
16
+ default: false
17
+ },
18
+ /**
19
+ * @deprecated Please use `disabled` prop instead.
20
+ */
13
21
  disable: {
14
22
  type: Boolean,
15
23
  default: false
@@ -45,13 +53,15 @@ const _sfc_main = create({
45
53
  },
46
54
  emits: ["change", "update:modelValue", "update:loading"],
47
55
  setup(props, { emit }) {
56
+ const legacyDisabled = computed(() => props.disabled || props.disable);
57
+ const disabled = useFormDisabled(legacyDisabled);
48
58
  const isActive = computed(() => props.modelValue === props.activeValue);
49
59
  const classes = computed(() => {
50
60
  const prefixCls = componentName;
51
61
  return {
52
62
  [prefixCls]: true,
53
63
  [isActive.value ? "nut-switch-open" : "nut-switch-close"]: true,
54
- [`${prefixCls}-disable`]: props.disable,
64
+ [`${prefixCls}-disabled`]: disabled.value,
55
65
  [`${prefixCls}-base`]: true
56
66
  };
57
67
  });
@@ -62,7 +72,7 @@ const _sfc_main = create({
62
72
  });
63
73
  let updateType = "";
64
74
  const onClick = (event) => {
65
- if (props.disable || props.loading)
75
+ if (props.loading || disabled.value)
66
76
  return;
67
77
  const value = isActive.value ? props.inactiveValue : props.activeValue;
68
78
  updateType = "click";
@@ -1 +1 @@
1
- .nut-switch{cursor:pointer;display:inline-flex;align-items:center;background-color:var(--nut-primary-color, #fa2c19);border-radius:var(--nut-switch-border-radius, 21px);background-size:100% 100%;background-repeat:no-repeat;background-position:center center;flex:0 0 auto}.nut-switch .nut-icon-loading1{width:12px;height:12px;font-size:12px}.nut-switch.nut-switch-close{background-color:var(--nut-switch-close-bg-color, #ebebeb)}.nut-switch .nut-switch-button{display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--nut-white, #fff);transition:transform .3s}.nut-switch .nut-switch-button .nut-switch-label{color:var(--nut-white, #fff);font-size:var(--nut-font-size-1, 12px)}.nut-switch .nut-switch-button .nut-switch-label.open{transform:translateX(-16px)}.nut-switch .nut-switch-button .nut-switch-label.close{transform:translateX(16px)}.nut-switch.nut-switch-disable{opacity:.6}.nut-switch.nut-switch-base{min-width:var(--nut-switch-width, 36px);height:var(--nut-switch-height, 21px);line-height:var(--nut-switch-line-height, 21px);overflow:hidden}.nut-switch.nut-switch-base .nut-switch-button{height:var(--nut-switch-inside-height, 13px);width:var(--nut-switch-inside-width, 13px);transform:var(--nut-switch-inside-close-transform, translateX(30%))}.nut-switch.nut-switch-base.nut-switch-open .nut-switch-button{transform:var(--nut-switch-inside-open-transform, translateX(146%))}
1
+ .nut-switch{cursor:pointer;display:inline-flex;align-items:center;background-color:var(--nut-primary-color, #fa2c19);border-radius:var(--nut-switch-border-radius, 21px);background-size:100% 100%;background-repeat:no-repeat;background-position:center center;flex:0 0 auto}.nut-switch .nut-icon-loading1{width:12px;height:12px;font-size:12px}.nut-switch.nut-switch-close{background-color:var(--nut-switch-close-bg-color, #ebebeb)}.nut-switch .nut-switch-button{display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--nut-white, #fff);transition:transform .3s}.nut-switch .nut-switch-button .nut-switch-label{color:var(--nut-white, #fff);font-size:var(--nut-font-size-1, 12px)}.nut-switch .nut-switch-button .nut-switch-label.open{transform:translateX(-16px)}.nut-switch .nut-switch-button .nut-switch-label.close{transform:translateX(16px)}.nut-switch.nut-switch-disabled{opacity:.6}.nut-switch.nut-switch-base{min-width:var(--nut-switch-width, 36px);height:var(--nut-switch-height, 21px);line-height:var(--nut-switch-line-height, 21px);overflow:hidden}.nut-switch.nut-switch-base .nut-switch-button{height:var(--nut-switch-inside-height, 13px);width:var(--nut-switch-inside-width, 13px);transform:var(--nut-switch-inside-close-transform, translateX(30%))}.nut-switch.nut-switch-base.nut-switch-open .nut-switch-button{transform:var(--nut-switch-inside-open-transform, translateX(146%))}
@@ -36,7 +36,7 @@
36
36
  }
37
37
  }
38
38
  }
39
- &.nut-switch-disable {
39
+ &.nut-switch-disabled {
40
40
  opacity: 0.6;
41
41
  }
42
42
  &.nut-switch-base {
@@ -22,8 +22,6 @@ import { c as createComponent } from "../component-TCzwHGVq.js";
22
22
  import { DownArrow } from "@nutui/icons-vue";
23
23
  import { u as useLocale } from "../index-s3RgMhc7.js";
24
24
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
25
- import "@nutui/nutui/dist/packages/locale/lang";
26
- import "../util-4Jkyw4BJ.js";
27
25
  const RenderColumn = defineComponent({
28
26
  props: {
29
27
  slots: {
@@ -48,7 +48,6 @@ import { u as useRect } from "../index-cp6Ms_Qe.js";
48
48
  import { r as requestAniFrame } from "../raf-MQjoO-Ag.js";
49
49
  import { u as useTouch } from "../index-084nl_oE.js";
50
50
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
51
- import "../index-xDfQLRen.js";
52
51
  const useTabContentTouch = (props, tabMethods, taro, useTaroRect) => {
53
52
  const tabsContentRef = ref();
54
53
  const tabsContentRefRect = ref({ width: 0, height: 0 });
@@ -1,9 +1,8 @@
1
- import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
1
+ import { toRef, ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
3
  import { u as useLocale } from "../index-s3RgMhc7.js";
4
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
4
5
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
5
- import "@nutui/nutui/dist/packages/locale/lang";
6
- import "../util-4Jkyw4BJ.js";
7
6
  const { create } = createComponent("textarea");
8
7
  const cN = "NutTextarea";
9
8
  const _sfc_main = create({
@@ -51,13 +50,14 @@ const _sfc_main = create({
51
50
  },
52
51
  emits: ["update:modelValue", "change", "blur", "focus"],
53
52
  setup(props, { emit }) {
53
+ const disabled = useFormDisabled(toRef(props, "disabled"));
54
54
  const translate = useLocale(cN);
55
55
  const textareaRef = ref();
56
56
  const classes = computed(() => {
57
57
  const prefixCls = "nut-textarea";
58
58
  return {
59
59
  [prefixCls]: true,
60
- [`${prefixCls}--disabled`]: props.disabled
60
+ [`${prefixCls}--disabled`]: disabled.value
61
61
  };
62
62
  });
63
63
  onMounted(() => {
@@ -117,14 +117,14 @@ const _sfc_main = create({
117
117
  }
118
118
  };
119
119
  const focus = (event) => {
120
- if (props.disabled)
120
+ if (disabled.value)
121
121
  return;
122
122
  if (props.readonly)
123
123
  return;
124
124
  emit("focus", event);
125
125
  };
126
126
  const blur = (event) => {
127
- if (props.disabled)
127
+ if (disabled.value)
128
128
  return;
129
129
  if (props.readonly)
130
130
  return;
@@ -146,6 +146,7 @@ const _sfc_main = create({
146
146
  textareaRef,
147
147
  classes,
148
148
  styles,
149
+ disabled,
149
150
  change,
150
151
  focus,
151
152
  blur,
@@ -34,7 +34,7 @@ const _sfc_main = create({
34
34
  }
35
35
  },
36
36
  emits: ["change"],
37
- setup: (props, context) => {
37
+ setup: (props, { emit }) => {
38
38
  const currentKey = inject("currentKey");
39
39
  const state = reactive({
40
40
  currentKey
@@ -47,7 +47,7 @@ const _sfc_main = create({
47
47
  };
48
48
  });
49
49
  const handlePannel = (pannelKey) => {
50
- context.emit("change", pannelKey);
50
+ emit("change", pannelKey);
51
51
  };
52
52
  return __spreadProps(__spreadValues({}, toRefs(state)), {
53
53
  classes,
@@ -1,12 +1,8 @@
1
1
  import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, createElementBlock, toDisplayString, renderSlot } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { N as NutPopup } from "../index-wY4t0zYt.js";
3
+ import { N as NutPopup } from "../index-BqB5dTeo.js";
4
4
  import { u as useLocale } from "../index-s3RgMhc7.js";
5
5
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
6
- import "@nutui/icons-vue";
7
- import "../overlay/Overlay.js";
8
- import "../util-4Jkyw4BJ.js";
9
- import "@nutui/nutui/dist/packages/locale/lang";
10
6
  const { create } = createComponent("time-select");
11
7
  const cN = "NutTimeSelect";
12
8
  const _sfc_main = create({
@@ -23,7 +23,6 @@ import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
23
23
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
24
24
  import { C as CreateComponent } from "../mountComponent-uInXoTMp.js";
25
25
  import { Success, Failure, Tips, Loading } from "@nutui/icons-vue";
26
- import "../util-4Jkyw4BJ.js";
27
26
  const { create } = createComponent("toast");
28
27
  const _sfc_main = create({
29
28
  components: {},
@@ -107,7 +106,7 @@ const _sfc_main = create({
107
106
  const show = () => {
108
107
  clearTimer();
109
108
  if (props.duration) {
110
- timer = setTimeout(() => {
109
+ timer = window.setTimeout(() => {
111
110
  hide();
112
111
  }, props.duration);
113
112
  }
@@ -151,8 +150,9 @@ const _sfc_main = create({
151
150
  return ["nut-toast-icon-wrapper", { "nut-toast-icon-no-animation": !props.loadingRotate }];
152
151
  });
153
152
  const onAfterLeave = () => {
153
+ var _a;
154
154
  clearTimer();
155
- props.unmount(props.id);
155
+ (_a = props.unmount) == null ? void 0 : _a.call(props, props.id);
156
156
  props.onClose && props.onClose();
157
157
  };
158
158
  return {
@@ -23,10 +23,6 @@ import { u as useRect } from "../index-cp6Ms_Qe.js";
23
23
  import { Close } from "@nutui/icons-vue";
24
24
  import NutPopover from "../popover/Popover.js";
25
25
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
26
- import "../renderIcon--EgZu5_5.js";
27
- import "../index-wY4t0zYt.js";
28
- import "../overlay/Overlay.js";
29
- import "../util-4Jkyw4BJ.js";
30
26
  const { create } = createComponent("tour");
31
27
  const _sfc_main = create({
32
28
  components: {
@@ -4,15 +4,14 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { ref, watch, h, reactive, resolveComponent, openBlock, createElementBlock, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createVNode } from "vue";
7
+ import { toRef, ref, watch, h, reactive, resolveComponent, openBlock, createElementBlock, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createVNode } from "vue";
8
8
  import { c as createComponent } from "../component-TCzwHGVq.js";
9
9
  import { f as funInterceptor } from "../Interceptor-WYVtGbGC.js";
10
10
  import NutProgress from "../progress/Progress.js";
11
11
  import { Photograph, Failure, Loading, Del, Link } from "@nutui/icons-vue";
12
12
  import { u as useLocale } from "../index-s3RgMhc7.js";
13
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
13
14
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
14
- import "../util-4Jkyw4BJ.js";
15
- import "@nutui/nutui/dist/packages/locale/lang";
16
15
  class UploadOptions {
17
16
  constructor() {
18
17
  __publicField(this, "url", "");
@@ -153,6 +152,7 @@ const _sfc_main = create({
153
152
  "fileItemClick"
154
153
  ],
155
154
  setup(props, { emit }) {
155
+ const disabled = useFormDisabled(toRef(props, "disabled"));
156
156
  const translate = useLocale(cN);
157
157
  const fileList = ref(props.fileList);
158
158
  const uploadQueue = ref([]);
@@ -169,7 +169,7 @@ const _sfc_main = create({
169
169
  accept: props.accept,
170
170
  multiple: props.multiple,
171
171
  name: props.name,
172
- disabled: props.disabled
172
+ disabled: disabled.value
173
173
  };
174
174
  if (props.capture) {
175
175
  params.capture = "camera";
@@ -312,6 +312,8 @@ const _sfc_main = create({
312
312
  });
313
313
  };
314
314
  const onDelete = (file, index2) => {
315
+ if (disabled.value)
316
+ return;
315
317
  clearUploadQueue(index2);
316
318
  funInterceptor(props.beforeDelete, {
317
319
  args: [file, fileList.value],
@@ -319,7 +321,7 @@ const _sfc_main = create({
319
321
  });
320
322
  };
321
323
  const onChange = (event) => {
322
- if (props.disabled) {
324
+ if (props.disabled || disabled.value) {
323
325
  return;
324
326
  }
325
327
  const $el = event.target;
@@ -21,8 +21,6 @@ import { reactive, ref, computed, watch, nextTick, onMounted, toRefs, openBlock,
21
21
  import { c as createComponent } from "../component-TCzwHGVq.js";
22
22
  import { u as useLocale } from "../index-s3RgMhc7.js";
23
23
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
24
- import "@nutui/nutui/dist/packages/locale/lang";
25
- import "../util-4Jkyw4BJ.js";
26
24
  function throttle(fn, delay) {
27
25
  let timer = null;
28
26
  let startTime = Date.now();
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "NutUI",
5
- "version": "4.3.0",
5
+ "version": "4.3.2",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -2652,6 +2652,15 @@
2652
2652
  "kind": "expression"
2653
2653
  }
2654
2654
  },
2655
+ {
2656
+ "name": "disabled",
2657
+ "default": "`false`",
2658
+ "description": "禁用表单下的所有数据录入组件",
2659
+ "value": {
2660
+ "type": "boolean",
2661
+ "kind": "expression"
2662
+ }
2663
+ },
2655
2664
  {
2656
2665
  "name": "label-position",
2657
2666
  "default": "`left`",
@@ -4164,7 +4173,7 @@
4164
4173
  },
4165
4174
  {
4166
4175
  "name": "field-names",
4167
- "default": "`{ text: 'text', value: 'value', children: 'children' }`",
4176
+ "default": "`{ text: 'text', value: 'value', children: 'children', className: 'className' }`",
4168
4177
  "description": "自定义 columns 中的字段",
4169
4178
  "value": {
4170
4179
  "type": "object",
@@ -5977,7 +5986,7 @@
5977
5986
  }
5978
5987
  },
5979
5988
  {
5980
- "name": "disable",
5989
+ "name": "disabled ",
5981
5990
  "default": "`false`",
5982
5991
  "description": "禁用状态",
5983
5992
  "value": {
@@ -6047,6 +6056,15 @@
6047
6056
  "type": "boolean | string | number",
6048
6057
  "kind": "expression"
6049
6058
  }
6059
+ },
6060
+ {
6061
+ "name": "disable ",
6062
+ "default": "`false`",
6063
+ "description": "禁用状态",
6064
+ "value": {
6065
+ "type": "boolean",
6066
+ "kind": "expression"
6067
+ }
6050
6068
  }
6051
6069
  ]
6052
6070
  },