rx-compo 1.0.52 → 1.0.54
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/entry/types/index.d.ts +0 -1
- package/es/components/RxButton/index.js +16 -25
- package/es/components/RxCheckbox/index.js +3712 -0
- package/es/components/RxCheckboxGroup/index.js +6430 -0
- package/es/components/RxDatePicker/index.js +13042 -0
- package/es/components/RxInput/index.js +1560 -0
- package/es/components/RxOption/index.js +8859 -0
- package/es/components/RxRadio/index.js +646 -0
- package/es/components/RxRadioButton/index.js +646 -0
- package/es/components/RxRadioGroup/index.js +1117 -0
- package/es/components/RxScrollbar/index.js +867 -0
- package/es/components/RxSelect/index.js +9022 -0
- package/es/components/RxSelectPlus/index.js +17471 -0
- package/es/components/RxSuperCondition/index.js +8690 -0
- package/es/components/RxTooltip/index.js +2470 -0
- package/es/components/index.js +13 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/utils/useContext.d.ts +10 -0
- package/es/utils/useContext.js +13 -0
- package/es/utils/useTextOverflow.d.ts +4 -0
- package/es/utils/useTextOverflow.js +13 -0
- package/es/utils/with-install.d.ts +3 -0
- package/es/utils/with-install.js +7 -0
- package/index.esm.js +43171 -1577
- package/index.js +43192 -1585
- package/lib/components/RxButton/index.js +15 -24
- package/lib/components/RxCheckbox/index.js +3717 -0
- package/lib/components/RxCheckboxGroup/index.js +6435 -0
- package/lib/components/RxDatePicker/index.js +13047 -0
- package/lib/components/RxInput/index.js +1565 -0
- package/lib/components/RxOption/index.js +8864 -0
- package/lib/components/RxRadio/index.js +651 -0
- package/lib/components/RxRadioButton/index.js +651 -0
- package/lib/components/RxRadioGroup/index.js +1122 -0
- package/lib/components/RxScrollbar/index.js +872 -0
- package/lib/components/RxSelect/index.js +9027 -0
- package/lib/components/RxSelectPlus/index.js +17476 -0
- package/lib/components/RxSuperCondition/index.js +8695 -0
- package/lib/components/RxTooltip/index.js +2475 -0
- package/lib/components/index.js +91 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/utils/useContext.d.ts +10 -0
- package/lib/utils/useContext.js +18 -0
- package/lib/utils/useTextOverflow.d.ts +4 -0
- package/lib/utils/useTextOverflow.js +17 -0
- package/lib/utils/with-install.d.ts +3 -0
- package/lib/utils/with-install.js +11 -0
- package/package.json +4 -2
- package/theme-chalk/css/index.css +1 -1
- package/theme-chalk/css/rx-button.css +1 -0
- package/theme-chalk/css/rx-checkbox-group.css +1 -0
- package/theme-chalk/css/rx-checkbox.css +1 -0
- package/theme-chalk/css/rx-date-picker.css +0 -0
- package/theme-chalk/css/rx-input.css +1 -0
- package/theme-chalk/css/rx-option.css +1 -0
- package/theme-chalk/css/rx-radio-button.css +0 -0
- package/theme-chalk/css/rx-radio-group.css +1 -0
- package/theme-chalk/css/rx-radio.css +1 -0
- package/theme-chalk/css/rx-scrollbar.css +0 -0
- package/theme-chalk/css/rx-select.css +1 -0
- package/theme-chalk/css/rx-super-condition.css +0 -0
- package/theme-chalk/css/rx-tooltip.css +0 -0
- package/es/components/RxButton/index.d.ts +0 -3
- package/es/components/RxButton/src/index.d.ts +0 -3
- package/es/components/RxButton/src/index.vue.d.ts +0 -10
- package/es/components/index.d.ts +0 -2
- package/lib/components/RxButton/index.d.ts +0 -3
- package/lib/components/RxButton/src/index.d.ts +0 -3
- package/lib/components/RxButton/src/index.vue.d.ts +0 -10
- package/lib/components/index.d.ts +0 -2
- package/types/components/RxButton/index.d.ts +0 -3
- package/types/components/RxButton/src/index.d.ts +0 -3
- package/types/components/RxButton/src/index.vue.d.ts +0 -10
- package/types/components/index.d.ts +0 -2
- package/types/utils/with-install.d.ts +0 -3
|
@@ -0,0 +1,1565 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var withInstall$1 = require('rx-compo/lib/utils/with-install');
|
|
6
|
+
var vue = require('vue');
|
|
7
|
+
var index = require('rx-compo/lib/components/RxInput/src/index');
|
|
8
|
+
var vueDemi = require('vue-demi');
|
|
9
|
+
var useTotalInput = require('rx-compo/lib/components/RxInput/src/hooks/useTotalInput');
|
|
10
|
+
|
|
11
|
+
const isClient$1 = typeof window !== "undefined";
|
|
12
|
+
const isDef = (val) => typeof val !== "undefined";
|
|
13
|
+
|
|
14
|
+
isClient$1 ? window : void 0;
|
|
15
|
+
isClient$1 ? window.document : void 0;
|
|
16
|
+
isClient$1 ? window.navigator : void 0;
|
|
17
|
+
isClient$1 ? window.location : void 0;
|
|
18
|
+
function cloneFnJSON(source) {
|
|
19
|
+
return JSON.parse(JSON.stringify(source));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function useVModel(props, key, emit, options = {}) {
|
|
23
|
+
var _a, _b, _c, _d, _e;
|
|
24
|
+
const {
|
|
25
|
+
clone = false,
|
|
26
|
+
passive = false,
|
|
27
|
+
eventName,
|
|
28
|
+
deep = false,
|
|
29
|
+
defaultValue,
|
|
30
|
+
shouldEmit
|
|
31
|
+
} = options;
|
|
32
|
+
const vm = vueDemi.getCurrentInstance();
|
|
33
|
+
const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
|
|
34
|
+
let event = eventName;
|
|
35
|
+
if (!key) {
|
|
36
|
+
if (vueDemi.isVue2) {
|
|
37
|
+
const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;
|
|
38
|
+
key = (modelOptions == null ? void 0 : modelOptions.value) || "value";
|
|
39
|
+
if (!eventName)
|
|
40
|
+
event = (modelOptions == null ? void 0 : modelOptions.event) || "input";
|
|
41
|
+
} else {
|
|
42
|
+
key = "modelValue";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
event = event || `update:${key.toString()}`;
|
|
46
|
+
const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val);
|
|
47
|
+
const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
|
|
48
|
+
const triggerEmit = (value) => {
|
|
49
|
+
if (shouldEmit) {
|
|
50
|
+
if (shouldEmit(value))
|
|
51
|
+
_emit(event, value);
|
|
52
|
+
} else {
|
|
53
|
+
_emit(event, value);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
if (passive) {
|
|
57
|
+
const initialValue = getValue();
|
|
58
|
+
const proxy = vueDemi.ref(initialValue);
|
|
59
|
+
vueDemi.watch(
|
|
60
|
+
() => props[key],
|
|
61
|
+
(v) => proxy.value = cloneFn(v)
|
|
62
|
+
);
|
|
63
|
+
vueDemi.watch(
|
|
64
|
+
proxy,
|
|
65
|
+
(v) => {
|
|
66
|
+
if (v !== props[key] || deep)
|
|
67
|
+
triggerEmit(v);
|
|
68
|
+
},
|
|
69
|
+
{ deep }
|
|
70
|
+
);
|
|
71
|
+
return proxy;
|
|
72
|
+
} else {
|
|
73
|
+
return vueDemi.computed({
|
|
74
|
+
get() {
|
|
75
|
+
return getValue();
|
|
76
|
+
},
|
|
77
|
+
set(value) {
|
|
78
|
+
triggerEmit(value);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
var _a;
|
|
85
|
+
const isClient = typeof window !== "undefined";
|
|
86
|
+
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
87
|
+
|
|
88
|
+
function resolveUnref(r) {
|
|
89
|
+
return typeof r === "function" ? r() : vueDemi.unref(r);
|
|
90
|
+
}
|
|
91
|
+
function identity(arg) {
|
|
92
|
+
return arg;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function tryOnScopeDispose(fn) {
|
|
96
|
+
if (vueDemi.getCurrentScope()) {
|
|
97
|
+
vueDemi.onScopeDispose(fn);
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function tryOnMounted(fn, sync = true) {
|
|
104
|
+
if (vueDemi.getCurrentInstance())
|
|
105
|
+
vueDemi.onMounted(fn);
|
|
106
|
+
else if (sync)
|
|
107
|
+
fn();
|
|
108
|
+
else
|
|
109
|
+
vueDemi.nextTick(fn);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function unrefElement(elRef) {
|
|
113
|
+
var _a;
|
|
114
|
+
const plain = resolveUnref(elRef);
|
|
115
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const defaultWindow = isClient ? window : void 0;
|
|
119
|
+
isClient ? window.document : void 0;
|
|
120
|
+
isClient ? window.navigator : void 0;
|
|
121
|
+
isClient ? window.location : void 0;
|
|
122
|
+
|
|
123
|
+
function useSupported(callback, sync = false) {
|
|
124
|
+
const isSupported = vueDemi.ref();
|
|
125
|
+
const update = () => isSupported.value = Boolean(callback());
|
|
126
|
+
update();
|
|
127
|
+
tryOnMounted(update, sync);
|
|
128
|
+
return isSupported;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
132
|
+
const globalKey = "__vueuse_ssr_handlers__";
|
|
133
|
+
_global[globalKey] = _global[globalKey] || {};
|
|
134
|
+
_global[globalKey];
|
|
135
|
+
|
|
136
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
137
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
138
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
139
|
+
var __objRest$2 = (source, exclude) => {
|
|
140
|
+
var target = {};
|
|
141
|
+
for (var prop in source)
|
|
142
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
143
|
+
target[prop] = source[prop];
|
|
144
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
145
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
146
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
147
|
+
target[prop] = source[prop];
|
|
148
|
+
}
|
|
149
|
+
return target;
|
|
150
|
+
};
|
|
151
|
+
function useResizeObserver(target, callback, options = {}) {
|
|
152
|
+
const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, ["window"]);
|
|
153
|
+
let observer;
|
|
154
|
+
const isSupported = useSupported(() => window && "ResizeObserver" in window);
|
|
155
|
+
const cleanup = () => {
|
|
156
|
+
if (observer) {
|
|
157
|
+
observer.disconnect();
|
|
158
|
+
observer = void 0;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const stopWatch = vueDemi.watch(() => unrefElement(target), (el) => {
|
|
162
|
+
cleanup();
|
|
163
|
+
if (isSupported.value && window && el) {
|
|
164
|
+
observer = new ResizeObserver(callback);
|
|
165
|
+
observer.observe(el, observerOptions);
|
|
166
|
+
}
|
|
167
|
+
}, { immediate: true, flush: "post" });
|
|
168
|
+
const stop = () => {
|
|
169
|
+
cleanup();
|
|
170
|
+
stopWatch();
|
|
171
|
+
};
|
|
172
|
+
tryOnScopeDispose(stop);
|
|
173
|
+
return {
|
|
174
|
+
isSupported,
|
|
175
|
+
stop
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
var SwipeDirection;
|
|
180
|
+
(function(SwipeDirection2) {
|
|
181
|
+
SwipeDirection2["UP"] = "UP";
|
|
182
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
183
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
184
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
185
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
186
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
187
|
+
|
|
188
|
+
var __defProp = Object.defineProperty;
|
|
189
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
190
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
191
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
192
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
193
|
+
var __spreadValues = (a, b) => {
|
|
194
|
+
for (var prop in b || (b = {}))
|
|
195
|
+
if (__hasOwnProp.call(b, prop))
|
|
196
|
+
__defNormalProp(a, prop, b[prop]);
|
|
197
|
+
if (__getOwnPropSymbols)
|
|
198
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
199
|
+
if (__propIsEnum.call(b, prop))
|
|
200
|
+
__defNormalProp(a, prop, b[prop]);
|
|
201
|
+
}
|
|
202
|
+
return a;
|
|
203
|
+
};
|
|
204
|
+
const _TransitionPresets = {
|
|
205
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
|
206
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
|
207
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
208
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
|
209
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
210
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
211
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
|
212
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
213
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
214
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
|
215
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
216
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
217
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
|
218
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
219
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
220
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
|
221
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
222
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
223
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
|
224
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
225
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
226
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
227
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
228
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
229
|
+
};
|
|
230
|
+
__spreadValues({
|
|
231
|
+
linear: identity
|
|
232
|
+
}, _TransitionPresets);
|
|
233
|
+
|
|
234
|
+
const isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
|
|
235
|
+
|
|
236
|
+
!!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
|
237
|
+
!!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
|
238
|
+
const NOOP = () => {
|
|
239
|
+
};
|
|
240
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
241
|
+
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
242
|
+
const isString = (val) => typeof val === "string";
|
|
243
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* The inverse of `_.toPairs`; this method returns an object composed
|
|
247
|
+
* from key-value `pairs`.
|
|
248
|
+
*
|
|
249
|
+
* @static
|
|
250
|
+
* @memberOf _
|
|
251
|
+
* @since 4.0.0
|
|
252
|
+
* @category Array
|
|
253
|
+
* @param {Array} pairs The key-value pairs.
|
|
254
|
+
* @returns {Object} Returns the new object.
|
|
255
|
+
* @example
|
|
256
|
+
*
|
|
257
|
+
* _.fromPairs([['a', 1], ['b', 2]]);
|
|
258
|
+
* // => { 'a': 1, 'b': 2 }
|
|
259
|
+
*/
|
|
260
|
+
function fromPairs(pairs) {
|
|
261
|
+
var index = -1,
|
|
262
|
+
length = pairs == null ? 0 : pairs.length,
|
|
263
|
+
result = {};
|
|
264
|
+
|
|
265
|
+
while (++index < length) {
|
|
266
|
+
var pair = pairs[index];
|
|
267
|
+
result[pair[0]] = pair[1];
|
|
268
|
+
}
|
|
269
|
+
return result;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Checks if `value` is `null` or `undefined`.
|
|
274
|
+
*
|
|
275
|
+
* @static
|
|
276
|
+
* @memberOf _
|
|
277
|
+
* @since 4.0.0
|
|
278
|
+
* @category Lang
|
|
279
|
+
* @param {*} value The value to check.
|
|
280
|
+
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
281
|
+
* @example
|
|
282
|
+
*
|
|
283
|
+
* _.isNil(null);
|
|
284
|
+
* // => true
|
|
285
|
+
*
|
|
286
|
+
* _.isNil(void 0);
|
|
287
|
+
* // => true
|
|
288
|
+
*
|
|
289
|
+
* _.isNil(NaN);
|
|
290
|
+
* // => false
|
|
291
|
+
*/
|
|
292
|
+
function isNil(value) {
|
|
293
|
+
return value == null;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const isUndefined = (val) => val === void 0;
|
|
297
|
+
const isNumber = (val) => typeof val === "number";
|
|
298
|
+
const isStringNumber = (val) => {
|
|
299
|
+
if (!isString(val)) {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
return !Number.isNaN(Number(val));
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
class ElementPlusError extends Error {
|
|
306
|
+
constructor(m) {
|
|
307
|
+
super(m);
|
|
308
|
+
this.name = "ElementPlusError";
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function debugWarn(scope, message) {
|
|
312
|
+
if (process.env.NODE_ENV !== "production") {
|
|
313
|
+
const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
|
|
314
|
+
console.warn(error);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const SCOPE = "utils/dom/style";
|
|
319
|
+
function addUnit(value, defaultUnit = "px") {
|
|
320
|
+
if (!value)
|
|
321
|
+
return "";
|
|
322
|
+
if (isNumber(value) || isStringNumber(value)) {
|
|
323
|
+
return `${value}${defaultUnit}`;
|
|
324
|
+
} else if (isString(value)) {
|
|
325
|
+
return value;
|
|
326
|
+
}
|
|
327
|
+
debugWarn(SCOPE, "binding value must be a string or number");
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/*! Element Plus Icons Vue v2.1.0 */
|
|
331
|
+
|
|
332
|
+
// unplugin-vue:/plugin-vue/export-helper
|
|
333
|
+
var export_helper_default = (sfc, props) => {
|
|
334
|
+
let target = sfc.__vccOpts || sfc;
|
|
335
|
+
for (let [key, val] of props)
|
|
336
|
+
target[key] = val;
|
|
337
|
+
return target;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/circle-check.vue?vue&type=script&lang.ts
|
|
341
|
+
var circle_check_vue_vue_type_script_lang_default = {
|
|
342
|
+
name: "CircleCheck"
|
|
343
|
+
};
|
|
344
|
+
var _hoisted_149 = {
|
|
345
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
346
|
+
viewBox: "0 0 1024 1024"
|
|
347
|
+
}, _hoisted_249 = /* @__PURE__ */ vue.createElementVNode(
|
|
348
|
+
"path",
|
|
349
|
+
{
|
|
350
|
+
fill: "currentColor",
|
|
351
|
+
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
|
|
352
|
+
},
|
|
353
|
+
null,
|
|
354
|
+
-1
|
|
355
|
+
/* HOISTED */
|
|
356
|
+
), _hoisted_348 = /* @__PURE__ */ vue.createElementVNode(
|
|
357
|
+
"path",
|
|
358
|
+
{
|
|
359
|
+
fill: "currentColor",
|
|
360
|
+
d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
|
|
361
|
+
},
|
|
362
|
+
null,
|
|
363
|
+
-1
|
|
364
|
+
/* HOISTED */
|
|
365
|
+
), _hoisted_415 = [
|
|
366
|
+
_hoisted_249,
|
|
367
|
+
_hoisted_348
|
|
368
|
+
];
|
|
369
|
+
function _sfc_render49(_ctx, _cache, $props, $setup, $data, $options) {
|
|
370
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_149, _hoisted_415);
|
|
371
|
+
}
|
|
372
|
+
var circle_check_default = /* @__PURE__ */ export_helper_default(circle_check_vue_vue_type_script_lang_default, [["render", _sfc_render49], ["__file", "circle-check.vue"]]);
|
|
373
|
+
|
|
374
|
+
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/circle-close.vue?vue&type=script&lang.ts
|
|
375
|
+
var circle_close_vue_vue_type_script_lang_default = {
|
|
376
|
+
name: "CircleClose"
|
|
377
|
+
};
|
|
378
|
+
var _hoisted_151 = {
|
|
379
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
380
|
+
viewBox: "0 0 1024 1024"
|
|
381
|
+
}, _hoisted_251 = /* @__PURE__ */ vue.createElementVNode(
|
|
382
|
+
"path",
|
|
383
|
+
{
|
|
384
|
+
fill: "currentColor",
|
|
385
|
+
d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"
|
|
386
|
+
},
|
|
387
|
+
null,
|
|
388
|
+
-1
|
|
389
|
+
/* HOISTED */
|
|
390
|
+
), _hoisted_350 = /* @__PURE__ */ vue.createElementVNode(
|
|
391
|
+
"path",
|
|
392
|
+
{
|
|
393
|
+
fill: "currentColor",
|
|
394
|
+
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
|
|
395
|
+
},
|
|
396
|
+
null,
|
|
397
|
+
-1
|
|
398
|
+
/* HOISTED */
|
|
399
|
+
), _hoisted_416 = [
|
|
400
|
+
_hoisted_251,
|
|
401
|
+
_hoisted_350
|
|
402
|
+
];
|
|
403
|
+
function _sfc_render51(_ctx, _cache, $props, $setup, $data, $options) {
|
|
404
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_151, _hoisted_416);
|
|
405
|
+
}
|
|
406
|
+
var circle_close_default = /* @__PURE__ */ export_helper_default(circle_close_vue_vue_type_script_lang_default, [["render", _sfc_render51], ["__file", "circle-close.vue"]]);
|
|
407
|
+
|
|
408
|
+
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/hide.vue?vue&type=script&lang.ts
|
|
409
|
+
var hide_vue_vue_type_script_lang_default = {
|
|
410
|
+
name: "Hide"
|
|
411
|
+
};
|
|
412
|
+
var _hoisted_1133 = {
|
|
413
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
414
|
+
viewBox: "0 0 1024 1024"
|
|
415
|
+
}, _hoisted_2133 = /* @__PURE__ */ vue.createElementVNode(
|
|
416
|
+
"path",
|
|
417
|
+
{
|
|
418
|
+
fill: "currentColor",
|
|
419
|
+
d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2L371.2 588.8ZM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
|
|
420
|
+
},
|
|
421
|
+
null,
|
|
422
|
+
-1
|
|
423
|
+
/* HOISTED */
|
|
424
|
+
), _hoisted_3132 = /* @__PURE__ */ vue.createElementVNode(
|
|
425
|
+
"path",
|
|
426
|
+
{
|
|
427
|
+
fill: "currentColor",
|
|
428
|
+
d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
|
|
429
|
+
},
|
|
430
|
+
null,
|
|
431
|
+
-1
|
|
432
|
+
/* HOISTED */
|
|
433
|
+
), _hoisted_438 = [
|
|
434
|
+
_hoisted_2133,
|
|
435
|
+
_hoisted_3132
|
|
436
|
+
];
|
|
437
|
+
function _sfc_render133(_ctx, _cache, $props, $setup, $data, $options) {
|
|
438
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1133, _hoisted_438);
|
|
439
|
+
}
|
|
440
|
+
var hide_default = /* @__PURE__ */ export_helper_default(hide_vue_vue_type_script_lang_default, [["render", _sfc_render133], ["__file", "hide.vue"]]);
|
|
441
|
+
|
|
442
|
+
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/loading.vue?vue&type=script&lang.ts
|
|
443
|
+
var loading_vue_vue_type_script_lang_default = {
|
|
444
|
+
name: "Loading"
|
|
445
|
+
};
|
|
446
|
+
var _hoisted_1150 = {
|
|
447
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
448
|
+
viewBox: "0 0 1024 1024"
|
|
449
|
+
}, _hoisted_2150 = /* @__PURE__ */ vue.createElementVNode(
|
|
450
|
+
"path",
|
|
451
|
+
{
|
|
452
|
+
fill: "currentColor",
|
|
453
|
+
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
|
|
454
|
+
},
|
|
455
|
+
null,
|
|
456
|
+
-1
|
|
457
|
+
/* HOISTED */
|
|
458
|
+
), _hoisted_3149 = [
|
|
459
|
+
_hoisted_2150
|
|
460
|
+
];
|
|
461
|
+
function _sfc_render150(_ctx, _cache, $props, $setup, $data, $options) {
|
|
462
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1150, _hoisted_3149);
|
|
463
|
+
}
|
|
464
|
+
var loading_default = /* @__PURE__ */ export_helper_default(loading_vue_vue_type_script_lang_default, [["render", _sfc_render150], ["__file", "loading.vue"]]);
|
|
465
|
+
|
|
466
|
+
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/view.vue?vue&type=script&lang.ts
|
|
467
|
+
var view_vue_vue_type_script_lang_default = {
|
|
468
|
+
name: "View"
|
|
469
|
+
};
|
|
470
|
+
var _hoisted_1283 = {
|
|
471
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
472
|
+
viewBox: "0 0 1024 1024"
|
|
473
|
+
}, _hoisted_2283 = /* @__PURE__ */ vue.createElementVNode(
|
|
474
|
+
"path",
|
|
475
|
+
{
|
|
476
|
+
fill: "currentColor",
|
|
477
|
+
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448zm0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"
|
|
478
|
+
},
|
|
479
|
+
null,
|
|
480
|
+
-1
|
|
481
|
+
/* HOISTED */
|
|
482
|
+
), _hoisted_3282 = [
|
|
483
|
+
_hoisted_2283
|
|
484
|
+
];
|
|
485
|
+
function _sfc_render283(_ctx, _cache, $props, $setup, $data, $options) {
|
|
486
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1283, _hoisted_3282);
|
|
487
|
+
}
|
|
488
|
+
var view_default = /* @__PURE__ */ export_helper_default(view_vue_vue_type_script_lang_default, [["render", _sfc_render283], ["__file", "view.vue"]]);
|
|
489
|
+
|
|
490
|
+
const epPropKey = "__epPropKey";
|
|
491
|
+
const definePropType = (val) => val;
|
|
492
|
+
const isEpProp = (val) => isObject(val) && !!val[epPropKey];
|
|
493
|
+
const buildProp = (prop, key) => {
|
|
494
|
+
if (!isObject(prop) || isEpProp(prop))
|
|
495
|
+
return prop;
|
|
496
|
+
const { values, required, default: defaultValue, type, validator } = prop;
|
|
497
|
+
const _validator = values || validator ? (val) => {
|
|
498
|
+
let valid = false;
|
|
499
|
+
let allowedValues = [];
|
|
500
|
+
if (values) {
|
|
501
|
+
allowedValues = Array.from(values);
|
|
502
|
+
if (hasOwn(prop, "default")) {
|
|
503
|
+
allowedValues.push(defaultValue);
|
|
504
|
+
}
|
|
505
|
+
valid || (valid = allowedValues.includes(val));
|
|
506
|
+
}
|
|
507
|
+
if (validator)
|
|
508
|
+
valid || (valid = validator(val));
|
|
509
|
+
if (!valid && allowedValues.length > 0) {
|
|
510
|
+
const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
|
|
511
|
+
vue.warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
|
|
512
|
+
}
|
|
513
|
+
return valid;
|
|
514
|
+
} : void 0;
|
|
515
|
+
const epProp = {
|
|
516
|
+
type,
|
|
517
|
+
required: !!required,
|
|
518
|
+
validator: _validator,
|
|
519
|
+
[epPropKey]: true
|
|
520
|
+
};
|
|
521
|
+
if (hasOwn(prop, "default"))
|
|
522
|
+
epProp.default = defaultValue;
|
|
523
|
+
return epProp;
|
|
524
|
+
};
|
|
525
|
+
const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
|
|
526
|
+
key,
|
|
527
|
+
buildProp(option, key)
|
|
528
|
+
]));
|
|
529
|
+
|
|
530
|
+
const iconPropType = definePropType([
|
|
531
|
+
String,
|
|
532
|
+
Object,
|
|
533
|
+
Function
|
|
534
|
+
]);
|
|
535
|
+
const ValidateComponentsMap = {
|
|
536
|
+
validating: loading_default,
|
|
537
|
+
success: circle_check_default,
|
|
538
|
+
error: circle_close_default
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
const withInstall = (main, extra) => {
|
|
542
|
+
main.install = (app) => {
|
|
543
|
+
for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
|
|
544
|
+
app.component(comp.name, comp);
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
if (extra) {
|
|
548
|
+
for (const [key, comp] of Object.entries(extra)) {
|
|
549
|
+
main[key] = comp;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return main;
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
const UPDATE_MODEL_EVENT = "update:modelValue";
|
|
556
|
+
|
|
557
|
+
const componentSizes = ["", "default", "small", "large"];
|
|
558
|
+
|
|
559
|
+
const isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
|
|
560
|
+
|
|
561
|
+
const mutable = (val) => val;
|
|
562
|
+
|
|
563
|
+
const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
|
|
564
|
+
const LISTENER_PREFIX = /^on[A-Z]/;
|
|
565
|
+
const useAttrs = (params = {}) => {
|
|
566
|
+
const { excludeListeners = false, excludeKeys } = params;
|
|
567
|
+
const allExcludeKeys = vue.computed(() => {
|
|
568
|
+
return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
|
|
569
|
+
});
|
|
570
|
+
const instance = vue.getCurrentInstance();
|
|
571
|
+
if (!instance) {
|
|
572
|
+
debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
|
|
573
|
+
return vue.computed(() => ({}));
|
|
574
|
+
}
|
|
575
|
+
return vue.computed(() => {
|
|
576
|
+
var _a;
|
|
577
|
+
return fromPairs(Object.entries((_a = instance.proxy) == null ? void 0 : _a.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
const defaultNamespace = "el";
|
|
582
|
+
const statePrefix = "is-";
|
|
583
|
+
const _bem = (namespace, block, blockSuffix, element, modifier) => {
|
|
584
|
+
let cls = `${namespace}-${block}`;
|
|
585
|
+
if (blockSuffix) {
|
|
586
|
+
cls += `-${blockSuffix}`;
|
|
587
|
+
}
|
|
588
|
+
if (element) {
|
|
589
|
+
cls += `__${element}`;
|
|
590
|
+
}
|
|
591
|
+
if (modifier) {
|
|
592
|
+
cls += `--${modifier}`;
|
|
593
|
+
}
|
|
594
|
+
return cls;
|
|
595
|
+
};
|
|
596
|
+
const namespaceContextKey = Symbol("namespaceContextKey");
|
|
597
|
+
const useGetDerivedNamespace = (namespaceOverrides) => {
|
|
598
|
+
const derivedNamespace = namespaceOverrides || vue.inject(namespaceContextKey, vue.ref(defaultNamespace));
|
|
599
|
+
const namespace = vue.computed(() => {
|
|
600
|
+
return vue.unref(derivedNamespace) || defaultNamespace;
|
|
601
|
+
});
|
|
602
|
+
return namespace;
|
|
603
|
+
};
|
|
604
|
+
const useNamespace = (block, namespaceOverrides) => {
|
|
605
|
+
const namespace = useGetDerivedNamespace(namespaceOverrides);
|
|
606
|
+
const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
|
|
607
|
+
const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
|
|
608
|
+
const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
|
|
609
|
+
const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
|
|
610
|
+
const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
|
|
611
|
+
const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
|
|
612
|
+
const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
|
|
613
|
+
const is = (name, ...args) => {
|
|
614
|
+
const state = args.length >= 1 ? args[0] : true;
|
|
615
|
+
return name && state ? `${statePrefix}${name}` : "";
|
|
616
|
+
};
|
|
617
|
+
const cssVar = (object) => {
|
|
618
|
+
const styles = {};
|
|
619
|
+
for (const key in object) {
|
|
620
|
+
if (object[key]) {
|
|
621
|
+
styles[`--${namespace.value}-${key}`] = object[key];
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return styles;
|
|
625
|
+
};
|
|
626
|
+
const cssVarBlock = (object) => {
|
|
627
|
+
const styles = {};
|
|
628
|
+
for (const key in object) {
|
|
629
|
+
if (object[key]) {
|
|
630
|
+
styles[`--${namespace.value}-${block}-${key}`] = object[key];
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return styles;
|
|
634
|
+
};
|
|
635
|
+
const cssVarName = (name) => `--${namespace.value}-${name}`;
|
|
636
|
+
const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
|
|
637
|
+
return {
|
|
638
|
+
namespace,
|
|
639
|
+
b,
|
|
640
|
+
e,
|
|
641
|
+
m,
|
|
642
|
+
be,
|
|
643
|
+
em,
|
|
644
|
+
bm,
|
|
645
|
+
bem,
|
|
646
|
+
is,
|
|
647
|
+
cssVar,
|
|
648
|
+
cssVarName,
|
|
649
|
+
cssVarBlock,
|
|
650
|
+
cssVarBlockName
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
const useProp = (name) => {
|
|
655
|
+
const vm = vue.getCurrentInstance();
|
|
656
|
+
return vue.computed(() => {
|
|
657
|
+
var _a, _b;
|
|
658
|
+
return (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[name];
|
|
659
|
+
});
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
const defaultIdInjection = {
|
|
663
|
+
prefix: Math.floor(Math.random() * 1e4),
|
|
664
|
+
current: 0
|
|
665
|
+
};
|
|
666
|
+
const ID_INJECTION_KEY = Symbol("elIdInjection");
|
|
667
|
+
const useIdInjection = () => {
|
|
668
|
+
return vue.getCurrentInstance() ? vue.inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
|
|
669
|
+
};
|
|
670
|
+
const useId = (deterministicId) => {
|
|
671
|
+
const idInjection = useIdInjection();
|
|
672
|
+
if (!isClient && idInjection === defaultIdInjection) {
|
|
673
|
+
debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
674
|
+
usage: app.provide(ID_INJECTION_KEY, {
|
|
675
|
+
prefix: number,
|
|
676
|
+
current: number,
|
|
677
|
+
})`);
|
|
678
|
+
}
|
|
679
|
+
const namespace = useGetDerivedNamespace();
|
|
680
|
+
const idRef = vue.computed(() => vue.unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
|
|
681
|
+
return idRef;
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
function useCursor(input) {
|
|
685
|
+
const selectionRef = vue.ref();
|
|
686
|
+
function recordCursor() {
|
|
687
|
+
if (input.value == void 0)
|
|
688
|
+
return;
|
|
689
|
+
const { selectionStart, selectionEnd, value } = input.value;
|
|
690
|
+
if (selectionStart == null || selectionEnd == null)
|
|
691
|
+
return;
|
|
692
|
+
const beforeTxt = value.slice(0, Math.max(0, selectionStart));
|
|
693
|
+
const afterTxt = value.slice(Math.max(0, selectionEnd));
|
|
694
|
+
selectionRef.value = {
|
|
695
|
+
selectionStart,
|
|
696
|
+
selectionEnd,
|
|
697
|
+
value,
|
|
698
|
+
beforeTxt,
|
|
699
|
+
afterTxt
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
function setCursor() {
|
|
703
|
+
if (input.value == void 0 || selectionRef.value == void 0)
|
|
704
|
+
return;
|
|
705
|
+
const { value } = input.value;
|
|
706
|
+
const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
|
|
707
|
+
if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
|
|
708
|
+
return;
|
|
709
|
+
let startPos = value.length;
|
|
710
|
+
if (value.endsWith(afterTxt)) {
|
|
711
|
+
startPos = value.length - afterTxt.length;
|
|
712
|
+
} else if (value.startsWith(beforeTxt)) {
|
|
713
|
+
startPos = beforeTxt.length;
|
|
714
|
+
} else {
|
|
715
|
+
const beforeLastChar = beforeTxt[selectionStart - 1];
|
|
716
|
+
const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
|
|
717
|
+
if (newIndex !== -1) {
|
|
718
|
+
startPos = newIndex + 1;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
input.value.setSelectionRange(startPos, startPos);
|
|
722
|
+
}
|
|
723
|
+
return [recordCursor, setCursor];
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
const useSizeProp = buildProp({
|
|
727
|
+
type: String,
|
|
728
|
+
values: componentSizes,
|
|
729
|
+
required: false
|
|
730
|
+
});
|
|
731
|
+
const SIZE_INJECTION_KEY = Symbol("size");
|
|
732
|
+
const useGlobalSize = () => {
|
|
733
|
+
const injectedSize = vue.inject(SIZE_INJECTION_KEY, {});
|
|
734
|
+
return vue.computed(() => {
|
|
735
|
+
return vue.unref(injectedSize.size) || "";
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
var _export_sfc = (sfc, props) => {
|
|
740
|
+
const target = sfc.__vccOpts || sfc;
|
|
741
|
+
for (const [key, val] of props) {
|
|
742
|
+
target[key] = val;
|
|
743
|
+
}
|
|
744
|
+
return target;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
const iconProps = buildProps({
|
|
748
|
+
size: {
|
|
749
|
+
type: definePropType([Number, String])
|
|
750
|
+
},
|
|
751
|
+
color: {
|
|
752
|
+
type: String
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
const __default__$1 = vue.defineComponent({
|
|
757
|
+
name: "ElIcon",
|
|
758
|
+
inheritAttrs: false
|
|
759
|
+
});
|
|
760
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
761
|
+
...__default__$1,
|
|
762
|
+
props: iconProps,
|
|
763
|
+
setup(__props) {
|
|
764
|
+
const props = __props;
|
|
765
|
+
const ns = useNamespace("icon");
|
|
766
|
+
const style = vue.computed(() => {
|
|
767
|
+
const { size, color } = props;
|
|
768
|
+
if (!size && !color)
|
|
769
|
+
return {};
|
|
770
|
+
return {
|
|
771
|
+
fontSize: isUndefined(size) ? void 0 : addUnit(size),
|
|
772
|
+
"--color": color
|
|
773
|
+
};
|
|
774
|
+
});
|
|
775
|
+
return (_ctx, _cache) => {
|
|
776
|
+
return vue.openBlock(), vue.createElementBlock("i", vue.mergeProps({
|
|
777
|
+
class: vue.unref(ns).b(),
|
|
778
|
+
style: vue.unref(style)
|
|
779
|
+
}, _ctx.$attrs), [
|
|
780
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
781
|
+
], 16);
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
|
|
786
|
+
|
|
787
|
+
const ElIcon = withInstall(Icon);
|
|
788
|
+
|
|
789
|
+
const formContextKey = Symbol("formContextKey");
|
|
790
|
+
const formItemContextKey = Symbol("formItemContextKey");
|
|
791
|
+
|
|
792
|
+
const useFormSize = (fallback, ignore = {}) => {
|
|
793
|
+
const emptyRef = vue.ref(void 0);
|
|
794
|
+
const size = ignore.prop ? emptyRef : useProp("size");
|
|
795
|
+
const globalConfig = ignore.global ? emptyRef : useGlobalSize();
|
|
796
|
+
const form = ignore.form ? { size: void 0 } : vue.inject(formContextKey, void 0);
|
|
797
|
+
const formItem = ignore.formItem ? { size: void 0 } : vue.inject(formItemContextKey, void 0);
|
|
798
|
+
return vue.computed(() => size.value || vue.unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig.value || "");
|
|
799
|
+
};
|
|
800
|
+
const useFormDisabled = (fallback) => {
|
|
801
|
+
const disabled = useProp("disabled");
|
|
802
|
+
const form = vue.inject(formContextKey, void 0);
|
|
803
|
+
return vue.computed(() => disabled.value || vue.unref(fallback) || (form == null ? void 0 : form.disabled) || false);
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
const useFormItem = () => {
|
|
807
|
+
const form = vue.inject(formContextKey, void 0);
|
|
808
|
+
const formItem = vue.inject(formItemContextKey, void 0);
|
|
809
|
+
return {
|
|
810
|
+
form,
|
|
811
|
+
formItem
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
const useFormItemInputId = (props, {
|
|
815
|
+
formItemContext,
|
|
816
|
+
disableIdGeneration,
|
|
817
|
+
disableIdManagement
|
|
818
|
+
}) => {
|
|
819
|
+
if (!disableIdGeneration) {
|
|
820
|
+
disableIdGeneration = vue.ref(false);
|
|
821
|
+
}
|
|
822
|
+
if (!disableIdManagement) {
|
|
823
|
+
disableIdManagement = vue.ref(false);
|
|
824
|
+
}
|
|
825
|
+
const inputId = vue.ref();
|
|
826
|
+
let idUnwatch = void 0;
|
|
827
|
+
const isLabeledByFormItem = vue.computed(() => {
|
|
828
|
+
var _a;
|
|
829
|
+
return !!(!props.label && formItemContext && formItemContext.inputIds && ((_a = formItemContext.inputIds) == null ? void 0 : _a.length) <= 1);
|
|
830
|
+
});
|
|
831
|
+
vue.onMounted(() => {
|
|
832
|
+
idUnwatch = vue.watch([vue.toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration2]) => {
|
|
833
|
+
const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0;
|
|
834
|
+
if (newId !== inputId.value) {
|
|
835
|
+
if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
|
|
836
|
+
inputId.value && formItemContext.removeInputId(inputId.value);
|
|
837
|
+
if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) {
|
|
838
|
+
formItemContext.addInputId(newId);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
inputId.value = newId;
|
|
842
|
+
}
|
|
843
|
+
}, { immediate: true });
|
|
844
|
+
});
|
|
845
|
+
vue.onUnmounted(() => {
|
|
846
|
+
idUnwatch && idUnwatch();
|
|
847
|
+
if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
|
|
848
|
+
inputId.value && formItemContext.removeInputId(inputId.value);
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
return {
|
|
852
|
+
isLabeledByFormItem,
|
|
853
|
+
inputId
|
|
854
|
+
};
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
let hiddenTextarea = void 0;
|
|
858
|
+
const HIDDEN_STYLE = `
|
|
859
|
+
height:0 !important;
|
|
860
|
+
visibility:hidden !important;
|
|
861
|
+
${isFirefox() ? "" : "overflow:hidden !important;"}
|
|
862
|
+
position:absolute !important;
|
|
863
|
+
z-index:-1000 !important;
|
|
864
|
+
top:0 !important;
|
|
865
|
+
right:0 !important;
|
|
866
|
+
`;
|
|
867
|
+
const CONTEXT_STYLE = [
|
|
868
|
+
"letter-spacing",
|
|
869
|
+
"line-height",
|
|
870
|
+
"padding-top",
|
|
871
|
+
"padding-bottom",
|
|
872
|
+
"font-family",
|
|
873
|
+
"font-weight",
|
|
874
|
+
"font-size",
|
|
875
|
+
"text-rendering",
|
|
876
|
+
"text-transform",
|
|
877
|
+
"width",
|
|
878
|
+
"text-indent",
|
|
879
|
+
"padding-left",
|
|
880
|
+
"padding-right",
|
|
881
|
+
"border-width",
|
|
882
|
+
"box-sizing"
|
|
883
|
+
];
|
|
884
|
+
function calculateNodeStyling(targetElement) {
|
|
885
|
+
const style = window.getComputedStyle(targetElement);
|
|
886
|
+
const boxSizing = style.getPropertyValue("box-sizing");
|
|
887
|
+
const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
|
|
888
|
+
const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
|
|
889
|
+
const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";");
|
|
890
|
+
return { contextStyle, paddingSize, borderSize, boxSizing };
|
|
891
|
+
}
|
|
892
|
+
function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
|
|
893
|
+
var _a;
|
|
894
|
+
if (!hiddenTextarea) {
|
|
895
|
+
hiddenTextarea = document.createElement("textarea");
|
|
896
|
+
document.body.appendChild(hiddenTextarea);
|
|
897
|
+
}
|
|
898
|
+
const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
|
|
899
|
+
hiddenTextarea.setAttribute("style", `${contextStyle};${HIDDEN_STYLE}`);
|
|
900
|
+
hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
|
|
901
|
+
let height = hiddenTextarea.scrollHeight;
|
|
902
|
+
const result = {};
|
|
903
|
+
if (boxSizing === "border-box") {
|
|
904
|
+
height = height + borderSize;
|
|
905
|
+
} else if (boxSizing === "content-box") {
|
|
906
|
+
height = height - paddingSize;
|
|
907
|
+
}
|
|
908
|
+
hiddenTextarea.value = "";
|
|
909
|
+
const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
910
|
+
if (isNumber(minRows)) {
|
|
911
|
+
let minHeight = singleRowHeight * minRows;
|
|
912
|
+
if (boxSizing === "border-box") {
|
|
913
|
+
minHeight = minHeight + paddingSize + borderSize;
|
|
914
|
+
}
|
|
915
|
+
height = Math.max(minHeight, height);
|
|
916
|
+
result.minHeight = `${minHeight}px`;
|
|
917
|
+
}
|
|
918
|
+
if (isNumber(maxRows)) {
|
|
919
|
+
let maxHeight = singleRowHeight * maxRows;
|
|
920
|
+
if (boxSizing === "border-box") {
|
|
921
|
+
maxHeight = maxHeight + paddingSize + borderSize;
|
|
922
|
+
}
|
|
923
|
+
height = Math.min(maxHeight, height);
|
|
924
|
+
}
|
|
925
|
+
result.height = `${height}px`;
|
|
926
|
+
(_a = hiddenTextarea.parentNode) == null ? void 0 : _a.removeChild(hiddenTextarea);
|
|
927
|
+
hiddenTextarea = void 0;
|
|
928
|
+
return result;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
const inputProps = buildProps({
|
|
932
|
+
id: {
|
|
933
|
+
type: String,
|
|
934
|
+
default: void 0
|
|
935
|
+
},
|
|
936
|
+
size: useSizeProp,
|
|
937
|
+
disabled: Boolean,
|
|
938
|
+
modelValue: {
|
|
939
|
+
type: definePropType([
|
|
940
|
+
String,
|
|
941
|
+
Number,
|
|
942
|
+
Object
|
|
943
|
+
]),
|
|
944
|
+
default: ""
|
|
945
|
+
},
|
|
946
|
+
type: {
|
|
947
|
+
type: String,
|
|
948
|
+
default: "text"
|
|
949
|
+
},
|
|
950
|
+
resize: {
|
|
951
|
+
type: String,
|
|
952
|
+
values: ["none", "both", "horizontal", "vertical"]
|
|
953
|
+
},
|
|
954
|
+
autosize: {
|
|
955
|
+
type: definePropType([Boolean, Object]),
|
|
956
|
+
default: false
|
|
957
|
+
},
|
|
958
|
+
autocomplete: {
|
|
959
|
+
type: String,
|
|
960
|
+
default: "off"
|
|
961
|
+
},
|
|
962
|
+
formatter: {
|
|
963
|
+
type: Function
|
|
964
|
+
},
|
|
965
|
+
parser: {
|
|
966
|
+
type: Function
|
|
967
|
+
},
|
|
968
|
+
placeholder: {
|
|
969
|
+
type: String
|
|
970
|
+
},
|
|
971
|
+
form: {
|
|
972
|
+
type: String
|
|
973
|
+
},
|
|
974
|
+
readonly: {
|
|
975
|
+
type: Boolean,
|
|
976
|
+
default: false
|
|
977
|
+
},
|
|
978
|
+
clearable: {
|
|
979
|
+
type: Boolean,
|
|
980
|
+
default: false
|
|
981
|
+
},
|
|
982
|
+
showPassword: {
|
|
983
|
+
type: Boolean,
|
|
984
|
+
default: false
|
|
985
|
+
},
|
|
986
|
+
showWordLimit: {
|
|
987
|
+
type: Boolean,
|
|
988
|
+
default: false
|
|
989
|
+
},
|
|
990
|
+
suffixIcon: {
|
|
991
|
+
type: iconPropType
|
|
992
|
+
},
|
|
993
|
+
prefixIcon: {
|
|
994
|
+
type: iconPropType
|
|
995
|
+
},
|
|
996
|
+
containerRole: {
|
|
997
|
+
type: String,
|
|
998
|
+
default: void 0
|
|
999
|
+
},
|
|
1000
|
+
label: {
|
|
1001
|
+
type: String,
|
|
1002
|
+
default: void 0
|
|
1003
|
+
},
|
|
1004
|
+
tabindex: {
|
|
1005
|
+
type: [String, Number],
|
|
1006
|
+
default: 0
|
|
1007
|
+
},
|
|
1008
|
+
validateEvent: {
|
|
1009
|
+
type: Boolean,
|
|
1010
|
+
default: true
|
|
1011
|
+
},
|
|
1012
|
+
inputStyle: {
|
|
1013
|
+
type: definePropType([Object, Array, String]),
|
|
1014
|
+
default: () => mutable({})
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
const inputEmits = {
|
|
1018
|
+
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
|
1019
|
+
input: (value) => isString(value),
|
|
1020
|
+
change: (value) => isString(value),
|
|
1021
|
+
focus: (evt) => evt instanceof FocusEvent,
|
|
1022
|
+
blur: (evt) => evt instanceof FocusEvent,
|
|
1023
|
+
clear: () => true,
|
|
1024
|
+
mouseleave: (evt) => evt instanceof MouseEvent,
|
|
1025
|
+
mouseenter: (evt) => evt instanceof MouseEvent,
|
|
1026
|
+
keydown: (evt) => evt instanceof Event,
|
|
1027
|
+
compositionstart: (evt) => evt instanceof CompositionEvent,
|
|
1028
|
+
compositionupdate: (evt) => evt instanceof CompositionEvent,
|
|
1029
|
+
compositionend: (evt) => evt instanceof CompositionEvent
|
|
1030
|
+
};
|
|
1031
|
+
|
|
1032
|
+
const _hoisted_1 = ["role"];
|
|
1033
|
+
const _hoisted_2 = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"];
|
|
1034
|
+
const _hoisted_3 = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"];
|
|
1035
|
+
const __default__ = vue.defineComponent({
|
|
1036
|
+
name: "ElInput",
|
|
1037
|
+
inheritAttrs: false
|
|
1038
|
+
});
|
|
1039
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
1040
|
+
...__default__,
|
|
1041
|
+
props: inputProps,
|
|
1042
|
+
emits: inputEmits,
|
|
1043
|
+
setup(__props, { expose, emit }) {
|
|
1044
|
+
const props = __props;
|
|
1045
|
+
const rawAttrs = vue.useAttrs();
|
|
1046
|
+
const slots = vue.useSlots();
|
|
1047
|
+
const containerAttrs = vue.computed(() => {
|
|
1048
|
+
const comboBoxAttrs = {};
|
|
1049
|
+
if (props.containerRole === "combobox") {
|
|
1050
|
+
comboBoxAttrs["aria-haspopup"] = rawAttrs["aria-haspopup"];
|
|
1051
|
+
comboBoxAttrs["aria-owns"] = rawAttrs["aria-owns"];
|
|
1052
|
+
comboBoxAttrs["aria-expanded"] = rawAttrs["aria-expanded"];
|
|
1053
|
+
}
|
|
1054
|
+
return comboBoxAttrs;
|
|
1055
|
+
});
|
|
1056
|
+
const containerKls = vue.computed(() => [
|
|
1057
|
+
props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
|
|
1058
|
+
nsInput.m(inputSize.value),
|
|
1059
|
+
nsInput.is("disabled", inputDisabled.value),
|
|
1060
|
+
nsInput.is("exceed", inputExceed.value),
|
|
1061
|
+
{
|
|
1062
|
+
[nsInput.b("group")]: slots.prepend || slots.append,
|
|
1063
|
+
[nsInput.bm("group", "append")]: slots.append,
|
|
1064
|
+
[nsInput.bm("group", "prepend")]: slots.prepend,
|
|
1065
|
+
[nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
|
|
1066
|
+
[nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
|
|
1067
|
+
[nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value
|
|
1068
|
+
},
|
|
1069
|
+
rawAttrs.class
|
|
1070
|
+
]);
|
|
1071
|
+
const wrapperKls = vue.computed(() => [
|
|
1072
|
+
nsInput.e("wrapper"),
|
|
1073
|
+
nsInput.is("focus", focused.value)
|
|
1074
|
+
]);
|
|
1075
|
+
const attrs = useAttrs({
|
|
1076
|
+
excludeKeys: vue.computed(() => {
|
|
1077
|
+
return Object.keys(containerAttrs.value);
|
|
1078
|
+
})
|
|
1079
|
+
});
|
|
1080
|
+
const { form, formItem } = useFormItem();
|
|
1081
|
+
const { inputId } = useFormItemInputId(props, {
|
|
1082
|
+
formItemContext: formItem
|
|
1083
|
+
});
|
|
1084
|
+
const inputSize = useFormSize();
|
|
1085
|
+
const inputDisabled = useFormDisabled();
|
|
1086
|
+
const nsInput = useNamespace("input");
|
|
1087
|
+
const nsTextarea = useNamespace("textarea");
|
|
1088
|
+
const input = vue.shallowRef();
|
|
1089
|
+
const textarea = vue.shallowRef();
|
|
1090
|
+
const focused = vue.ref(false);
|
|
1091
|
+
const hovering = vue.ref(false);
|
|
1092
|
+
const isComposing = vue.ref(false);
|
|
1093
|
+
const passwordVisible = vue.ref(false);
|
|
1094
|
+
const countStyle = vue.ref();
|
|
1095
|
+
const textareaCalcStyle = vue.shallowRef(props.inputStyle);
|
|
1096
|
+
const _ref = vue.computed(() => input.value || textarea.value);
|
|
1097
|
+
const needStatusIcon = vue.computed(() => {
|
|
1098
|
+
var _a;
|
|
1099
|
+
return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false;
|
|
1100
|
+
});
|
|
1101
|
+
const validateState = vue.computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
|
|
1102
|
+
const validateIcon = vue.computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
|
|
1103
|
+
const passwordIcon = vue.computed(() => passwordVisible.value ? view_default : hide_default);
|
|
1104
|
+
const containerStyle = vue.computed(() => [
|
|
1105
|
+
rawAttrs.style,
|
|
1106
|
+
props.inputStyle
|
|
1107
|
+
]);
|
|
1108
|
+
const textareaStyle = vue.computed(() => [
|
|
1109
|
+
props.inputStyle,
|
|
1110
|
+
textareaCalcStyle.value,
|
|
1111
|
+
{ resize: props.resize }
|
|
1112
|
+
]);
|
|
1113
|
+
const nativeInputValue = vue.computed(() => isNil(props.modelValue) ? "" : String(props.modelValue));
|
|
1114
|
+
const showClear = vue.computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
|
|
1115
|
+
const showPwdVisible = vue.computed(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || focused.value));
|
|
1116
|
+
const isWordLimitVisible = vue.computed(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
|
|
1117
|
+
const textLength = vue.computed(() => nativeInputValue.value.length);
|
|
1118
|
+
const inputExceed = vue.computed(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
|
|
1119
|
+
const suffixVisible = vue.computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
|
|
1120
|
+
const [recordCursor, setCursor] = useCursor(input);
|
|
1121
|
+
useResizeObserver(textarea, (entries) => {
|
|
1122
|
+
onceInitSizeTextarea();
|
|
1123
|
+
if (!isWordLimitVisible.value || props.resize !== "both")
|
|
1124
|
+
return;
|
|
1125
|
+
const entry = entries[0];
|
|
1126
|
+
const { width } = entry.contentRect;
|
|
1127
|
+
countStyle.value = {
|
|
1128
|
+
right: `calc(100% - ${width + 15 + 6}px)`
|
|
1129
|
+
};
|
|
1130
|
+
});
|
|
1131
|
+
const resizeTextarea = () => {
|
|
1132
|
+
const { type, autosize } = props;
|
|
1133
|
+
if (!isClient || type !== "textarea" || !textarea.value)
|
|
1134
|
+
return;
|
|
1135
|
+
if (autosize) {
|
|
1136
|
+
const minRows = isObject(autosize) ? autosize.minRows : void 0;
|
|
1137
|
+
const maxRows = isObject(autosize) ? autosize.maxRows : void 0;
|
|
1138
|
+
const textareaStyle2 = calcTextareaHeight(textarea.value, minRows, maxRows);
|
|
1139
|
+
textareaCalcStyle.value = {
|
|
1140
|
+
overflowY: "hidden",
|
|
1141
|
+
...textareaStyle2
|
|
1142
|
+
};
|
|
1143
|
+
vue.nextTick(() => {
|
|
1144
|
+
textarea.value.offsetHeight;
|
|
1145
|
+
textareaCalcStyle.value = textareaStyle2;
|
|
1146
|
+
});
|
|
1147
|
+
} else {
|
|
1148
|
+
textareaCalcStyle.value = {
|
|
1149
|
+
minHeight: calcTextareaHeight(textarea.value).minHeight
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
const createOnceInitResize = (resizeTextarea2) => {
|
|
1154
|
+
let isInit = false;
|
|
1155
|
+
return () => {
|
|
1156
|
+
var _a;
|
|
1157
|
+
if (isInit || !props.autosize)
|
|
1158
|
+
return;
|
|
1159
|
+
const isElHidden = ((_a = textarea.value) == null ? void 0 : _a.offsetParent) === null;
|
|
1160
|
+
if (!isElHidden) {
|
|
1161
|
+
resizeTextarea2();
|
|
1162
|
+
isInit = true;
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
};
|
|
1166
|
+
const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
|
|
1167
|
+
const setNativeInputValue = () => {
|
|
1168
|
+
const input2 = _ref.value;
|
|
1169
|
+
const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
|
|
1170
|
+
if (!input2 || input2.value === formatterValue)
|
|
1171
|
+
return;
|
|
1172
|
+
input2.value = formatterValue;
|
|
1173
|
+
};
|
|
1174
|
+
const handleInput = async (event) => {
|
|
1175
|
+
recordCursor();
|
|
1176
|
+
let { value } = event.target;
|
|
1177
|
+
if (props.formatter) {
|
|
1178
|
+
value = props.parser ? props.parser(value) : value;
|
|
1179
|
+
}
|
|
1180
|
+
if (isComposing.value)
|
|
1181
|
+
return;
|
|
1182
|
+
if (value === nativeInputValue.value) {
|
|
1183
|
+
setNativeInputValue();
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
1187
|
+
emit("input", value);
|
|
1188
|
+
await vue.nextTick();
|
|
1189
|
+
setNativeInputValue();
|
|
1190
|
+
setCursor();
|
|
1191
|
+
};
|
|
1192
|
+
const handleChange = (event) => {
|
|
1193
|
+
emit("change", event.target.value);
|
|
1194
|
+
};
|
|
1195
|
+
const handleCompositionStart = (event) => {
|
|
1196
|
+
emit("compositionstart", event);
|
|
1197
|
+
isComposing.value = true;
|
|
1198
|
+
};
|
|
1199
|
+
const handleCompositionUpdate = (event) => {
|
|
1200
|
+
var _a;
|
|
1201
|
+
emit("compositionupdate", event);
|
|
1202
|
+
const text = (_a = event.target) == null ? void 0 : _a.value;
|
|
1203
|
+
const lastCharacter = text[text.length - 1] || "";
|
|
1204
|
+
isComposing.value = !isKorean(lastCharacter);
|
|
1205
|
+
};
|
|
1206
|
+
const handleCompositionEnd = (event) => {
|
|
1207
|
+
emit("compositionend", event);
|
|
1208
|
+
if (isComposing.value) {
|
|
1209
|
+
isComposing.value = false;
|
|
1210
|
+
handleInput(event);
|
|
1211
|
+
}
|
|
1212
|
+
};
|
|
1213
|
+
const handlePasswordVisible = () => {
|
|
1214
|
+
passwordVisible.value = !passwordVisible.value;
|
|
1215
|
+
focus();
|
|
1216
|
+
};
|
|
1217
|
+
const focus = async () => {
|
|
1218
|
+
var _a;
|
|
1219
|
+
await vue.nextTick();
|
|
1220
|
+
(_a = _ref.value) == null ? void 0 : _a.focus();
|
|
1221
|
+
};
|
|
1222
|
+
const blur = () => {
|
|
1223
|
+
var _a;
|
|
1224
|
+
return (_a = _ref.value) == null ? void 0 : _a.blur();
|
|
1225
|
+
};
|
|
1226
|
+
const handleFocus = (event) => {
|
|
1227
|
+
focused.value = true;
|
|
1228
|
+
emit("focus", event);
|
|
1229
|
+
};
|
|
1230
|
+
const handleBlur = (event) => {
|
|
1231
|
+
var _a;
|
|
1232
|
+
focused.value = false;
|
|
1233
|
+
emit("blur", event);
|
|
1234
|
+
if (props.validateEvent) {
|
|
1235
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
const handleMouseLeave = (evt) => {
|
|
1239
|
+
hovering.value = false;
|
|
1240
|
+
emit("mouseleave", evt);
|
|
1241
|
+
};
|
|
1242
|
+
const handleMouseEnter = (evt) => {
|
|
1243
|
+
hovering.value = true;
|
|
1244
|
+
emit("mouseenter", evt);
|
|
1245
|
+
};
|
|
1246
|
+
const handleKeydown = (evt) => {
|
|
1247
|
+
emit("keydown", evt);
|
|
1248
|
+
};
|
|
1249
|
+
const select = () => {
|
|
1250
|
+
var _a;
|
|
1251
|
+
(_a = _ref.value) == null ? void 0 : _a.select();
|
|
1252
|
+
};
|
|
1253
|
+
const clear = () => {
|
|
1254
|
+
emit(UPDATE_MODEL_EVENT, "");
|
|
1255
|
+
emit("change", "");
|
|
1256
|
+
emit("clear");
|
|
1257
|
+
emit("input", "");
|
|
1258
|
+
};
|
|
1259
|
+
vue.watch(() => props.modelValue, () => {
|
|
1260
|
+
var _a;
|
|
1261
|
+
vue.nextTick(() => resizeTextarea());
|
|
1262
|
+
if (props.validateEvent) {
|
|
1263
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
|
|
1264
|
+
}
|
|
1265
|
+
});
|
|
1266
|
+
vue.watch(nativeInputValue, () => setNativeInputValue());
|
|
1267
|
+
vue.watch(() => props.type, async () => {
|
|
1268
|
+
await vue.nextTick();
|
|
1269
|
+
setNativeInputValue();
|
|
1270
|
+
resizeTextarea();
|
|
1271
|
+
});
|
|
1272
|
+
vue.onMounted(() => {
|
|
1273
|
+
if (!props.formatter && props.parser) {
|
|
1274
|
+
debugWarn("ElInput", "If you set the parser, you also need to set the formatter.");
|
|
1275
|
+
}
|
|
1276
|
+
setNativeInputValue();
|
|
1277
|
+
vue.nextTick(resizeTextarea);
|
|
1278
|
+
});
|
|
1279
|
+
expose({
|
|
1280
|
+
input,
|
|
1281
|
+
textarea,
|
|
1282
|
+
ref: _ref,
|
|
1283
|
+
textareaStyle,
|
|
1284
|
+
autosize: vue.toRef(props, "autosize"),
|
|
1285
|
+
focus,
|
|
1286
|
+
blur,
|
|
1287
|
+
select,
|
|
1288
|
+
clear,
|
|
1289
|
+
resizeTextarea
|
|
1290
|
+
});
|
|
1291
|
+
return (_ctx, _cache) => {
|
|
1292
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.mergeProps(vue.unref(containerAttrs), {
|
|
1293
|
+
class: vue.unref(containerKls),
|
|
1294
|
+
style: vue.unref(containerStyle),
|
|
1295
|
+
role: _ctx.containerRole,
|
|
1296
|
+
onMouseenter: handleMouseEnter,
|
|
1297
|
+
onMouseleave: handleMouseLeave
|
|
1298
|
+
}), [
|
|
1299
|
+
vue.createCommentVNode(" input "),
|
|
1300
|
+
_ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1301
|
+
vue.createCommentVNode(" prepend slot "),
|
|
1302
|
+
_ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1303
|
+
key: 0,
|
|
1304
|
+
class: vue.normalizeClass(vue.unref(nsInput).be("group", "prepend"))
|
|
1305
|
+
}, [
|
|
1306
|
+
vue.renderSlot(_ctx.$slots, "prepend")
|
|
1307
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
1308
|
+
vue.createElementVNode("div", {
|
|
1309
|
+
class: vue.normalizeClass(vue.unref(wrapperKls))
|
|
1310
|
+
}, [
|
|
1311
|
+
vue.createCommentVNode(" prefix slot "),
|
|
1312
|
+
_ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1313
|
+
key: 0,
|
|
1314
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("prefix"))
|
|
1315
|
+
}, [
|
|
1316
|
+
vue.createElementVNode("span", {
|
|
1317
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("prefix-inner")),
|
|
1318
|
+
onClick: focus
|
|
1319
|
+
}, [
|
|
1320
|
+
vue.renderSlot(_ctx.$slots, "prefix"),
|
|
1321
|
+
_ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
|
|
1322
|
+
key: 0,
|
|
1323
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
|
|
1324
|
+
}, {
|
|
1325
|
+
default: vue.withCtx(() => [
|
|
1326
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
|
|
1327
|
+
]),
|
|
1328
|
+
_: 1
|
|
1329
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
1330
|
+
], 2)
|
|
1331
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
1332
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
1333
|
+
id: vue.unref(inputId),
|
|
1334
|
+
ref_key: "input",
|
|
1335
|
+
ref: input,
|
|
1336
|
+
class: vue.unref(nsInput).e("inner")
|
|
1337
|
+
}, vue.unref(attrs), {
|
|
1338
|
+
type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
|
|
1339
|
+
disabled: vue.unref(inputDisabled),
|
|
1340
|
+
formatter: _ctx.formatter,
|
|
1341
|
+
parser: _ctx.parser,
|
|
1342
|
+
readonly: _ctx.readonly,
|
|
1343
|
+
autocomplete: _ctx.autocomplete,
|
|
1344
|
+
tabindex: _ctx.tabindex,
|
|
1345
|
+
"aria-label": _ctx.label,
|
|
1346
|
+
placeholder: _ctx.placeholder,
|
|
1347
|
+
style: _ctx.inputStyle,
|
|
1348
|
+
form: props.form,
|
|
1349
|
+
onCompositionstart: handleCompositionStart,
|
|
1350
|
+
onCompositionupdate: handleCompositionUpdate,
|
|
1351
|
+
onCompositionend: handleCompositionEnd,
|
|
1352
|
+
onInput: handleInput,
|
|
1353
|
+
onFocus: handleFocus,
|
|
1354
|
+
onBlur: handleBlur,
|
|
1355
|
+
onChange: handleChange,
|
|
1356
|
+
onKeydown: handleKeydown
|
|
1357
|
+
}), null, 16, _hoisted_2),
|
|
1358
|
+
vue.createCommentVNode(" suffix slot "),
|
|
1359
|
+
vue.unref(suffixVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1360
|
+
key: 1,
|
|
1361
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("suffix"))
|
|
1362
|
+
}, [
|
|
1363
|
+
vue.createElementVNode("span", {
|
|
1364
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("suffix-inner")),
|
|
1365
|
+
onClick: focus
|
|
1366
|
+
}, [
|
|
1367
|
+
!vue.unref(showClear) || !vue.unref(showPwdVisible) || !vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1368
|
+
vue.renderSlot(_ctx.$slots, "suffix"),
|
|
1369
|
+
_ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
|
|
1370
|
+
key: 0,
|
|
1371
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
|
|
1372
|
+
}, {
|
|
1373
|
+
default: vue.withCtx(() => [
|
|
1374
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.suffixIcon)))
|
|
1375
|
+
]),
|
|
1376
|
+
_: 1
|
|
1377
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
1378
|
+
], 64)) : vue.createCommentVNode("v-if", true),
|
|
1379
|
+
vue.unref(showClear) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
|
|
1380
|
+
key: 1,
|
|
1381
|
+
class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("clear")]),
|
|
1382
|
+
onMousedown: vue.withModifiers(vue.unref(NOOP), ["prevent"]),
|
|
1383
|
+
onClick: clear
|
|
1384
|
+
}, {
|
|
1385
|
+
default: vue.withCtx(() => [
|
|
1386
|
+
vue.createVNode(vue.unref(circle_close_default))
|
|
1387
|
+
]),
|
|
1388
|
+
_: 1
|
|
1389
|
+
}, 8, ["class", "onMousedown"])) : vue.createCommentVNode("v-if", true),
|
|
1390
|
+
vue.unref(showPwdVisible) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
|
|
1391
|
+
key: 2,
|
|
1392
|
+
class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("password")]),
|
|
1393
|
+
onClick: handlePasswordVisible
|
|
1394
|
+
}, {
|
|
1395
|
+
default: vue.withCtx(() => [
|
|
1396
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(passwordIcon))))
|
|
1397
|
+
]),
|
|
1398
|
+
_: 1
|
|
1399
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
1400
|
+
vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1401
|
+
key: 3,
|
|
1402
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("count"))
|
|
1403
|
+
}, [
|
|
1404
|
+
vue.createElementVNode("span", {
|
|
1405
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("count-inner"))
|
|
1406
|
+
}, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 3)
|
|
1407
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
1408
|
+
vue.unref(validateState) && vue.unref(validateIcon) && vue.unref(needStatusIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
|
|
1409
|
+
key: 4,
|
|
1410
|
+
class: vue.normalizeClass([
|
|
1411
|
+
vue.unref(nsInput).e("icon"),
|
|
1412
|
+
vue.unref(nsInput).e("validateIcon"),
|
|
1413
|
+
vue.unref(nsInput).is("loading", vue.unref(validateState) === "validating")
|
|
1414
|
+
])
|
|
1415
|
+
}, {
|
|
1416
|
+
default: vue.withCtx(() => [
|
|
1417
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(validateIcon))))
|
|
1418
|
+
]),
|
|
1419
|
+
_: 1
|
|
1420
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
1421
|
+
], 2)
|
|
1422
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
1423
|
+
], 2),
|
|
1424
|
+
vue.createCommentVNode(" append slot "),
|
|
1425
|
+
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1426
|
+
key: 1,
|
|
1427
|
+
class: vue.normalizeClass(vue.unref(nsInput).be("group", "append"))
|
|
1428
|
+
}, [
|
|
1429
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
1430
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
1431
|
+
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
1432
|
+
vue.createCommentVNode(" textarea "),
|
|
1433
|
+
vue.createElementVNode("textarea", vue.mergeProps({
|
|
1434
|
+
id: vue.unref(inputId),
|
|
1435
|
+
ref_key: "textarea",
|
|
1436
|
+
ref: textarea,
|
|
1437
|
+
class: vue.unref(nsTextarea).e("inner")
|
|
1438
|
+
}, vue.unref(attrs), {
|
|
1439
|
+
tabindex: _ctx.tabindex,
|
|
1440
|
+
disabled: vue.unref(inputDisabled),
|
|
1441
|
+
readonly: _ctx.readonly,
|
|
1442
|
+
autocomplete: _ctx.autocomplete,
|
|
1443
|
+
style: vue.unref(textareaStyle),
|
|
1444
|
+
"aria-label": _ctx.label,
|
|
1445
|
+
placeholder: _ctx.placeholder,
|
|
1446
|
+
form: props.form,
|
|
1447
|
+
onCompositionstart: handleCompositionStart,
|
|
1448
|
+
onCompositionupdate: handleCompositionUpdate,
|
|
1449
|
+
onCompositionend: handleCompositionEnd,
|
|
1450
|
+
onInput: handleInput,
|
|
1451
|
+
onFocus: handleFocus,
|
|
1452
|
+
onBlur: handleBlur,
|
|
1453
|
+
onChange: handleChange,
|
|
1454
|
+
onKeydown: handleKeydown
|
|
1455
|
+
}), null, 16, _hoisted_3),
|
|
1456
|
+
vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1457
|
+
key: 0,
|
|
1458
|
+
style: vue.normalizeStyle(countStyle.value),
|
|
1459
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("count"))
|
|
1460
|
+
}, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 7)) : vue.createCommentVNode("v-if", true)
|
|
1461
|
+
], 64))
|
|
1462
|
+
], 16, _hoisted_1)), [
|
|
1463
|
+
[vue.vShow, _ctx.type !== "hidden"]
|
|
1464
|
+
]);
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
});
|
|
1468
|
+
var Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);
|
|
1469
|
+
|
|
1470
|
+
const ElInput = withInstall(Input);
|
|
1471
|
+
|
|
1472
|
+
var script = vue.defineComponent({
|
|
1473
|
+
name: 'RxInput',
|
|
1474
|
+
components: {
|
|
1475
|
+
ElInput
|
|
1476
|
+
},
|
|
1477
|
+
props: index.RxInputProps,
|
|
1478
|
+
setup(props, { emit }) {
|
|
1479
|
+
const valuePass = useVModel(props, 'value', emit);
|
|
1480
|
+
const { formmatterTotalInputValue, formatterTotalBlurForAddDecimal, checkPropsIsVaildWhenTotal } = useTotalInput.useTotalInput(valuePass, props);
|
|
1481
|
+
vue.nextTick(() => {
|
|
1482
|
+
switch (props.inputType) {
|
|
1483
|
+
case 'total':
|
|
1484
|
+
checkPropsIsVaildWhenTotal();
|
|
1485
|
+
break;
|
|
1486
|
+
}
|
|
1487
|
+
});
|
|
1488
|
+
return {
|
|
1489
|
+
valuePass,
|
|
1490
|
+
formmatterTotalInputValue,
|
|
1491
|
+
formatterTotalBlurForAddDecimal
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
|
|
1496
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1497
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
1498
|
+
|
|
1499
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1500
|
+
vue.createCommentVNode(" 默认input "),
|
|
1501
|
+
(_ctx.inputType == 'default')
|
|
1502
|
+
? (vue.openBlock(), vue.createBlock(_component_el_input, vue.mergeProps({
|
|
1503
|
+
key: 0,
|
|
1504
|
+
modelValue: _ctx.valuePass,
|
|
1505
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.valuePass) = $event)),
|
|
1506
|
+
class: "rx-input input-default"
|
|
1507
|
+
}, _ctx.$attrs, { clearable: "" }), {
|
|
1508
|
+
default: vue.withCtx(() => [
|
|
1509
|
+
vue.renderSlot(_ctx.$slots, "prefix"),
|
|
1510
|
+
vue.renderSlot(_ctx.$slots, "suffix"),
|
|
1511
|
+
vue.renderSlot(_ctx.$slots, "prepend"),
|
|
1512
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
1513
|
+
]),
|
|
1514
|
+
_: 3 /* FORWARDED */
|
|
1515
|
+
}, 16 /* FULL_PROPS */, ["modelValue"]))
|
|
1516
|
+
: vue.createCommentVNode("v-if", true),
|
|
1517
|
+
vue.createCommentVNode(" 数量input "),
|
|
1518
|
+
(_ctx.inputType == 'total')
|
|
1519
|
+
? (vue.openBlock(), vue.createBlock(_component_el_input, vue.mergeProps({
|
|
1520
|
+
key: 1,
|
|
1521
|
+
modelValue: _ctx.valuePass,
|
|
1522
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((_ctx.valuePass) = $event)),
|
|
1523
|
+
class: "rx-input input-total",
|
|
1524
|
+
clearable: ""
|
|
1525
|
+
}, _ctx.$attrs, {
|
|
1526
|
+
onInput: _ctx.formmatterTotalInputValue,
|
|
1527
|
+
onBlur: _ctx.formatterTotalBlurForAddDecimal
|
|
1528
|
+
}), {
|
|
1529
|
+
default: vue.withCtx(() => [
|
|
1530
|
+
vue.renderSlot(_ctx.$slots, "prefix"),
|
|
1531
|
+
vue.renderSlot(_ctx.$slots, "suffix"),
|
|
1532
|
+
vue.renderSlot(_ctx.$slots, "prepend"),
|
|
1533
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
1534
|
+
]),
|
|
1535
|
+
_: 3 /* FORWARDED */
|
|
1536
|
+
}, 16 /* FULL_PROPS */, ["modelValue", "onInput", "onBlur"]))
|
|
1537
|
+
: vue.createCommentVNode("v-if", true),
|
|
1538
|
+
vue.createCommentVNode(" 金额input "),
|
|
1539
|
+
(_ctx.inputType == 'money')
|
|
1540
|
+
? (vue.openBlock(), vue.createBlock(_component_el_input, vue.mergeProps({
|
|
1541
|
+
key: 2,
|
|
1542
|
+
modelValue: _ctx.valuePass,
|
|
1543
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((_ctx.valuePass) = $event)),
|
|
1544
|
+
class: "rx-input input-money",
|
|
1545
|
+
clearable: ""
|
|
1546
|
+
}, _ctx.$attrs), {
|
|
1547
|
+
default: vue.withCtx(() => [
|
|
1548
|
+
vue.renderSlot(_ctx.$slots, "prefix"),
|
|
1549
|
+
vue.renderSlot(_ctx.$slots, "suffix"),
|
|
1550
|
+
vue.renderSlot(_ctx.$slots, "prepend"),
|
|
1551
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
1552
|
+
]),
|
|
1553
|
+
_: 3 /* FORWARDED */
|
|
1554
|
+
}, 16 /* FULL_PROPS */, ["modelValue"]))
|
|
1555
|
+
: vue.createCommentVNode("v-if", true)
|
|
1556
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
script.render = render;
|
|
1560
|
+
script.__file = "packages/components/RxInput/src/index.vue";
|
|
1561
|
+
|
|
1562
|
+
const RxInput = withInstall$1.withInstall(script);
|
|
1563
|
+
|
|
1564
|
+
exports.RxInput = RxInput;
|
|
1565
|
+
exports["default"] = RxInput;
|