@opentinyvue/vue-input 2.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/LICENSE +22 -0
- package/index.d.ts +13 -0
- package/lib/index.js +212 -0
- package/lib/mobile-first.js +400 -0
- package/lib/mobile.js +247 -0
- package/lib/pc.js +428 -0
- package/lib/tall-storage.js +95 -0
- package/package.json +26 -0
- package/src/index.d.ts +217 -0
- package/src/mobile-first.vue.d.ts +2 -0
- package/src/mobile.vue.d.ts +2 -0
- package/src/pc.vue.d.ts +2 -0
- package/src/tall-storage.vue.d.ts +2 -0
package/lib/mobile.js
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { renderless, api } from '@opentinyvue/vue-renderless/input/vue';
|
|
2
|
+
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
|
+
import { iconClose, iconChevronRight, iconEyeopen, iconEyeclose } from '@opentinyvue/vue-icon';
|
|
4
|
+
import ActionSheet from '@opentinyvue/vue-action-sheet';
|
|
5
|
+
import '@opentinyvue/vue-theme-mobile/input/index.css';
|
|
6
|
+
|
|
7
|
+
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
8
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
9
|
+
if (render) {
|
|
10
|
+
options.render = render;
|
|
11
|
+
options.staticRenderFns = staticRenderFns;
|
|
12
|
+
options._compiled = true;
|
|
13
|
+
}
|
|
14
|
+
var hook;
|
|
15
|
+
if (injectStyles) {
|
|
16
|
+
hook = injectStyles;
|
|
17
|
+
}
|
|
18
|
+
if (hook) {
|
|
19
|
+
if (options.functional) {
|
|
20
|
+
options._injectStyles = hook;
|
|
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
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
exports: scriptExports,
|
|
33
|
+
options
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var __vue2_script = defineComponent({
|
|
38
|
+
emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave", "input"],
|
|
39
|
+
components: {
|
|
40
|
+
IconClose: iconClose(),
|
|
41
|
+
IconChevronRight: iconChevronRight(),
|
|
42
|
+
IconEyeopen: iconEyeopen(),
|
|
43
|
+
IconEyeclose: iconEyeclose(),
|
|
44
|
+
TinyActionSheet: ActionSheet
|
|
45
|
+
},
|
|
46
|
+
props: [].concat(props, ["name", "selectMenu", "ellipsis", "contentStyle", "labelWidth", "tips", "isSelect", "type", "label", "modelValue", "disabled", "readonly", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "validateEvent", "showWordLimit", "title", "counter", "autosize", "tabindex", "width", "textAlign", "resize"]),
|
|
47
|
+
setup: function setup$1(props2, context) {
|
|
48
|
+
return setup({
|
|
49
|
+
props: props2,
|
|
50
|
+
context,
|
|
51
|
+
renderless,
|
|
52
|
+
api
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var render = function render2() {
|
|
57
|
+
var _vm = this;
|
|
58
|
+
var _h = _vm.$createElement;
|
|
59
|
+
var _c = _vm._self._c || _h;
|
|
60
|
+
return _c("div", {
|
|
61
|
+
class: [_vm.type === "textarea" ? "tiny-mobile-textarea" : "tiny-mobile-input", _vm.state.inputSize ? "tiny-mobile-input-" + _vm.state.inputSize : "", {
|
|
62
|
+
"is-focus": _vm.state.focused,
|
|
63
|
+
"is-disabled": _vm.state.inputDisabled,
|
|
64
|
+
"is-exceed": _vm.state.inputExceed,
|
|
65
|
+
"is-showlimit": _vm.state.isWordLimitVisible && _vm.type === "textarea",
|
|
66
|
+
"tiny-mobile-input-group": _vm.slots.prepend || _vm.slots.append,
|
|
67
|
+
"tiny-mobile-input-group-append": _vm.slots.append,
|
|
68
|
+
"tiny-mobile-input-group-prepend": _vm.slots.prepend
|
|
69
|
+
}],
|
|
70
|
+
style: _vm.$attrs.style,
|
|
71
|
+
on: {
|
|
72
|
+
"mouseenter": function mouseenter($event) {
|
|
73
|
+
_vm.state.hovering = true;
|
|
74
|
+
},
|
|
75
|
+
"mouseleave": function mouseleave($event) {
|
|
76
|
+
_vm.state.hovering = false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, [_vm.slots.title || _vm.title ? _c("div", {
|
|
80
|
+
staticClass: "tiny-mobile-input__title"
|
|
81
|
+
}, [_vm._t("title", function() {
|
|
82
|
+
return [_vm._v(_vm._s(_vm.title))];
|
|
83
|
+
})], 2) : _vm._e(), _vm.type !== "textarea" ? _c("div", {
|
|
84
|
+
staticClass: "tiny-mobile-input__wrapper"
|
|
85
|
+
}, [_vm.isSelect ? _c("div", {
|
|
86
|
+
staticClass: "tiny-mobile-input__select",
|
|
87
|
+
on: {
|
|
88
|
+
"click": _vm.showBox
|
|
89
|
+
}
|
|
90
|
+
}, [_c("input", _vm._b({
|
|
91
|
+
staticClass: "tiny-mobile-input__inner",
|
|
92
|
+
style: _vm.state.inputStyle,
|
|
93
|
+
attrs: {
|
|
94
|
+
"type": "text",
|
|
95
|
+
"readonly": "",
|
|
96
|
+
"disabled": _vm.state.inputDisabled,
|
|
97
|
+
"name": _vm.name,
|
|
98
|
+
"aria-label": _vm.label,
|
|
99
|
+
"tabindex": _vm.tabindex
|
|
100
|
+
},
|
|
101
|
+
domProps: {
|
|
102
|
+
"value": _vm.state.checkedLabel
|
|
103
|
+
},
|
|
104
|
+
on: {
|
|
105
|
+
"input": _vm.handleInput,
|
|
106
|
+
"change": _vm.handleChange
|
|
107
|
+
}
|
|
108
|
+
}, "input", _vm.a(_vm.$attrs, ["size", "class", "style", "^on[A-Z]"]), false)), _c("div", {
|
|
109
|
+
staticClass: "tiny-mobile-input__select-icon",
|
|
110
|
+
style: {
|
|
111
|
+
transform: _vm.state.boxVisibility ? "rotate(90deg)" : "none"
|
|
112
|
+
}
|
|
113
|
+
}, [_c("IconChevronRight")], 1)]) : [_vm.type !== "textarea" ? _c("input", _vm._b({
|
|
114
|
+
ref: "input",
|
|
115
|
+
staticClass: "tiny-mobile-input__inner",
|
|
116
|
+
style: _vm.state.inputStyle,
|
|
117
|
+
attrs: {
|
|
118
|
+
"name": _vm.name,
|
|
119
|
+
"tabindex": _vm.tabindex,
|
|
120
|
+
"type": _vm.showPassword ? _vm.state.passwordVisible ? "text" : "password" : _vm.type,
|
|
121
|
+
"disabled": _vm.state.inputDisabled,
|
|
122
|
+
"readonly": _vm.readonly,
|
|
123
|
+
"autocomplete": _vm.autocomplete,
|
|
124
|
+
"aria-label": _vm.label
|
|
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
|
|
189
|
+
},
|
|
190
|
+
on: {
|
|
191
|
+
"focus": _vm.handleFocus,
|
|
192
|
+
"blur": _vm.handleBlur,
|
|
193
|
+
"change": _vm.handleChange,
|
|
194
|
+
"compositionstart": _vm.handleCompositionStart,
|
|
195
|
+
"compositionupdate": _vm.handleCompositionUpdate,
|
|
196
|
+
"compositionend": _vm.handleCompositionEnd,
|
|
197
|
+
"input": _vm.handleInput,
|
|
198
|
+
"keyup": function keyup($event) {
|
|
199
|
+
return _vm.$emit("keyup", $event);
|
|
200
|
+
},
|
|
201
|
+
"keydown": function keydown($event) {
|
|
202
|
+
return _vm.$emit("keydown", $event);
|
|
203
|
+
},
|
|
204
|
+
"paste": function paste($event) {
|
|
205
|
+
return _vm.$emit("paste", $event);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}, "textarea", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]"]), false))]), _vm.state.isWordLimitVisible && _vm.type === "textarea" ? _c("span", {
|
|
209
|
+
staticClass: "tiny-mobile-textarea__count"
|
|
210
|
+
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))]) : _vm._e(), _vm.slots.tips || _vm.tips ? _c("div", {
|
|
211
|
+
staticClass: "tiny-mobile-input__tips"
|
|
212
|
+
}, [_vm._t("tips", function() {
|
|
213
|
+
return [_vm._v(_vm._s(_vm.tips))];
|
|
214
|
+
})], 2) : _vm._e(), _c("tiny-action-sheet", {
|
|
215
|
+
attrs: {
|
|
216
|
+
"menus": _vm.selectMenu,
|
|
217
|
+
"ellipsis": _vm.ellipsis,
|
|
218
|
+
"content-style": _vm.contentStyle,
|
|
219
|
+
"visible": _vm.state.boxVisibility
|
|
220
|
+
},
|
|
221
|
+
on: {
|
|
222
|
+
"update:visible": function updateVisible($event) {
|
|
223
|
+
_vm.state.boxVisibility = $event;
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
model: {
|
|
227
|
+
value: _vm.state.sheetvalue,
|
|
228
|
+
callback: function callback($$v) {
|
|
229
|
+
_vm.$set(_vm.state, "sheetvalue", $$v);
|
|
230
|
+
},
|
|
231
|
+
expression: "state.sheetvalue"
|
|
232
|
+
}
|
|
233
|
+
})], 1);
|
|
234
|
+
};
|
|
235
|
+
var staticRenderFns = [];
|
|
236
|
+
var __cssModules = {};
|
|
237
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
238
|
+
function __vue2_injectStyles(context) {
|
|
239
|
+
for (var o in __cssModules) {
|
|
240
|
+
this[o] = __cssModules[o];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
var mobile = /* @__PURE__ */ function() {
|
|
244
|
+
return __component__.exports;
|
|
245
|
+
}();
|
|
246
|
+
|
|
247
|
+
export { mobile as default };
|
package/lib/pc.js
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { renderless as renderless$1, api as api$1 } from '@opentinyvue/vue-renderless/input/vue';
|
|
2
|
+
import { defineComponent, $prefix, setup, directive, props } from '@opentinyvue/vue-common';
|
|
3
|
+
import Clickoutside from '@opentinyvue/vue-renderless/common/deps/clickoutside';
|
|
4
|
+
import { renderless, api } from '@opentinyvue/vue-renderless/tall-storage/vue';
|
|
5
|
+
import '@opentinyvue/vue-theme/tall-storage/index.css';
|
|
6
|
+
import { IconClose, IconEyeopen, IconEyeclose } from '@opentinyvue/vue-icon';
|
|
7
|
+
import Tooltip from '@opentinyvue/vue-tooltip';
|
|
8
|
+
import Button from '@opentinyvue/vue-button';
|
|
9
|
+
import DialogBox from '@opentinyvue/vue-dialog-box';
|
|
10
|
+
import '@opentinyvue/vue-theme/input/index.css';
|
|
11
|
+
import '@opentinyvue/vue-theme/textarea/index.css';
|
|
12
|
+
|
|
13
|
+
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
14
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
15
|
+
if (render) {
|
|
16
|
+
options.render = render;
|
|
17
|
+
options.staticRenderFns = staticRenderFns;
|
|
18
|
+
options._compiled = true;
|
|
19
|
+
}
|
|
20
|
+
var hook;
|
|
21
|
+
if (injectStyles) {
|
|
22
|
+
hook = injectStyles;
|
|
23
|
+
}
|
|
24
|
+
if (hook) {
|
|
25
|
+
if (options.functional) {
|
|
26
|
+
options._injectStyles = hook;
|
|
27
|
+
var originalRender = options.render;
|
|
28
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
29
|
+
hook.call(context);
|
|
30
|
+
return originalRender(h, context);
|
|
31
|
+
};
|
|
32
|
+
} else {
|
|
33
|
+
var existing = options.beforeCreate;
|
|
34
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
exports: scriptExports,
|
|
39
|
+
options
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var __vue2_script$1 = defineComponent({
|
|
44
|
+
name: $prefix + "TallStorage",
|
|
45
|
+
inheritAttrs: false,
|
|
46
|
+
props: {
|
|
47
|
+
isMemoryStorage: Boolean,
|
|
48
|
+
localstorageData: Array
|
|
49
|
+
},
|
|
50
|
+
setup: function setup$1(props, context) {
|
|
51
|
+
return setup({
|
|
52
|
+
props,
|
|
53
|
+
context,
|
|
54
|
+
renderless,
|
|
55
|
+
api
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var render$1 = function render2() {
|
|
60
|
+
var _vm = this;
|
|
61
|
+
var _h = _vm.$createElement;
|
|
62
|
+
var _c = _vm._self._c || _h;
|
|
63
|
+
return _c("div", {
|
|
64
|
+
staticClass: "tiny-tall-storage",
|
|
65
|
+
on: {
|
|
66
|
+
"mousedown": _vm.mousedown
|
|
67
|
+
}
|
|
68
|
+
}, [_c("div", {
|
|
69
|
+
staticClass: "tiny-storage-list-style"
|
|
70
|
+
}, [_c("ul", {
|
|
71
|
+
staticClass: "tiny-storage-list",
|
|
72
|
+
on: {
|
|
73
|
+
"keydown": function keydown($event) {
|
|
74
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
75
|
+
return _vm.keydownEvent.apply(null, arguments);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, _vm._l(_vm.localstorageData, function(item) {
|
|
79
|
+
return _c("li", {
|
|
80
|
+
key: item,
|
|
81
|
+
staticClass: "tiny-storage-item",
|
|
82
|
+
class: [_vm.state.hoverValue === item ? "item-hover" : ""],
|
|
83
|
+
on: {
|
|
84
|
+
"click": function click($event) {
|
|
85
|
+
return _vm.selectItem(item);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, [_vm._v(" " + _vm._s(item) + " ")]);
|
|
89
|
+
}), 0)])]);
|
|
90
|
+
};
|
|
91
|
+
var staticRenderFns$1 = [];
|
|
92
|
+
var __cssModules$1 = {};
|
|
93
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1);
|
|
94
|
+
function __vue2_injectStyles$1(context) {
|
|
95
|
+
for (var o in __cssModules$1) {
|
|
96
|
+
this[o] = __cssModules$1[o];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
var tallStorage = /* @__PURE__ */ function() {
|
|
100
|
+
return __component__$1.exports;
|
|
101
|
+
}();
|
|
102
|
+
|
|
103
|
+
var render = function render2() {
|
|
104
|
+
var _vm = this;
|
|
105
|
+
var _h = _vm.$createElement;
|
|
106
|
+
var _c = _vm._self._c || _h;
|
|
107
|
+
return _c("div", _vm._b({
|
|
108
|
+
class: [_vm.$attrs.class, _vm.type === "textarea" ? "tiny-textarea" : "tiny-input", _vm.state.inputSize ? "tiny-input-" + _vm.state.inputSize : "", {
|
|
109
|
+
"is-disabled": _vm.state.inputDisabled,
|
|
110
|
+
"is-exceed": _vm.state.inputExceed,
|
|
111
|
+
"tiny-input-group": _vm.slots.prepend || _vm.slots.append,
|
|
112
|
+
"tiny-input-group-append": _vm.slots.append,
|
|
113
|
+
"tiny-input-group-prepend": _vm.slots.prepend,
|
|
114
|
+
"tiny-input-prefix": _vm.slots.prefix || _vm.prefixIcon,
|
|
115
|
+
"tiny-input-suffix": _vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword || _vm.mask && _vm.state.inputDisabled,
|
|
116
|
+
"tiny-input-word-limit": _vm.state.isWordLimitVisible,
|
|
117
|
+
"is-display-only": _vm.state.isDisplayOnly,
|
|
118
|
+
"tiny-input-underline": _vm.inputBoxType === "underline"
|
|
119
|
+
}],
|
|
120
|
+
on: {
|
|
121
|
+
"mouseenter": function mouseenter($event) {
|
|
122
|
+
_vm.state.hovering = true;
|
|
123
|
+
_vm.$emit("mouseenter", $event);
|
|
124
|
+
},
|
|
125
|
+
"mouseleave": function mouseleave($event) {
|
|
126
|
+
_vm.state.hovering = false;
|
|
127
|
+
_vm.$emit("mouseleave", $event);
|
|
128
|
+
},
|
|
129
|
+
"click": function click($event) {
|
|
130
|
+
return _vm.$emit("click", $event);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, "div", _vm.a(_vm.$attrs, ["class"]), false), [_vm.type !== "textarea" ? [_vm.slots.prepend ? _c("div", {
|
|
134
|
+
ref: "prepend",
|
|
135
|
+
staticClass: "tiny-input-group__prepend"
|
|
136
|
+
}, [_vm._t("prepend")], 2) : _vm._e(), _c("span", {
|
|
137
|
+
staticClass: "tiny-input-display-only"
|
|
138
|
+
}, [_vm.state.isDisplayOnly ? _c("tiny-tooltip", {
|
|
139
|
+
attrs: {
|
|
140
|
+
"disabled": !_vm.showTooltip,
|
|
141
|
+
"effect": "light",
|
|
142
|
+
"content": _vm.state.displayOnlyTooltip,
|
|
143
|
+
"placement": "top",
|
|
144
|
+
"popper-class": _vm.state.tooltipConfig.popperClass || ""
|
|
145
|
+
},
|
|
146
|
+
nativeOn: {
|
|
147
|
+
"mouseenter": function mouseenter($event) {
|
|
148
|
+
return _vm.handleEnterDisplayOnlyContent.apply(null, arguments);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, [_vm.type === "password" ? _c("span", {
|
|
152
|
+
staticClass: "tiny-input-display-only__content"
|
|
153
|
+
}, [_vm._v(_vm._s(_vm.state.hiddenPassword))]) : _vm.mask ? _c("span", {
|
|
154
|
+
staticClass: "tiny-input-display-only__mask"
|
|
155
|
+
}, [_c("span", {
|
|
156
|
+
staticClass: "tiny-input-display-only__mask-text"
|
|
157
|
+
}, [_vm._v(_vm._s(_vm.state.displayedMaskValue))]), _c(_vm.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose", {
|
|
158
|
+
tag: "component",
|
|
159
|
+
nativeOn: {
|
|
160
|
+
"click": function click($event) {
|
|
161
|
+
_vm.state.maskValueVisible = !_vm.state.maskValueVisible;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
})], 1) : _c("span", {
|
|
165
|
+
staticClass: "tiny-input-display-only__content"
|
|
166
|
+
}, [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _vm.type !== "textarea" ? _c("input", _vm._b({
|
|
167
|
+
ref: "input",
|
|
168
|
+
class: ["tiny-input__inner", _vm.mask && _vm.state.inputDisabled && !_vm.state.maskValueVisible && "tiny-input__mask"],
|
|
169
|
+
attrs: {
|
|
170
|
+
"name": _vm.name,
|
|
171
|
+
"data-tag": "tiny-input-inner",
|
|
172
|
+
"tabindex": _vm.tabindex,
|
|
173
|
+
"type": _vm.showPassword ? _vm.state.passwordVisible ? "text" : "password" : _vm.type,
|
|
174
|
+
"disabled": _vm.state.inputDisabled,
|
|
175
|
+
"readonly": _vm.readonly,
|
|
176
|
+
"unselectable": _vm.readonly ? "on" : "off",
|
|
177
|
+
"autocomplete": _vm.autocomplete,
|
|
178
|
+
"aria-label": _vm.label
|
|
179
|
+
},
|
|
180
|
+
on: {
|
|
181
|
+
"compositionend": _vm.handleCompositionEnd,
|
|
182
|
+
"compositionupdate": _vm.handleCompositionUpdate,
|
|
183
|
+
"compositionstart": _vm.handleCompositionStart,
|
|
184
|
+
"blur": _vm.handleBlur,
|
|
185
|
+
"focus": _vm.handleFocus,
|
|
186
|
+
"input": _vm.handleInput,
|
|
187
|
+
"change": _vm.handleChange,
|
|
188
|
+
"keyup": function keyup($event) {
|
|
189
|
+
return _vm.$emit("keyup", $event);
|
|
190
|
+
},
|
|
191
|
+
"keydown": function keydown($event) {
|
|
192
|
+
return _vm.$emit("keydown", $event);
|
|
193
|
+
},
|
|
194
|
+
"paste": function paste($event) {
|
|
195
|
+
return _vm.$emit("paste", $event);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}, "input", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]", "id"]), false)) : _vm._e()], 1), _vm.isMemoryStorage ? _c("tiny-tall-storage", {
|
|
199
|
+
attrs: {
|
|
200
|
+
"name": _vm.name,
|
|
201
|
+
"localstorage-data": _vm.storageData,
|
|
202
|
+
"is-memory-storage": _vm.isMemoryStorage
|
|
203
|
+
},
|
|
204
|
+
on: {
|
|
205
|
+
"selected": _vm.selectedMemory
|
|
206
|
+
}
|
|
207
|
+
}) : _vm._e(), !_vm.state.isDisplayOnly && (_vm.slots.prefix || _vm.prefixIcon) ? _c("span", {
|
|
208
|
+
ref: "prefix",
|
|
209
|
+
staticClass: "tiny-input__prefix"
|
|
210
|
+
}, [_vm._t("prefix"), _vm.prefixIcon ? _c(_vm.prefixIcon, {
|
|
211
|
+
tag: "component",
|
|
212
|
+
staticClass: "tiny-svg-size tiny-input__icon"
|
|
213
|
+
}) : _vm._e()], 2) : _vm._e(), _c("div", [_c("transition", {
|
|
214
|
+
attrs: {
|
|
215
|
+
"name": "tiny-transition-icon-out-in"
|
|
216
|
+
}
|
|
217
|
+
}, [!_vm.state.isDisplayOnly && _vm.getSuffixVisible() ? _c("span", {
|
|
218
|
+
ref: "suffix",
|
|
219
|
+
staticClass: "tiny-input__suffix"
|
|
220
|
+
}, [_c("span", {
|
|
221
|
+
staticClass: "tiny-input__suffix-inner"
|
|
222
|
+
}, [_vm.frontClearIcon && _vm.state.showClear ? _c("icon-close", {
|
|
223
|
+
staticClass: "tiny-svg-size tiny-input__icon tiny-input__clear",
|
|
224
|
+
on: {
|
|
225
|
+
"mousedown": function mousedown($event) {
|
|
226
|
+
$event.preventDefault();
|
|
227
|
+
},
|
|
228
|
+
"click": _vm.clear
|
|
229
|
+
}
|
|
230
|
+
}) : _vm._e(), !_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm.suffixIcon ? _c(_vm.suffixIcon, {
|
|
231
|
+
tag: "component",
|
|
232
|
+
staticClass: "tiny-svg-size tiny-input__icon"
|
|
233
|
+
}) : _vm._e()] : _vm._e(), !_vm.frontClearIcon && _vm.state.showClear ? _c("icon-close", {
|
|
234
|
+
staticClass: "tiny-svg-size tiny-input__icon tiny-input__clear",
|
|
235
|
+
on: {
|
|
236
|
+
"mousedown": function mousedown($event) {
|
|
237
|
+
$event.preventDefault();
|
|
238
|
+
},
|
|
239
|
+
"click": _vm.clear
|
|
240
|
+
}
|
|
241
|
+
}) : _vm._e(), _vm.showPassword ? _c(_vm.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose", {
|
|
242
|
+
tag: "component",
|
|
243
|
+
staticClass: "tiny-svg-size tiny-input__icon",
|
|
244
|
+
nativeOn: {
|
|
245
|
+
"click": function click($event) {
|
|
246
|
+
return _vm.handlePasswordVisible.apply(null, arguments);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}) : _vm._e(), _vm.mask && _vm.state.inputDisabled ? _c(_vm.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose", {
|
|
250
|
+
tag: "component",
|
|
251
|
+
staticClass: "tiny-svg-size tiny-input__icon",
|
|
252
|
+
nativeOn: {
|
|
253
|
+
"click": function click($event) {
|
|
254
|
+
_vm.state.maskValueVisible = !_vm.state.maskValueVisible;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}) : _vm._e(), _vm.state.isWordLimitVisible ? _c("span", {
|
|
258
|
+
staticClass: "tiny-input__count"
|
|
259
|
+
}, [_c("span", {
|
|
260
|
+
staticClass: "tiny-input__count-inner"
|
|
261
|
+
}, [_c("span", {
|
|
262
|
+
staticClass: "tiny-input__count-text-length"
|
|
263
|
+
}, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "" + _vm.state.textLength : "") + " ")]), _c("span", {
|
|
264
|
+
staticClass: "tiny-input__count-upper-limit"
|
|
265
|
+
}, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "/" + _vm.state.upperLimit : _vm.state.textLength) + " ")])])]) : _vm._e()], 2), _vm.state.validateState ? _c("i", {
|
|
266
|
+
staticClass: "tiny-input__icon",
|
|
267
|
+
class: ["tiny-input__validateIcon", _vm.validateIcon]
|
|
268
|
+
}) : _vm._e()]) : _vm._e()])], 1), _vm.slots.append ? _c("div", {
|
|
269
|
+
ref: "append",
|
|
270
|
+
staticClass: "tiny-input-group__append"
|
|
271
|
+
}, [_vm._t("append")], 2) : _vm._e(), _vm.slots.panel ? _c("div", {
|
|
272
|
+
ref: "panel",
|
|
273
|
+
staticClass: "tiny-input-group__panel"
|
|
274
|
+
}, [_vm._t("panel")], 2) : _vm._e()] : _c("span", {
|
|
275
|
+
class: ["tiny-textarea-display-only", _vm.hoverExpand && "tiny-textarea__inner-con"]
|
|
276
|
+
}, [_vm.state.isDisplayOnly ? _c("tiny-tooltip", {
|
|
277
|
+
attrs: {
|
|
278
|
+
"disabled": !_vm.showTooltip,
|
|
279
|
+
"pre": "",
|
|
280
|
+
"effect": "light",
|
|
281
|
+
"content": _vm.state.displayOnlyTooltip,
|
|
282
|
+
"placement": "top",
|
|
283
|
+
"popper-class": _vm.state.tooltipConfig.popperClass || ""
|
|
284
|
+
},
|
|
285
|
+
nativeOn: {
|
|
286
|
+
"mouseenter": function mouseenter($event) {
|
|
287
|
+
return _vm.handleEnterDisplayOnlyContent($event, "textarea");
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}, [_c("div", {
|
|
291
|
+
staticClass: "tiny-textarea-display-only__wrap"
|
|
292
|
+
}, [_c("span", {
|
|
293
|
+
ref: "textBox",
|
|
294
|
+
staticClass: "tiny-textarea-display-only__content text-box"
|
|
295
|
+
}, [_vm.state.showMoreBtn ? _c("span", {
|
|
296
|
+
staticClass: "more-btn",
|
|
297
|
+
on: {
|
|
298
|
+
"click": function click($event) {
|
|
299
|
+
_vm.state.showDisplayOnlyBox = true;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}, [_vm._v(_vm._s(_vm.t("ui.input.more")) + ">")]) : _vm._e(), _c("span", [_vm._v(_vm._s(_vm.state.displayOnlyText))])])])]) : _vm._e(), _vm.state.isDisplayOnly && _vm.popupMore ? _c("tiny-dialog-box", {
|
|
303
|
+
attrs: {
|
|
304
|
+
"title": _vm.t("ui.input.detail"),
|
|
305
|
+
"visible": _vm.state.showDisplayOnlyBox,
|
|
306
|
+
"append-to-body": true
|
|
307
|
+
},
|
|
308
|
+
on: {
|
|
309
|
+
"update:visible": function updateVisible($event) {
|
|
310
|
+
_vm.state.showDisplayOnlyBox = $event;
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
scopedSlots: _vm._u([{
|
|
314
|
+
key: "footer",
|
|
315
|
+
fn: function fn() {
|
|
316
|
+
return [_c("tiny-button", {
|
|
317
|
+
on: {
|
|
318
|
+
"click": function click($event) {
|
|
319
|
+
_vm.state.showDisplayOnlyBox = false;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}, [_vm._v(_vm._s(_vm.t("ui.input.close")))])];
|
|
323
|
+
},
|
|
324
|
+
proxy: true
|
|
325
|
+
}], null, false, 2786811157)
|
|
326
|
+
}, [_c("div", [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _c("textarea", _vm._b({
|
|
327
|
+
directives: [{
|
|
328
|
+
name: "clickoutside",
|
|
329
|
+
rawName: "v-clickoutside.mouseup",
|
|
330
|
+
value: function value() {
|
|
331
|
+
return _vm.handleTextareaMouseUp(true);
|
|
332
|
+
},
|
|
333
|
+
expression: "() => handleTextareaMouseUp(true)",
|
|
334
|
+
modifiers: {
|
|
335
|
+
"mouseup": true
|
|
336
|
+
}
|
|
337
|
+
}],
|
|
338
|
+
ref: "textarea",
|
|
339
|
+
staticClass: "tiny-textarea__inner",
|
|
340
|
+
class: _vm.hoverExpand && !_vm.state.enteredTextarea && "tiny-textarea__fix-height",
|
|
341
|
+
style: _vm.state.textareaStyle,
|
|
342
|
+
attrs: {
|
|
343
|
+
"tabindex": _vm.tabindex,
|
|
344
|
+
"disabled": _vm.state.inputDisabled,
|
|
345
|
+
"readonly": _vm.readonly,
|
|
346
|
+
"unselectable": _vm.readonly ? "on" : "off",
|
|
347
|
+
"autocomplete": _vm.autocomplete,
|
|
348
|
+
"aria-label": _vm.label
|
|
349
|
+
},
|
|
350
|
+
on: {
|
|
351
|
+
"compositionstart": _vm.handleCompositionStart,
|
|
352
|
+
"compositionupdate": _vm.handleCompositionUpdate,
|
|
353
|
+
"compositionend": _vm.handleCompositionEnd,
|
|
354
|
+
"input": _vm.handleInput,
|
|
355
|
+
"focus": _vm.handleFocus,
|
|
356
|
+
"blur": _vm.handleBlur,
|
|
357
|
+
"change": _vm.handleChange,
|
|
358
|
+
"mouseenter": function mouseenter($event) {
|
|
359
|
+
return _vm.handleEnterTextarea($event);
|
|
360
|
+
},
|
|
361
|
+
"mouseleave": function mouseleave($event) {
|
|
362
|
+
return _vm.handleLeaveTextarea($event);
|
|
363
|
+
},
|
|
364
|
+
"mousedown": function mousedown($event) {
|
|
365
|
+
return _vm.handleTextareaMouseDown();
|
|
366
|
+
},
|
|
367
|
+
"mouseup": function mouseup($event) {
|
|
368
|
+
return _vm.handleTextareaMouseUp();
|
|
369
|
+
},
|
|
370
|
+
"keyup": function keyup($event) {
|
|
371
|
+
return _vm.$emit("keyup", $event);
|
|
372
|
+
},
|
|
373
|
+
"keydown": function keydown($event) {
|
|
374
|
+
return _vm.$emit("keydown", $event);
|
|
375
|
+
},
|
|
376
|
+
"paste": function paste($event) {
|
|
377
|
+
return _vm.$emit("paste", $event);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}, "textarea", _vm.a(_vm.$attrs, ["type", "class", "style", "id"]), false))], 1), _vm.state.isWordLimitVisible && _vm.type === "textarea" ? _c("span", {
|
|
381
|
+
staticClass: "tiny-input__count"
|
|
382
|
+
}, [_c("span", {
|
|
383
|
+
staticClass: "tiny-input__count-inner"
|
|
384
|
+
}, [_c("span", {
|
|
385
|
+
staticClass: "tiny-input__count-text-length"
|
|
386
|
+
}, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "" + _vm.state.textLength : "") + " ")]), _c("span", {
|
|
387
|
+
staticClass: "tiny-input__count-upper-limit"
|
|
388
|
+
}, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "/" + _vm.state.upperLimit : _vm.state.textLength) + " ")])])]) : _vm._e(), _vm._t("default")], 2);
|
|
389
|
+
};
|
|
390
|
+
var staticRenderFns = [];
|
|
391
|
+
var __vue2_script = defineComponent({
|
|
392
|
+
inheritAttrs: false,
|
|
393
|
+
// 勿删,兼容灵雀特殊场景,MR#1861
|
|
394
|
+
emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave", "click", "input"],
|
|
395
|
+
directives: directive({
|
|
396
|
+
Clickoutside
|
|
397
|
+
}),
|
|
398
|
+
components: {
|
|
399
|
+
IconClose: IconClose(),
|
|
400
|
+
IconEyeopen: IconEyeopen(),
|
|
401
|
+
IconEyeclose: IconEyeclose(),
|
|
402
|
+
TinyTallStorage: tallStorage,
|
|
403
|
+
TinyTooltip: Tooltip,
|
|
404
|
+
TinyButton: Button,
|
|
405
|
+
TinyDialogBox: DialogBox
|
|
406
|
+
},
|
|
407
|
+
props: [].concat(props, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "memorySpace", "validateEvent", "showWordLimit", "displayOnly", "displayOnlyContent", "frontClearIcon", "showEmptyValue", "hoverExpand", "popupMore", "showTooltip", "inputBoxType"]),
|
|
408
|
+
setup: function setup$1(props2, context) {
|
|
409
|
+
return setup({
|
|
410
|
+
props: props2,
|
|
411
|
+
context,
|
|
412
|
+
renderless: renderless$1,
|
|
413
|
+
api: api$1
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
var __cssModules = {};
|
|
418
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
419
|
+
function __vue2_injectStyles(context) {
|
|
420
|
+
for (var o in __cssModules) {
|
|
421
|
+
this[o] = __cssModules[o];
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
var pc = /* @__PURE__ */ function() {
|
|
425
|
+
return __component__.exports;
|
|
426
|
+
}();
|
|
427
|
+
|
|
428
|
+
export { pc as default };
|