@nutui/nutui 4.0.10-beta.1 → 4.0.11
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 +23 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +6316 -7237
- package/dist/nutui.umd.js +1 -1
- 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 +95 -150
- package/dist/packages/_es/MenuItem.js +109 -154
- 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 -437
- 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 +123 -174
- 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/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +148 -45
- package/dist/styles/themes/jdb.scss +148 -45
- package/dist/styles/themes/jddkh.scss +148 -45
- package/dist/styles/themes/jdt.scss +148 -45
- 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/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
- 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,50 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
19
|
-
import { MaskClose } from "@nutui/icons-vue";
|
|
20
|
-
import { _ as
|
|
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
|
|
23
|
-
const
|
|
24
|
-
|
|
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
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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 } =
|
|
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:
|
|
46
|
+
default: !1
|
|
68
47
|
},
|
|
69
48
|
disabled: {
|
|
70
49
|
type: Boolean,
|
|
71
|
-
default:
|
|
50
|
+
default: !1
|
|
72
51
|
},
|
|
73
52
|
readonly: {
|
|
74
53
|
type: Boolean,
|
|
75
|
-
default:
|
|
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:
|
|
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:
|
|
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:
|
|
82
|
+
default: !1
|
|
104
83
|
},
|
|
105
84
|
autofocus: {
|
|
106
85
|
type: Boolean,
|
|
107
|
-
default:
|
|
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:
|
|
94
|
+
default: !1
|
|
116
95
|
},
|
|
117
96
|
showClearIcon: {
|
|
118
97
|
type: Boolean,
|
|
119
|
-
default:
|
|
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(
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
149
|
-
const prefixCls = componentName;
|
|
120
|
+
}), N = S(() => {
|
|
121
|
+
const t = oe;
|
|
150
122
|
return {
|
|
151
|
-
[
|
|
152
|
-
[`${
|
|
153
|
-
[`${
|
|
154
|
-
[`${
|
|
155
|
-
[`${
|
|
156
|
-
[
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
if (
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
|
|
210
|
-
|
|
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
|
-
|
|
152
|
+
l.value = !1;
|
|
220
153
|
}, 200);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
|
|
249
|
-
|
|
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
|
-
|
|
264
|
-
|
|
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
|
-
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
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
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
215
|
+
s("view", ie, [
|
|
216
|
+
s("view", re, [
|
|
217
|
+
s("view", se, [
|
|
218
|
+
p(e.$slots, "left")
|
|
323
219
|
]),
|
|
324
|
-
|
|
325
|
-
(
|
|
220
|
+
s("view", ue, [
|
|
221
|
+
(f(), Q(R(e.renderInput(e.type)), {
|
|
326
222
|
class: "input-text",
|
|
327
223
|
ref: "inputRef",
|
|
328
|
-
style:
|
|
329
|
-
maxlength:
|
|
330
|
-
placeholder:
|
|
331
|
-
disabled:
|
|
332
|
-
readonly:
|
|
333
|
-
value:
|
|
334
|
-
formatTrigger:
|
|
335
|
-
autofocus:
|
|
336
|
-
enterkeyhint:
|
|
337
|
-
onInput:
|
|
338
|
-
onFocus:
|
|
339
|
-
onBlur:
|
|
340
|
-
onClick:
|
|
341
|
-
onChange:
|
|
342
|
-
onCompositionend:
|
|
343
|
-
onCompositionstart:
|
|
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
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
])) :
|
|
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
|
-
|
|
246
|
+
e.clearable && !e.readonly ? Y((f(), g("view", {
|
|
351
247
|
key: 0,
|
|
352
248
|
class: "nut-input-clear-box",
|
|
353
|
-
onClick:
|
|
249
|
+
onClick: n[0] || (n[0] = (...r) => e.clear && e.clear(...r))
|
|
354
250
|
}, [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
size:
|
|
358
|
-
width:
|
|
359
|
-
height:
|
|
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
|
-
[
|
|
364
|
-
]) :
|
|
365
|
-
|
|
366
|
-
|
|
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
|
|
268
|
+
const Ve = /* @__PURE__ */ ne(ae, [["render", me]]);
|
|
373
269
|
export {
|
|
374
|
-
|
|
270
|
+
Ve as default
|
|
375
271
|
};
|