@nutui/nutui 4.3.1 → 4.3.3

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 (130) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/nutui.es.js +2 -4
  3. package/dist/nutui.js +6035 -6408
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/actionsheet/ActionSheet.js +1 -1
  6. package/dist/packages/address/Address.js +1 -1
  7. package/dist/packages/addresslist/AddressList.js +2 -2
  8. package/dist/packages/animate/Animate.js +51 -44
  9. package/dist/packages/backtop/Backtop.js +79 -89
  10. package/dist/packages/calendar/Calendar.js +814 -3
  11. package/dist/packages/calendar/index.scss +0 -1
  12. package/dist/packages/calendarcard/CalendarCard.js +1 -1
  13. package/dist/packages/card/Card.js +4 -4
  14. package/dist/packages/cascader/Cascader.js +1 -1
  15. package/dist/packages/checkbox/Checkbox.js +1 -1
  16. package/dist/packages/circleprogress/CircleProgress.js +90 -97
  17. package/dist/packages/col/Col.js +41 -30
  18. package/dist/packages/comment/Comment.js +2 -2
  19. package/dist/packages/{common-LvGbU-A3.js → common-FZL3qC99.js} +5 -2
  20. package/dist/packages/dialog/Dialog.js +1 -1
  21. package/dist/packages/ecard/Ecard.js +2 -2
  22. package/dist/packages/form/Form.js +3 -1
  23. package/dist/packages/formitem/FormItem.js +1 -1
  24. package/dist/packages/imagepreview/ImagePreview.js +1 -1
  25. package/dist/packages/{index-wY4t0zYt.js → index-BqB5dTeo.js} +29 -17
  26. package/dist/packages/{index.vue_vue_type_script_lang-w2sgcysj.js → index.vue_vue_type_script_lang-n0HbjvfF.js} +1 -1
  27. package/dist/packages/input/Input.js +8 -8
  28. package/dist/packages/inputnumber/InputNumber.js +84 -103
  29. package/dist/packages/invoice/Invoice.js +87 -138
  30. package/dist/packages/layout/Layout.js +3 -0
  31. package/dist/packages/menuitem/MenuItem.js +1 -1
  32. package/dist/packages/navbar/Navbar.js +103 -115
  33. package/dist/packages/notify/Notify.js +1 -1
  34. package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -1
  35. package/dist/packages/popover/Popover.js +1 -1
  36. package/dist/packages/popup/Popup.js +1 -1
  37. package/dist/packages/price/Price.js +69 -77
  38. package/dist/packages/progress/Progress.js +96 -115
  39. package/dist/packages/radio/Radio.js +1 -1
  40. package/dist/packages/range/Range.js +1 -1
  41. package/dist/packages/rate/Rate.js +99 -141
  42. package/dist/packages/row/Row.js +43 -39
  43. package/dist/packages/searchbar/Searchbar.js +1 -1
  44. package/dist/packages/shortpassword/ShortPassword.js +1 -1
  45. package/dist/packages/sku/Sku.js +5 -5
  46. package/dist/packages/swipe/Swipe.js +96 -110
  47. package/dist/packages/swipegroup/SwipeGroup.js +41 -23
  48. package/dist/packages/switch/Switch.js +12 -4
  49. package/dist/packages/switch/index.css +1 -1
  50. package/dist/packages/switch/index.scss +1 -1
  51. package/dist/packages/tag/Tag.js +57 -66
  52. package/dist/packages/textarea/Textarea.js +1 -1
  53. package/dist/packages/timeselect/TimeSelect.js +1 -1
  54. package/dist/packages/uploader/Uploader.js +5 -5
  55. package/dist/smartips/web-types.json +12 -3
  56. package/dist/style.css +1 -1
  57. package/dist/styles/base-jdb.css +1 -1
  58. package/dist/styles/base-jddkh.css +1 -1
  59. package/dist/styles/base-jdt.css +1 -1
  60. package/dist/styles/themes/default.scss +0 -1
  61. package/dist/styles/themes/jdb.scss +0 -1
  62. package/dist/styles/themes/jddkh.scss +0 -1
  63. package/dist/styles/themes/jdt.scss +0 -1
  64. package/dist/styles/variables-jdb.scss +0 -1
  65. package/dist/styles/variables-jddkh.scss +0 -1
  66. package/dist/styles/variables-jdt.scss +0 -1
  67. package/dist/styles/variables.scss +0 -1
  68. package/dist/types/__VUE/animate/animate.vue.d.ts +75 -0
  69. package/dist/types/__VUE/animate/index.d.ts +6 -0
  70. package/dist/types/__VUE/backtop/backtop.vue.d.ts +87 -0
  71. package/dist/types/__VUE/backtop/index.d.ts +5 -0
  72. package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -12
  73. package/dist/types/__VUE/circleprogress/circle-progress.vue.d.ts +88 -0
  74. package/dist/types/__VUE/circleprogress/index.d.ts +6 -0
  75. package/dist/types/__VUE/col/col.vue.d.ts +53 -0
  76. package/dist/types/__VUE/col/index.d.ts +5 -0
  77. package/dist/types/__VUE/form/common.d.ts +2 -0
  78. package/dist/types/__VUE/form/types.d.ts +0 -1
  79. package/dist/types/__VUE/input/index.vue.d.ts +1 -1
  80. package/dist/types/__VUE/inputnumber/index.d.ts +5 -0
  81. package/dist/types/__VUE/inputnumber/input-number.vue.d.ts +112 -0
  82. package/dist/types/__VUE/invoice/index.d.ts +6 -0
  83. package/dist/types/__VUE/invoice/invoice.vue.d.ts +59 -0
  84. package/dist/types/__VUE/invoice/types.d.ts +12 -0
  85. package/dist/types/__VUE/layout/index.d.ts +4 -0
  86. package/dist/types/__VUE/layout/layout.vue.d.ts +10 -0
  87. package/dist/types/__VUE/navbar/index.d.ts +5 -0
  88. package/dist/types/__VUE/navbar/navbar.vue.d.ts +125 -0
  89. package/dist/types/__VUE/price/index.d.ts +6 -0
  90. package/dist/types/__VUE/price/price.vue.d.ts +83 -0
  91. package/dist/types/__VUE/progress/index.d.ts +6 -0
  92. package/dist/types/__VUE/progress/progress.vue.d.ts +91 -0
  93. package/dist/types/__VUE/rate/index.d.ts +5 -0
  94. package/dist/types/__VUE/rate/rate.vue.d.ts +208 -0
  95. package/dist/types/__VUE/row/index.d.ts +5 -0
  96. package/dist/types/__VUE/row/row.vue.d.ts +71 -0
  97. package/dist/types/__VUE/swipe/index.d.ts +6 -0
  98. package/dist/types/__VUE/swipe/swipe.vue.d.ts +79 -0
  99. package/dist/types/__VUE/swipe/types.d.ts +1 -0
  100. package/dist/types/__VUE/swipegroup/index.d.ts +5 -0
  101. package/dist/types/__VUE/swipegroup/swipe-group.vue.d.ts +47 -0
  102. package/dist/types/__VUE/switch/index.vue.d.ts +9 -0
  103. package/dist/types/__VUE/tag/index.d.ts +6 -0
  104. package/dist/types/__VUE/tag/tag.vue.d.ts +90 -0
  105. package/dist/types/__VUE/tag/types.d.ts +1 -1
  106. package/dist/types/index.d.ts +32 -18
  107. package/package.json +1 -1
  108. package/dist/packages/calendaritem/CalendarItem.js +0 -819
  109. package/dist/packages/calendaritem/index.css +0 -0
  110. package/dist/packages/calendaritem/index.mjs +0 -2
  111. package/dist/packages/calendaritem/index.scss +0 -0
  112. package/dist/packages/calendaritem/style/css.mjs +0 -2
  113. package/dist/packages/calendaritem/style/index.mjs +0 -2
  114. package/dist/packages/types-Ynmct7na.js +0 -4
  115. package/dist/types/__VUE/animate/index.vue.d.ts +0 -71
  116. package/dist/types/__VUE/backtop/index.vue.d.ts +0 -98
  117. package/dist/types/__VUE/circleprogress/index.vue.d.ts +0 -95
  118. package/dist/types/__VUE/col/index.vue.d.ts +0 -42
  119. package/dist/types/__VUE/inputnumber/index.vue.d.ts +0 -117
  120. package/dist/types/__VUE/invoice/index.vue.d.ts +0 -53
  121. package/dist/types/__VUE/layout/index.vue.d.ts +0 -12
  122. package/dist/types/__VUE/navbar/index.vue.d.ts +0 -129
  123. package/dist/types/__VUE/price/index.vue.d.ts +0 -97
  124. package/dist/types/__VUE/progress/index.vue.d.ts +0 -120
  125. package/dist/types/__VUE/rate/index.vue.d.ts +0 -240
  126. package/dist/types/__VUE/row/index.vue.d.ts +0 -62
  127. package/dist/types/__VUE/swipe/index.vue.d.ts +0 -70
  128. package/dist/types/__VUE/swipegroup/index.vue.d.ts +0 -26
  129. package/dist/types/__VUE/tag/index.vue.d.ts +0 -94
  130. /package/dist/types/__VUE/animate/{type.d.ts → types.d.ts} +0 -0
@@ -1,55 +1,44 @@
1
- import { useSlots, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
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, computed, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode, unref } from "vue";
2
21
  import { Checked } from "@nutui/icons-vue";
3
- import { c as createComponent } from "../component-TCzwHGVq.js";
4
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
5
- const { create } = createComponent("progress");
6
- const _sfc_main = create({
7
- components: { Checked },
22
+ import { w as withInstall } from "../with-install-p59gYYU_.js";
23
+ const _hoisted_1 = { class: "nut-progress" };
24
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
25
+ name: "NutProgress"
26
+ }), {
27
+ __name: "progress",
8
28
  props: {
9
- percentage: {
10
- type: [Number, String],
11
- default: 0,
12
- required: true
13
- },
14
- size: {
15
- type: String,
16
- default: "base"
17
- },
18
- status: {
19
- type: String,
20
- default: "text"
21
- },
22
- strokeWidth: {
23
- type: [Number, String],
24
- default: ""
25
- },
26
- textInside: {
27
- type: Boolean,
28
- default: false
29
- },
30
- showText: {
31
- type: Boolean,
32
- default: true
33
- },
34
- strokeColor: {
35
- type: String,
36
- default: ""
37
- },
38
- textColor: {
39
- type: String,
40
- default: ""
41
- },
42
- textBackground: {
43
- type: String,
44
- default: ""
45
- },
46
- isShowPercentage: {
47
- type: Boolean,
48
- default: true
49
- }
29
+ percentage: { default: 0 },
30
+ size: { default: "base" },
31
+ status: { default: "text" },
32
+ strokeWidth: {},
33
+ textInside: { type: Boolean, default: false },
34
+ showText: { type: Boolean, default: true },
35
+ strokeColor: {},
36
+ textColor: {},
37
+ textBackground: {},
38
+ isShowPercentage: { type: Boolean, default: true }
50
39
  },
51
- setup(props) {
52
- const slotDefault = !!useSlots().default;
40
+ setup(__props) {
41
+ const props = __props;
53
42
  const height = computed(() => {
54
43
  if (props.strokeWidth) {
55
44
  return props.strokeWidth + "px";
@@ -70,73 +59,65 @@ const _sfc_main = create({
70
59
  color: props.textColor || ""
71
60
  };
72
61
  });
73
- return {
74
- height,
75
- percentage,
76
- bgStyle,
77
- textStyle,
78
- slotDefault
62
+ return (_ctx, _cache) => {
63
+ return openBlock(), createElementBlock("div", _hoisted_1, [
64
+ createElementVNode("div", {
65
+ class: normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
66
+ style: normalizeStyle({ height: height.value })
67
+ }, [
68
+ createElementVNode("div", {
69
+ class: normalizeClass(["nut-progress-inner", _ctx.status === "active" ? "nut-active" : ""]),
70
+ style: normalizeStyle(bgStyle.value)
71
+ }, null, 6),
72
+ _ctx.showText && _ctx.textInside && !_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
73
+ key: 0,
74
+ class: "nut-progress-text nut-progress-insidetext",
75
+ style: normalizeStyle({
76
+ lineHeight: height.value,
77
+ left: `${percentage.value}%`,
78
+ transform: `translate(-${+percentage.value}%,-50%)`,
79
+ background: _ctx.textBackground || _ctx.strokeColor
80
+ })
81
+ }, [
82
+ createElementVNode("span", {
83
+ style: normalizeStyle(textStyle.value)
84
+ }, toDisplayString(percentage.value) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
85
+ ], 4)) : createCommentVNode("", true),
86
+ _ctx.showText && _ctx.textInside && _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
87
+ key: 1,
88
+ class: "nut-progress-slot",
89
+ style: normalizeStyle({
90
+ position: `absolute`,
91
+ top: `50%`,
92
+ left: `${percentage.value}%`,
93
+ transform: `translate(-${+percentage.value}%,-50%)`
94
+ })
95
+ }, [
96
+ renderSlot(_ctx.$slots, "default")
97
+ ], 4)) : createCommentVNode("", true)
98
+ ], 6),
99
+ _ctx.showText && !_ctx.textInside ? (openBlock(), createElementBlock("div", {
100
+ key: 0,
101
+ class: "nut-progress-text",
102
+ style: normalizeStyle({ lineHeight: height.value })
103
+ }, [
104
+ _ctx.status === "text" || _ctx.status === "active" ? (openBlock(), createElementBlock("span", {
105
+ key: 0,
106
+ style: normalizeStyle(textStyle.value)
107
+ }, toDisplayString(percentage.value) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status === "icon" ? renderSlot(_ctx.$slots, "icon-name", { key: 1 }, () => [
108
+ createVNode(unref(Checked), {
109
+ width: "15px",
110
+ height: "15px",
111
+ color: "#439422"
112
+ })
113
+ ]) : createCommentVNode("", true)
114
+ ], 4)) : createCommentVNode("", true)
115
+ ]);
79
116
  };
80
117
  }
81
- });
82
- const _hoisted_1 = { class: "nut-progress" };
83
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
84
- const _component_Checked = resolveComponent("Checked");
85
- return openBlock(), createElementBlock("div", _hoisted_1, [
86
- createElementVNode("div", {
87
- class: normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
88
- style: normalizeStyle({ height: _ctx.height })
89
- }, [
90
- createElementVNode("div", {
91
- class: normalizeClass(["nut-progress-inner", _ctx.status === "active" ? "nut-active" : ""]),
92
- style: normalizeStyle(_ctx.bgStyle)
93
- }, null, 6),
94
- _ctx.showText && _ctx.textInside && !_ctx.slotDefault ? (openBlock(), createElementBlock("div", {
95
- key: 0,
96
- class: "nut-progress-text nut-progress-insidetext",
97
- style: normalizeStyle({
98
- lineHeight: _ctx.height,
99
- left: `${_ctx.percentage}%`,
100
- transform: `translate(-${+_ctx.percentage}%,-50%)`,
101
- background: _ctx.textBackground || _ctx.strokeColor
102
- })
103
- }, [
104
- createElementVNode("span", {
105
- style: normalizeStyle(_ctx.textStyle)
106
- }, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
107
- ], 4)) : createCommentVNode("", true),
108
- _ctx.showText && _ctx.textInside && _ctx.slotDefault ? (openBlock(), createElementBlock("div", {
109
- key: 1,
110
- class: "nut-progress-slot",
111
- style: normalizeStyle({
112
- position: `absolute`,
113
- top: `50%`,
114
- left: `${_ctx.percentage}%`,
115
- transform: `translate(-${+_ctx.percentage}%,-50%)`
116
- })
117
- }, [
118
- renderSlot(_ctx.$slots, "default")
119
- ], 4)) : createCommentVNode("", true)
120
- ], 6),
121
- _ctx.showText && !_ctx.textInside ? (openBlock(), createElementBlock("div", {
122
- key: 0,
123
- class: "nut-progress-text",
124
- style: normalizeStyle({ lineHeight: _ctx.height })
125
- }, [
126
- _ctx.status === "text" || _ctx.status === "active" ? (openBlock(), createElementBlock("span", {
127
- key: 0,
128
- style: normalizeStyle(_ctx.textStyle)
129
- }, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status === "icon" ? renderSlot(_ctx.$slots, "icon-name", { key: 1 }, () => [
130
- createVNode(_component_Checked, {
131
- width: "15px",
132
- height: "15px",
133
- color: "#439422"
134
- })
135
- ]) : createCommentVNode("", true)
136
- ], 4)) : createCommentVNode("", true)
137
- ]);
138
- }
139
- const NutProgress = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
118
+ }));
119
+ withInstall(_sfc_main);
140
120
  export {
141
- NutProgress as default
121
+ _sfc_main as Progress,
122
+ _sfc_main as default
142
123
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../index.vue_vue_type_script_lang-w2sgcysj.js";
1
+ import { _ as _sfc_main } from "../index.vue_vue_type_script_lang-n0HbjvfF.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -22,7 +22,7 @@ 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
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
26
26
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
27
27
  const { componentName, create } = createComponent("range");
28
28
  const _sfc_main = create({
@@ -17,67 +17,45 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { toRef, ref, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode } from "vue";
20
+ import { defineComponent, toRef, ref, openBlock, createElementBlock, Fragment, renderList, unref, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode } from "vue";
21
21
  import { StarFillN } from "@nutui/icons-vue";
22
- import { c as createComponent } from "../component-TCzwHGVq.js";
23
22
  import { r as renderIcon } from "../renderIcon--EgZu5_5.js";
24
23
  import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
25
24
  import { u as useTouch } from "../index-084nl_oE.js";
26
- import { u as useFormDisabled } from "../common-LvGbU-A3.js";
27
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
28
- const { create } = createComponent("rate");
29
- const _sfc_main = create({
25
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
26
+ import { w as withInstall } from "../with-install-p59gYYU_.js";
27
+ const _hoisted_1 = ["id"];
28
+ const _hoisted_2 = { class: "nut-rate-item__icon--full" };
29
+ const _hoisted_3 = {
30
+ key: 0,
31
+ class: "nut-rate-item__icon--half"
32
+ };
33
+ const _hoisted_4 = {
34
+ key: 1,
35
+ class: "nut-rate-item__icon--half"
36
+ };
37
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
38
+ name: "NutRate"
39
+ }), {
40
+ __name: "rate",
30
41
  props: {
31
- count: {
32
- type: [String, Number],
33
- default: 5
34
- },
35
- modelValue: {
36
- type: [String, Number],
37
- default: 0
38
- },
39
- customIcon: {
40
- type: Object,
41
- default: () => {
42
- return StarFillN;
43
- }
44
- },
45
- size: {
46
- type: [String, Number],
47
- default: void 0
48
- },
49
- activeColor: {
50
- type: String,
51
- default: ""
52
- },
53
- voidColor: {
54
- type: String,
55
- default: ""
56
- },
57
- readonly: {
58
- type: Boolean,
59
- default: false
60
- },
61
- disabled: {
62
- type: Boolean,
63
- default: false
64
- },
65
- allowHalf: {
66
- type: Boolean,
67
- default: false
68
- },
69
- touchable: {
70
- type: Boolean,
71
- default: true
72
- },
73
- spacing: {
74
- type: [String, Number],
75
- default: void 0
76
- }
42
+ count: { default: 5 },
43
+ modelValue: { default: 0 },
44
+ customIcon: { default: () => StarFillN },
45
+ size: {},
46
+ activeColor: { default: "" },
47
+ voidColor: { default: "" },
48
+ readonly: { type: Boolean, default: false },
49
+ disabled: { type: Boolean, default: false },
50
+ allowHalf: { type: Boolean, default: false },
51
+ touchable: { type: Boolean, default: true },
52
+ spacing: {}
77
53
  },
78
- components: { StarFillN },
79
54
  emits: ["update:modelValue", "change"],
80
- setup(props, { emit, slots }) {
55
+ setup(__props, { emit: __emit }) {
56
+ const props = __props;
57
+ const emit = __emit;
58
+ const refRandomId = Math.random().toString(36).slice(-8);
81
59
  const disabled = useFormDisabled(toRef(props, "disabled"));
82
60
  const rateRefs = ref([]);
83
61
  const updateVal = (value) => {
@@ -114,97 +92,77 @@ const _sfc_main = create({
114
92
  return v;
115
93
  };
116
94
  const touch = useTouch();
117
- const touchMethods = {
118
- onTouchStart(event) {
119
- if (!props.touchable || props.readonly)
120
- return;
121
- touch.start(event);
122
- },
123
- onTouchMove(event) {
124
- if (!props.touchable)
125
- return;
126
- touch.move(event);
127
- if (touch.isHorizontal()) {
128
- if (rateRefs.value) {
129
- event.preventDefault();
130
- updateVal(getScoreByPosition(touch.moveX.value, rateRefs, props.allowHalf));
131
- }
95
+ const onTouchStart = (event) => {
96
+ if (!props.touchable || props.readonly)
97
+ return;
98
+ touch.start(event);
99
+ };
100
+ const onTouchMove = (event) => {
101
+ if (!props.touchable)
102
+ return;
103
+ touch.move(event);
104
+ if (touch.isHorizontal()) {
105
+ if (rateRefs.value) {
106
+ event.preventDefault();
107
+ updateVal(getScoreByPosition(touch.moveX.value, rateRefs, props.allowHalf));
132
108
  }
133
109
  }
134
110
  };
135
- const refRandomId = Math.random().toString(36).slice(-8);
136
- return __spreadProps(__spreadValues({}, touchMethods), {
137
- onClick,
138
- pxCheck,
139
- rateRefs,
140
- refRandomId,
141
- renderIcon,
142
- slots,
143
- disabled
144
- });
145
- }
146
- });
147
- const _hoisted_1 = ["id"];
148
- const _hoisted_2 = { class: "nut-rate-item__icon--full" };
149
- const _hoisted_3 = {
150
- key: 0,
151
- class: "nut-rate-item__icon--half"
152
- };
153
- const _hoisted_4 = {
154
- key: 1,
155
- class: "nut-rate-item__icon--half"
156
- };
157
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
158
- return openBlock(), createElementBlock("view", {
159
- class: "nut-rate",
160
- onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
161
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args))
162
- }, [
163
- (openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.count), (n) => {
111
+ return (_ctx, _cache) => {
164
112
  return openBlock(), createElementBlock("view", {
165
- id: "rateRefs-" + _ctx.refRandomId + n,
166
- key: n,
167
- ref_for: true,
168
- ref: "rateRefs",
169
- class: "nut-rate-item",
170
- style: normalizeStyle(n < Number(_ctx.count) ? { marginRight: _ctx.pxCheck(_ctx.spacing) } : {})
113
+ class: "nut-rate",
114
+ onTouchstart: onTouchStart,
115
+ onTouchmove: onTouchMove
171
116
  }, [
172
- createElementVNode("view", _hoisted_2, [
173
- (openBlock(), createBlock(resolveDynamicComponent(
174
- _ctx.renderIcon(_ctx.customIcon, {
175
- width: _ctx.size,
176
- height: _ctx.size,
177
- size: _ctx.size,
178
- color: n <= Number(_ctx.modelValue) ? _ctx.activeColor : _ctx.voidColor
179
- })
180
- ), {
181
- class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > Number(_ctx.modelValue) }]),
182
- onClick: ($event) => _ctx.onClick(1, n)
183
- }, null, 8, ["class", "onClick"]))
184
- ]),
185
- _ctx.allowHalf && Number(_ctx.modelValue) + 1 > n ? (openBlock(), createElementBlock("view", _hoisted_3, [
186
- (openBlock(), createBlock(resolveDynamicComponent(
187
- _ctx.renderIcon(_ctx.customIcon, {
188
- width: _ctx.size,
189
- height: _ctx.size,
190
- size: _ctx.size,
191
- color: n <= Number(_ctx.modelValue) + 1 ? _ctx.activeColor : _ctx.voidColor
192
- })
193
- ), {
194
- class: "nut-rate-item__icon",
195
- onClick: ($event) => _ctx.onClick(2, n)
196
- }, null, 8, ["onClick"]))
197
- ])) : _ctx.allowHalf && Number(_ctx.modelValue) + 1 < n ? (openBlock(), createElementBlock("view", _hoisted_4, [
198
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: _ctx.voidColor })), {
199
- class: "nut-rate-item__icon nut-rate-item__icon--disabled",
200
- onClick: ($event) => _ctx.onClick(2, n)
201
- }, null, 8, ["onClick"]))
202
- ])) : createCommentVNode("", true)
203
- ], 12, _hoisted_1);
204
- }), 128))
205
- ], 32);
206
- }
207
- const NutRate = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
117
+ (openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.count), (n) => {
118
+ return openBlock(), createElementBlock("view", {
119
+ id: "rateRefs-" + unref(refRandomId) + n,
120
+ key: n,
121
+ ref_for: true,
122
+ ref_key: "rateRefs",
123
+ ref: rateRefs,
124
+ class: "nut-rate-item",
125
+ style: normalizeStyle(n < Number(_ctx.count) ? { marginRight: unref(pxCheck)(_ctx.spacing) } : {})
126
+ }, [
127
+ createElementVNode("view", _hoisted_2, [
128
+ (openBlock(), createBlock(resolveDynamicComponent(
129
+ unref(renderIcon)(_ctx.customIcon, {
130
+ width: _ctx.size,
131
+ height: _ctx.size,
132
+ size: _ctx.size,
133
+ color: n <= Number(_ctx.modelValue) ? _ctx.activeColor : _ctx.voidColor
134
+ })
135
+ ), {
136
+ class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": unref(disabled) || n > Number(_ctx.modelValue) }]),
137
+ onClick: ($event) => onClick(1, n)
138
+ }, null, 8, ["class", "onClick"]))
139
+ ]),
140
+ _ctx.allowHalf && Number(_ctx.modelValue) + 1 > n ? (openBlock(), createElementBlock("view", _hoisted_3, [
141
+ (openBlock(), createBlock(resolveDynamicComponent(
142
+ unref(renderIcon)(_ctx.customIcon, {
143
+ width: _ctx.size,
144
+ height: _ctx.size,
145
+ size: _ctx.size,
146
+ color: n <= Number(_ctx.modelValue) + 1 ? _ctx.activeColor : _ctx.voidColor
147
+ })
148
+ ), {
149
+ class: "nut-rate-item__icon",
150
+ onClick: ($event) => onClick(2, n)
151
+ }, null, 8, ["onClick"]))
152
+ ])) : _ctx.allowHalf && Number(_ctx.modelValue) + 1 < n ? (openBlock(), createElementBlock("view", _hoisted_4, [
153
+ (openBlock(), createBlock(resolveDynamicComponent(unref(renderIcon)(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: _ctx.voidColor })), {
154
+ class: "nut-rate-item__icon nut-rate-item__icon--disabled",
155
+ onClick: ($event) => onClick(2, n)
156
+ }, null, 8, ["onClick"]))
157
+ ])) : createCommentVNode("", true)
158
+ ], 12, _hoisted_1);
159
+ }), 128))
160
+ ], 32);
161
+ };
162
+ }
163
+ }));
164
+ withInstall(_sfc_main);
208
165
  export {
209
- NutRate as default
166
+ _sfc_main as Rate,
167
+ _sfc_main as default
210
168
  };
@@ -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
  };
@@ -22,7 +22,7 @@ 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
+ import { u as useFormDisabled } from "../common-FZL3qC99.js";
26
26
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
27
27
  const { create } = createComponent("searchbar");
28
28
  const cN = "NutSearchbar";
@@ -1,6 +1,6 @@
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";
@@ -1,10 +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 NutInputNumber from "../inputnumber/InputNumber.js";
7
- import { N as NutPopup } from "../index-wY4t0zYt.js";
6
+ import { InputNumber as _sfc_main$6 } from "../inputnumber/InputNumber.js";
7
+ import { N as NutPopup } from "../index-BqB5dTeo.js";
8
8
  const { create: create$4 } = createComponent("sku-header");
9
9
  const cN$1 = "NutSkuHeader";
10
10
  const _sfc_main$4 = create$4({
@@ -15,7 +15,7 @@ const _sfc_main$4 = create$4({
15
15
  }
16
16
  },
17
17
  components: {
18
- NutPrice
18
+ NutPrice: _sfc_main$5
19
19
  },
20
20
  setup(props, { slots }) {
21
21
  const translate = useLocale(cN$1);
@@ -144,7 +144,7 @@ const _sfc_main$2 = create$2({
144
144
  },
145
145
  emits: ["click", "changeSku", "changeStepper", "clickBtnOptions", "overLimit", "reduce", "add"],
146
146
  components: {
147
- NutInputNumber
147
+ NutInputNumber: _sfc_main$6
148
148
  },
149
149
  setup(props, { emit }) {
150
150
  const goodsCount = ref(props.stepperMin);