@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.
- package/CHANGELOG.md +17 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +15382 -0
- package/dist/nutui.umd.js +1 -7
- package/dist/packages/_es/ActionSheet.js +78 -111
- package/dist/packages/_es/Address.js +250 -375
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +41 -58
- package/dist/packages/_es/Audio.js +128 -197
- package/dist/packages/_es/AudioOperate.js +60 -71
- package/dist/packages/_es/Avatar.js +66 -89
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +36 -47
- package/dist/packages/_es/Barrage.js +68 -147
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -157
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +315 -474
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -156
- package/dist/packages/_es/CheckboxGroup.js +38 -59
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +33 -58
- package/dist/packages/_es/CollapseItem.js +78 -108
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +37 -55
- package/dist/packages/_es/Countdown.js +100 -212
- package/dist/packages/_es/Countup.js +232 -445
- package/dist/packages/_es/DatePicker.js +162 -265
- package/dist/packages/_es/Dialog.js +161 -213
- package/dist/packages/_es/Divider.js +42 -57
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +143 -219
- package/dist/packages/_es/Ellipsis.js +95 -178
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +107 -178
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +90 -129
- package/dist/packages/_es/ImagePreview.js +256 -412
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -136
- package/dist/packages/_es/Input.js +160 -264
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +104 -130
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +117 -215
- package/dist/packages/_es/Menu.js +96 -152
- package/dist/packages/_es/MenuItem.js +117 -172
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +197 -312
- package/dist/packages/_es/Notify.js +110 -166
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +52 -80
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +275 -441
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +44 -82
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +95 -173
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +204 -347
- package/dist/packages/_es/Rate.js +92 -141
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +130 -179
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -80
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -146
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +250 -343
- package/dist/packages/_es/Step.js +59 -86
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -74
- package/dist/packages/_es/Swipe.js +83 -155
- package/dist/packages/_es/Swiper.js +174 -311
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -68
- package/dist/packages/_es/TabPane.js +30 -41
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -82
- package/dist/packages/_es/Table.js +109 -165
- package/dist/packages/_es/Tabs.js +240 -388
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -76
- package/dist/packages/_es/TimePannel.js +34 -48
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +144 -218
- package/dist/packages/_es/Tour.js +138 -192
- package/dist/packages/_es/TrendArrow.js +57 -77
- package/dist/packages/_es/Uploader.js +234 -359
- package/dist/packages/_es/Video.js +191 -316
- package/dist/packages/_es/Watermark.js +84 -117
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/menuitem/index.scss +7 -10
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/smartips/web-types.json +2 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +158 -55
- package/dist/styles/themes/jdb.scss +158 -55
- package/dist/styles/themes/jddkh.scss +158 -55
- package/dist/styles/themes/jdt.scss +158 -55
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
- package/dist/types/__VUE/image/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/row/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-87422be8.js +0 -942
- package/dist/packages/_es/index-da0a7662.js +0 -259
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 } =
|
|
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],
|
|
@@ -32,12 +24,16 @@ const _sfc_main = create({
|
|
|
32
24
|
},
|
|
33
25
|
inputType: {
|
|
34
26
|
type: String,
|
|
35
|
-
default: "
|
|
27
|
+
default: "text"
|
|
36
28
|
},
|
|
37
29
|
label: {
|
|
38
30
|
type: String,
|
|
39
31
|
default: ""
|
|
40
32
|
},
|
|
33
|
+
shape: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "round"
|
|
36
|
+
},
|
|
41
37
|
maxLength: {
|
|
42
38
|
type: [String, Number],
|
|
43
39
|
default: "9999"
|
|
@@ -48,11 +44,11 @@ const _sfc_main = create({
|
|
|
48
44
|
},
|
|
49
45
|
clearable: {
|
|
50
46
|
type: Boolean,
|
|
51
|
-
default:
|
|
47
|
+
default: !0
|
|
52
48
|
},
|
|
53
49
|
clearIcon: {
|
|
54
50
|
type: Object,
|
|
55
|
-
default: () =>
|
|
51
|
+
default: () => W
|
|
56
52
|
},
|
|
57
53
|
background: {
|
|
58
54
|
type: String,
|
|
@@ -64,21 +60,19 @@ const _sfc_main = create({
|
|
|
64
60
|
},
|
|
65
61
|
focusStyle: {
|
|
66
62
|
type: Object,
|
|
67
|
-
|
|
68
|
-
default: () => {
|
|
69
|
-
}
|
|
63
|
+
default: () => ({})
|
|
70
64
|
},
|
|
71
65
|
autofocus: {
|
|
72
66
|
type: Boolean,
|
|
73
|
-
default:
|
|
67
|
+
default: !1
|
|
74
68
|
},
|
|
75
69
|
disabled: {
|
|
76
70
|
type: Boolean,
|
|
77
|
-
default:
|
|
71
|
+
default: !1
|
|
78
72
|
},
|
|
79
73
|
readonly: {
|
|
80
74
|
type: Boolean,
|
|
81
|
-
default:
|
|
75
|
+
default: !1
|
|
82
76
|
},
|
|
83
77
|
inputAlign: {
|
|
84
78
|
type: String,
|
|
@@ -96,183 +90,140 @@ const _sfc_main = create({
|
|
|
96
90
|
"click-left-icon",
|
|
97
91
|
"click-right-icon"
|
|
98
92
|
],
|
|
99
|
-
setup(
|
|
100
|
-
const
|
|
101
|
-
active:
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
})
|
|
113
|
-
const valueChange = (event) => {
|
|
114
|
-
const input = event.target;
|
|
115
|
-
let val = input.value;
|
|
116
|
-
if (props.maxLength && val.length > Number(props.maxLength)) {
|
|
117
|
-
val = val.slice(0, Number(props.maxLength));
|
|
118
|
-
}
|
|
119
|
-
emit("update:modelValue", val, event);
|
|
120
|
-
emit("change", val, event);
|
|
121
|
-
};
|
|
122
|
-
const focusCss = ref({});
|
|
123
|
-
const valueFocus = (event) => {
|
|
124
|
-
const input = event.target;
|
|
125
|
-
let value = input.value;
|
|
126
|
-
state.active = true;
|
|
127
|
-
focusCss.value = props.focusStyle;
|
|
128
|
-
emit("focus", value, event);
|
|
129
|
-
};
|
|
130
|
-
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) => {
|
|
131
107
|
setTimeout(() => {
|
|
132
|
-
|
|
108
|
+
n.active = !1;
|
|
133
109
|
}, 0);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
inputsearch.value.focus();
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
return __spreadProps(__spreadValues({
|
|
172
|
-
renderIcon,
|
|
173
|
-
inputsearch
|
|
174
|
-
}, toRefs(state)), {
|
|
175
|
-
valueChange,
|
|
176
|
-
valueFocus,
|
|
177
|
-
valueBlur,
|
|
178
|
-
handleClear,
|
|
179
|
-
handleSubmit,
|
|
180
|
-
searchbarStyle,
|
|
181
|
-
inputSearchbarStyle,
|
|
182
|
-
focusCss,
|
|
183
|
-
translate,
|
|
184
|
-
clickInput,
|
|
185
|
-
leftIconClick,
|
|
186
|
-
rightIconClick,
|
|
187
|
-
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
|
|
188
144
|
});
|
|
189
145
|
}
|
|
190
|
-
})
|
|
191
|
-
const _hoisted_1 = {
|
|
146
|
+
}), x = {
|
|
192
147
|
key: 0,
|
|
193
148
|
class: "nut-searchbar__search-label"
|
|
194
|
-
}
|
|
195
|
-
const _hoisted_2 = {
|
|
149
|
+
}, ee = {
|
|
196
150
|
key: 1,
|
|
197
151
|
class: "nut-searchbar__search-icon nut-searchbar__left-search-icon"
|
|
198
|
-
}
|
|
199
|
-
const _hoisted_3 = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"];
|
|
200
|
-
const _hoisted_4 = {
|
|
152
|
+
}, ae = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"], te = {
|
|
201
153
|
key: 1,
|
|
202
154
|
class: "nut-searchbar__search-icon nut-searchbar__iptright-search-icon"
|
|
203
|
-
}
|
|
204
|
-
const _hoisted_5 = {
|
|
155
|
+
}, le = {
|
|
205
156
|
key: 2,
|
|
206
157
|
class: "nut-searchbar__search-icon nut-searchbar__right-search-icon"
|
|
207
158
|
};
|
|
208
|
-
function
|
|
209
|
-
return
|
|
159
|
+
function ne(e, a, n, p, g, y) {
|
|
160
|
+
return s(), u("view", {
|
|
210
161
|
class: "nut-searchbar",
|
|
211
|
-
style:
|
|
162
|
+
style: f(e.searchbarStyle)
|
|
212
163
|
}, [
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
])) :
|
|
217
|
-
|
|
218
|
-
class: "nut-searchbar__search-input",
|
|
219
|
-
style:
|
|
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))
|
|
220
171
|
}, [
|
|
221
|
-
|
|
172
|
+
e.$slots.leftin ? (s(), u("view", {
|
|
222
173
|
key: 0,
|
|
223
174
|
class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon",
|
|
224
|
-
onClick:
|
|
175
|
+
onClick: a[0] || (a[0] = (...l) => e.leftIconClick && e.leftIconClick(...l))
|
|
225
176
|
}, [
|
|
226
|
-
|
|
227
|
-
])) :
|
|
228
|
-
|
|
229
|
-
class:
|
|
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"])
|
|
230
181
|
}, [
|
|
231
|
-
|
|
182
|
+
c("form", {
|
|
232
183
|
class: "nut-searchbar__input-form",
|
|
233
184
|
action: "#",
|
|
234
|
-
onSubmit:
|
|
185
|
+
onSubmit: a[5] || (a[5] = G((...l) => e.handleSubmit && e.handleSubmit(...l), ["prevent"]))
|
|
235
186
|
}, [
|
|
236
|
-
|
|
187
|
+
c("input", {
|
|
237
188
|
ref: "inputsearch",
|
|
238
|
-
class:
|
|
239
|
-
type:
|
|
240
|
-
maxlength:
|
|
241
|
-
placeholder:
|
|
242
|
-
value:
|
|
243
|
-
disabled:
|
|
244
|
-
readonly:
|
|
245
|
-
onClick:
|
|
246
|
-
onInput:
|
|
247
|
-
onFocus:
|
|
248
|
-
onBlur:
|
|
249
|
-
style:
|
|
250
|
-
}, null, 46,
|
|
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)
|
|
251
202
|
], 32)
|
|
252
203
|
], 2),
|
|
253
|
-
|
|
254
|
-
class:
|
|
204
|
+
c("view", {
|
|
205
|
+
class: d(["nut-searchbar__input-inner-icon", e.$slots.rightin && "nut-searchbar__input-inner-icon-absolute"])
|
|
255
206
|
}, [
|
|
256
|
-
|
|
207
|
+
e.clearable ? H((s(), u("view", {
|
|
257
208
|
key: 0,
|
|
258
|
-
onClick:
|
|
209
|
+
onClick: a[6] || (a[6] = (...l) => e.handleClear && e.handleClear(...l)),
|
|
259
210
|
class: "nut-searchbar__search-icon nut-searchbar__input-clear"
|
|
260
211
|
}, [
|
|
261
|
-
|
|
212
|
+
e.$slots["clear-icon"] ? i(e.$slots, "clear-icon", { key: 0 }) : (s(), J(K(e.renderIcon(e.clearIcon)), { key: 1 }))
|
|
262
213
|
], 512)), [
|
|
263
|
-
[
|
|
264
|
-
]) :
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
])) :
|
|
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)
|
|
268
219
|
], 2)
|
|
269
|
-
],
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
])) :
|
|
220
|
+
], 6),
|
|
221
|
+
e.$slots.rightout ? (s(), u("view", le, [
|
|
222
|
+
i(e.$slots, "rightout")
|
|
223
|
+
])) : o("", !0)
|
|
273
224
|
], 4);
|
|
274
225
|
}
|
|
275
|
-
const
|
|
226
|
+
const de = /* @__PURE__ */ X(_, [["render", ne]]);
|
|
276
227
|
export {
|
|
277
|
-
|
|
228
|
+
de as default
|
|
278
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
|
|
3
|
-
import { P as
|
|
4
|
-
import { Tips } from "@nutui/icons-vue";
|
|
5
|
-
import { _ as
|
|
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 } =
|
|
9
|
-
const _sfc_main = create({
|
|
8
|
+
const { create: O, translate: N } = _("short-password"), B = O({
|
|
10
9
|
components: {
|
|
11
|
-
[
|
|
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:
|
|
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:
|
|
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(
|
|
51
|
-
const
|
|
52
|
-
|
|
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
|
-
|
|
59
|
-
() =>
|
|
60
|
-
(
|
|
61
|
-
|
|
53
|
+
w(
|
|
54
|
+
() => e.visible,
|
|
55
|
+
(s) => {
|
|
56
|
+
c.value = s;
|
|
62
57
|
}
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
() =>
|
|
66
|
-
|
|
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
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
91
|
-
|
|
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
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
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:
|
|
120
|
-
"onUpdate:visible":
|
|
121
|
-
closeable:
|
|
122
|
-
onClickCloseIcon:
|
|
123
|
-
"close-on-click-overlay":
|
|
124
|
-
onClickOverlay:
|
|
125
|
-
teleportDisable:
|
|
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:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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:
|
|
111
|
+
onTouchstart: t[0] || (t[0] = (...o) => e.onTouchStart && e.onTouchStart(...o))
|
|
134
112
|
}, [
|
|
135
|
-
(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
-
|
|
154
|
-
onClick:
|
|
155
|
-
},
|
|
156
|
-
])) :
|
|
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
|
|
139
|
+
const H = /* @__PURE__ */ V(B, [["render", E]]);
|
|
164
140
|
export {
|
|
165
|
-
|
|
141
|
+
H as default
|
|
166
142
|
};
|