@nutui/nutui 4.0.9 → 4.0.10

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 (168) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +15382 -0
  4. package/dist/nutui.umd.js +1 -7
  5. package/dist/packages/_es/ActionSheet.js +78 -111
  6. package/dist/packages/_es/Address.js +250 -375
  7. package/dist/packages/_es/AddressList.js +269 -354
  8. package/dist/packages/_es/Animate.js +41 -58
  9. package/dist/packages/_es/Audio.js +128 -197
  10. package/dist/packages/_es/AudioOperate.js +60 -71
  11. package/dist/packages/_es/Avatar.js +66 -89
  12. package/dist/packages/_es/AvatarGroup.js +23 -31
  13. package/dist/packages/_es/Backtop.js +59 -99
  14. package/dist/packages/_es/Badge.js +36 -47
  15. package/dist/packages/_es/Barrage.js +68 -147
  16. package/dist/packages/_es/Button.js +47 -66
  17. package/dist/packages/_es/Calendar.js +135 -157
  18. package/dist/packages/_es/CalendarItem.js +6 -6
  19. package/dist/packages/_es/Card.js +42 -56
  20. package/dist/packages/_es/Cascader.js +315 -474
  21. package/dist/packages/_es/Category.js +29 -39
  22. package/dist/packages/_es/CategoryPane.js +57 -83
  23. package/dist/packages/_es/Cell.js +56 -71
  24. package/dist/packages/_es/CellGroup.js +19 -27
  25. package/dist/packages/_es/Checkbox.js +109 -156
  26. package/dist/packages/_es/CheckboxGroup.js +38 -59
  27. package/dist/packages/_es/CircleProgress.js +67 -96
  28. package/dist/packages/_es/Col.js +23 -31
  29. package/dist/packages/_es/Collapse.js +33 -58
  30. package/dist/packages/_es/CollapseItem.js +78 -108
  31. package/dist/packages/_es/Comment.js +207 -279
  32. package/dist/packages/_es/ConfigProvider.js +37 -55
  33. package/dist/packages/_es/Countdown.js +100 -212
  34. package/dist/packages/_es/Countup.js +232 -445
  35. package/dist/packages/_es/DatePicker.js +162 -265
  36. package/dist/packages/_es/Dialog.js +161 -213
  37. package/dist/packages/_es/Divider.js +42 -57
  38. package/dist/packages/_es/Drag.js +70 -153
  39. package/dist/packages/_es/Ecard.js +64 -104
  40. package/dist/packages/_es/Elevator.js +143 -219
  41. package/dist/packages/_es/Ellipsis.js +95 -178
  42. package/dist/packages/_es/Empty.js +23 -39
  43. package/dist/packages/_es/FixedNav.js +93 -116
  44. package/dist/packages/_es/Form.js +107 -178
  45. package/dist/packages/_es/FormItem.js +48 -61
  46. package/dist/packages/_es/Grid.js +5 -6
  47. package/dist/packages/_es/GridItem.js +58 -84
  48. package/dist/packages/_es/Image.js +90 -129
  49. package/dist/packages/_es/ImagePreview.js +256 -412
  50. package/dist/packages/_es/Indicator.js +30 -34
  51. package/dist/packages/_es/InfiniteLoading.js +83 -136
  52. package/dist/packages/_es/Input.js +160 -264
  53. package/dist/packages/_es/InputNumber.js +81 -117
  54. package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
  55. package/dist/packages/_es/Invoice.js +104 -130
  56. package/dist/packages/_es/Layout.js +3 -4
  57. package/dist/packages/_es/List.js +117 -215
  58. package/dist/packages/_es/Menu.js +96 -152
  59. package/dist/packages/_es/MenuItem.js +117 -172
  60. package/dist/packages/_es/Navbar.js +103 -119
  61. package/dist/packages/_es/Noticebar.js +197 -312
  62. package/dist/packages/_es/Notify.js +110 -166
  63. package/dist/packages/_es/NumberKeyboard.js +127 -202
  64. package/dist/packages/_es/Overlay.js +52 -80
  65. package/dist/packages/_es/Pagination.js +70 -100
  66. package/dist/packages/_es/Picker.js +275 -441
  67. package/dist/packages/_es/Popover.js +122 -225
  68. package/dist/packages/_es/Popup.js +4 -4
  69. package/dist/packages/_es/Price.js +44 -82
  70. package/dist/packages/_es/Progress.js +63 -79
  71. package/dist/packages/_es/PullRefresh.js +95 -173
  72. package/dist/packages/_es/Radio.js +4 -4
  73. package/dist/packages/_es/RadioGroup.js +3 -3
  74. package/dist/packages/_es/Range.js +204 -347
  75. package/dist/packages/_es/Rate.js +92 -141
  76. package/dist/packages/_es/Row.js +21 -27
  77. package/dist/packages/_es/Searchbar.js +130 -179
  78. package/dist/packages/_es/ShortPassword.js +69 -93
  79. package/dist/packages/_es/SideNavbar.js +49 -80
  80. package/dist/packages/_es/SideNavbarItem.js +22 -32
  81. package/dist/packages/_es/Signature.js +83 -146
  82. package/dist/packages/_es/Skeleton.js +110 -130
  83. package/dist/packages/_es/Sku.js +250 -343
  84. package/dist/packages/_es/Step.js +59 -86
  85. package/dist/packages/_es/Steps.js +26 -31
  86. package/dist/packages/_es/Sticky.js +4 -4
  87. package/dist/packages/_es/SubSideNavbar.js +52 -74
  88. package/dist/packages/_es/Swipe.js +83 -155
  89. package/dist/packages/_es/Swiper.js +174 -311
  90. package/dist/packages/_es/SwiperItem.js +28 -44
  91. package/dist/packages/_es/Switch.js +55 -68
  92. package/dist/packages/_es/TabPane.js +30 -41
  93. package/dist/packages/_es/Tabbar.js +41 -52
  94. package/dist/packages/_es/TabbarItem.js +61 -82
  95. package/dist/packages/_es/Table.js +109 -165
  96. package/dist/packages/_es/Tabs.js +240 -388
  97. package/dist/packages/_es/Tag.js +44 -61
  98. package/dist/packages/_es/Textarea.js +80 -124
  99. package/dist/packages/_es/TimeDetail.js +49 -76
  100. package/dist/packages/_es/TimePannel.js +34 -48
  101. package/dist/packages/_es/TimeSelect.js +47 -68
  102. package/dist/packages/_es/Toast.js +144 -218
  103. package/dist/packages/_es/Tour.js +138 -192
  104. package/dist/packages/_es/TrendArrow.js +57 -77
  105. package/dist/packages/_es/Uploader.js +234 -359
  106. package/dist/packages/_es/Video.js +191 -316
  107. package/dist/packages/_es/Watermark.js +84 -117
  108. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
  109. package/dist/packages/_es/common-d218746f.js +116 -0
  110. package/dist/packages/_es/component-234624bc.js +89 -0
  111. package/dist/packages/_es/index-14dfadc4.js +561 -0
  112. package/dist/packages/_es/index-192a3ef6.js +29 -0
  113. package/dist/packages/_es/index-360c5092.js +210 -0
  114. package/dist/packages/_es/index-496e6e05.js +24 -0
  115. package/dist/packages/_es/index-50eed3d9.js +7 -0
  116. package/dist/packages/_es/index-53ec2d4d.js +34 -0
  117. package/dist/packages/_es/index-fadb0974.js +8 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
  120. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
  121. package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
  122. package/dist/packages/_es/pxCheck-38173291.js +4 -0
  123. package/dist/packages/_es/raf-a74f1a06.js +16 -0
  124. package/dist/packages/_es/renderIcon-47498b32.js +5 -0
  125. package/dist/packages/col/index.scss +2 -2
  126. package/dist/packages/menuitem/index.scss +7 -10
  127. package/dist/packages/searchbar/index.scss +4 -0
  128. package/dist/smartips/web-types.json +2 -2
  129. package/dist/style.css +1 -1
  130. package/dist/styles/themes/default.scss +158 -55
  131. package/dist/styles/themes/jdb.scss +158 -55
  132. package/dist/styles/themes/jddkh.scss +158 -55
  133. package/dist/styles/themes/jdt.scss +158 -55
  134. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  135. package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
  136. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  137. package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
  138. package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
  139. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  140. package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
  141. package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
  142. package/dist/types/__VUE/row/index.vue.d.ts +1 -1
  143. package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
  144. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/table/common.d.ts +55 -2
  147. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
  148. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  149. package/dist/types/index.d.ts +1 -1
  150. package/package.json +2 -2
  151. package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
  152. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
  153. package/dist/packages/_es/common-b9a5e726.js +0 -145
  154. package/dist/packages/_es/component-81a4c1d0.js +0 -145
  155. package/dist/packages/_es/index-29892cda.js +0 -33
  156. package/dist/packages/_es/index-43c34ac6.js +0 -30
  157. package/dist/packages/_es/index-54d03fc1.js +0 -8
  158. package/dist/packages/_es/index-79c5dc33.js +0 -10
  159. package/dist/packages/_es/index-7a7385e4.js +0 -67
  160. package/dist/packages/_es/index-87422be8.js +0 -942
  161. package/dist/packages/_es/index-da0a7662.js +0 -259
  162. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
  163. package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
  164. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
  165. package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
  166. package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
  167. package/dist/packages/_es/raf-729dad54.js +0 -25
  168. package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
@@ -1,50 +1,29 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
1
+ var D = Object.defineProperty;
2
+ var b = Object.getOwnPropertySymbols;
3
+ var P = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
4
+ var C = (e, n, o) => n in e ? D(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, k = (e, n) => {
5
+ for (var o in n || (n = {}))
6
+ P.call(n, o) && C(e, o, n[o]);
7
+ if (b)
8
+ for (var o of b(n))
9
+ W.call(n, o) && C(e, o, n[o]);
10
+ return e;
16
11
  };
17
- import { ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, createCommentVNode, withDirectives, createVNode, mergeProps, vShow } from "vue";
18
- import { c as createComponent } from "./component-81a4c1d0.js";
19
- import { MaskClose } from "@nutui/icons-vue";
20
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
12
+ import { ref as w, reactive as O, computed as S, watch as j, onMounted as G, h as H, resolveComponent as J, openBlock as f, createElementBlock as g, normalizeClass as K, createElementVNode as s, renderSlot as p, createBlock as Q, resolveDynamicComponent as R, normalizeStyle as U, toDisplayString as V, createTextVNode as X, createCommentVNode as B, withDirectives as Y, createVNode as Z, mergeProps as x, vShow as _ } from "vue";
13
+ import { c as ee } from "./component-234624bc.js";
14
+ import { MaskClose as te } from "@nutui/icons-vue";
15
+ import { _ as ne } from "./_plugin-vue_export-helper-dad06003.js";
21
16
  import "../locale/lang";
22
- function trimExtraChar(value, char, regExp) {
23
- const index2 = value.indexOf(char);
24
- if (index2 === -1) {
25
- return value;
26
- }
27
- if (char === "-" && index2 !== 0) {
28
- return value.slice(0, index2);
29
- }
30
- return value.slice(0, index2 + 1) + value.slice(index2).replace(regExp, "");
17
+ function v(e, n, o) {
18
+ const l = e.indexOf(n);
19
+ return l === -1 ? e : n === "-" && l !== 0 ? e.slice(0, l) : e.slice(0, l + 1) + e.slice(l).replace(o, "");
31
20
  }
32
- function formatNumber(value, allowDot = true, allowMinus = true) {
33
- if (allowDot) {
34
- value = trimExtraChar(value, ".", /\./g);
35
- } else {
36
- value = value.split(".")[0];
37
- }
38
- if (allowMinus) {
39
- value = trimExtraChar(value, "-", /-/g);
40
- } else {
41
- value = value.replace(/-/, "");
42
- }
43
- const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
44
- return value.replace(regExp, "");
21
+ function L(e, n = !0, o = !0) {
22
+ n ? e = v(e, ".", /\./g) : e = e.split(".")[0], o ? e = v(e, "-", /-/g) : e = e.replace(/-/, "");
23
+ const l = n ? /[^-0-9.]/g : /[^-0-9]/g;
24
+ return e.replace(l, "");
45
25
  }
46
- const { componentName, create } = createComponent("input");
47
- const _sfc_main = create({
26
+ const { componentName: oe, create: le } = ee("input"), ae = le({
48
27
  props: {
49
28
  type: {
50
29
  type: String,
@@ -64,15 +43,15 @@ const _sfc_main = create({
64
43
  },
65
44
  required: {
66
45
  type: Boolean,
67
- default: false
46
+ default: !1
68
47
  },
69
48
  disabled: {
70
49
  type: Boolean,
71
- default: false
50
+ default: !1
72
51
  },
73
52
  readonly: {
74
53
  type: Boolean,
75
- default: false
54
+ default: !1
76
55
  },
77
56
  maxLength: {
78
57
  type: [String, Number],
@@ -80,7 +59,7 @@ const _sfc_main = create({
80
59
  },
81
60
  clearable: {
82
61
  type: Boolean,
83
- default: false
62
+ default: !1
84
63
  },
85
64
  clearSize: {
86
65
  type: [String, Number],
@@ -88,7 +67,7 @@ const _sfc_main = create({
88
67
  },
89
68
  border: {
90
69
  type: Boolean,
91
- default: true
70
+ default: !0
92
71
  },
93
72
  formatTrigger: {
94
73
  type: String,
@@ -100,11 +79,11 @@ const _sfc_main = create({
100
79
  },
101
80
  showWordLimit: {
102
81
  type: Boolean,
103
- default: false
82
+ default: !1
104
83
  },
105
84
  autofocus: {
106
85
  type: Boolean,
107
- default: false
86
+ default: !1
108
87
  },
109
88
  confirmType: {
110
89
  type: String,
@@ -112,264 +91,181 @@ const _sfc_main = create({
112
91
  },
113
92
  error: {
114
93
  type: Boolean,
115
- default: false
94
+ default: !1
116
95
  },
117
96
  showClearIcon: {
118
97
  type: Boolean,
119
- default: false
98
+ default: !1
120
99
  },
121
100
  class: {
122
101
  type: String,
123
102
  default: ""
124
103
  }
125
104
  },
126
- components: { MaskClose },
105
+ components: { MaskClose: te },
127
106
  emits: ["update:modelValue", "blur", "focus", "clear", "keypress", "click", "click-input"],
128
107
  expose: ["focus", "blur", "select"],
129
- setup(props, { emit, slots }) {
130
- const active = ref(false);
131
- const inputRef = ref();
132
- const getModelValue = () => {
133
- var _a;
134
- return String((_a = props.modelValue) != null ? _a : "");
135
- };
136
- const renderInput = (type) => {
137
- return h("input", __spreadValues({
138
- style: styles
139
- }, inputType(type)));
140
- };
141
- const state = reactive({
142
- focused: false,
143
- validateFailed: false,
108
+ setup(e, { emit: n, slots: o }) {
109
+ const l = w(!1), i = w(), u = () => {
110
+ var t;
111
+ return String((t = e.modelValue) != null ? t : "");
112
+ }, m = (t) => H("input", k({
113
+ style: h
114
+ }, y(t))), r = O({
115
+ focused: !1,
116
+ validateFailed: !1,
144
117
  // 校验失败
145
118
  validateMessage: ""
146
119
  // 校验信息
147
- });
148
- const classes = computed(() => {
149
- const prefixCls = componentName;
120
+ }), N = S(() => {
121
+ const t = oe;
150
122
  return {
151
- [prefixCls]: true,
152
- [`${prefixCls}--disabled`]: props.disabled,
153
- [`${prefixCls}--required`]: props.required,
154
- [`${prefixCls}--error`]: props.error,
155
- [`${prefixCls}--border`]: props.border,
156
- [props.class]: !!props.class
123
+ [t]: !0,
124
+ [`${t}--disabled`]: e.disabled,
125
+ [`${t}--required`]: e.required,
126
+ [`${t}--error`]: e.error,
127
+ [`${t}--border`]: e.border,
128
+ [e.class]: !!e.class
157
129
  };
158
- });
159
- const styles = computed(() => {
160
- return {
161
- textAlign: props.inputAlign
162
- };
163
- });
164
- const inputType = (type) => {
165
- if (type === "number") {
166
- return {
167
- type: "text"
168
- };
169
- }
170
- if (type === "digit") {
171
- return {
172
- type: "tel"
173
- };
130
+ }), h = S(() => ({
131
+ textAlign: e.inputAlign
132
+ })), y = (t) => t === "number" ? {
133
+ type: "text"
134
+ } : t === "digit" ? {
135
+ type: "tel"
136
+ } : { type: t }, $ = (t) => {
137
+ if (!t.target.composing) {
138
+ let a = t.target.value;
139
+ e.maxLength && a.length > Number(e.maxLength) && (a = a.slice(0, Number(e.maxLength))), d(a);
174
140
  }
175
- return { type };
176
- };
177
- const onInput = (event) => {
178
- if (!event.target.composing) {
179
- const input = event.target;
180
- let value = input.value;
181
- if (props.maxLength && value.length > Number(props.maxLength)) {
182
- value = value.slice(0, Number(props.maxLength));
183
- }
184
- updateValue(value);
185
- }
186
- };
187
- const updateValue = (value, trigger = "onChange") => {
188
- var _a;
189
- if (props.type === "digit") {
190
- value = formatNumber(value, false, false);
191
- }
192
- if (props.type === "number") {
193
- value = formatNumber(value, true, true);
194
- }
195
- if (props.formatter && trigger === props.formatTrigger) {
196
- value = props.formatter(value);
197
- }
198
- if (((_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.value) !== value) {
199
- inputRef.value.value = value;
200
- }
201
- if (value !== props.modelValue) {
202
- emit("update:modelValue", value);
203
- }
204
- };
205
- const onFocus = (event) => {
206
- if (props.disabled || props.readonly) {
141
+ }, d = (t, c = "onChange") => {
142
+ var a;
143
+ e.type === "digit" && (t = L(t, !1, !1)), e.type === "number" && (t = L(t, !0, !0)), e.formatter && c === e.formatTrigger && (t = e.formatter(t)), ((a = i == null ? void 0 : i.value) == null ? void 0 : a.value) !== t && (i.value.value = t), t !== e.modelValue && n("update:modelValue", t);
144
+ }, T = (t) => {
145
+ if (e.disabled || e.readonly)
207
146
  return;
208
- }
209
- const input = event.target;
210
- input.value;
211
- active.value = true;
212
- emit("focus", event);
213
- };
214
- const onBlur = (event) => {
215
- if (props.disabled || props.readonly) {
147
+ t.target.value, l.value = !0, n("focus", t);
148
+ }, I = (t) => {
149
+ if (e.disabled || e.readonly)
216
150
  return;
217
- }
218
151
  setTimeout(() => {
219
- active.value = false;
152
+ l.value = !1;
220
153
  }, 200);
221
- const input = event.target;
222
- let value = input.value;
223
- if (props.maxLength && value.length > Number(props.maxLength)) {
224
- value = value.slice(0, Number(props.maxLength));
225
- }
226
- updateValue(getModelValue(), "onBlur");
227
- emit("blur", event);
228
- };
229
- const clear = (event) => {
230
- event.stopPropagation();
231
- if (props.disabled)
232
- return;
233
- emit("update:modelValue", "", event);
234
- emit("clear", "", event);
235
- };
236
- const resetValidation = () => {
237
- if (state.validateFailed) {
238
- state.validateFailed = false;
239
- state.validateMessage = "";
240
- }
241
- };
242
- const onClickInput = (event) => {
243
- if (props.disabled) {
244
- return;
245
- }
246
- emit("click-input", event);
154
+ let a = t.target.value;
155
+ e.maxLength && a.length > Number(e.maxLength) && (a = a.slice(0, Number(e.maxLength))), d(u(), "onBlur"), n("blur", t);
156
+ }, z = (t) => {
157
+ t.stopPropagation(), !e.disabled && (n("update:modelValue", "", t), n("clear", "", t));
158
+ }, F = () => {
159
+ r.validateFailed && (r.validateFailed = !1, r.validateMessage = "");
160
+ }, M = (t) => {
161
+ e.disabled || n("click-input", t);
162
+ }, E = (t) => {
163
+ n("click", t);
164
+ }, q = ({ target: t }) => {
165
+ t.composing = !0;
166
+ }, A = ({ target: t }) => {
167
+ t.composing && (t.composing = !1, t.dispatchEvent(new Event("input")));
247
168
  };
248
- const onClick = (event) => {
249
- emit("click", event);
250
- };
251
- const startComposing = ({ target }) => {
252
- target.composing = true;
253
- };
254
- const endComposing = ({ target }) => {
255
- if (target.composing) {
256
- target.composing = false;
257
- target.dispatchEvent(new Event("input"));
258
- }
259
- };
260
- watch(
261
- () => props.modelValue,
169
+ return j(
170
+ () => e.modelValue,
262
171
  () => {
263
- updateValue(getModelValue());
264
- resetValidation();
172
+ d(u()), F();
173
+ }
174
+ ), G(() => {
175
+ d(u(), e.formatTrigger);
176
+ }), {
177
+ renderInput: m,
178
+ inputRef: i,
179
+ active: l,
180
+ classes: N,
181
+ styles: h,
182
+ inputType: y,
183
+ onInput: $,
184
+ onFocus: T,
185
+ onBlur: I,
186
+ clear: z,
187
+ startComposing: q,
188
+ endComposing: A,
189
+ onClick: E,
190
+ onClickInput: M,
191
+ focus: () => {
192
+ var t;
193
+ (t = i.value) == null || t.focus();
194
+ },
195
+ blur: () => {
196
+ var t;
197
+ (t = i.value) == null || t.blur();
198
+ },
199
+ select: () => {
200
+ var t;
201
+ (t = i.value) == null || t.select();
265
202
  }
266
- );
267
- onMounted(() => {
268
- updateValue(getModelValue(), props.formatTrigger);
269
- });
270
- const focus = () => {
271
- var _a;
272
- (_a = inputRef.value) == null ? void 0 : _a.focus();
273
- };
274
- const blur = () => {
275
- var _a;
276
- (_a = inputRef.value) == null ? void 0 : _a.blur();
277
- };
278
- const select = () => {
279
- var _a;
280
- (_a = inputRef.value) == null ? void 0 : _a.select();
281
- };
282
- return {
283
- renderInput,
284
- inputRef,
285
- active,
286
- classes,
287
- styles,
288
- inputType,
289
- onInput,
290
- onFocus,
291
- onBlur,
292
- clear,
293
- startComposing,
294
- endComposing,
295
- onClick,
296
- onClickInput,
297
- focus,
298
- blur,
299
- select
300
203
  };
301
204
  }
302
- });
303
- const _hoisted_1 = { class: "nut-input-value" };
304
- const _hoisted_2 = { class: "nut-input-inner" };
305
- const _hoisted_3 = { class: "nut-input-left-box" };
306
- const _hoisted_4 = { class: "nut-input-box" };
307
- const _hoisted_5 = {
205
+ }), ie = { class: "nut-input-value" }, re = { class: "nut-input-inner" }, se = { class: "nut-input-left-box" }, ue = { class: "nut-input-box" }, de = {
308
206
  key: 0,
309
207
  class: "nut-input-word-limit"
310
- };
311
- const _hoisted_6 = { class: "nut-input-word-num" };
312
- const _hoisted_7 = { class: "nut-input-right-box" };
313
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
314
- const _component_MaskClose = resolveComponent("MaskClose");
315
- return openBlock(), createElementBlock("view", {
316
- class: normalizeClass(_ctx.classes),
317
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
208
+ }, ce = { class: "nut-input-word-num" }, fe = { class: "nut-input-right-box" };
209
+ function me(e, n, o, l, i, u) {
210
+ const m = J("MaskClose");
211
+ return f(), g("view", {
212
+ class: K(e.classes),
213
+ onClick: n[1] || (n[1] = (...r) => e.onClick && e.onClick(...r))
318
214
  }, [
319
- createElementVNode("view", _hoisted_1, [
320
- createElementVNode("view", _hoisted_2, [
321
- createElementVNode("view", _hoisted_3, [
322
- renderSlot(_ctx.$slots, "left")
215
+ s("view", ie, [
216
+ s("view", re, [
217
+ s("view", se, [
218
+ p(e.$slots, "left")
323
219
  ]),
324
- createElementVNode("view", _hoisted_4, [
325
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput(_ctx.type)), {
220
+ s("view", ue, [
221
+ (f(), Q(R(e.renderInput(e.type)), {
326
222
  class: "input-text",
327
223
  ref: "inputRef",
328
- style: normalizeStyle(_ctx.styles),
329
- maxlength: _ctx.maxLength,
330
- placeholder: _ctx.placeholder,
331
- disabled: _ctx.disabled,
332
- readonly: _ctx.readonly,
333
- value: _ctx.modelValue,
334
- formatTrigger: _ctx.formatTrigger,
335
- autofocus: _ctx.autofocus,
336
- enterkeyhint: _ctx.confirmType,
337
- onInput: _ctx.onInput,
338
- onFocus: _ctx.onFocus,
339
- onBlur: _ctx.onBlur,
340
- onClick: _ctx.onClickInput,
341
- onChange: _ctx.endComposing,
342
- onCompositionend: _ctx.endComposing,
343
- onCompositionstart: _ctx.startComposing
224
+ style: U(e.styles),
225
+ maxlength: e.maxLength,
226
+ placeholder: e.placeholder,
227
+ disabled: e.disabled,
228
+ readonly: e.readonly,
229
+ value: e.modelValue,
230
+ formatTrigger: e.formatTrigger,
231
+ autofocus: e.autofocus,
232
+ enterkeyhint: e.confirmType,
233
+ onInput: e.onInput,
234
+ onFocus: e.onFocus,
235
+ onBlur: e.onBlur,
236
+ onClick: e.onClickInput,
237
+ onChange: e.endComposing,
238
+ onCompositionend: e.endComposing,
239
+ onCompositionstart: e.startComposing
344
240
  }, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick", "onChange", "onCompositionend", "onCompositionstart"])),
345
- _ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_5, [
346
- createElementVNode("span", _hoisted_6, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0), 1),
347
- createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
348
- ])) : createCommentVNode("", true)
241
+ e.showWordLimit && e.maxLength ? (f(), g("view", de, [
242
+ s("span", ce, V(e.modelValue ? e.modelValue.length : 0), 1),
243
+ X("/" + V(e.maxLength), 1)
244
+ ])) : B("", !0)
349
245
  ]),
350
- _ctx.clearable && !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("view", {
246
+ e.clearable && !e.readonly ? Y((f(), g("view", {
351
247
  key: 0,
352
248
  class: "nut-input-clear-box",
353
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clear && _ctx.clear(...args))
249
+ onClick: n[0] || (n[0] = (...r) => e.clear && e.clear(...r))
354
250
  }, [
355
- renderSlot(_ctx.$slots, "clear", {}, () => [
356
- createVNode(_component_MaskClose, mergeProps({ class: "nut-input-clear" }, _ctx.$attrs, {
357
- size: _ctx.clearSize,
358
- width: _ctx.clearSize,
359
- height: _ctx.clearSize
251
+ p(e.$slots, "clear", {}, () => [
252
+ Z(m, x({ class: "nut-input-clear" }, e.$attrs, {
253
+ size: e.clearSize,
254
+ width: e.clearSize,
255
+ height: e.clearSize
360
256
  }), null, 16, ["size", "width", "height"])
361
257
  ])
362
258
  ], 512)), [
363
- [vShow, (_ctx.active || _ctx.showClearIcon) && _ctx.modelValue.length > 0]
364
- ]) : createCommentVNode("", true),
365
- createElementVNode("view", _hoisted_7, [
366
- renderSlot(_ctx.$slots, "right")
259
+ [_, (e.active || e.showClearIcon) && e.modelValue.length > 0]
260
+ ]) : B("", !0),
261
+ s("view", fe, [
262
+ p(e.$slots, "right")
367
263
  ])
368
264
  ])
369
265
  ])
370
266
  ], 2);
371
267
  }
372
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
268
+ const Ve = /* @__PURE__ */ ne(ae, [["render", me]]);
373
269
  export {
374
- index as default
270
+ Ve as default
375
271
  };