@nutui/nutui 4.3.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5242 -5326
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/actionsheet/ActionSheet.js +0 -2
  6. package/dist/packages/address/Address.js +0 -3
  7. package/dist/packages/addresslist/AddressList.js +0 -4
  8. package/dist/packages/audio/Audio.js +0 -3
  9. package/dist/packages/audiooperate/AudioOperate.js +0 -4
  10. package/dist/packages/avatar/Avatar.js +0 -1
  11. package/dist/packages/avatarcropper/AvatarCropper.js +0 -1
  12. package/dist/packages/calendar/Calendar.js +0 -6
  13. package/dist/packages/calendarcard/CalendarCard.js +0 -2
  14. package/dist/packages/calendaritem/CalendarItem.js +0 -2
  15. package/dist/packages/card/Card.js +0 -1
  16. package/dist/packages/cascader/Cascader.js +0 -9
  17. package/dist/packages/checkbox/Checkbox.js +4 -2
  18. package/dist/packages/collapse/Collapse.js +40 -28
  19. package/dist/packages/collapseitem/CollapseItem.js +112 -125
  20. package/dist/packages/comment/Comment.js +0 -5
  21. package/dist/packages/common-LvGbU-A3.js +13 -0
  22. package/dist/packages/countdown/Countdown.js +3 -4
  23. package/dist/packages/datepicker/DatePicker.js +0 -4
  24. package/dist/packages/dialog/Dialog.js +0 -4
  25. package/dist/packages/ecard/Ecard.js +0 -4
  26. package/dist/packages/empty/Empty.js +0 -2
  27. package/dist/packages/fixednav/FixedNav.js +0 -2
  28. package/dist/packages/form/Form.js +161 -157
  29. package/dist/packages/formitem/FormItem.js +76 -107
  30. package/dist/packages/grid/Grid.js +0 -1
  31. package/dist/packages/imagepreview/ImagePreview.js +0 -4
  32. package/dist/packages/{index.vue_vue_type_script_lang-MJYVRFbp.js → index.vue_vue_type_script_lang-w2sgcysj.js} +6 -4
  33. package/dist/packages/infiniteloading/InfiniteLoading.js +0 -1
  34. package/dist/packages/input/Input.js +10 -7
  35. package/dist/packages/inputnumber/InputNumber.js +11 -8
  36. package/dist/packages/invoice/Invoice.js +10 -21
  37. package/dist/packages/locale/lang/index.js +0 -1
  38. package/dist/packages/menuitem/MenuItem.js +0 -2
  39. package/dist/packages/notify/Notify.js +0 -3
  40. package/dist/packages/numberkeyboard/NumberKeyboard.js +0 -4
  41. package/dist/packages/pagination/Pagination.js +0 -2
  42. package/dist/packages/picker/Picker.js +10 -5
  43. package/dist/packages/popover/Popover.js +0 -3
  44. package/dist/packages/popup/Popup.js +0 -4
  45. package/dist/packages/pullrefresh/PullRefresh.js +0 -1
  46. package/dist/packages/radio/Radio.js +1 -6
  47. package/dist/packages/radiogroup/RadioGroup.js +0 -3
  48. package/dist/packages/range/Range.js +10 -7
  49. package/dist/packages/rate/Rate.js +6 -3
  50. package/dist/packages/searchbar/Searchbar.js +5 -4
  51. package/dist/packages/shortpassword/ShortPassword.js +0 -3
  52. package/dist/packages/signature/Signature.js +0 -4
  53. package/dist/packages/sku/Sku.js +5 -9
  54. package/dist/packages/switch/Switch.js +5 -3
  55. package/dist/packages/table/Table.js +0 -2
  56. package/dist/packages/tabs/Tabs.js +0 -1
  57. package/dist/packages/textarea/Textarea.js +7 -6
  58. package/dist/packages/timepannel/TimePannel.js +2 -2
  59. package/dist/packages/timeselect/TimeSelect.js +0 -4
  60. package/dist/packages/toast/Toast.js +3 -3
  61. package/dist/packages/tour/Tour.js +0 -4
  62. package/dist/packages/uploader/Uploader.js +7 -5
  63. package/dist/packages/video/Video.js +0 -2
  64. package/dist/smartips/web-types.json +11 -2
  65. package/dist/types/__VUE/address/index.vue.d.ts +43 -3
  66. package/dist/types/__VUE/collapse/collapse.vue.d.ts +60 -0
  67. package/dist/types/__VUE/collapse/index.d.ts +6 -0
  68. package/dist/types/__VUE/collapse/types.d.ts +3 -2
  69. package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +201 -0
  70. package/dist/types/__VUE/collapseitem/index.d.ts +5 -0
  71. package/dist/types/__VUE/countdown/index.vue.d.ts +23 -1
  72. package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
  73. package/dist/types/__VUE/form/common.d.ts +2 -30
  74. package/dist/types/__VUE/form/form.vue.d.ts +80 -0
  75. package/dist/types/__VUE/form/index.d.ts +6 -0
  76. package/dist/types/__VUE/form/types.d.ts +12 -4
  77. package/dist/types/__VUE/formitem/form-item.vue.d.ts +97 -0
  78. package/dist/types/__VUE/formitem/index.d.ts +5 -0
  79. package/dist/types/__VUE/input/index.vue.d.ts +2 -1
  80. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -0
  81. package/dist/types/__VUE/picker/index.vue.d.ts +1 -0
  82. package/dist/types/__VUE/picker/types.d.ts +1 -0
  83. package/dist/types/__VUE/picker/usePicker.d.ts +1 -0
  84. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  85. package/dist/types/__VUE/rate/index.vue.d.ts +1 -0
  86. package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -0
  87. package/dist/types/__VUE/skeleton/index.vue.d.ts +3 -3
  88. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
  89. package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
  90. package/dist/types/__VUE/table/index.vue.d.ts +4 -4
  91. package/dist/types/__VUE/tabs/index.vue.d.ts +4 -4
  92. package/dist/types/__VUE/textarea/index.vue.d.ts +1 -0
  93. package/dist/types/__VUE/toast/index.vue.d.ts +21 -1
  94. package/dist/types/index.d.ts +9 -5
  95. package/dist/types/utils/index.d.ts +1 -0
  96. package/package.json +1 -1
  97. package/dist/types/__VUE/collapse/index.vue.d.ts +0 -39
  98. package/dist/types/__VUE/collapseitem/index.vue.d.ts +0 -212
  99. package/dist/types/__VUE/form/index.vue.d.ts +0 -58
  100. package/dist/types/__VUE/formitem/index.vue.d.ts +0 -134
  101. package/dist/types/__VUE/formitem/types.d.ts +0 -11
@@ -14,9 +14,10 @@ var __spreadValues = (a, b) => {
14
14
  }
15
15
  return a;
16
16
  };
17
- import { ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, withDirectives, createVNode, mergeProps, vShow } from "vue";
18
- import { c as createComponent } from "../component-TCzwHGVq.js";
17
+ import { toRef, ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, withDirectives, createVNode, mergeProps, vShow } from "vue";
19
18
  import { MaskClose } from "@nutui/icons-vue";
19
+ import { c as createComponent } from "../component-TCzwHGVq.js";
20
+ import { u as useFormDisabled } from "../common-LvGbU-A3.js";
20
21
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
21
22
  function trimExtraChar(value, char, regExp) {
22
23
  const index2 = value.indexOf(char);
@@ -141,6 +142,7 @@ const _sfc_main = create({
141
142
  emits: ["update:modelValue", "blur", "focus", "clear", "keypress", "click", "clickInput", "confirm"],
142
143
  expose: ["focus", "blur", "select"],
143
144
  setup(props, { emit }) {
145
+ const disabled = useFormDisabled(toRef(props, "disabled"));
144
146
  const active = ref(false);
145
147
  const inputRef = ref();
146
148
  const getModelValue = () => {
@@ -159,7 +161,7 @@ const _sfc_main = create({
159
161
  const prefixCls = componentName;
160
162
  return {
161
163
  [prefixCls]: true,
162
- [`${prefixCls}--disabled`]: props.disabled,
164
+ [`${prefixCls}--disabled`]: disabled.value,
163
165
  [`${prefixCls}--required`]: props.required,
164
166
  [`${prefixCls}--error`]: props.error,
165
167
  [`${prefixCls}--border`]: props.border,
@@ -198,14 +200,14 @@ const _sfc_main = create({
198
200
  }
199
201
  };
200
202
  const onFocus = (event) => {
201
- if (props.disabled || props.readonly) {
203
+ if (disabled.value || props.readonly) {
202
204
  return;
203
205
  }
204
206
  active.value = true;
205
207
  emit("focus", event);
206
208
  };
207
209
  const onBlur = (event) => {
208
- if (props.disabled || props.readonly) {
210
+ if (disabled.value || props.readonly) {
209
211
  return;
210
212
  }
211
213
  setTimeout(() => {
@@ -221,7 +223,7 @@ const _sfc_main = create({
221
223
  };
222
224
  const clear = (event) => {
223
225
  event.stopPropagation();
224
- if (props.disabled)
226
+ if (disabled.value)
225
227
  return;
226
228
  emit("update:modelValue", "", event);
227
229
  emit("clear", "", event);
@@ -233,7 +235,7 @@ const _sfc_main = create({
233
235
  }
234
236
  };
235
237
  const onClickInput = (event) => {
236
- if (props.disabled) {
238
+ if (disabled.value) {
237
239
  return;
238
240
  }
239
241
  emit("clickInput", event);
@@ -283,6 +285,7 @@ const _sfc_main = create({
283
285
  active,
284
286
  classes,
285
287
  styles,
288
+ disabled,
286
289
  onInput,
287
290
  onFocus,
288
291
  onBlur,
@@ -1,7 +1,8 @@
1
- import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, normalizeStyle } from "vue";
1
+ import { toRef, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, normalizeStyle } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
3
  import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
4
4
  import { Minus, Plus } from "@nutui/icons-vue";
5
+ import { u as useFormDisabled } from "../common-LvGbU-A3.js";
5
6
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
6
7
  const { componentName, create } = createComponent("input-number");
7
8
  const _sfc_main = create({
@@ -46,11 +47,12 @@ const _sfc_main = create({
46
47
  },
47
48
  emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"],
48
49
  setup(props, { emit }) {
50
+ const disabled = useFormDisabled(toRef(props, "disabled"));
49
51
  const classes = computed(() => {
50
52
  const prefixCls = componentName;
51
53
  return {
52
54
  [prefixCls]: true,
53
- [`${prefixCls}--disabled`]: props.disabled
55
+ [`${prefixCls}--disabled`]: disabled.value
54
56
  };
55
57
  });
56
58
  const fixedDecimalPlaces = (v) => {
@@ -68,13 +70,13 @@ const _sfc_main = create({
68
70
  emit("change", output_value, event);
69
71
  };
70
72
  const addAllow = (value = Number(props.modelValue)) => {
71
- return value < Number(props.max) && !props.disabled;
73
+ return value < Number(props.max) && !disabled.value;
72
74
  };
73
75
  const reduceAllow = (value = Number(props.modelValue)) => {
74
- return value > Number(props.min) && !props.disabled;
76
+ return value > Number(props.min) && !disabled.value;
75
77
  };
76
78
  const reduce = (event) => {
77
- if (props.disabled)
79
+ if (disabled.value)
78
80
  return;
79
81
  emit("reduce", event);
80
82
  let output_value = Number(props.modelValue) - Number(props.step);
@@ -86,7 +88,7 @@ const _sfc_main = create({
86
88
  }
87
89
  };
88
90
  const add = (event) => {
89
- if (props.disabled)
91
+ if (disabled.value)
90
92
  return;
91
93
  emit("add", event);
92
94
  let output_value = Number(props.modelValue) + Number(props.step);
@@ -98,14 +100,14 @@ const _sfc_main = create({
98
100
  }
99
101
  };
100
102
  const focus = (event) => {
101
- if (props.disabled)
103
+ if (disabled.value)
102
104
  return;
103
105
  if (props.readonly)
104
106
  return;
105
107
  emit("focus", event);
106
108
  };
107
109
  const blur = (event) => {
108
- if (props.disabled)
110
+ if (disabled.value)
109
111
  return;
110
112
  if (props.readonly)
111
113
  return;
@@ -142,6 +144,7 @@ const _sfc_main = create({
142
144
  );
143
145
  return {
144
146
  classes,
147
+ disabled,
145
148
  change,
146
149
  blur,
147
150
  focus,
@@ -19,31 +19,20 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, onMounted, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, withDirectives, vModelText, createCommentVNode } from "vue";
21
21
  import { c as createComponent } from "../component-TCzwHGVq.js";
22
- import NutForm from "../form/Form.js";
23
- import NutFormItem from "../formitem/FormItem.js";
24
- import { _ as _sfc_main$1 } from "../index.vue_vue_type_script_lang-MJYVRFbp.js";
25
- import { _ as _sfc_main$2 } from "../index.vue_vue_type_script_lang-54PRh3YM.js";
26
- import { Button as _sfc_main$3 } from "../button/Button.js";
22
+ import { Form as _sfc_main$1 } from "../form/Form.js";
23
+ import { FormItem as _sfc_main$2 } from "../formitem/FormItem.js";
24
+ import { _ as _sfc_main$3 } from "../index.vue_vue_type_script_lang-w2sgcysj.js";
25
+ import { _ as _sfc_main$4 } from "../index.vue_vue_type_script_lang-54PRh3YM.js";
26
+ import { Button as _sfc_main$5 } from "../button/Button.js";
27
27
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
28
- import "../util-4Jkyw4BJ.js";
29
- import "../types-Ynmct7na.js";
30
- import "../useChildren-GU_NVfD8.js";
31
- import "../cellgroup/CellGroup.js";
32
- import "../pxCheck-OnXlN1NC.js";
33
- import "../cell/Cell.js";
34
- import "../index-Ii9XdkPy.js";
35
- import "@nutui/icons-vue";
36
- import "../useParent-KIxqkovs.js";
37
- import "../types-odSRziQJ.js";
38
- import "../with-install-p59gYYU_.js";
39
28
  const { componentName, create } = createComponent("invoice");
40
29
  const _sfc_main = create({
41
30
  components: {
42
- NutForm,
43
- NutFormItem,
44
- NutRadio: _sfc_main$1,
45
- NutRadioGroup: _sfc_main$2,
46
- NutButton: _sfc_main$3
31
+ NutForm: _sfc_main$1,
32
+ NutFormItem: _sfc_main$2,
33
+ NutRadio: _sfc_main$3,
34
+ NutRadioGroup: _sfc_main$4,
35
+ NutButton: _sfc_main$5
47
36
  },
48
37
  props: {
49
38
  data: {
@@ -7,7 +7,6 @@ var __publicField = (obj, key, value) => {
7
7
  import { reactive, ref } from "vue";
8
8
  import Lang from "./zh-CN.js";
9
9
  import Lang$1 from "./en-US.js";
10
- import "./baseLang-7uiEiO-2.js";
11
10
  const isObject = (val) => val !== null && typeof val === "object";
12
11
  const deepMerge = (target, newObj) => {
13
12
  Object.keys(newObj).forEach((key) => {
@@ -24,8 +24,6 @@ import { Check } from "@nutui/icons-vue";
24
24
  import { u as useParent } from "../useParent-KIxqkovs.js";
25
25
  import { M as MENU_KEY } from "../types-j71K23JP.js";
26
26
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
27
- import "../overlay/Overlay.js";
28
- import "../util-4Jkyw4BJ.js";
29
27
  const { create } = createComponent("menu-item");
30
28
  const _sfc_main = create({
31
29
  props: {
@@ -21,9 +21,6 @@ import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createEl
21
21
  import { c as createComponent } from "../component-TCzwHGVq.js";
22
22
  import { N as NutPopup } from "../index-wY4t0zYt.js";
23
23
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
24
- import "@nutui/icons-vue";
25
- import "../overlay/Overlay.js";
26
- import "../util-4Jkyw4BJ.js";
27
24
  const { create } = createComponent("notify");
28
25
  const _sfc_main = create({
29
26
  components: {
@@ -3,10 +3,6 @@ import { c as createComponent } from "../component-TCzwHGVq.js";
3
3
  import { N as NutPopup } from "../index-wY4t0zYt.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("number-keyboard");
11
7
  const cN = "NutNumberKeyboard";
12
8
  const _sfc_main = create({
@@ -2,8 +2,6 @@ import { toRefs, computed, watchEffect, openBlock, createElementBlock, createEle
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
3
  import { u as useLocale } from "../index-s3RgMhc7.js";
4
4
  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
5
  const { create } = createComponent("pagination");
8
6
  const cN = "NutPagination";
9
7
  const _sfc_main = create({
@@ -24,11 +24,11 @@ import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
24
24
  import { u as useTouch } from "../index-084nl_oE.js";
25
25
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
26
26
  import { u as useLocale } from "../index-s3RgMhc7.js";
27
- import "@nutui/nutui/dist/packages/locale/lang";
28
27
  const DEFAULT_FILED_NAMES = {
29
28
  text: "text",
30
29
  value: "value",
31
- children: "children"
30
+ children: "children",
31
+ className: "className"
32
32
  };
33
33
  const usePicker = (props, emit) => {
34
34
  const state = reactive({
@@ -450,14 +450,19 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
450
450
  }, [
451
451
  item && item[_ctx.fieldNames.text] && _ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
452
452
  key: 0,
453
- class: normalizeClass(["nut-picker-roller-item", { "nut-picker-roller-item-hidden": _ctx.isHidden(index + 1) }]),
453
+ class: normalizeClass(["nut-picker-roller-item", {
454
+ "nut-picker-roller-item-hidden": _ctx.isHidden(index + 1),
455
+ [item[_ctx.fieldNames.className]]: item[_ctx.fieldNames.className]
456
+ }]),
454
457
  style: normalizeStyle(_ctx.setRollerStyle(index + 1))
455
458
  }, toDisplayString(item[_ctx.fieldNames.text]), 7)) : createCommentVNode("", true),
456
459
  item && item[_ctx.fieldNames.text] && !_ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
457
460
  key: 1,
458
- class: "nut-picker-roller-item-tile",
461
+ class: normalizeClass(["nut-picker-roller-item-tile", {
462
+ [item[_ctx.fieldNames.className]]: item[_ctx.fieldNames.className]
463
+ }]),
459
464
  style: normalizeStyle({ height: _ctx.pxCheck(_ctx.optionHeight), lineHeight: _ctx.pxCheck(_ctx.optionHeight) })
460
- }, toDisplayString(item[_ctx.fieldNames.text]), 5)) : createCommentVNode("", true)
465
+ }, toDisplayString(item[_ctx.fieldNames.text]), 7)) : createCommentVNode("", true)
461
466
  ], 64);
462
467
  }), 128))
463
468
  ], 36),
@@ -4,9 +4,6 @@ import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
4
4
  import { u as useRect } from "../index-cp6Ms_Qe.js";
5
5
  import { N as NutPopup } from "../index-wY4t0zYt.js";
6
6
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
7
- import "@nutui/icons-vue";
8
- import "../overlay/Overlay.js";
9
- import "../util-4Jkyw4BJ.js";
10
7
  const { create } = createComponent("popover");
11
8
  const _sfc_main = create({
12
9
  components: {
@@ -1,10 +1,6 @@
1
1
  import { N } from "../index-wY4t0zYt.js";
2
2
  import "vue";
3
3
  import "../_plugin-vue_export-helper-yVxbj29m.js";
4
- import "@nutui/icons-vue";
5
- import "../overlay/Overlay.js";
6
- import "../component-TCzwHGVq.js";
7
- import "../util-4Jkyw4BJ.js";
8
4
  export {
9
5
  N as default
10
6
  };
@@ -26,7 +26,6 @@ import { u as useScrollParent } from "../index-xDfQLRen.js";
26
26
  import { Loading } from "@nutui/icons-vue";
27
27
  import { u as useLocale } from "../index-s3RgMhc7.js";
28
28
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
29
- import "@nutui/nutui/dist/packages/locale/lang";
30
29
  const { create } = createComponent("pull-refresh");
31
30
  const cN = "NutPullRefresh";
32
31
  const _sfc_main = create({
@@ -1,9 +1,4 @@
1
- import { _ as _sfc_main } from "../index.vue_vue_type_script_lang-MJYVRFbp.js";
2
- import "vue";
3
- import "../component-TCzwHGVq.js";
4
- import "@nutui/icons-vue";
5
- import "../pxCheck-OnXlN1NC.js";
6
- import "../types-odSRziQJ.js";
1
+ import { _ as _sfc_main } from "../index.vue_vue_type_script_lang-w2sgcysj.js";
7
2
  export {
8
3
  _sfc_main as default
9
4
  };
@@ -1,7 +1,4 @@
1
1
  import { _ as _sfc_main } from "../index.vue_vue_type_script_lang-54PRh3YM.js";
2
- import "vue";
3
- import "../component-TCzwHGVq.js";
4
- import "../types-odSRziQJ.js";
5
2
  export {
6
3
  _sfc_main as default
7
4
  };
@@ -17,11 +17,12 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
20
+ import { toRef, ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
21
21
  import { c as createComponent } from "../component-TCzwHGVq.js";
22
22
  import { a as isArray } from "../util-4Jkyw4BJ.js";
23
23
  import { u as useTouch } from "../index-084nl_oE.js";
24
24
  import { u as useRect } from "../index-cp6Ms_Qe.js";
25
+ import { u as useFormDisabled } from "../common-LvGbU-A3.js";
25
26
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
26
27
  const { componentName, create } = createComponent("range");
27
28
  const _sfc_main = create({
@@ -69,6 +70,7 @@ const _sfc_main = create({
69
70
  },
70
71
  emits: ["change", "dragEnd", "dragStart", "update:modelValue"],
71
72
  setup(props, { emit }) {
73
+ const disabled = useFormDisabled(toRef(props, "disabled"));
72
74
  const buttonIndex = ref(0);
73
75
  let startValue;
74
76
  let currentValue;
@@ -86,7 +88,7 @@ const _sfc_main = create({
86
88
  const prefixCls = componentName;
87
89
  return {
88
90
  [prefixCls]: true,
89
- [`${prefixCls}-disabled`]: props.disabled,
91
+ [`${prefixCls}-disabled`]: disabled.value,
90
92
  [`${prefixCls}-vertical`]: props.vertical,
91
93
  [`${prefixCls}-show-number`]: !props.hiddenRange
92
94
  };
@@ -211,7 +213,7 @@ const _sfc_main = create({
211
213
  }
212
214
  };
213
215
  const onClick = (event) => {
214
- if (props.disabled) {
216
+ if (disabled.value) {
215
217
  return;
216
218
  }
217
219
  const { min, modelValue } = props;
@@ -236,7 +238,7 @@ const _sfc_main = create({
236
238
  }
237
239
  };
238
240
  const onTouchStart = (event) => {
239
- if (props.disabled) {
241
+ if (disabled.value) {
240
242
  return;
241
243
  }
242
244
  touch.start(event);
@@ -249,7 +251,7 @@ const _sfc_main = create({
249
251
  dragStatus.value = "start";
250
252
  };
251
253
  const onTouchMove = (event) => {
252
- if (props.disabled) {
254
+ if (disabled.value) {
253
255
  return;
254
256
  }
255
257
  if (dragStatus.value === "start") {
@@ -274,7 +276,7 @@ const _sfc_main = create({
274
276
  updateValue(currentValue);
275
277
  };
276
278
  const onTouchEnd = () => {
277
- if (props.disabled) {
279
+ if (disabled.value) {
278
280
  return;
279
281
  }
280
282
  if (dragStatus.value === "draging") {
@@ -304,7 +306,8 @@ const _sfc_main = create({
304
306
  markClassName,
305
307
  marksStyle,
306
308
  marksList,
307
- tickStyle
309
+ tickStyle,
310
+ disabled
308
311
  });
309
312
  }
310
313
  });
@@ -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-LvGbU-A3.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
  });
@@ -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-LvGbU-A3.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
  });
@@ -4,9 +4,6 @@ import { N as NutPopup } from "../index-wY4t0zYt.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({
@@ -3,13 +3,8 @@ import NutPrice 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
7
  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";
13
8
  const { create: create$4 } = createComponent("sku-header");
14
9
  const cN$1 = "NutSkuHeader";
15
10
  const _sfc_main$4 = create$4({
@@ -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
- import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
1
+ import { toRef, 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-LvGbU-A3.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({
@@ -45,13 +46,14 @@ const _sfc_main = create({
45
46
  },
46
47
  emits: ["change", "update:modelValue", "update:loading"],
47
48
  setup(props, { emit }) {
49
+ const disabled = useFormDisabled(toRef(props, "disable"));
48
50
  const isActive = computed(() => props.modelValue === props.activeValue);
49
51
  const classes = computed(() => {
50
52
  const prefixCls = componentName;
51
53
  return {
52
54
  [prefixCls]: true,
53
55
  [isActive.value ? "nut-switch-open" : "nut-switch-close"]: true,
54
- [`${prefixCls}-disable`]: props.disable,
56
+ [`${prefixCls}-disable`]: disabled.value,
55
57
  [`${prefixCls}-base`]: true
56
58
  };
57
59
  });
@@ -62,7 +64,7 @@ const _sfc_main = create({
62
64
  });
63
65
  let updateType = "";
64
66
  const onClick = (event) => {
65
- if (props.disable || props.loading)
67
+ if (props.loading || disabled.value)
66
68
  return;
67
69
  const value = isActive.value ? props.inactiveValue : props.activeValue;
68
70
  updateType = "click";
@@ -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-LvGbU-A3.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,