@nutui/nutui 4.0.10-beta.1 → 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 (160) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +6550 -8291
  4. package/dist/nutui.umd.js +1 -1
  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 +95 -150
  59. package/dist/packages/_es/MenuItem.js +109 -154
  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 -437
  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 +123 -174
  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/smartips/web-types.json +1 -1
  126. package/dist/style.css +1 -1
  127. package/dist/styles/themes/default.scss +154 -51
  128. package/dist/styles/themes/jdb.scss +154 -51
  129. package/dist/styles/themes/jddkh.scss +154 -51
  130. package/dist/styles/themes/jdt.scss +154 -51
  131. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  132. package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
  133. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  134. package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
  135. package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
  136. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  137. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
  138. package/dist/types/__VUE/table/common.d.ts +55 -2
  139. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
  140. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  141. package/dist/types/index.d.ts +1 -1
  142. package/package.json +2 -2
  143. package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
  144. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
  145. package/dist/packages/_es/common-b9a5e726.js +0 -145
  146. package/dist/packages/_es/component-81a4c1d0.js +0 -145
  147. package/dist/packages/_es/index-29892cda.js +0 -33
  148. package/dist/packages/_es/index-43c34ac6.js +0 -30
  149. package/dist/packages/_es/index-54d03fc1.js +0 -8
  150. package/dist/packages/_es/index-79c5dc33.js +0 -10
  151. package/dist/packages/_es/index-7a7385e4.js +0 -67
  152. package/dist/packages/_es/index-87422be8.js +0 -942
  153. package/dist/packages/_es/index-da0a7662.js +0 -259
  154. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
  155. package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
  156. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
  157. package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
  158. package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
  159. package/dist/packages/_es/raf-729dad54.js +0 -25
  160. package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
@@ -1,30 +1,22 @@
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 { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, normalizeClass, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
21
- import { c as createComponent } from "./component-81a4c1d0.js";
22
- import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
23
- import { CircleClose } from "@nutui/icons-vue";
24
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ var D = Object.defineProperty, T = Object.defineProperties;
2
+ var j = Object.getOwnPropertyDescriptors;
3
+ var v = Object.getOwnPropertySymbols;
4
+ var z = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
5
+ var S = (e, a, n) => a in e ? D(e, a, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[a] = n, h = (e, a) => {
6
+ for (var n in a || (a = {}))
7
+ z.call(a, n) && S(e, n, a[n]);
8
+ if (v)
9
+ for (var n of v(a))
10
+ E.call(a, n) && S(e, n, a[n]);
11
+ return e;
12
+ }, C = (e, a) => T(e, j(a));
13
+ import { reactive as M, computed as b, ref as $, onMounted as O, toRefs as R, openBlock as s, createElementBlock as u, normalizeStyle as f, toDisplayString as q, createCommentVNode as o, renderSlot as i, createElementVNode as c, normalizeClass as d, withModifiers as G, withDirectives as H, createBlock as J, resolveDynamicComponent as K, vShow as P } from "vue";
14
+ import { c as Q } from "./component-234624bc.js";
15
+ import { r as U } from "./renderIcon-47498b32.js";
16
+ import { CircleClose as W } from "@nutui/icons-vue";
17
+ import { _ as X } from "./_plugin-vue_export-helper-dad06003.js";
25
18
  import "../locale/lang";
26
- const { create, translate } = createComponent("searchbar");
27
- const _sfc_main = create({
19
+ const { create: Y, translate: Z } = Q("searchbar"), _ = Y({
28
20
  props: {
29
21
  modelValue: {
30
22
  type: [String, Number],
@@ -52,11 +44,11 @@ const _sfc_main = create({
52
44
  },
53
45
  clearable: {
54
46
  type: Boolean,
55
- default: true
47
+ default: !0
56
48
  },
57
49
  clearIcon: {
58
50
  type: Object,
59
- default: () => CircleClose
51
+ default: () => W
60
52
  },
61
53
  background: {
62
54
  type: String,
@@ -72,15 +64,15 @@ const _sfc_main = create({
72
64
  },
73
65
  autofocus: {
74
66
  type: Boolean,
75
- default: false
67
+ default: !1
76
68
  },
77
69
  disabled: {
78
70
  type: Boolean,
79
- default: false
71
+ default: !1
80
72
  },
81
73
  readonly: {
82
74
  type: Boolean,
83
- default: false
75
+ default: !1
84
76
  },
85
77
  inputAlign: {
86
78
  type: String,
@@ -98,183 +90,140 @@ const _sfc_main = create({
98
90
  "click-left-icon",
99
91
  "click-right-icon"
100
92
  ],
101
- setup(props, { emit }) {
102
- const state = reactive({
103
- active: false
104
- });
105
- const searchbarStyle = computed(() => {
106
- return {
107
- background: props.background
108
- };
109
- });
110
- const inputSearchbarStyle = computed(() => {
111
- return {
112
- background: props.inputBackground
113
- };
114
- });
115
- const valueChange = (event) => {
116
- const input = event.target;
117
- let val = input.value;
118
- if (props.maxLength && val.length > Number(props.maxLength)) {
119
- val = val.slice(0, Number(props.maxLength));
120
- }
121
- emit("update:modelValue", val, event);
122
- emit("change", val, event);
123
- };
124
- const focusCss = ref({});
125
- const valueFocus = (event) => {
126
- const input = event.target;
127
- let value = input.value;
128
- state.active = true;
129
- focusCss.value = props.focusStyle;
130
- emit("focus", value, event);
131
- };
132
- const valueBlur = (event) => {
93
+ setup(e, { emit: a }) {
94
+ const n = M({
95
+ active: !1
96
+ }), p = b(() => ({
97
+ background: e.background
98
+ })), g = b(() => ({
99
+ background: e.inputBackground
100
+ })), y = (t) => {
101
+ let r = t.target.value;
102
+ e.maxLength && r.length > Number(e.maxLength) && (r = r.slice(0, Number(e.maxLength))), a("update:modelValue", r, t), a("change", r, t);
103
+ }, l = $({}), B = (t) => {
104
+ let r = t.target.value;
105
+ n.active = !0, l.value = e.focusStyle, a("focus", r, t);
106
+ }, w = (t) => {
133
107
  setTimeout(() => {
134
- state.active = false;
108
+ n.active = !1;
135
109
  }, 0);
136
- const input = event.target;
137
- let value = input.value;
138
- if (props.maxLength && value.length > Number(props.maxLength)) {
139
- value = value.slice(0, Number(props.maxLength));
140
- }
141
- focusCss.value = {};
142
- emit("blur", value, event);
143
- };
144
- const handleClear = (event) => {
145
- emit("update:modelValue", "", event);
146
- emit("change", "", event);
147
- emit("clear", "");
148
- };
149
- const handleSubmit = () => {
150
- emit("search", props.modelValue);
151
- };
152
- const clickInput = (event) => {
153
- emit("click-input", event);
154
- };
155
- const leftIconClick = (event) => {
156
- emit("click-left-icon", props.modelValue, event);
157
- };
158
- const rightIconClick = (event) => {
159
- emit("click-right-icon", props.modelValue, event);
160
- };
161
- const styleSearchbar = computed(() => {
162
- const style = {
163
- textAlign: props.inputAlign
164
- };
165
- return style;
166
- });
167
- const inputsearch = ref(null);
168
- onMounted(() => {
169
- if (props.autofocus) {
170
- inputsearch.value.focus();
171
- }
172
- });
173
- return __spreadProps(__spreadValues({
174
- renderIcon,
175
- inputsearch
176
- }, toRefs(state)), {
177
- valueChange,
178
- valueFocus,
179
- valueBlur,
180
- handleClear,
181
- handleSubmit,
182
- searchbarStyle,
183
- inputSearchbarStyle,
184
- focusCss,
185
- translate,
186
- clickInput,
187
- leftIconClick,
188
- rightIconClick,
189
- styleSearchbar
110
+ let r = t.target.value;
111
+ e.maxLength && r.length > Number(e.maxLength) && (r = r.slice(0, Number(e.maxLength))), l.value = {}, a("blur", r, t);
112
+ }, I = (t) => {
113
+ a("update:modelValue", "", t), a("change", "", t), a("clear", "");
114
+ }, V = () => {
115
+ a("search", e.modelValue);
116
+ }, L = (t) => {
117
+ a("click-input", t);
118
+ }, N = (t) => {
119
+ a("click-left-icon", e.modelValue, t);
120
+ }, F = (t) => {
121
+ a("click-right-icon", e.modelValue, t);
122
+ }, A = b(() => ({
123
+ textAlign: e.inputAlign
124
+ })), m = $(null);
125
+ return O(() => {
126
+ e.autofocus && m.value.focus();
127
+ }), C(h({
128
+ renderIcon: U,
129
+ inputsearch: m
130
+ }, R(n)), {
131
+ valueChange: y,
132
+ valueFocus: B,
133
+ valueBlur: w,
134
+ handleClear: I,
135
+ handleSubmit: V,
136
+ searchbarStyle: p,
137
+ inputSearchbarStyle: g,
138
+ focusCss: l,
139
+ translate: Z,
140
+ clickInput: L,
141
+ leftIconClick: N,
142
+ rightIconClick: F,
143
+ styleSearchbar: A
190
144
  });
191
145
  }
192
- });
193
- const _hoisted_1 = {
146
+ }), x = {
194
147
  key: 0,
195
148
  class: "nut-searchbar__search-label"
196
- };
197
- const _hoisted_2 = {
149
+ }, ee = {
198
150
  key: 1,
199
151
  class: "nut-searchbar__search-icon nut-searchbar__left-search-icon"
200
- };
201
- const _hoisted_3 = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"];
202
- const _hoisted_4 = {
152
+ }, ae = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"], te = {
203
153
  key: 1,
204
154
  class: "nut-searchbar__search-icon nut-searchbar__iptright-search-icon"
205
- };
206
- const _hoisted_5 = {
155
+ }, le = {
207
156
  key: 2,
208
157
  class: "nut-searchbar__search-icon nut-searchbar__right-search-icon"
209
158
  };
210
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
211
- return openBlock(), createElementBlock("view", {
159
+ function ne(e, a, n, p, g, y) {
160
+ return s(), u("view", {
212
161
  class: "nut-searchbar",
213
- style: normalizeStyle(_ctx.searchbarStyle)
162
+ style: f(e.searchbarStyle)
214
163
  }, [
215
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
216
- _ctx.$slots.leftout ? (openBlock(), createElementBlock("view", _hoisted_2, [
217
- renderSlot(_ctx.$slots, "leftout")
218
- ])) : createCommentVNode("", true),
219
- createElementVNode("view", {
220
- class: normalizeClass([`nut-searchbar__search-input`, _ctx.shape]),
221
- style: normalizeStyle(__spreadValues(__spreadValues({}, _ctx.inputSearchbarStyle), _ctx.focusCss))
164
+ e.label ? (s(), u("span", x, q(e.label), 1)) : o("", !0),
165
+ e.$slots.leftout ? (s(), u("view", ee, [
166
+ i(e.$slots, "leftout")
167
+ ])) : o("", !0),
168
+ c("view", {
169
+ class: d(["nut-searchbar__search-input", e.shape]),
170
+ style: f(h(h({}, e.inputSearchbarStyle), e.focusCss))
222
171
  }, [
223
- _ctx.$slots.leftin ? (openBlock(), createElementBlock("view", {
172
+ e.$slots.leftin ? (s(), u("view", {
224
173
  key: 0,
225
174
  class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon",
226
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.leftIconClick && _ctx.leftIconClick(...args))
175
+ onClick: a[0] || (a[0] = (...l) => e.leftIconClick && e.leftIconClick(...l))
227
176
  }, [
228
- renderSlot(_ctx.$slots, "leftin")
229
- ])) : createCommentVNode("", true),
230
- createElementVNode("view", {
231
- class: normalizeClass(["nut-searchbar__input-inner", _ctx.$slots.rightin && "nut-searchbar__input-inner-absolute"])
177
+ i(e.$slots, "leftin")
178
+ ])) : o("", !0),
179
+ c("view", {
180
+ class: d(["nut-searchbar__input-inner", e.$slots.rightin && "nut-searchbar__input-inner-absolute"])
232
181
  }, [
233
- createElementVNode("form", {
182
+ c("form", {
234
183
  class: "nut-searchbar__input-form",
235
184
  action: "#",
236
- onSubmit: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleSubmit && _ctx.handleSubmit(...args), ["prevent"]))
185
+ onSubmit: a[5] || (a[5] = G((...l) => e.handleSubmit && e.handleSubmit(...l), ["prevent"]))
237
186
  }, [
238
- createElementVNode("input", {
187
+ c("input", {
239
188
  ref: "inputsearch",
240
- class: normalizeClass(["nut-searchbar__input-bar", _ctx.clearable && "nut-searchbar__input-bar_clear"]),
241
- type: _ctx.inputType,
242
- maxlength: _ctx.maxLength,
243
- placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
244
- value: _ctx.modelValue,
245
- disabled: _ctx.disabled,
246
- readonly: _ctx.readonly,
247
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.clickInput && _ctx.clickInput(...args)),
248
- onInput: _cache[2] || (_cache[2] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
249
- onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
250
- onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args)),
251
- style: normalizeStyle(_ctx.styleSearchbar)
252
- }, null, 46, _hoisted_3)
189
+ class: d(["nut-searchbar__input-bar", e.clearable && "nut-searchbar__input-bar_clear"]),
190
+ type: e.inputType,
191
+ maxlength: e.maxLength,
192
+ placeholder: e.placeholder || e.translate("placeholder"),
193
+ value: e.modelValue,
194
+ disabled: e.disabled,
195
+ readonly: e.readonly,
196
+ onClick: a[1] || (a[1] = (...l) => e.clickInput && e.clickInput(...l)),
197
+ onInput: a[2] || (a[2] = (...l) => e.valueChange && e.valueChange(...l)),
198
+ onFocus: a[3] || (a[3] = (...l) => e.valueFocus && e.valueFocus(...l)),
199
+ onBlur: a[4] || (a[4] = (...l) => e.valueBlur && e.valueBlur(...l)),
200
+ style: f(e.styleSearchbar)
201
+ }, null, 46, ae)
253
202
  ], 32)
254
203
  ], 2),
255
- createElementVNode("view", {
256
- class: normalizeClass(["nut-searchbar__input-inner-icon", _ctx.$slots.rightin && "nut-searchbar__input-inner-icon-absolute"])
204
+ c("view", {
205
+ class: d(["nut-searchbar__input-inner-icon", e.$slots.rightin && "nut-searchbar__input-inner-icon-absolute"])
257
206
  }, [
258
- _ctx.clearable ? withDirectives((openBlock(), createElementBlock("view", {
207
+ e.clearable ? H((s(), u("view", {
259
208
  key: 0,
260
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.handleClear && _ctx.handleClear(...args)),
209
+ onClick: a[6] || (a[6] = (...l) => e.handleClear && e.handleClear(...l)),
261
210
  class: "nut-searchbar__search-icon nut-searchbar__input-clear"
262
211
  }, [
263
- _ctx.$slots["clear-icon"] ? renderSlot(_ctx.$slots, "clear-icon", { key: 0 }) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.clearIcon)), { key: 1 }))
212
+ e.$slots["clear-icon"] ? i(e.$slots, "clear-icon", { key: 0 }) : (s(), J(K(e.renderIcon(e.clearIcon)), { key: 1 }))
264
213
  ], 512)), [
265
- [vShow, String(_ctx.modelValue).length > 0]
266
- ]) : createCommentVNode("", true),
267
- _ctx.$slots.rightin ? (openBlock(), createElementBlock("view", _hoisted_4, [
268
- renderSlot(_ctx.$slots, "rightin")
269
- ])) : createCommentVNode("", true)
214
+ [P, String(e.modelValue).length > 0]
215
+ ]) : o("", !0),
216
+ e.$slots.rightin ? (s(), u("view", te, [
217
+ i(e.$slots, "rightin")
218
+ ])) : o("", !0)
270
219
  ], 2)
271
220
  ], 6),
272
- _ctx.$slots.rightout ? (openBlock(), createElementBlock("view", _hoisted_5, [
273
- renderSlot(_ctx.$slots, "rightout")
274
- ])) : createCommentVNode("", true)
221
+ e.$slots.rightout ? (s(), u("view", le, [
222
+ i(e.$slots, "rightout")
223
+ ])) : o("", !0)
275
224
  ], 4);
276
225
  }
277
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
226
+ const de = /* @__PURE__ */ X(_, [["render", ne]]);
278
227
  export {
279
- index as default
228
+ de as default
280
229
  };
@@ -1,15 +1,14 @@
1
- import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { P as Popup } from "./index-da0a7662.js";
4
- import { Tips } from "@nutui/icons-vue";
5
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { ref as h, computed as b, watch as w, resolveComponent as f, openBlock as r, createElementBlock as l, createVNode as v, withCtx as k, createElementVNode as n, toDisplayString as a, Fragment as C, renderList as S, createCommentVNode as g } from "vue";
2
+ import { c as _ } from "./component-234624bc.js";
3
+ import { P as y } from "./index-360c5092.js";
4
+ import { Tips as T } from "@nutui/icons-vue";
5
+ import { _ as V } from "./_plugin-vue_export-helper-dad06003.js";
6
6
  import "../locale/lang";
7
7
  import "./Overlay.js";
8
- const { create, translate } = createComponent("short-password");
9
- const _sfc_main = create({
8
+ const { create: O, translate: N } = _("short-password"), B = O({
10
9
  components: {
11
- [Popup.name]: Popup,
12
- Tips
10
+ [y.name]: y,
11
+ Tips: T
13
12
  },
14
13
  props: {
15
14
  title: {
@@ -26,7 +25,7 @@ const _sfc_main = create({
26
25
  },
27
26
  visible: {
28
27
  type: Boolean,
29
- default: false
28
+ default: !1
30
29
  },
31
30
  modelValue: {
32
31
  type: String,
@@ -38,7 +37,7 @@ const _sfc_main = create({
38
37
  },
39
38
  closeOnClickOverlay: {
40
39
  type: Boolean,
41
- default: true
40
+ default: !0
42
41
  },
43
42
  length: {
44
43
  type: [String, Number],
@@ -47,120 +46,97 @@ const _sfc_main = create({
47
46
  }
48
47
  },
49
48
  emits: ["update:modelValue", "update:visible", "complete", "tips", "close", "focus"],
50
- setup(props, { emit }) {
51
- const realInput = ref(props.modelValue);
52
- const comLen = computed(() => range(Number(props.length)));
53
- const show = ref(props.visible);
54
- const onTouchStart = (event) => {
55
- event.stopPropagation();
56
- emit("focus");
49
+ setup(e, { emit: t }) {
50
+ const p = h(e.modelValue), u = b(() => i(Number(e.length))), c = h(e.visible), m = (s) => {
51
+ s.stopPropagation(), t("focus");
57
52
  };
58
- watch(
59
- () => props.visible,
60
- (value) => {
61
- show.value = value;
53
+ w(
54
+ () => e.visible,
55
+ (s) => {
56
+ c.value = s;
62
57
  }
63
- );
64
- watch(
65
- () => props.modelValue,
66
- (value) => {
67
- realInput.value = value;
68
- if (String(value).length === comLen.value) {
69
- emit("complete", value);
70
- }
58
+ ), w(
59
+ () => e.modelValue,
60
+ (s) => {
61
+ p.value = s, String(s).length === u.value && t("complete", s);
71
62
  }
72
63
  );
73
- const close = () => {
74
- emit("update:visible", false);
75
- emit("close");
76
- };
77
- const range = (val) => {
78
- return Math.min(Math.max(4, val), 6);
79
- };
80
- const onTips = () => {
81
- emit("tips");
82
- };
64
+ const d = () => {
65
+ t("update:visible", !1), t("close");
66
+ }, i = (s) => Math.min(Math.max(4, s), 6);
83
67
  return {
84
- comLen,
85
- realInput,
86
- onTouchStart,
87
- range,
88
- close,
89
- onTips,
90
- show,
91
- translate
68
+ comLen: u,
69
+ realInput: p,
70
+ onTouchStart: m,
71
+ range: i,
72
+ close: d,
73
+ onTips: () => {
74
+ t("tips");
75
+ },
76
+ show: c,
77
+ translate: N
92
78
  };
93
79
  }
94
- });
95
- const _hoisted_1 = { class: "nut-short-password-title" };
96
- const _hoisted_2 = { class: "nut-short-password-subtitle" };
97
- const _hoisted_3 = { class: "nut-short-password-wrapper" };
98
- const _hoisted_4 = {
80
+ }), I = { class: "nut-short-password-title" }, M = { class: "nut-short-password-subtitle" }, $ = { class: "nut-short-password-wrapper" }, L = {
99
81
  key: 0,
100
82
  class: "nut-short-password__item-icon"
101
- };
102
- const _hoisted_5 = { class: "nut-short-password__message" };
103
- const _hoisted_6 = { class: "nut-short-password--error" };
104
- const _hoisted_7 = {
83
+ }, P = { class: "nut-short-password__message" }, A = { class: "nut-short-password--error" }, D = {
105
84
  key: 0,
106
85
  class: "nut-short-password--forget"
107
86
  };
108
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
109
- const _component_tips = resolveComponent("tips");
110
- const _component_nut_popup = resolveComponent("nut-popup");
111
- return openBlock(), createElementBlock("view", null, [
112
- createVNode(_component_nut_popup, {
87
+ function E(e, t, p, u, c, m) {
88
+ const d = f("tips"), i = f("nut-popup");
89
+ return r(), l("view", null, [
90
+ v(i, {
113
91
  style: {
114
92
  padding: "30px 24px 20px 24px",
115
93
  borderRadius: "12px",
116
94
  textAlign: "center",
117
95
  top: "45%"
118
96
  },
119
- visible: _ctx.show,
120
- "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.show = $event),
121
- closeable: true,
122
- onClickCloseIcon: _ctx.close,
123
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
124
- onClickOverlay: _ctx.close,
125
- teleportDisable: false
97
+ visible: e.show,
98
+ "onUpdate:visible": t[2] || (t[2] = (o) => e.show = o),
99
+ closeable: !0,
100
+ onClickCloseIcon: e.close,
101
+ "close-on-click-overlay": e.closeOnClickOverlay,
102
+ onClickOverlay: e.close,
103
+ teleportDisable: !1
126
104
  }, {
127
- default: withCtx(() => [
128
- createElementVNode("view", _hoisted_1, toDisplayString(_ctx.title || _ctx.translate("title")), 1),
129
- createElementVNode("view", _hoisted_2, toDisplayString(_ctx.desc || _ctx.translate("desc")), 1),
130
- createElementVNode("div", _hoisted_3, [
131
- createElementVNode("view", {
105
+ default: k(() => [
106
+ n("view", I, a(e.title || e.translate("title")), 1),
107
+ n("view", M, a(e.desc || e.translate("desc")), 1),
108
+ n("div", $, [
109
+ n("view", {
132
110
  class: "nut-short-password__list",
133
- onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args))
111
+ onTouchstart: t[0] || (t[0] = (...o) => e.onTouchStart && e.onTouchStart(...o))
134
112
  }, [
135
- (openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen, index2) => {
136
- return openBlock(), createElementBlock("view", {
137
- class: "nut-short-password__item",
138
- key: index2
139
- }, [
140
- String(_ctx.realInput).length > index2 ? (openBlock(), createElementBlock("view", _hoisted_4)) : createCommentVNode("", true)
141
- ]);
142
- }), 128))
113
+ (r(!0), l(C, null, S(new Array(e.comLen), (o, s) => (r(), l("view", {
114
+ class: "nut-short-password__item",
115
+ key: s
116
+ }, [
117
+ String(e.realInput).length > s ? (r(), l("view", L)) : g("", !0)
118
+ ]))), 128))
143
119
  ], 32)
144
120
  ]),
145
- createElementVNode("view", _hoisted_5, [
146
- createElementVNode("view", _hoisted_6, toDisplayString(_ctx.errorMsg), 1),
147
- _ctx.tips || _ctx.translate("tips") ? (openBlock(), createElementBlock("view", _hoisted_7, [
148
- createVNode(_component_tips, {
121
+ n("view", P, [
122
+ n("view", A, a(e.errorMsg), 1),
123
+ e.tips || e.translate("tips") ? (r(), l("view", D, [
124
+ v(d, {
149
125
  class: "icon",
150
126
  width: "11px",
151
127
  height: "11px"
152
128
  }),
153
- createElementVNode("view", {
154
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onTips && _ctx.onTips(...args))
155
- }, toDisplayString(_ctx.tips || _ctx.translate("tips")), 1)
156
- ])) : createCommentVNode("", true)
129
+ n("view", {
130
+ onClick: t[1] || (t[1] = (...o) => e.onTips && e.onTips(...o))
131
+ }, a(e.tips || e.translate("tips")), 1)
132
+ ])) : g("", !0)
157
133
  ])
158
134
  ]),
159
135
  _: 1
160
136
  }, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay"])
161
137
  ]);
162
138
  }
163
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
139
+ const H = /* @__PURE__ */ V(B, [["render", E]]);
164
140
  export {
165
- index as default
141
+ H as default
166
142
  };