@opentinyvue/vue-input 2.21.0 → 3.21.0
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/lib/index.js +1 -1
- package/lib/mobile-first.js +490 -341
- package/lib/mobile.js +304 -213
- package/lib/pc.js +538 -365
- package/lib/tall-storage.js +73 -68
- package/package.json +7 -7
- package/src/index.d.ts +406 -2
- package/src/mobile-first.vue.d.ts +125 -1
- package/src/mobile.vue.d.ts +124 -1
- package/src/pc.vue.d.ts +137 -1
- package/src/tall-storage.vue.d.ts +18 -1
package/lib/mobile.js
CHANGED
|
@@ -3,38 +3,51 @@ import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
|
3
3
|
import { iconClose, iconChevronRight, iconEyeopen, iconEyeclose } from '@opentinyvue/vue-icon';
|
|
4
4
|
import ActionSheet from '@opentinyvue/vue-action-sheet';
|
|
5
5
|
import '@opentinyvue/vue-theme-mobile/input/index.css';
|
|
6
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, mergeProps, createVNode, Fragment, createBlock, resolveDynamicComponent, withModifiers } from 'vue';
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
-
var
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
9
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
10
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
11
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
12
|
+
t && (r = t);
|
|
13
|
+
var o = 0;
|
|
14
|
+
return function() {
|
|
15
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
16
|
+
};
|
|
13
17
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var originalRender = options.render;
|
|
22
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
23
|
-
hook.call(context);
|
|
24
|
-
return originalRender(h, context);
|
|
25
|
-
};
|
|
26
|
-
} else {
|
|
27
|
-
var existing = options.beforeCreate;
|
|
28
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
29
|
-
}
|
|
18
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19
|
+
}
|
|
20
|
+
function _unsupportedIterableToArray(r, a) {
|
|
21
|
+
if (r) {
|
|
22
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
23
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
24
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
30
25
|
}
|
|
31
|
-
return {
|
|
32
|
-
exports: scriptExports,
|
|
33
|
-
options
|
|
34
|
-
};
|
|
35
26
|
}
|
|
27
|
+
function _arrayLikeToArray(r, a) {
|
|
28
|
+
(null == a || a > r.length) && (a = r.length);
|
|
29
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
33
|
+
var target = sfc.__vccOpts || sfc;
|
|
34
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
35
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
36
|
+
target[key] = val;
|
|
37
|
+
}
|
|
38
|
+
return target;
|
|
39
|
+
};
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
function _extends() {
|
|
42
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
43
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
44
|
+
var t = arguments[e];
|
|
45
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
46
|
+
}
|
|
47
|
+
return n;
|
|
48
|
+
}, _extends.apply(null, arguments);
|
|
49
|
+
}
|
|
50
|
+
var _sfc_main = defineComponent({
|
|
38
51
|
emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave", "input"],
|
|
39
52
|
components: {
|
|
40
53
|
IconClose: iconClose(),
|
|
@@ -53,195 +66,273 @@ var __vue2_script = defineComponent({
|
|
|
53
66
|
});
|
|
54
67
|
}
|
|
55
68
|
});
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
on: {
|
|
127
|
-
"compositionstart": _vm.handleCompositionStart,
|
|
128
|
-
"compositionupdate": _vm.handleCompositionUpdate,
|
|
129
|
-
"compositionend": _vm.handleCompositionEnd,
|
|
130
|
-
"input": _vm.handleInput,
|
|
131
|
-
"focus": _vm.handleFocus,
|
|
132
|
-
"blur": _vm.handleBlur,
|
|
133
|
-
"change": _vm.handleChange
|
|
134
|
-
}
|
|
135
|
-
}, "input", _vm.a(_vm.$attrs, ["size", "class", "style", "^on[A-Z]"]), false)) : _vm._e(), _vm.slots.prepend ? _c("div", {
|
|
136
|
-
staticClass: "tiny-mobile-input-group__prepend"
|
|
137
|
-
}, [_c("span", [_vm._t("prepend")], 2)]) : _vm._e(), _vm.slots.prefix || _vm.prefixIcon ? _c("div", {
|
|
138
|
-
staticClass: "tiny-mobile-input__prefix"
|
|
139
|
-
}, [_vm._t("prefix"), _vm.prefixIcon ? _c(_vm.prefixIcon, {
|
|
140
|
-
tag: "component",
|
|
141
|
-
staticClass: "tiny-mobile-input__icon"
|
|
142
|
-
}) : _vm._e()], 2) : _vm._e(), _vm.getSuffixVisible() ? _c("span", {
|
|
143
|
-
staticClass: "tiny-mobile-input__suffix"
|
|
144
|
-
}, [!_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm.suffixIcon ? _c(_vm.suffixIcon, {
|
|
145
|
-
tag: "component",
|
|
146
|
-
staticClass: "tiny-mobile-input__icon"
|
|
147
|
-
}) : _vm._e()] : _vm._e(), _vm.state.showClear ? _c("icon-close", {
|
|
148
|
-
staticClass: "tiny-mobile-input__icon tiny-mobile-input__clear",
|
|
149
|
-
on: {
|
|
150
|
-
"mousedown": function mousedown($event) {
|
|
151
|
-
$event.preventDefault();
|
|
152
|
-
},
|
|
153
|
-
"click": _vm.clear
|
|
154
|
-
}
|
|
155
|
-
}) : _vm._e(), _vm.state.showPwdVisible ? _c(_vm.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose", {
|
|
156
|
-
tag: "component",
|
|
157
|
-
staticClass: "tiny-mobile-input__icon",
|
|
158
|
-
on: {
|
|
159
|
-
"click": _vm.handlePasswordVisible
|
|
160
|
-
}
|
|
161
|
-
}) : _vm._e(), _vm.state.isWordLimitVisible ? _c("span", {
|
|
162
|
-
staticClass: "tiny-mobile-input__count"
|
|
163
|
-
}, [_c("span", {
|
|
164
|
-
staticClass: "tiny-mobile-input__count-inner"
|
|
165
|
-
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))])]) : _vm._e(), _vm.state.validateState ? _c("i", {
|
|
166
|
-
staticClass: "tiny-mobile-input__icon",
|
|
167
|
-
class: ["tiny-mobile-input__validateIcon", _vm.validateIcon]
|
|
168
|
-
}) : _vm._e()], 2) : _vm._e(), _vm.slots.append ? _c("div", {
|
|
169
|
-
staticClass: "tiny-mobile-input-group__append"
|
|
170
|
-
}, [_vm._t("append")], 2) : _vm._e()]], 2) : _c("div", {
|
|
171
|
-
staticClass: "tiny-mobile-textarea__wrapper"
|
|
172
|
-
}, [_c("textarea", _vm._b({
|
|
173
|
-
ref: "textarea",
|
|
174
|
-
class: ["tiny-mobile-textarea__inner", {
|
|
175
|
-
"is-focus": _vm.state.focused,
|
|
176
|
-
"is-autosize": _vm.autosize
|
|
177
|
-
}],
|
|
178
|
-
style: Object.assign({}, _vm.state.textareaStyle, {
|
|
179
|
-
width: _vm.$attrs.cols ? "auto" : "100%",
|
|
180
|
-
height: _vm.$attrs.cols || _vm.autosize ? "auto" : ""
|
|
181
|
-
}),
|
|
182
|
-
attrs: {
|
|
183
|
-
"name": _vm.name,
|
|
184
|
-
"tabindex": _vm.tabindex,
|
|
185
|
-
"disabled": _vm.state.inputDisabled,
|
|
186
|
-
"readonly": _vm.readonly,
|
|
187
|
-
"autocomplete": _vm.autocomplete,
|
|
188
|
-
"aria-label": _vm.label
|
|
69
|
+
var _hoisted_1 = {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "tiny-mobile-input__title"
|
|
72
|
+
};
|
|
73
|
+
var _hoisted_2 = {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: "tiny-mobile-input__wrapper"
|
|
76
|
+
};
|
|
77
|
+
var _hoisted_3 = ["value", "disabled", "name", "aria-label", "tabindex"];
|
|
78
|
+
var _hoisted_4 = ["name", "tabindex", "type", "disabled", "readonly", "autocomplete", "aria-label"];
|
|
79
|
+
var _hoisted_5 = {
|
|
80
|
+
key: 1,
|
|
81
|
+
class: "tiny-mobile-input-group__prepend"
|
|
82
|
+
};
|
|
83
|
+
var _hoisted_6 = {
|
|
84
|
+
key: 2,
|
|
85
|
+
class: "tiny-mobile-input__prefix"
|
|
86
|
+
};
|
|
87
|
+
var _hoisted_7 = {
|
|
88
|
+
key: 3,
|
|
89
|
+
class: "tiny-mobile-input__suffix"
|
|
90
|
+
};
|
|
91
|
+
var _hoisted_8 = {
|
|
92
|
+
key: 3,
|
|
93
|
+
class: "tiny-mobile-input__count"
|
|
94
|
+
};
|
|
95
|
+
var _hoisted_9 = {
|
|
96
|
+
class: "tiny-mobile-input__count-inner"
|
|
97
|
+
};
|
|
98
|
+
var _hoisted_10 = {
|
|
99
|
+
key: 4,
|
|
100
|
+
class: "tiny-mobile-input-group__append"
|
|
101
|
+
};
|
|
102
|
+
var _hoisted_11 = {
|
|
103
|
+
key: 2,
|
|
104
|
+
class: "tiny-mobile-textarea__wrapper"
|
|
105
|
+
};
|
|
106
|
+
var _hoisted_12 = ["name", "tabindex", "disabled", "readonly", "autocomplete", "aria-label"];
|
|
107
|
+
var _hoisted_13 = {
|
|
108
|
+
key: 3,
|
|
109
|
+
class: "tiny-mobile-textarea__count"
|
|
110
|
+
};
|
|
111
|
+
var _hoisted_14 = {
|
|
112
|
+
key: 4,
|
|
113
|
+
class: "tiny-mobile-input__tips"
|
|
114
|
+
};
|
|
115
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
116
|
+
var _component_IconChevronRight = resolveComponent("IconChevronRight");
|
|
117
|
+
var _component_icon_close = resolveComponent("icon-close");
|
|
118
|
+
var _component_tiny_action_sheet = resolveComponent("tiny-action-sheet");
|
|
119
|
+
return openBlock(), createElementBlock(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
class: normalizeClass([_ctx.type === "textarea" ? "tiny-mobile-textarea" : "tiny-mobile-input", _ctx.state.inputSize ? "tiny-mobile-input-" + _ctx.state.inputSize : "", {
|
|
123
|
+
"is-focus": _ctx.state.focused,
|
|
124
|
+
"is-disabled": _ctx.state.inputDisabled,
|
|
125
|
+
"is-exceed": _ctx.state.inputExceed,
|
|
126
|
+
"is-showlimit": _ctx.state.isWordLimitVisible && _ctx.type === "textarea",
|
|
127
|
+
"tiny-mobile-input-group": _ctx.slots.prepend || _ctx.slots.append,
|
|
128
|
+
"tiny-mobile-input-group-append": _ctx.slots.append,
|
|
129
|
+
"tiny-mobile-input-group-prepend": _ctx.slots.prepend
|
|
130
|
+
}]),
|
|
131
|
+
style: normalizeStyle(_ctx.$attrs.style),
|
|
132
|
+
onMouseenter: _cache[23] || (_cache[23] = function($event) {
|
|
133
|
+
return _ctx.state.hovering = true;
|
|
134
|
+
}),
|
|
135
|
+
onMouseleave: _cache[24] || (_cache[24] = function($event) {
|
|
136
|
+
return _ctx.state.hovering = false;
|
|
137
|
+
})
|
|
189
138
|
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"
|
|
199
|
-
|
|
139
|
+
[_ctx.slots.title || _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, function() {
|
|
140
|
+
return [createTextVNode(
|
|
141
|
+
toDisplayString(_ctx.title),
|
|
142
|
+
1
|
|
143
|
+
/* TEXT */
|
|
144
|
+
)];
|
|
145
|
+
})])) : createCommentVNode("v-if", true), _ctx.type !== "textarea" ? (openBlock(), createElementBlock("div", _hoisted_2, [_ctx.isSelect ? (openBlock(), createElementBlock("div", {
|
|
146
|
+
key: 0,
|
|
147
|
+
class: "tiny-mobile-input__select",
|
|
148
|
+
onClick: _cache[2] || (_cache[2] = function() {
|
|
149
|
+
return _ctx.showBox && _ctx.showBox.apply(_ctx, arguments);
|
|
150
|
+
})
|
|
151
|
+
}, [createElementVNode("input", mergeProps({
|
|
152
|
+
type: "text",
|
|
153
|
+
readonly: "",
|
|
154
|
+
class: "tiny-mobile-input__inner"
|
|
155
|
+
}, _ctx.a(_ctx.$attrs, ["size", "class", "style", "^on[A-Z]"]), {
|
|
156
|
+
value: _ctx.state.checkedLabel,
|
|
157
|
+
disabled: _ctx.state.inputDisabled,
|
|
158
|
+
name: _ctx.name,
|
|
159
|
+
"aria-label": _ctx.label,
|
|
160
|
+
style: _ctx.state.inputStyle,
|
|
161
|
+
tabindex: _ctx.tabindex,
|
|
162
|
+
onInput: _cache[0] || (_cache[0] = function() {
|
|
163
|
+
return _ctx.handleInput && _ctx.handleInput.apply(_ctx, arguments);
|
|
164
|
+
}),
|
|
165
|
+
onChange: _cache[1] || (_cache[1] = function() {
|
|
166
|
+
return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
|
|
167
|
+
})
|
|
168
|
+
}), null, 16, _hoisted_3), createElementVNode(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
class: "tiny-mobile-input__select-icon",
|
|
172
|
+
style: normalizeStyle({
|
|
173
|
+
transform: _ctx.state.boxVisibility ? "rotate(90deg)" : "none"
|
|
174
|
+
})
|
|
200
175
|
},
|
|
201
|
-
|
|
202
|
-
|
|
176
|
+
[createVNode(_component_IconChevronRight)],
|
|
177
|
+
4
|
|
178
|
+
/* STYLE */
|
|
179
|
+
)])) : (openBlock(), createElementBlock(
|
|
180
|
+
Fragment,
|
|
181
|
+
{
|
|
182
|
+
key: 1
|
|
203
183
|
},
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
184
|
+
[_ctx.type !== "textarea" ? (openBlock(), createElementBlock("input", mergeProps({
|
|
185
|
+
key: 0,
|
|
186
|
+
ref: "input",
|
|
187
|
+
name: _ctx.name
|
|
188
|
+
}, _ctx.a(_ctx.$attrs, ["size", "class", "style", "^on[A-Z]"]), {
|
|
189
|
+
class: "tiny-mobile-input__inner",
|
|
190
|
+
style: _ctx.state.inputStyle,
|
|
191
|
+
tabindex: _ctx.tabindex,
|
|
192
|
+
type: _ctx.showPassword ? _ctx.state.passwordVisible ? "text" : "password" : _ctx.type,
|
|
193
|
+
disabled: _ctx.state.inputDisabled,
|
|
194
|
+
readonly: _ctx.readonly,
|
|
195
|
+
autocomplete: _ctx.autocomplete,
|
|
196
|
+
onCompositionstart: _cache[3] || (_cache[3] = function() {
|
|
197
|
+
return _ctx.handleCompositionStart && _ctx.handleCompositionStart.apply(_ctx, arguments);
|
|
198
|
+
}),
|
|
199
|
+
onCompositionupdate: _cache[4] || (_cache[4] = function() {
|
|
200
|
+
return _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate.apply(_ctx, arguments);
|
|
201
|
+
}),
|
|
202
|
+
onCompositionend: _cache[5] || (_cache[5] = function() {
|
|
203
|
+
return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd.apply(_ctx, arguments);
|
|
204
|
+
}),
|
|
205
|
+
onInput: _cache[6] || (_cache[6] = function() {
|
|
206
|
+
return _ctx.handleInput && _ctx.handleInput.apply(_ctx, arguments);
|
|
207
|
+
}),
|
|
208
|
+
onFocus: _cache[7] || (_cache[7] = function() {
|
|
209
|
+
return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
|
|
210
|
+
}),
|
|
211
|
+
onBlur: _cache[8] || (_cache[8] = function() {
|
|
212
|
+
return _ctx.handleBlur && _ctx.handleBlur.apply(_ctx, arguments);
|
|
213
|
+
}),
|
|
214
|
+
onChange: _cache[9] || (_cache[9] = function() {
|
|
215
|
+
return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
|
|
216
|
+
}),
|
|
217
|
+
"aria-label": _ctx.label
|
|
218
|
+
}), null, 16, _hoisted_4)) : createCommentVNode("v-if", true), _ctx.slots.prepend ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("span", null, [renderSlot(_ctx.$slots, "prepend")])])) : createCommentVNode("v-if", true), _ctx.slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "prefix"), _ctx.prefixIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon), {
|
|
219
|
+
key: 0,
|
|
220
|
+
class: "tiny-mobile-input__icon"
|
|
221
|
+
})) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), _ctx.getSuffixVisible() ? (openBlock(), createElementBlock("span", _hoisted_7, [!_ctx.state.showClear || !_ctx.state.showPwdVisible || !_ctx.state.isWordLimitVisible ? (openBlock(), createElementBlock(
|
|
222
|
+
Fragment,
|
|
223
|
+
{
|
|
224
|
+
key: 0
|
|
225
|
+
},
|
|
226
|
+
[renderSlot(_ctx.$slots, "suffix"), _ctx.suffixIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon), {
|
|
227
|
+
key: 0,
|
|
228
|
+
class: "tiny-mobile-input__icon"
|
|
229
|
+
})) : createCommentVNode("v-if", true)],
|
|
230
|
+
64
|
|
231
|
+
/* STABLE_FRAGMENT */
|
|
232
|
+
)) : createCommentVNode("v-if", true), _ctx.state.showClear ? (openBlock(), createBlock(_component_icon_close, {
|
|
233
|
+
key: 1,
|
|
234
|
+
class: "tiny-mobile-input__icon tiny-mobile-input__clear",
|
|
235
|
+
onMousedown: _cache[10] || (_cache[10] = withModifiers(function() {
|
|
236
|
+
}, ["prevent"])),
|
|
237
|
+
onClick: _ctx.clear
|
|
238
|
+
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true), _ctx.state.showPwdVisible ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose"), {
|
|
239
|
+
key: 2,
|
|
240
|
+
class: "tiny-mobile-input__icon",
|
|
241
|
+
onClick: _ctx.handlePasswordVisible
|
|
242
|
+
}, null, 8, ["onClick"])) : createCommentVNode("v-if", true), _ctx.state.isWordLimitVisible ? (openBlock(), createElementBlock("span", _hoisted_8, [createElementVNode(
|
|
243
|
+
"span",
|
|
244
|
+
_hoisted_9,
|
|
245
|
+
toDisplayString(_ctx.state.showWordLimit ? _ctx.state.textLength + "/" + _ctx.state.upperLimit : _ctx.state.textLength),
|
|
246
|
+
1
|
|
247
|
+
/* TEXT */
|
|
248
|
+
)])) : createCommentVNode("v-if", true), _ctx.state.validateState ? (openBlock(), createElementBlock(
|
|
249
|
+
"i",
|
|
250
|
+
{
|
|
251
|
+
key: 4,
|
|
252
|
+
class: normalizeClass(["tiny-mobile-input__icon", ["tiny-mobile-input__validateIcon", _ctx.validateIcon]])
|
|
253
|
+
},
|
|
254
|
+
null,
|
|
255
|
+
2
|
|
256
|
+
/* CLASS */
|
|
257
|
+
)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), _ctx.slots.append ? (openBlock(), createElementBlock("div", _hoisted_10, [renderSlot(_ctx.$slots, "append")])) : createCommentVNode("v-if", true)],
|
|
258
|
+
64
|
|
259
|
+
/* STABLE_FRAGMENT */
|
|
260
|
+
))])) : (openBlock(), createElementBlock("div", _hoisted_11, [createElementVNode("textarea", mergeProps({
|
|
261
|
+
ref: "textarea",
|
|
262
|
+
name: _ctx.name
|
|
263
|
+
}, _ctx.a(_ctx.$attrs, ["type", "class", "style", "^on[A-Z]"]), {
|
|
264
|
+
class: ["tiny-mobile-textarea__inner", {
|
|
265
|
+
"is-focus": _ctx.state.focused,
|
|
266
|
+
"is-autosize": _ctx.autosize
|
|
267
|
+
}],
|
|
268
|
+
tabindex: _ctx.tabindex,
|
|
269
|
+
disabled: _ctx.state.inputDisabled,
|
|
270
|
+
readonly: _ctx.readonly,
|
|
271
|
+
autocomplete: _ctx.autocomplete,
|
|
272
|
+
style: _extends({}, _ctx.state.textareaStyle, {
|
|
273
|
+
width: _ctx.$attrs.cols ? "auto" : "100%",
|
|
274
|
+
height: _ctx.$attrs.cols || _ctx.autosize ? "auto" : ""
|
|
275
|
+
}),
|
|
276
|
+
"aria-label": _ctx.label,
|
|
277
|
+
onFocus: _cache[11] || (_cache[11] = function() {
|
|
278
|
+
return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
|
|
279
|
+
}),
|
|
280
|
+
onBlur: _cache[12] || (_cache[12] = function() {
|
|
281
|
+
return _ctx.handleBlur && _ctx.handleBlur.apply(_ctx, arguments);
|
|
282
|
+
}),
|
|
283
|
+
onChange: _cache[13] || (_cache[13] = function() {
|
|
284
|
+
return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
|
|
285
|
+
}),
|
|
286
|
+
onCompositionstart: _cache[14] || (_cache[14] = function() {
|
|
287
|
+
return _ctx.handleCompositionStart && _ctx.handleCompositionStart.apply(_ctx, arguments);
|
|
288
|
+
}),
|
|
289
|
+
onCompositionupdate: _cache[15] || (_cache[15] = function() {
|
|
290
|
+
return _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate.apply(_ctx, arguments);
|
|
291
|
+
}),
|
|
292
|
+
onCompositionend: _cache[16] || (_cache[16] = function() {
|
|
293
|
+
return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd.apply(_ctx, arguments);
|
|
294
|
+
}),
|
|
295
|
+
onInput: _cache[17] || (_cache[17] = function() {
|
|
296
|
+
return _ctx.handleInput && _ctx.handleInput.apply(_ctx, arguments);
|
|
297
|
+
}),
|
|
298
|
+
onKeyup: _cache[18] || (_cache[18] = function($event) {
|
|
299
|
+
return _ctx.$emit("keyup", $event);
|
|
300
|
+
}),
|
|
301
|
+
onKeydown: _cache[19] || (_cache[19] = function($event) {
|
|
302
|
+
return _ctx.$emit("keydown", $event);
|
|
303
|
+
}),
|
|
304
|
+
onPaste: _cache[20] || (_cache[20] = function($event) {
|
|
305
|
+
return _ctx.$emit("paste", $event);
|
|
306
|
+
})
|
|
307
|
+
}), "\n ", 16, _hoisted_12)])), _ctx.state.isWordLimitVisible && _ctx.type === "textarea" ? (openBlock(), createElementBlock(
|
|
308
|
+
"span",
|
|
309
|
+
_hoisted_13,
|
|
310
|
+
toDisplayString(_ctx.state.showWordLimit ? _ctx.state.textLength + "/" + _ctx.state.upperLimit : _ctx.state.textLength),
|
|
311
|
+
1
|
|
312
|
+
/* TEXT */
|
|
313
|
+
)) : createCommentVNode("v-if", true), _ctx.slots.tips || _ctx.tips ? (openBlock(), createElementBlock("div", _hoisted_14, [renderSlot(_ctx.$slots, "tips", {}, function() {
|
|
314
|
+
return [createTextVNode(
|
|
315
|
+
toDisplayString(_ctx.tips),
|
|
316
|
+
1
|
|
317
|
+
/* TEXT */
|
|
318
|
+
)];
|
|
319
|
+
})])) : createCommentVNode("v-if", true), createVNode(_component_tiny_action_sheet, {
|
|
320
|
+
modelValue: _ctx.state.sheetvalue,
|
|
321
|
+
"onUpdate:modelValue": _cache[21] || (_cache[21] = function($event) {
|
|
322
|
+
return _ctx.state.sheetvalue = $event;
|
|
323
|
+
}),
|
|
324
|
+
menus: _ctx.selectMenu,
|
|
325
|
+
ellipsis: _ctx.ellipsis,
|
|
326
|
+
"content-style": _ctx.contentStyle,
|
|
327
|
+
visible: _ctx.state.boxVisibility,
|
|
328
|
+
"onUpdate:visible": _cache[22] || (_cache[22] = function($event) {
|
|
329
|
+
return _ctx.state.boxVisibility = $event;
|
|
330
|
+
})
|
|
331
|
+
}, null, 8, ["modelValue", "menus", "ellipsis", "content-style", "visible"])],
|
|
332
|
+
38
|
|
333
|
+
/* CLASS, STYLE, NEED_HYDRATION */
|
|
334
|
+
);
|
|
242
335
|
}
|
|
243
|
-
var mobile = /* @__PURE__ */
|
|
244
|
-
return __component__.exports;
|
|
245
|
-
}();
|
|
336
|
+
var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
246
337
|
|
|
247
338
|
export { mobile as default };
|