@nutui/nutui 4.0.11 → 4.0.12

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 (158) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.js +2 -2
  3. package/dist/nutui.umd.js +1 -1
  4. package/dist/packages/_es/ActionSheet.js +111 -78
  5. package/dist/packages/_es/Address.js +375 -250
  6. package/dist/packages/_es/AddressList.js +354 -269
  7. package/dist/packages/_es/Animate.js +58 -41
  8. package/dist/packages/_es/Audio.js +197 -128
  9. package/dist/packages/_es/AudioOperate.js +71 -60
  10. package/dist/packages/_es/Avatar.js +89 -66
  11. package/dist/packages/_es/AvatarGroup.js +31 -23
  12. package/dist/packages/_es/Backtop.js +99 -59
  13. package/dist/packages/_es/Badge.js +47 -36
  14. package/dist/packages/_es/Barrage.js +147 -68
  15. package/dist/packages/_es/Button.js +66 -47
  16. package/dist/packages/_es/Calendar.js +157 -135
  17. package/dist/packages/_es/CalendarItem.js +6 -6
  18. package/dist/packages/_es/Card.js +56 -42
  19. package/dist/packages/_es/Cascader.js +474 -315
  20. package/dist/packages/_es/Category.js +39 -29
  21. package/dist/packages/_es/CategoryPane.js +83 -57
  22. package/dist/packages/_es/Cell.js +71 -56
  23. package/dist/packages/_es/CellGroup.js +27 -19
  24. package/dist/packages/_es/Checkbox.js +156 -109
  25. package/dist/packages/_es/CheckboxGroup.js +59 -38
  26. package/dist/packages/_es/CircleProgress.js +96 -67
  27. package/dist/packages/_es/Col.js +31 -23
  28. package/dist/packages/_es/Collapse.js +58 -33
  29. package/dist/packages/_es/CollapseItem.js +108 -78
  30. package/dist/packages/_es/Comment.js +279 -207
  31. package/dist/packages/_es/ConfigProvider.js +55 -37
  32. package/dist/packages/_es/Countdown.js +212 -100
  33. package/dist/packages/_es/Countup.js +445 -232
  34. package/dist/packages/_es/DatePicker.js +265 -162
  35. package/dist/packages/_es/Dialog.js +213 -161
  36. package/dist/packages/_es/Divider.js +57 -42
  37. package/dist/packages/_es/Drag.js +153 -70
  38. package/dist/packages/_es/Ecard.js +104 -64
  39. package/dist/packages/_es/Elevator.js +219 -143
  40. package/dist/packages/_es/Ellipsis.js +178 -95
  41. package/dist/packages/_es/Empty.js +39 -23
  42. package/dist/packages/_es/FixedNav.js +116 -93
  43. package/dist/packages/_es/Form.js +178 -107
  44. package/dist/packages/_es/FormItem.js +61 -48
  45. package/dist/packages/_es/Grid.js +6 -5
  46. package/dist/packages/_es/GridItem.js +84 -58
  47. package/dist/packages/_es/Image.js +130 -90
  48. package/dist/packages/_es/ImagePreview.js +412 -256
  49. package/dist/packages/_es/Indicator.js +34 -30
  50. package/dist/packages/_es/InfiniteLoading.js +136 -83
  51. package/dist/packages/_es/Input.js +264 -160
  52. package/dist/packages/_es/InputNumber.js +117 -81
  53. package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
  54. package/dist/packages/_es/Invoice.js +130 -104
  55. package/dist/packages/_es/Layout.js +4 -3
  56. package/dist/packages/_es/List.js +215 -117
  57. package/dist/packages/_es/Menu.js +150 -95
  58. package/dist/packages/_es/MenuItem.js +154 -109
  59. package/dist/packages/_es/Navbar.js +119 -103
  60. package/dist/packages/_es/Noticebar.js +312 -197
  61. package/dist/packages/_es/Notify.js +166 -110
  62. package/dist/packages/_es/NumberKeyboard.js +202 -127
  63. package/dist/packages/_es/Overlay.js +80 -52
  64. package/dist/packages/_es/Pagination.js +100 -70
  65. package/dist/packages/_es/Picker.js +437 -275
  66. package/dist/packages/_es/Popover.js +225 -122
  67. package/dist/packages/_es/Popup.js +4 -4
  68. package/dist/packages/_es/Price.js +82 -44
  69. package/dist/packages/_es/Progress.js +79 -63
  70. package/dist/packages/_es/PullRefresh.js +173 -95
  71. package/dist/packages/_es/Radio.js +4 -4
  72. package/dist/packages/_es/RadioGroup.js +3 -3
  73. package/dist/packages/_es/Range.js +347 -204
  74. package/dist/packages/_es/Rate.js +141 -92
  75. package/dist/packages/_es/Row.js +27 -21
  76. package/dist/packages/_es/Searchbar.js +174 -123
  77. package/dist/packages/_es/ShortPassword.js +93 -69
  78. package/dist/packages/_es/SideNavbar.js +80 -49
  79. package/dist/packages/_es/SideNavbarItem.js +32 -22
  80. package/dist/packages/_es/Signature.js +146 -83
  81. package/dist/packages/_es/Skeleton.js +130 -110
  82. package/dist/packages/_es/Sku.js +343 -250
  83. package/dist/packages/_es/Step.js +86 -59
  84. package/dist/packages/_es/Steps.js +31 -26
  85. package/dist/packages/_es/Sticky.js +4 -4
  86. package/dist/packages/_es/SubSideNavbar.js +74 -52
  87. package/dist/packages/_es/Swipe.js +155 -83
  88. package/dist/packages/_es/Swiper.js +311 -174
  89. package/dist/packages/_es/SwiperItem.js +44 -28
  90. package/dist/packages/_es/Switch.js +68 -55
  91. package/dist/packages/_es/TabPane.js +41 -30
  92. package/dist/packages/_es/Tabbar.js +52 -41
  93. package/dist/packages/_es/TabbarItem.js +82 -61
  94. package/dist/packages/_es/Table.js +165 -109
  95. package/dist/packages/_es/Tabs.js +388 -240
  96. package/dist/packages/_es/Tag.js +61 -44
  97. package/dist/packages/_es/Textarea.js +124 -80
  98. package/dist/packages/_es/TimeDetail.js +76 -49
  99. package/dist/packages/_es/TimePannel.js +48 -34
  100. package/dist/packages/_es/TimeSelect.js +68 -47
  101. package/dist/packages/_es/Toast.js +218 -144
  102. package/dist/packages/_es/Tour.js +192 -138
  103. package/dist/packages/_es/TrendArrow.js +77 -57
  104. package/dist/packages/_es/Uploader.js +359 -234
  105. package/dist/packages/_es/Video.js +316 -191
  106. package/dist/packages/_es/Watermark.js +117 -84
  107. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
  108. package/dist/packages/_es/common-b9a5e726.js +145 -0
  109. package/dist/packages/_es/component-81a4c1d0.js +145 -0
  110. package/dist/packages/_es/index-29892cda.js +33 -0
  111. package/dist/packages/_es/index-43c34ac6.js +30 -0
  112. package/dist/packages/_es/index-54d03fc1.js +8 -0
  113. package/dist/packages/_es/index-79c5dc33.js +10 -0
  114. package/dist/packages/_es/index-7a7385e4.js +67 -0
  115. package/dist/packages/_es/index-87422be8.js +942 -0
  116. package/dist/packages/_es/index-da0a7662.js +259 -0
  117. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
  120. package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
  121. package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
  122. package/dist/packages/_es/raf-729dad54.js +25 -0
  123. package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
  124. package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
  125. package/dist/packages/locale/lang/en-US.js +39 -36
  126. package/dist/packages/locale/lang/id-ID.js +39 -36
  127. package/dist/packages/locale/lang/index.js +44 -22
  128. package/dist/packages/locale/lang/zh-CN.js +38 -35
  129. package/dist/packages/locale/lang/zh-TW.js +38 -35
  130. package/dist/resolver/index.js +26 -1
  131. package/dist/resolver/index.mjs +17 -14
  132. package/dist/smartips/web-types.json +1 -1
  133. package/dist/style.css +1 -1
  134. package/dist/styles/themes/default.scss +48 -48
  135. package/dist/styles/themes/jdb.scss +48 -48
  136. package/dist/styles/themes/jddkh.scss +48 -48
  137. package/dist/styles/themes/jdt.scss +48 -48
  138. package/dist/types/index.d.ts +1 -1
  139. package/package.json +3 -4
  140. package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
  141. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
  142. package/dist/packages/_es/common-d218746f.js +0 -116
  143. package/dist/packages/_es/component-234624bc.js +0 -89
  144. package/dist/packages/_es/index-14dfadc4.js +0 -561
  145. package/dist/packages/_es/index-192a3ef6.js +0 -29
  146. package/dist/packages/_es/index-360c5092.js +0 -210
  147. package/dist/packages/_es/index-496e6e05.js +0 -24
  148. package/dist/packages/_es/index-50eed3d9.js +0 -7
  149. package/dist/packages/_es/index-53ec2d4d.js +0 -34
  150. package/dist/packages/_es/index-fadb0974.js +0 -8
  151. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
  152. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
  153. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
  154. package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
  155. package/dist/packages/_es/pxCheck-38173291.js +0 -4
  156. package/dist/packages/_es/raf-a74f1a06.js +0 -16
  157. package/dist/packages/_es/renderIcon-47498b32.js +0 -5
  158. package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
@@ -1,9 +1,10 @@
1
- import { toRefs as p, computed as i, resolveComponent as f, openBlock as u, createElementBlock as m, normalizeClass as d, normalizeStyle as C, renderSlot as k, createBlock as y, createCommentVNode as v } from "vue";
2
- import { c as g } from "./component-234624bc.js";
3
- import { Close as $ } from "@nutui/icons-vue";
4
- import { _ as S } from "./_plugin-vue_export-helper-dad06003.js";
1
+ import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { Close } from "@nutui/icons-vue";
4
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
- const { componentName: B, create: b } = g("tag"), h = b({
6
+ const { componentName, create } = createComponent("tag");
7
+ const _sfc_main = create({
7
8
  props: {
8
9
  color: { type: String, default: "" },
9
10
  textColor: { type: String, default: "" },
@@ -13,69 +14,85 @@ const { componentName: B, create: b } = g("tag"), h = b({
13
14
  },
14
15
  plain: {
15
16
  type: Boolean,
16
- default: !1
17
+ default: false
17
18
  },
18
19
  round: {
19
20
  type: Boolean,
20
- default: !1
21
+ default: false
21
22
  },
22
23
  mark: {
23
24
  type: Boolean,
24
- default: !1
25
+ default: false
25
26
  },
26
27
  closeable: {
27
28
  type: Boolean,
28
- default: !1
29
+ default: false
29
30
  }
30
31
  },
31
32
  components: {
32
- Close: $
33
+ Close
33
34
  },
34
35
  emits: ["close", "click"],
35
- setup(o, { emit: t }) {
36
- const { type: s, color: l, plain: a, round: c, mark: r, textColor: n } = p(o);
37
- return {
38
- classes: i(() => {
39
- const e = B;
40
- return {
41
- [e]: !0,
42
- [`${e}--${s.value}`]: s.value,
43
- [`${e}--plain`]: a.value,
44
- [`${e}--round`]: c.value,
45
- [`${e}--mark`]: r.value
46
- };
47
- }),
48
- getStyle: () => {
49
- const e = {};
50
- return n.value ? e.color = n.value : l.value && a.value && (e.color = l.value), a.value ? (e.background = "#fff", e["border-color"] = l.value) : l.value && (e.background = l.value), e;
51
- },
52
- onClose: (e) => {
53
- e.stopPropagation(), t("close", e);
54
- },
55
- onClick: (e) => {
56
- t("click", e);
36
+ setup(props, { emit }) {
37
+ const { type, color, plain, round, mark, textColor } = toRefs(props);
38
+ const classes = computed(() => {
39
+ const prefixCls = componentName;
40
+ return {
41
+ [prefixCls]: true,
42
+ [`${prefixCls}--${type.value}`]: type.value,
43
+ [`${prefixCls}--plain`]: plain.value,
44
+ [`${prefixCls}--round`]: round.value,
45
+ [`${prefixCls}--mark`]: mark.value
46
+ };
47
+ });
48
+ const getStyle = () => {
49
+ const style = {};
50
+ if (textColor.value) {
51
+ style.color = textColor.value;
52
+ } else if (color.value && plain.value) {
53
+ style.color = color.value;
54
+ }
55
+ if (plain.value) {
56
+ style.background = "#fff";
57
+ style["border-color"] = color.value;
58
+ } else if (color.value) {
59
+ style.background = color.value;
57
60
  }
61
+ return style;
62
+ };
63
+ const onClose = (event) => {
64
+ event.stopPropagation();
65
+ emit("close", event);
66
+ };
67
+ const onClick = (event) => {
68
+ emit("click", event);
69
+ };
70
+ return {
71
+ classes,
72
+ getStyle,
73
+ onClose,
74
+ onClick
58
75
  };
59
76
  }
60
77
  });
61
- function w(o, t, s, l, a, c) {
62
- const r = f("Close");
63
- return u(), m("view", {
64
- class: d(o.classes),
65
- style: C(o.getStyle()),
66
- onClick: t[0] || (t[0] = (...n) => o.onClick && o.onClick(...n))
78
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
79
+ const _component_Close = resolveComponent("Close");
80
+ return openBlock(), createElementBlock("view", {
81
+ class: normalizeClass(_ctx.classes),
82
+ style: normalizeStyle(_ctx.getStyle()),
83
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
67
84
  }, [
68
- k(o.$slots, "default"),
69
- o.closeable ? (u(), y(r, {
85
+ renderSlot(_ctx.$slots, "default"),
86
+ _ctx.closeable ? (openBlock(), createBlock(_component_Close, {
70
87
  key: 0,
71
88
  class: "nut-tag--close",
72
89
  width: "12px",
73
90
  height: "12px",
74
- onClick: o.onClose
75
- }, null, 8, ["onClick"])) : v("", !0)
91
+ onClick: _ctx.onClose
92
+ }, null, 8, ["onClick"])) : createCommentVNode("", true)
76
93
  ], 6);
77
94
  }
78
- const j = /* @__PURE__ */ S(h, [["render", w]]);
95
+ const Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
79
96
  export {
80
- j as default
97
+ Tag as default
81
98
  };
@@ -1,8 +1,9 @@
1
- import { ref as c, computed as m, onMounted as p, nextTick as g, watch as b, openBlock as f, createElementBlock as h, normalizeClass as C, createElementVNode as V, normalizeStyle as w, toDisplayString as y, createCommentVNode as S } from "vue";
2
- import { c as L } from "./component-234624bc.js";
3
- import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
1
+ import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
- const { componentName: B, create: z, translate: v } = L("textarea"), x = z({
5
+ const { componentName, create, translate } = createComponent("textarea");
6
+ const _sfc_main = create({
6
7
  props: {
7
8
  modelValue: {
8
9
  type: String,
@@ -14,7 +15,7 @@ const { componentName: B, create: z, translate: v } = L("textarea"), x = z({
14
15
  },
15
16
  limitShow: {
16
17
  type: Boolean,
17
- default: !1
18
+ default: false
18
19
  },
19
20
  maxLength: {
20
21
  type: [String, Number],
@@ -30,114 +31,157 @@ const { componentName: B, create: z, translate: v } = L("textarea"), x = z({
30
31
  },
31
32
  readonly: {
32
33
  type: Boolean,
33
- default: !1
34
+ default: false
34
35
  },
35
36
  disabled: {
36
37
  type: Boolean,
37
- default: !1
38
+ default: false
38
39
  },
39
40
  autosize: {
40
41
  type: [Boolean, Object],
41
- default: !1
42
+ default: false
42
43
  },
43
44
  autofocus: {
44
45
  type: Boolean,
45
- default: !1
46
+ default: false
46
47
  }
47
48
  },
48
49
  emits: ["update:modelValue", "change", "blur", "focus"],
49
- setup(e, { emit: o }) {
50
- const s = c(), u = m(() => {
51
- const t = B;
50
+ setup(props, { emit }) {
51
+ const textareaRef = ref();
52
+ const classes = computed(() => {
53
+ const prefixCls = componentName;
52
54
  return {
53
- [t]: !0,
54
- [`${t}--disabled`]: e.disabled
55
+ [prefixCls]: true,
56
+ [`${prefixCls}--disabled`]: props.disabled
55
57
  };
56
58
  });
57
- p(() => {
58
- e.modelValue && n(String(e.modelValue)), e.autosize && g(i);
59
+ onMounted(() => {
60
+ if (props.modelValue) {
61
+ emitChange(String(props.modelValue));
62
+ }
63
+ if (props.autosize) {
64
+ nextTick(getContentHeight);
65
+ }
66
+ });
67
+ const styles = computed(() => {
68
+ return {
69
+ textAlign: props.textAlign
70
+ // resize: props.autosize ? 'vertical' : 'none'
71
+ };
59
72
  });
60
- const r = m(() => ({
61
- textAlign: e.textAlign
62
- // resize: props.autosize ? 'vertical' : 'none'
63
- })), i = () => {
64
- let t = s.value;
65
- t.style.height = "auto";
66
- let a = t.scrollHeight;
67
- if (typeof e.autosize == "object") {
68
- const { maxHeight: l, minHeight: d } = e.autosize;
69
- l !== void 0 && (a = Math.min(a, l)), d !== void 0 && (a = Math.max(a, d));
73
+ const getContentHeight = () => {
74
+ let textarea = textareaRef.value;
75
+ textarea.style.height = "auto";
76
+ let height = textarea.scrollHeight;
77
+ if (typeof props.autosize === "object") {
78
+ const { maxHeight, minHeight } = props.autosize;
79
+ if (maxHeight !== void 0) {
80
+ height = Math.min(height, maxHeight);
81
+ }
82
+ if (minHeight !== void 0) {
83
+ height = Math.max(height, minHeight);
84
+ }
85
+ }
86
+ if (height) {
87
+ textarea.style.height = height + "px";
70
88
  }
71
- a && (t.style.height = a + "px");
72
89
  };
73
- b(
74
- () => e.modelValue,
90
+ watch(
91
+ () => props.modelValue,
75
92
  () => {
76
- e.autosize && g(i);
93
+ if (props.autosize) {
94
+ nextTick(getContentHeight);
95
+ }
77
96
  }
78
97
  );
79
- const n = (t, a) => {
80
- e.maxLength && t.length > Number(e.maxLength) && (t = t.substring(0, Number(e.maxLength))), o("update:modelValue", t, a), o("change", t, a);
98
+ const emitChange = (value, event) => {
99
+ if (props.maxLength && value.length > Number(props.maxLength)) {
100
+ value = value.substring(0, Number(props.maxLength));
101
+ }
102
+ emit("update:modelValue", value, event);
103
+ emit("change", value, event);
81
104
  };
82
- return {
83
- textareaRef: s,
84
- classes: u,
85
- styles: r,
86
- change: (t) => {
87
- if (!t.target.composing) {
88
- const a = t.target;
89
- let l = a.value;
90
- e.maxLength && l.length > Number(e.maxLength) && (l = l.slice(0, Number(e.maxLength))), n(a.value, t);
105
+ const change = (event) => {
106
+ if (!event.target.composing) {
107
+ const input = event.target;
108
+ let value = input.value;
109
+ if (props.maxLength && value.length > Number(props.maxLength)) {
110
+ value = value.slice(0, Number(props.maxLength));
91
111
  }
92
- },
93
- focus: (t) => {
94
- e.disabled || e.readonly || o("focus", t);
95
- },
96
- blur: (t) => {
97
- if (e.disabled || e.readonly)
98
- return;
99
- let l = t.target.value;
100
- n(l, t), o("blur", { value: l, event: t });
101
- },
102
- translate: v,
103
- startComposing: ({ target: t }) => {
104
- t.composing = !0;
105
- },
106
- endComposing: ({ target: t }) => {
107
- t.composing && (t.composing = !1, t.dispatchEvent(new Event("input")));
112
+ emitChange(input.value, event);
108
113
  }
109
114
  };
115
+ const focus = (event) => {
116
+ if (props.disabled)
117
+ return;
118
+ if (props.readonly)
119
+ return;
120
+ emit("focus", event);
121
+ };
122
+ const blur = (event) => {
123
+ if (props.disabled)
124
+ return;
125
+ if (props.readonly)
126
+ return;
127
+ const input = event.target;
128
+ let value = input.value;
129
+ emitChange(value, event);
130
+ emit("blur", { value, event });
131
+ };
132
+ const startComposing = ({ target }) => {
133
+ target.composing = true;
134
+ };
135
+ const endComposing = ({ target }) => {
136
+ if (target.composing) {
137
+ target.composing = false;
138
+ target.dispatchEvent(new Event("input"));
139
+ }
140
+ };
141
+ return {
142
+ textareaRef,
143
+ classes,
144
+ styles,
145
+ change,
146
+ focus,
147
+ blur,
148
+ translate,
149
+ startComposing,
150
+ endComposing
151
+ };
110
152
  }
111
- }), $ = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"], k = {
153
+ });
154
+ const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
155
+ const _hoisted_2 = {
112
156
  key: 0,
113
157
  class: "nut-textarea__limit"
114
158
  };
115
- function E(e, o, s, u, r, i) {
116
- return f(), h("view", {
117
- class: C(e.classes)
159
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
160
+ return openBlock(), createElementBlock("view", {
161
+ class: normalizeClass(_ctx.classes)
118
162
  }, [
119
- V("textarea", {
163
+ createElementVNode("textarea", {
120
164
  ref: "textareaRef",
121
165
  class: "nut-textarea__textarea",
122
- style: w(e.styles),
123
- rows: e.rows,
124
- disabled: e.disabled,
125
- readonly: e.readonly,
126
- value: e.modelValue,
127
- onInput: o[0] || (o[0] = (...n) => e.change && e.change(...n)),
128
- onBlur: o[1] || (o[1] = (...n) => e.blur && e.blur(...n)),
129
- onFocus: o[2] || (o[2] = (...n) => e.focus && e.focus(...n)),
130
- maxlength: e.maxLength,
131
- placeholder: e.placeholder || e.translate("placeholder"),
132
- autofocus: e.autofocus,
133
- onChange: o[3] || (o[3] = (...n) => e.endComposing && e.endComposing(...n)),
134
- onCompositionend: o[4] || (o[4] = (...n) => e.endComposing && e.endComposing(...n)),
135
- onCompositionstart: o[5] || (o[5] = (...n) => e.startComposing && e.startComposing(...n))
136
- }, null, 44, $),
137
- e.limitShow ? (f(), h("view", k, y(e.modelValue ? e.modelValue.length : 0) + "/" + y(e.maxLength), 1)) : S("", !0)
166
+ style: normalizeStyle(_ctx.styles),
167
+ rows: _ctx.rows,
168
+ disabled: _ctx.disabled,
169
+ readonly: _ctx.readonly,
170
+ value: _ctx.modelValue,
171
+ onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
172
+ onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
173
+ onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
174
+ maxlength: _ctx.maxLength,
175
+ placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
176
+ autofocus: _ctx.autofocus,
177
+ onChange: _cache[3] || (_cache[3] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
178
+ onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
179
+ onCompositionstart: _cache[5] || (_cache[5] = (...args) => _ctx.startComposing && _ctx.startComposing(...args))
180
+ }, null, 44, _hoisted_1),
181
+ _ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
138
182
  ], 2);
139
183
  }
140
- const T = /* @__PURE__ */ N(x, [["render", E]]);
184
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
141
185
  export {
142
- T as default
186
+ index as default
143
187
  };
@@ -1,69 +1,96 @@
1
- var T = Object.defineProperty, $ = Object.defineProperties;
2
- var w = Object.getOwnPropertyDescriptors;
3
- var u = Object.getOwnPropertySymbols;
4
- var K = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
5
- var p = (e, t, r) => t in e ? T(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, f = (e, t) => {
6
- for (var r in t || (t = {}))
7
- K.call(t, r) && p(e, r, t[r]);
8
- if (u)
9
- for (var r of u(t))
10
- D.call(t, r) && p(e, r, t[r]);
11
- return e;
12
- }, y = (e, t) => $(e, w(t));
13
- import { inject as C, reactive as x, computed as h, toRefs as B, openBlock as l, createElementBlock as c, normalizeClass as k, createElementVNode as g, Fragment as E, renderList as N, toDisplayString as j } from "vue";
14
- import { c as z } from "./component-234624bc.js";
15
- import { _ as A } from "./_plugin-vue_export-helper-dad06003.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 { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
21
+ import { c as createComponent } from "./component-81a4c1d0.js";
22
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
16
23
  import "../locale/lang";
17
- const { componentName: F, create: L } = z("time-detail"), R = L({
24
+ const { componentName, create } = createComponent("time-detail");
25
+ const _sfc_main = create({
18
26
  name: "timedetail",
19
27
  props: {
20
28
  times: {
21
29
  type: Array,
22
- default: () => []
30
+ default: () => {
31
+ return [];
32
+ }
23
33
  }
24
34
  },
25
35
  emits: ["select"],
26
- setup: (e, t) => {
27
- const r = C("currentKey"), o = C("currentTime"), i = x({
28
- currentKey: r,
29
- currentTime: o
30
- }), m = h(() => ({
31
- [F]: !0
32
- })), n = (s) => {
33
- let _ = i.currentTime.find((a) => a.key == i.currentKey);
34
- if (_)
36
+ setup: (props, context) => {
37
+ const currentKey = inject("currentKey");
38
+ const currentTime = inject("currentTime");
39
+ const state = reactive({
40
+ currentKey,
41
+ currentTime
42
+ });
43
+ const classes = computed(() => {
44
+ const prefixCls = componentName;
45
+ return {
46
+ [prefixCls]: true
47
+ };
48
+ });
49
+ const getClass = (item) => {
50
+ let find = state.currentTime.find((item2) => item2.key == state.currentKey);
51
+ if (find) {
35
52
  return {
36
- "nut-time-detail__detail__list__item": !0,
37
- "nut-time-detail__detail__list__item--curr": _.list.filter((a) => a === s).length > 0
53
+ "nut-time-detail__detail__list__item": true,
54
+ "nut-time-detail__detail__list__item--curr": find.list.filter((value) => value === item).length > 0
38
55
  };
39
- }, d = h(() => e.times.find((s) => s.key == i.currentKey).list), v = (s) => {
40
- t.emit("select", s);
56
+ }
57
+ };
58
+ const renderData = computed(() => {
59
+ return props.times.find((time) => time.key == state.currentKey)["list"];
60
+ });
61
+ const handleTime = (time) => {
62
+ context.emit("select", time);
41
63
  };
42
- return y(f({
43
- classes: m
44
- }, B(i)), {
45
- getClass: n,
46
- renderData: d,
47
- handleTime: v
64
+ return __spreadProps(__spreadValues({
65
+ classes
66
+ }, toRefs(state)), {
67
+ getClass,
68
+ renderData,
69
+ handleTime
48
70
  });
49
71
  }
50
- }), S = { class: "nut-time-detail__detail nut-time-detail__detail--moring" }, V = { class: "nut-time-detail__detail__list" }, b = ["onClick"];
51
- function q(e, t, r, o, i, m) {
52
- return l(), c("view", {
53
- class: k(e.classes)
72
+ });
73
+ const _hoisted_1 = { class: "nut-time-detail__detail nut-time-detail__detail--moring" };
74
+ const _hoisted_2 = { class: "nut-time-detail__detail__list" };
75
+ const _hoisted_3 = ["onClick"];
76
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
77
+ return openBlock(), createElementBlock("view", {
78
+ class: normalizeClass(_ctx.classes)
54
79
  }, [
55
- g("view", S, [
56
- g("view", V, [
57
- (l(!0), c(E, null, N(e.renderData, (n) => (l(), c("view", {
58
- class: k(e.getClass(n)),
59
- key: n,
60
- onClick: (d) => e.handleTime(n)
61
- }, j(n), 11, b))), 128))
80
+ createElementVNode("view", _hoisted_1, [
81
+ createElementVNode("view", _hoisted_2, [
82
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.renderData, (item) => {
83
+ return openBlock(), createElementBlock("view", {
84
+ class: normalizeClass(_ctx.getClass(item)),
85
+ key: item,
86
+ onClick: ($event) => _ctx.handleTime(item)
87
+ }, toDisplayString(item), 11, _hoisted_3);
88
+ }), 128))
62
89
  ])
63
90
  ])
64
91
  ], 2);
65
92
  }
66
- const O = /* @__PURE__ */ A(R, [["render", q]]);
93
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
67
94
  export {
68
- O as default
95
+ index as default
69
96
  };
@@ -1,20 +1,28 @@
1
- var m = Object.defineProperty, u = Object.defineProperties;
2
- var f = Object.getOwnPropertyDescriptors;
3
- var p = Object.getOwnPropertySymbols;
4
- var d = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
- var c = (n, e, t) => e in n ? m(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, l = (n, e) => {
6
- for (var t in e || (e = {}))
7
- d.call(e, t) && c(n, t, e[t]);
8
- if (p)
9
- for (var t of p(e))
10
- y.call(e, t) && c(n, t, e[t]);
11
- return n;
12
- }, i = (n, e) => u(n, f(e));
13
- import { inject as K, reactive as g, computed as C, toRefs as $, openBlock as h, createElementBlock as k, normalizeClass as v, toDisplayString as S } from "vue";
14
- import { c as _ } from "./component-234624bc.js";
15
- import { _ as x } from "./_plugin-vue_export-helper-dad06003.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 { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
21
+ import { c as createComponent } from "./component-81a4c1d0.js";
22
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
16
23
  import "../locale/lang";
17
- const { componentName: B, create: N } = _("time-pannel"), P = N({
24
+ const { componentName, create } = createComponent("time-pannel");
25
+ const _sfc_main = create({
18
26
  name: "timepannel",
19
27
  props: {
20
28
  name: {
@@ -27,28 +35,34 @@ const { componentName: B, create: N } = _("time-pannel"), P = N({
27
35
  }
28
36
  },
29
37
  emits: ["change"],
30
- setup: (n, e) => {
31
- const t = K("currentKey"), r = g({
32
- currentKey: t
33
- }), s = C(() => ({
34
- [B]: !0,
35
- "nut-time-pannel--curr": r.currentKey == n.pannelKey
36
- })), o = (a) => {
37
- e.emit("change", a);
38
+ setup: (props, context) => {
39
+ const currentKey = inject("currentKey");
40
+ const state = reactive({
41
+ currentKey
42
+ });
43
+ const classes = computed(() => {
44
+ const prefixCls = componentName;
45
+ return {
46
+ [prefixCls]: true,
47
+ "nut-time-pannel--curr": state.currentKey == props.pannelKey
48
+ };
49
+ });
50
+ const handlePannel = (pannelKey) => {
51
+ context.emit("change", pannelKey);
38
52
  };
39
- return i(l({}, $(r)), {
40
- classes: s,
41
- handlePannel: o
53
+ return __spreadProps(__spreadValues({}, toRefs(state)), {
54
+ classes,
55
+ handlePannel
42
56
  });
43
57
  }
44
58
  });
45
- function b(n, e, t, r, s, o) {
46
- return h(), k("view", {
47
- class: v(n.classes),
48
- onClick: e[0] || (e[0] = (a) => n.handlePannel(n.pannelKey))
49
- }, S(n.name), 3);
59
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
60
+ return openBlock(), createElementBlock("view", {
61
+ class: normalizeClass(_ctx.classes),
62
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
63
+ }, toDisplayString(_ctx.name), 3);
50
64
  }
51
- const R = /* @__PURE__ */ x(P, [["render", b]]);
65
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
52
66
  export {
53
- R as default
67
+ index as default
54
68
  };