lew-ui 2.6.1 → 2.6.3
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/dist/components/menu-tree/src/LewMenuTreeItem.vue.d.ts +8 -44
- package/dist/components/menu-tree/src/props.d.ts +3 -24
- package/dist/components/table/src/LewTable.vue.d.ts +1 -1
- package/dist/components/tree/src/LewTree.vue.d.ts +38 -38
- package/dist/components/tree/src/LewTreeItem.vue.d.ts +111 -0
- package/dist/components/tree/src/props.d.ts +50 -12
- package/dist/components/tree/src/transformTree.d.ts +38 -0
- package/dist/components/tree-select/src/LewTreeSelect.vue.d.ts +8 -10
- package/dist/components/tree-select/src/props.d.ts +1 -1
- package/dist/components/upload/src/props.d.ts +4 -2
- package/dist/index.mjs +1040 -956
- package/dist/index.umd.js +6 -6
- package/dist/style.css +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/package.json +1 -1
- package/dist/components/tree/src/tree2list.d.ts +0 -25
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ const isClient = typeof window !== "undefined" && typeof document !== "undefined
|
|
|
14
14
|
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
15
15
|
const toString$2 = Object.prototype.toString;
|
|
16
16
|
const isObject$3 = (val) => toString$2.call(val) === "[object Object]";
|
|
17
|
-
const noop
|
|
17
|
+
const noop = () => {
|
|
18
18
|
};
|
|
19
19
|
const isIOS = /* @__PURE__ */ getIsIOS();
|
|
20
20
|
function getIsIOS() {
|
|
@@ -35,11 +35,11 @@ const bypassFilter = (invoke) => {
|
|
|
35
35
|
function debounceFilter(ms, options = {}) {
|
|
36
36
|
let timer;
|
|
37
37
|
let maxTimer;
|
|
38
|
-
let lastRejector = noop
|
|
38
|
+
let lastRejector = noop;
|
|
39
39
|
const _clearTimeout = (timer2) => {
|
|
40
40
|
clearTimeout(timer2);
|
|
41
41
|
lastRejector();
|
|
42
|
-
lastRejector = noop
|
|
42
|
+
lastRejector = noop;
|
|
43
43
|
};
|
|
44
44
|
const filter = (invoke) => {
|
|
45
45
|
const duration = toValue(ms);
|
|
@@ -290,7 +290,7 @@ function useEventListener$1(...args) {
|
|
|
290
290
|
[target, events, listeners, options] = args;
|
|
291
291
|
}
|
|
292
292
|
if (!target)
|
|
293
|
-
return noop
|
|
293
|
+
return noop;
|
|
294
294
|
if (!Array.isArray(events))
|
|
295
295
|
events = [events];
|
|
296
296
|
if (!Array.isArray(listeners))
|
|
@@ -330,11 +330,11 @@ let _iOSWorkaround = false;
|
|
|
330
330
|
function onClickOutside(target, handler, options = {}) {
|
|
331
331
|
const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
|
|
332
332
|
if (!window2)
|
|
333
|
-
return noop
|
|
333
|
+
return noop;
|
|
334
334
|
if (isIOS && !_iOSWorkaround) {
|
|
335
335
|
_iOSWorkaround = true;
|
|
336
|
-
Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop
|
|
337
|
-
window2.document.documentElement.addEventListener("click", noop
|
|
336
|
+
Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop));
|
|
337
|
+
window2.document.documentElement.addEventListener("click", noop);
|
|
338
338
|
}
|
|
339
339
|
let shouldListen = true;
|
|
340
340
|
const shouldIgnore = (event) => {
|
|
@@ -399,8 +399,8 @@ function useAsyncState(promise, initialState, options) {
|
|
|
399
399
|
const {
|
|
400
400
|
immediate = true,
|
|
401
401
|
delay = 0,
|
|
402
|
-
onError = noop
|
|
403
|
-
onSuccess = noop
|
|
402
|
+
onError = noop,
|
|
403
|
+
onSuccess = noop,
|
|
404
404
|
resetOnExecute = true,
|
|
405
405
|
shallow = true,
|
|
406
406
|
throwError
|
|
@@ -575,7 +575,7 @@ function useMagicKeys(options = {}) {
|
|
|
575
575
|
target = defaultWindow,
|
|
576
576
|
aliasMap = DefaultMagicKeysAliasMap,
|
|
577
577
|
passive: passive2 = true,
|
|
578
|
-
onEventFired = noop
|
|
578
|
+
onEventFired = noop
|
|
579
579
|
} = options;
|
|
580
580
|
const current = reactive(/* @__PURE__ */ new Set());
|
|
581
581
|
const obj = {
|
|
@@ -805,7 +805,7 @@ function arrayMap(array2, iteratee) {
|
|
|
805
805
|
return result;
|
|
806
806
|
}
|
|
807
807
|
var isArray$1 = Array.isArray;
|
|
808
|
-
var INFINITY$
|
|
808
|
+
var INFINITY$1 = 1 / 0;
|
|
809
809
|
var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString$1 = symbolProto$2 ? symbolProto$2.toString : void 0;
|
|
810
810
|
function baseToString(value) {
|
|
811
811
|
if (typeof value == "string") {
|
|
@@ -818,7 +818,7 @@ function baseToString(value) {
|
|
|
818
818
|
return symbolToString$1 ? symbolToString$1.call(value) : "";
|
|
819
819
|
}
|
|
820
820
|
var result = value + "";
|
|
821
|
-
return result == "0" && 1 / value == -INFINITY$
|
|
821
|
+
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
822
822
|
}
|
|
823
823
|
var reWhitespace = /\s/;
|
|
824
824
|
function trimmedEndIndex(string2) {
|
|
@@ -945,8 +945,6 @@ function apply$1(func, thisArg, args) {
|
|
|
945
945
|
}
|
|
946
946
|
return func.apply(thisArg, args);
|
|
947
947
|
}
|
|
948
|
-
function noop() {
|
|
949
|
-
}
|
|
950
948
|
function copyArray(source, array2) {
|
|
951
949
|
var index2 = -1, length = source.length;
|
|
952
950
|
array2 || (array2 = Array(length));
|
|
@@ -1390,8 +1388,8 @@ function isKeyable(value) {
|
|
|
1390
1388
|
var type = typeof value;
|
|
1391
1389
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
1392
1390
|
}
|
|
1393
|
-
function getMapData(
|
|
1394
|
-
var data =
|
|
1391
|
+
function getMapData(map, key) {
|
|
1392
|
+
var data = map.__data__;
|
|
1395
1393
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1396
1394
|
}
|
|
1397
1395
|
function mapCacheDelete(key) {
|
|
@@ -1474,13 +1472,13 @@ function castPath(value, object2) {
|
|
|
1474
1472
|
}
|
|
1475
1473
|
return isKey(value, object2) ? [value] : stringToPath(toString$1(value));
|
|
1476
1474
|
}
|
|
1477
|
-
var INFINITY
|
|
1475
|
+
var INFINITY = 1 / 0;
|
|
1478
1476
|
function toKey(value) {
|
|
1479
1477
|
if (typeof value == "string" || isSymbol(value)) {
|
|
1480
1478
|
return value;
|
|
1481
1479
|
}
|
|
1482
1480
|
var result = value + "";
|
|
1483
|
-
return result == "0" && 1 / value == -INFINITY
|
|
1481
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
1484
1482
|
}
|
|
1485
1483
|
function baseGet(object2, path) {
|
|
1486
1484
|
path = castPath(path, object2);
|
|
@@ -1515,8 +1513,6 @@ function baseFlatten(array2, depth, predicate, isStrict, result) {
|
|
|
1515
1513
|
{
|
|
1516
1514
|
arrayPush(result, value);
|
|
1517
1515
|
}
|
|
1518
|
-
} else if (!isStrict) {
|
|
1519
|
-
result[result.length] = value;
|
|
1520
1516
|
}
|
|
1521
1517
|
}
|
|
1522
1518
|
return result;
|
|
@@ -1558,12 +1554,12 @@ function stackGet(key) {
|
|
|
1558
1554
|
function stackHas(key) {
|
|
1559
1555
|
return this.__data__.has(key);
|
|
1560
1556
|
}
|
|
1561
|
-
var LARGE_ARRAY_SIZE$
|
|
1557
|
+
var LARGE_ARRAY_SIZE$1 = 200;
|
|
1562
1558
|
function stackSet(key, value) {
|
|
1563
1559
|
var data = this.__data__;
|
|
1564
1560
|
if (data instanceof ListCache) {
|
|
1565
1561
|
var pairs = data.__data__;
|
|
1566
|
-
if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE$
|
|
1562
|
+
if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE$1 - 1) {
|
|
1567
1563
|
pairs.push([key, value]);
|
|
1568
1564
|
this.size = ++data.size;
|
|
1569
1565
|
return this;
|
|
@@ -1902,9 +1898,9 @@ function equalArrays(array2, other, bitmask, customizer, equalFunc, stack) {
|
|
|
1902
1898
|
stack["delete"](other);
|
|
1903
1899
|
return result;
|
|
1904
1900
|
}
|
|
1905
|
-
function mapToArray(
|
|
1906
|
-
var index2 = -1, result = Array(
|
|
1907
|
-
|
|
1901
|
+
function mapToArray(map) {
|
|
1902
|
+
var index2 = -1, result = Array(map.size);
|
|
1903
|
+
map.forEach(function(value, key) {
|
|
1908
1904
|
result[++index2] = [key, value];
|
|
1909
1905
|
});
|
|
1910
1906
|
return result;
|
|
@@ -2228,7 +2224,7 @@ var now$1 = function() {
|
|
|
2228
2224
|
return root.Date.now();
|
|
2229
2225
|
};
|
|
2230
2226
|
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
2231
|
-
var nativeMax = Math.max, nativeMin
|
|
2227
|
+
var nativeMax = Math.max, nativeMin = Math.min;
|
|
2232
2228
|
function debounce$2(func, wait, options) {
|
|
2233
2229
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
2234
2230
|
if (typeof func != "function") {
|
|
@@ -2255,7 +2251,7 @@ function debounce$2(func, wait, options) {
|
|
|
2255
2251
|
}
|
|
2256
2252
|
function remainingWait(time) {
|
|
2257
2253
|
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
2258
|
-
return maxing ? nativeMin
|
|
2254
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
2259
2255
|
}
|
|
2260
2256
|
function shouldInvoke(time) {
|
|
2261
2257
|
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
@@ -2390,13 +2386,13 @@ function baseMerge(object2, source, srcIndex, customizer, stack) {
|
|
|
2390
2386
|
}
|
|
2391
2387
|
}, keysIn);
|
|
2392
2388
|
}
|
|
2393
|
-
var LARGE_ARRAY_SIZE
|
|
2389
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
2394
2390
|
function baseDifference(array2, values, iteratee, comparator) {
|
|
2395
2391
|
var index2 = -1, includes = arrayIncludes, isCommon = true, length = array2.length, result = [], valuesLength = values.length;
|
|
2396
2392
|
if (!length) {
|
|
2397
2393
|
return result;
|
|
2398
2394
|
}
|
|
2399
|
-
if (values.length >= LARGE_ARRAY_SIZE
|
|
2395
|
+
if (values.length >= LARGE_ARRAY_SIZE) {
|
|
2400
2396
|
includes = cacheHas;
|
|
2401
2397
|
isCommon = false;
|
|
2402
2398
|
values = new SetCache(values);
|
|
@@ -2420,15 +2416,8 @@ function baseDifference(array2, values, iteratee, comparator) {
|
|
|
2420
2416
|
return result;
|
|
2421
2417
|
}
|
|
2422
2418
|
var difference = baseRest(function(array2, values) {
|
|
2423
|
-
return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values, 1, isArrayLikeObject
|
|
2419
|
+
return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values, 1, isArrayLikeObject)) : [];
|
|
2424
2420
|
});
|
|
2425
|
-
function castFunction(value) {
|
|
2426
|
-
return typeof value == "function" ? value : identity;
|
|
2427
|
-
}
|
|
2428
|
-
function forEach$1(collection, iteratee) {
|
|
2429
|
-
var func = isArray$1(collection) ? arrayEach : baseEach;
|
|
2430
|
-
return func(collection, castFunction(iteratee));
|
|
2431
|
-
}
|
|
2432
2421
|
var htmlEscapes = {
|
|
2433
2422
|
"&": "&",
|
|
2434
2423
|
"<": "<",
|
|
@@ -2442,28 +2431,6 @@ function escape$1(string2) {
|
|
|
2442
2431
|
string2 = toString$1(string2);
|
|
2443
2432
|
return string2 && reHasUnescapedHtml.test(string2) ? string2.replace(reUnescapedHtml, escapeHtmlChar) : string2;
|
|
2444
2433
|
}
|
|
2445
|
-
function findIndex$1(array2, predicate, fromIndex) {
|
|
2446
|
-
var length = array2 == null ? 0 : array2.length;
|
|
2447
|
-
if (!length) {
|
|
2448
|
-
return -1;
|
|
2449
|
-
}
|
|
2450
|
-
var index2 = 0;
|
|
2451
|
-
return baseFindIndex(array2, baseIteratee(predicate), index2);
|
|
2452
|
-
}
|
|
2453
|
-
function baseMap(collection, iteratee) {
|
|
2454
|
-
var index2 = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
2455
|
-
baseEach(collection, function(value, key, collection2) {
|
|
2456
|
-
result[++index2] = iteratee(value, key, collection2);
|
|
2457
|
-
});
|
|
2458
|
-
return result;
|
|
2459
|
-
}
|
|
2460
|
-
function map(collection, iteratee) {
|
|
2461
|
-
var func = isArray$1(collection) ? arrayMap : baseMap;
|
|
2462
|
-
return func(collection, baseIteratee(iteratee));
|
|
2463
|
-
}
|
|
2464
|
-
function flatMap(collection, iteratee) {
|
|
2465
|
-
return baseFlatten(map(collection, iteratee));
|
|
2466
|
-
}
|
|
2467
2434
|
var objectProto$1 = Object.prototype;
|
|
2468
2435
|
var hasOwnProperty$3 = objectProto$1.hasOwnProperty;
|
|
2469
2436
|
function baseHas(object2, key) {
|
|
@@ -2476,46 +2443,6 @@ var stringTag = "[object String]";
|
|
|
2476
2443
|
function isString$1(value) {
|
|
2477
2444
|
return typeof value == "string" || !isArray$1(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
2478
2445
|
}
|
|
2479
|
-
var nativeMin = Math.min;
|
|
2480
|
-
function baseIntersection(arrays, iteratee, comparator) {
|
|
2481
|
-
var includes = arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = [];
|
|
2482
|
-
while (othIndex--) {
|
|
2483
|
-
var array2 = arrays[othIndex];
|
|
2484
|
-
if (othIndex && iteratee) {
|
|
2485
|
-
array2 = arrayMap(array2, baseUnary(iteratee));
|
|
2486
|
-
}
|
|
2487
|
-
maxLength = nativeMin(array2.length, maxLength);
|
|
2488
|
-
caches[othIndex] = length >= 120 && array2.length >= 120 ? new SetCache(othIndex && array2) : void 0;
|
|
2489
|
-
}
|
|
2490
|
-
array2 = arrays[0];
|
|
2491
|
-
var index2 = -1, seen = caches[0];
|
|
2492
|
-
outer:
|
|
2493
|
-
while (++index2 < length && result.length < maxLength) {
|
|
2494
|
-
var value = array2[index2], computed2 = value;
|
|
2495
|
-
value = value !== 0 ? value : 0;
|
|
2496
|
-
if (!(seen ? cacheHas(seen, computed2) : includes(result, computed2))) {
|
|
2497
|
-
othIndex = othLength;
|
|
2498
|
-
while (--othIndex) {
|
|
2499
|
-
var cache2 = caches[othIndex];
|
|
2500
|
-
if (!(cache2 ? cacheHas(cache2, computed2) : includes(arrays[othIndex], computed2))) {
|
|
2501
|
-
continue outer;
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
if (seen) {
|
|
2505
|
-
seen.push(computed2);
|
|
2506
|
-
}
|
|
2507
|
-
result.push(value);
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
return result;
|
|
2511
|
-
}
|
|
2512
|
-
function castArrayLikeObject(value) {
|
|
2513
|
-
return isArrayLikeObject(value) ? value : [];
|
|
2514
|
-
}
|
|
2515
|
-
var intersection = baseRest(function(arrays) {
|
|
2516
|
-
var mapped = arrayMap(arrays, castArrayLikeObject);
|
|
2517
|
-
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
|
|
2518
|
-
});
|
|
2519
2446
|
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
2520
2447
|
var objectProto = Object.prototype;
|
|
2521
2448
|
var hasOwnProperty$2 = objectProto.hasOwnProperty;
|
|
@@ -2609,18 +2536,6 @@ function pickBy(object2, predicate) {
|
|
|
2609
2536
|
return predicate(value, path[0]);
|
|
2610
2537
|
});
|
|
2611
2538
|
}
|
|
2612
|
-
function baseSome(collection, predicate) {
|
|
2613
|
-
var result;
|
|
2614
|
-
baseEach(collection, function(value, index2, collection2) {
|
|
2615
|
-
result = predicate(value, index2, collection2);
|
|
2616
|
-
return !result;
|
|
2617
|
-
});
|
|
2618
|
-
return !!result;
|
|
2619
|
-
}
|
|
2620
|
-
function some(collection, predicate, guard) {
|
|
2621
|
-
var func = isArray$1(collection) ? arraySome : baseSome;
|
|
2622
|
-
return func(collection, baseIteratee(predicate));
|
|
2623
|
-
}
|
|
2624
2539
|
function sumBy(array2, iteratee) {
|
|
2625
2540
|
return array2 && array2.length ? baseSum(array2, baseIteratee(iteratee)) : 0;
|
|
2626
2541
|
}
|
|
@@ -2640,48 +2555,6 @@ function throttle(func, wait, options) {
|
|
|
2640
2555
|
"trailing": trailing
|
|
2641
2556
|
});
|
|
2642
2557
|
}
|
|
2643
|
-
var INFINITY = 1 / 0;
|
|
2644
|
-
var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == INFINITY) ? noop : function(values) {
|
|
2645
|
-
return new Set$1(values);
|
|
2646
|
-
};
|
|
2647
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
2648
|
-
function baseUniq(array2, iteratee, comparator) {
|
|
2649
|
-
var index2 = -1, includes = arrayIncludes, length = array2.length, isCommon = true, result = [], seen = result;
|
|
2650
|
-
if (length >= LARGE_ARRAY_SIZE) {
|
|
2651
|
-
var set = createSet(array2);
|
|
2652
|
-
if (set) {
|
|
2653
|
-
return setToArray(set);
|
|
2654
|
-
}
|
|
2655
|
-
isCommon = false;
|
|
2656
|
-
includes = cacheHas;
|
|
2657
|
-
seen = new SetCache();
|
|
2658
|
-
} else {
|
|
2659
|
-
seen = result;
|
|
2660
|
-
}
|
|
2661
|
-
outer:
|
|
2662
|
-
while (++index2 < length) {
|
|
2663
|
-
var value = array2[index2], computed2 = value;
|
|
2664
|
-
value = value !== 0 ? value : 0;
|
|
2665
|
-
if (isCommon && computed2 === computed2) {
|
|
2666
|
-
var seenIndex = seen.length;
|
|
2667
|
-
while (seenIndex--) {
|
|
2668
|
-
if (seen[seenIndex] === computed2) {
|
|
2669
|
-
continue outer;
|
|
2670
|
-
}
|
|
2671
|
-
}
|
|
2672
|
-
result.push(value);
|
|
2673
|
-
} else if (!includes(seen, computed2, comparator)) {
|
|
2674
|
-
if (seen !== result) {
|
|
2675
|
-
seen.push(computed2);
|
|
2676
|
-
}
|
|
2677
|
-
result.push(value);
|
|
2678
|
-
}
|
|
2679
|
-
}
|
|
2680
|
-
return result;
|
|
2681
|
-
}
|
|
2682
|
-
function uniq(array2) {
|
|
2683
|
-
return array2 && array2.length ? baseUniq(array2) : [];
|
|
2684
|
-
}
|
|
2685
2558
|
var idCounter$1 = 0;
|
|
2686
2559
|
function uniqueId(prefix) {
|
|
2687
2560
|
var id = ++idCounter$1;
|
|
@@ -3143,7 +3016,7 @@ const X = createLucideIcon("XIcon", [
|
|
|
3143
3016
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3144
3017
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3145
3018
|
]);
|
|
3146
|
-
const _sfc_main$
|
|
3019
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
3147
3020
|
__name: "Icon",
|
|
3148
3021
|
props: {
|
|
3149
3022
|
type: {
|
|
@@ -3245,7 +3118,7 @@ const _export_sfc = (sfc, props2) => {
|
|
|
3245
3118
|
}
|
|
3246
3119
|
return target;
|
|
3247
3120
|
};
|
|
3248
|
-
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3121
|
+
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-550e8cab"]]);
|
|
3249
3122
|
const iconColorType = {
|
|
3250
3123
|
normal: "gray",
|
|
3251
3124
|
warning: "orange",
|
|
@@ -3581,6 +3454,44 @@ const poll = ({
|
|
|
3581
3454
|
};
|
|
3582
3455
|
execute();
|
|
3583
3456
|
};
|
|
3457
|
+
const insertChildByKey = (tree, key, newChild) => {
|
|
3458
|
+
var _a;
|
|
3459
|
+
for (let i = 0; i < tree.length; i++) {
|
|
3460
|
+
if (tree[i].key === key) {
|
|
3461
|
+
tree[i].children = newChild;
|
|
3462
|
+
return true;
|
|
3463
|
+
}
|
|
3464
|
+
if ((_a = tree[i].children) == null ? void 0 : _a.length) {
|
|
3465
|
+
if (insertChildByKey(tree[i].children, key, newChild)) {
|
|
3466
|
+
return true;
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
return false;
|
|
3471
|
+
};
|
|
3472
|
+
const findAllChildrenKeys = (node) => {
|
|
3473
|
+
var _a;
|
|
3474
|
+
const keys2 = [];
|
|
3475
|
+
const traverse = (item) => {
|
|
3476
|
+
var _a2;
|
|
3477
|
+
if (item.key !== void 0) keys2.push(item.key);
|
|
3478
|
+
(_a2 = item.children) == null ? void 0 : _a2.forEach(traverse);
|
|
3479
|
+
};
|
|
3480
|
+
(_a = node.children) == null ? void 0 : _a.forEach(traverse);
|
|
3481
|
+
return keys2;
|
|
3482
|
+
};
|
|
3483
|
+
const findNodeByKey = (key, tree) => {
|
|
3484
|
+
var _a;
|
|
3485
|
+
const queue = cloneDeep(tree);
|
|
3486
|
+
while (queue.length > 0) {
|
|
3487
|
+
const node = queue.shift();
|
|
3488
|
+
if (node.key === key) return node;
|
|
3489
|
+
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
3490
|
+
queue.push(...node.children);
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
return null;
|
|
3494
|
+
};
|
|
3584
3495
|
const imageProps = {
|
|
3585
3496
|
src: {
|
|
3586
3497
|
type: String,
|
|
@@ -3688,17 +3599,17 @@ const imageProps = {
|
|
|
3688
3599
|
}
|
|
3689
3600
|
}
|
|
3690
3601
|
};
|
|
3691
|
-
const _hoisted_1$
|
|
3602
|
+
const _hoisted_1$L = {
|
|
3692
3603
|
key: 0,
|
|
3693
3604
|
class: "skeletons"
|
|
3694
3605
|
};
|
|
3695
|
-
const _hoisted_2$
|
|
3696
|
-
const _hoisted_3$
|
|
3606
|
+
const _hoisted_2$s = ["alt"];
|
|
3607
|
+
const _hoisted_3$l = {
|
|
3697
3608
|
key: 2,
|
|
3698
3609
|
class: "lew-image-box"
|
|
3699
3610
|
};
|
|
3700
|
-
const _hoisted_4$
|
|
3701
|
-
const _sfc_main$
|
|
3611
|
+
const _hoisted_4$e = ["src", "lazy", "alt"];
|
|
3612
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
3702
3613
|
__name: "LewImage",
|
|
3703
3614
|
props: imageProps,
|
|
3704
3615
|
setup(__props2) {
|
|
@@ -3745,19 +3656,19 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3745
3656
|
style: normalizeStyle(unref(imageStyleObject))
|
|
3746
3657
|
}, {
|
|
3747
3658
|
default: withCtx(() => [
|
|
3748
|
-
unref(_loading) || _ctx.loading || !_ctx.src ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3659
|
+
unref(_loading) || _ctx.loading || !_ctx.src ? (openBlock(), createElementBlock("div", _hoisted_1$L)) : unref(_error) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
3749
3660
|
_ctx.$slots.error ? renderSlot(_ctx.$slots, "error", { key: 0 }, void 0, true) : withDirectives((openBlock(), createElementBlock("img", {
|
|
3750
3661
|
key: 1,
|
|
3751
3662
|
class: "lew-image-fail-icon",
|
|
3752
3663
|
src: _imports_0,
|
|
3753
3664
|
alt: unref(locale).t("image.fail")
|
|
3754
|
-
}, null, 8, _hoisted_2$
|
|
3665
|
+
}, null, 8, _hoisted_2$s)), [
|
|
3755
3666
|
[_directive_tooltip, {
|
|
3756
3667
|
content: unref(locale).t("image.fail"),
|
|
3757
3668
|
trigger: "mouseenter"
|
|
3758
3669
|
}]
|
|
3759
3670
|
])
|
|
3760
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
3671
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_3$l, [
|
|
3761
3672
|
createElementVNode("img", {
|
|
3762
3673
|
class: "lew-image",
|
|
3763
3674
|
src: _ctx.src,
|
|
@@ -3767,7 +3678,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3767
3678
|
"object-position": _ctx.objectPosition
|
|
3768
3679
|
}),
|
|
3769
3680
|
alt: _ctx.alt
|
|
3770
|
-
}, null, 12, _hoisted_4$
|
|
3681
|
+
}, null, 12, _hoisted_4$e)
|
|
3771
3682
|
]))
|
|
3772
3683
|
]),
|
|
3773
3684
|
_: 3
|
|
@@ -3775,7 +3686,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3775
3686
|
};
|
|
3776
3687
|
}
|
|
3777
3688
|
});
|
|
3778
|
-
const LewImage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3689
|
+
const LewImage = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-f1c1be76"]]);
|
|
3779
3690
|
const avatarProps = {
|
|
3780
3691
|
size: {
|
|
3781
3692
|
type: [Number, String],
|
|
@@ -3901,12 +3812,12 @@ const avatarProps = {
|
|
|
3901
3812
|
}
|
|
3902
3813
|
}
|
|
3903
3814
|
};
|
|
3904
|
-
const _hoisted_1$
|
|
3815
|
+
const _hoisted_1$K = {
|
|
3905
3816
|
key: 0,
|
|
3906
3817
|
class: "skeletons"
|
|
3907
3818
|
};
|
|
3908
|
-
const _hoisted_2$
|
|
3909
|
-
const _sfc_main$
|
|
3819
|
+
const _hoisted_2$r = ["src", "alt"];
|
|
3820
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
3910
3821
|
__name: "LewAvatar",
|
|
3911
3822
|
props: avatarProps,
|
|
3912
3823
|
setup(__props2) {
|
|
@@ -4055,7 +3966,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4055
3966
|
class: "lew-avatar-text",
|
|
4056
3967
|
style: normalizeStyle(unref(textStyleObject))
|
|
4057
3968
|
}, toDisplayString$1(unref(altText)), 5)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4058
|
-
unref(_loading) || _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3969
|
+
unref(_loading) || _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$K)) : unref(_error) || !_ctx.src ? (openBlock(), createBlock(Icon, {
|
|
4059
3970
|
key: 1,
|
|
4060
3971
|
size: unref(getIconSize),
|
|
4061
3972
|
type: "user"
|
|
@@ -4065,7 +3976,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4065
3976
|
alt: _ctx.alt,
|
|
4066
3977
|
lazy: "",
|
|
4067
3978
|
style: normalizeStyle(unref(imageStyleObject))
|
|
4068
|
-
}, null, 12, _hoisted_2$
|
|
3979
|
+
}, null, 12, _hoisted_2$r)) : createCommentVNode("", true)
|
|
4069
3980
|
], 64))
|
|
4070
3981
|
], 4),
|
|
4071
3982
|
_ctx.status ? (openBlock(), createElementBlock("i", {
|
|
@@ -4076,7 +3987,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4076
3987
|
};
|
|
4077
3988
|
}
|
|
4078
3989
|
});
|
|
4079
|
-
const LewAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3990
|
+
const LewAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-27c30e37"]]);
|
|
4080
3991
|
const validColors = [
|
|
4081
3992
|
"blue",
|
|
4082
3993
|
"gray",
|
|
@@ -4198,13 +4109,13 @@ const buttonProps = {
|
|
|
4198
4109
|
description: "点击按钮时触发的异步请求函数"
|
|
4199
4110
|
}
|
|
4200
4111
|
};
|
|
4201
|
-
const _hoisted_1$
|
|
4202
|
-
const _hoisted_2$
|
|
4112
|
+
const _hoisted_1$J = ["disabled"];
|
|
4113
|
+
const _hoisted_2$q = {
|
|
4203
4114
|
key: 0,
|
|
4204
4115
|
class: "lew-button-content"
|
|
4205
4116
|
};
|
|
4206
|
-
const _hoisted_3$
|
|
4207
|
-
const _sfc_main
|
|
4117
|
+
const _hoisted_3$k = { class: "lew-button-text" };
|
|
4118
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
4208
4119
|
__name: "LewButton",
|
|
4209
4120
|
props: buttonProps,
|
|
4210
4121
|
emits: ["click"],
|
|
@@ -4315,18 +4226,18 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
4315
4226
|
type: "loader"
|
|
4316
4227
|
}, null, 8, ["size"])
|
|
4317
4228
|
], 2),
|
|
4318
|
-
_ctx.$slots.default || _ctx.text ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
4319
|
-
createElementVNode("span", _hoisted_3$
|
|
4229
|
+
_ctx.$slots.default || _ctx.text ? (openBlock(), createElementBlock("div", _hoisted_2$q, [
|
|
4230
|
+
createElementVNode("span", _hoisted_3$k, [
|
|
4320
4231
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4321
4232
|
createTextVNode(toDisplayString$1(_ctx.text), 1)
|
|
4322
4233
|
], 64))
|
|
4323
4234
|
])
|
|
4324
4235
|
])) : createCommentVNode("", true)
|
|
4325
|
-
], 14, _hoisted_1$
|
|
4236
|
+
], 14, _hoisted_1$J);
|
|
4326
4237
|
};
|
|
4327
4238
|
}
|
|
4328
4239
|
});
|
|
4329
|
-
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
4240
|
+
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-6acb7c29"]]);
|
|
4330
4241
|
const tagProps = {
|
|
4331
4242
|
text: {
|
|
4332
4243
|
type: String,
|
|
@@ -4386,16 +4297,16 @@ const tagProps = {
|
|
|
4386
4297
|
default: false
|
|
4387
4298
|
}
|
|
4388
4299
|
};
|
|
4389
|
-
const _hoisted_1$
|
|
4300
|
+
const _hoisted_1$I = {
|
|
4390
4301
|
key: 0,
|
|
4391
4302
|
class: "lew-tag-left"
|
|
4392
4303
|
};
|
|
4393
|
-
const _hoisted_2$
|
|
4394
|
-
const _hoisted_3$
|
|
4304
|
+
const _hoisted_2$p = { class: "lew-tag-value" };
|
|
4305
|
+
const _hoisted_3$j = {
|
|
4395
4306
|
key: 1,
|
|
4396
4307
|
class: "lew-tag-right"
|
|
4397
4308
|
};
|
|
4398
|
-
const _sfc_main
|
|
4309
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
4399
4310
|
__name: "LewTag",
|
|
4400
4311
|
props: tagProps,
|
|
4401
4312
|
emits: ["close"],
|
|
@@ -4477,13 +4388,13 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
4477
4388
|
class: "lew-tag",
|
|
4478
4389
|
style: normalizeStyle(unref(tagStyle))
|
|
4479
4390
|
}, [
|
|
4480
|
-
_ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4391
|
+
_ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
4481
4392
|
renderSlot(_ctx.$slots, "left")
|
|
4482
4393
|
])) : createCommentVNode("", true),
|
|
4483
|
-
createElementVNode("div", _hoisted_2$
|
|
4394
|
+
createElementVNode("div", _hoisted_2$p, [
|
|
4484
4395
|
createVNode(unref(LewTextTrim), { text: unref(displayText) }, null, 8, ["text"])
|
|
4485
4396
|
]),
|
|
4486
|
-
_ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
4397
|
+
_ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$j, [
|
|
4487
4398
|
renderSlot(_ctx.$slots, "right")
|
|
4488
4399
|
])) : createCommentVNode("", true),
|
|
4489
4400
|
_ctx.closable ? (openBlock(), createElementBlock("div", {
|
|
@@ -4549,11 +4460,11 @@ const badgeProps = {
|
|
|
4549
4460
|
}
|
|
4550
4461
|
}
|
|
4551
4462
|
};
|
|
4552
|
-
const _hoisted_1$
|
|
4463
|
+
const _hoisted_1$H = {
|
|
4553
4464
|
key: 2,
|
|
4554
4465
|
class: "lew-badge-text"
|
|
4555
4466
|
};
|
|
4556
|
-
const _sfc_main$
|
|
4467
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
4557
4468
|
__name: "LewBadge",
|
|
4558
4469
|
props: badgeProps,
|
|
4559
4470
|
setup(__props2) {
|
|
@@ -4605,7 +4516,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
4605
4516
|
class: normalizeClass(["lew-badge-dot", { "is-processing": _ctx.processing }]),
|
|
4606
4517
|
style: normalizeStyle(unref(getStyle))
|
|
4607
4518
|
}, null, 6)),
|
|
4608
|
-
_ctx.text ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
4519
|
+
_ctx.text ? (openBlock(), createElementBlock("span", _hoisted_1$H, toDisplayString$1(_ctx.text), 1)) : renderSlot(_ctx.$slots, "default", { key: 3 })
|
|
4609
4520
|
], 4);
|
|
4610
4521
|
};
|
|
4611
4522
|
}
|
|
@@ -4672,7 +4583,7 @@ const titleProps = {
|
|
|
4672
4583
|
}
|
|
4673
4584
|
}
|
|
4674
4585
|
};
|
|
4675
|
-
const _sfc_main$
|
|
4586
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
4676
4587
|
__name: "LewTitle",
|
|
4677
4588
|
props: titleProps,
|
|
4678
4589
|
setup(__props2) {
|
|
@@ -4699,7 +4610,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
4699
4610
|
};
|
|
4700
4611
|
}
|
|
4701
4612
|
});
|
|
4702
|
-
const LewTitle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4613
|
+
const LewTitle = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-1c7220e8"]]);
|
|
4703
4614
|
var top = "top";
|
|
4704
4615
|
var bottom = "bottom";
|
|
4705
4616
|
var right = "right";
|
|
@@ -5845,18 +5756,18 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
5845
5756
|
};
|
|
5846
5757
|
}
|
|
5847
5758
|
function order(modifiers) {
|
|
5848
|
-
var
|
|
5759
|
+
var map = /* @__PURE__ */ new Map();
|
|
5849
5760
|
var visited = /* @__PURE__ */ new Set();
|
|
5850
5761
|
var result = [];
|
|
5851
5762
|
modifiers.forEach(function(modifier) {
|
|
5852
|
-
|
|
5763
|
+
map.set(modifier.name, modifier);
|
|
5853
5764
|
});
|
|
5854
5765
|
function sort(modifier) {
|
|
5855
5766
|
visited.add(modifier.name);
|
|
5856
5767
|
var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
|
|
5857
5768
|
requires.forEach(function(dep) {
|
|
5858
5769
|
if (!visited.has(dep)) {
|
|
5859
|
-
var depModifier =
|
|
5770
|
+
var depModifier = map.get(dep);
|
|
5860
5771
|
if (depModifier) {
|
|
5861
5772
|
sort(depModifier);
|
|
5862
5773
|
}
|
|
@@ -7515,7 +7426,7 @@ const clearMeasureCache = () => {
|
|
|
7515
7426
|
sharedMeasureSpan = null;
|
|
7516
7427
|
}
|
|
7517
7428
|
};
|
|
7518
|
-
const _sfc_main$
|
|
7429
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
7519
7430
|
__name: "LewTextTrim",
|
|
7520
7431
|
props: textTrimProps,
|
|
7521
7432
|
setup(__props2) {
|
|
@@ -7667,7 +7578,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
7667
7578
|
};
|
|
7668
7579
|
}
|
|
7669
7580
|
});
|
|
7670
|
-
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7581
|
+
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-fb6a0a04"]]);
|
|
7671
7582
|
const flexProps = {
|
|
7672
7583
|
direction: {
|
|
7673
7584
|
type: String,
|
|
@@ -7757,7 +7668,7 @@ const flexProps = {
|
|
|
7757
7668
|
}
|
|
7758
7669
|
}
|
|
7759
7670
|
};
|
|
7760
|
-
const _sfc_main$
|
|
7671
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
7761
7672
|
__name: "LewFlex",
|
|
7762
7673
|
props: flexProps,
|
|
7763
7674
|
setup(__props2) {
|
|
@@ -7804,7 +7715,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
7804
7715
|
};
|
|
7805
7716
|
}
|
|
7806
7717
|
});
|
|
7807
|
-
const LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7718
|
+
const LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-21564e51"]]);
|
|
7808
7719
|
const markProps = {
|
|
7809
7720
|
color: {
|
|
7810
7721
|
type: String,
|
|
@@ -7874,7 +7785,7 @@ const markProps = {
|
|
|
7874
7785
|
typeDesc: `pointer | default | text | move | not-allowed`
|
|
7875
7786
|
}
|
|
7876
7787
|
};
|
|
7877
|
-
const _sfc_main$
|
|
7788
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
7878
7789
|
__name: "LewMark",
|
|
7879
7790
|
props: markProps,
|
|
7880
7791
|
emits: ["click"],
|
|
@@ -7903,7 +7814,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
7903
7814
|
};
|
|
7904
7815
|
}
|
|
7905
7816
|
});
|
|
7906
|
-
const LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7817
|
+
const LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-7475c5ce"]]);
|
|
7907
7818
|
const expandProps = {
|
|
7908
7819
|
collapseHeight: {
|
|
7909
7820
|
type: [Number, String],
|
|
@@ -7911,7 +7822,7 @@ const expandProps = {
|
|
|
7911
7822
|
description: `组件收起状态时的高度,可以是数字(单位为像素)或字符串(如 '50px'、'3rem' 等)`
|
|
7912
7823
|
}
|
|
7913
7824
|
};
|
|
7914
|
-
const _sfc_main$
|
|
7825
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
7915
7826
|
__name: "LewExpand",
|
|
7916
7827
|
props: expandProps,
|
|
7917
7828
|
setup(__props2) {
|
|
@@ -7959,7 +7870,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
7959
7870
|
};
|
|
7960
7871
|
}
|
|
7961
7872
|
});
|
|
7962
|
-
const LewExpand = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7873
|
+
const LewExpand = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-c9d905d9"]]);
|
|
7963
7874
|
const backTopProps = {
|
|
7964
7875
|
right: {
|
|
7965
7876
|
type: Number,
|
|
@@ -8026,7 +7937,7 @@ function useEventListener(target, event, callback) {
|
|
|
8026
7937
|
onMounted(() => target.addEventListener(event, callback, true));
|
|
8027
7938
|
onUnmounted(() => target.removeEventListener(event, callback, true));
|
|
8028
7939
|
}
|
|
8029
|
-
const _sfc_main$
|
|
7940
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
8030
7941
|
__name: "LewBackTop",
|
|
8031
7942
|
props: backTopProps,
|
|
8032
7943
|
emits: ["click"],
|
|
@@ -8081,7 +7992,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
8081
7992
|
};
|
|
8082
7993
|
}
|
|
8083
7994
|
});
|
|
8084
|
-
const LewBackTop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7995
|
+
const LewBackTop = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-85f05def"]]);
|
|
8085
7996
|
const stepsModel = {
|
|
8086
7997
|
modelValue: {
|
|
8087
7998
|
type: [String, Number],
|
|
@@ -8138,14 +8049,14 @@ const stepsProps = {
|
|
|
8138
8049
|
description: "步骤条的最小宽度"
|
|
8139
8050
|
}
|
|
8140
8051
|
};
|
|
8141
|
-
const _hoisted_1$
|
|
8142
|
-
const _hoisted_2$
|
|
8143
|
-
const _hoisted_3$
|
|
8052
|
+
const _hoisted_1$G = { class: "lew-steps lew-scrollbar" };
|
|
8053
|
+
const _hoisted_2$o = { class: "lew-steps-item-index" };
|
|
8054
|
+
const _hoisted_3$i = {
|
|
8144
8055
|
key: 4,
|
|
8145
8056
|
class: "index"
|
|
8146
8057
|
};
|
|
8147
|
-
const _hoisted_4$
|
|
8148
|
-
const _sfc_main$
|
|
8058
|
+
const _hoisted_4$d = { class: "lew-steps-item-info" };
|
|
8059
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
8149
8060
|
__name: "LewSteps",
|
|
8150
8061
|
props: /* @__PURE__ */ mergeModels(stepsProps, {
|
|
8151
8062
|
"modelValue": {},
|
|
@@ -8155,7 +8066,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
8155
8066
|
setup(__props2) {
|
|
8156
8067
|
const stepsValue = useModel(__props2, "modelValue");
|
|
8157
8068
|
return (_ctx, _cache) => {
|
|
8158
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8069
|
+
return openBlock(), createElementBlock("div", _hoisted_1$G, [
|
|
8159
8070
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
8160
8071
|
return openBlock(), createElementBlock("div", {
|
|
8161
8072
|
key: index2,
|
|
@@ -8168,7 +8079,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
8168
8079
|
}]),
|
|
8169
8080
|
style: normalizeStyle({ minWidth: unref(any2px)(_ctx.minWidth) })
|
|
8170
8081
|
}, [
|
|
8171
|
-
createElementVNode("div", _hoisted_2$
|
|
8082
|
+
createElementVNode("div", _hoisted_2$o, [
|
|
8172
8083
|
index2 === (stepsValue.value || 1) - 1 && _ctx.status === "loading" ? (openBlock(), createBlock(Icon, {
|
|
8173
8084
|
key: 0,
|
|
8174
8085
|
size: 16,
|
|
@@ -8191,9 +8102,9 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
8191
8102
|
size: 16,
|
|
8192
8103
|
"stroke-width": 3,
|
|
8193
8104
|
type: "check"
|
|
8194
|
-
})) : (openBlock(), createElementBlock("span", _hoisted_3$
|
|
8105
|
+
})) : (openBlock(), createElementBlock("span", _hoisted_3$i, toDisplayString$1(index2 + 1), 1))
|
|
8195
8106
|
]),
|
|
8196
|
-
createElementVNode("div", _hoisted_4$
|
|
8107
|
+
createElementVNode("div", _hoisted_4$d, [
|
|
8197
8108
|
createElementVNode("div", {
|
|
8198
8109
|
style: normalizeStyle({ maxWidth: unref(any2px)(_ctx.minWidth) }),
|
|
8199
8110
|
class: "lew-steps-item-title"
|
|
@@ -8250,10 +8161,10 @@ const menuProps = {
|
|
|
8250
8161
|
}
|
|
8251
8162
|
}
|
|
8252
8163
|
};
|
|
8253
|
-
const _hoisted_1$
|
|
8254
|
-
const _hoisted_2$
|
|
8255
|
-
const _hoisted_3$
|
|
8256
|
-
const _sfc_main$
|
|
8164
|
+
const _hoisted_1$F = { class: "lew-menu" };
|
|
8165
|
+
const _hoisted_2$n = { class: "lew-menu-item" };
|
|
8166
|
+
const _hoisted_3$h = ["onClick"];
|
|
8167
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
8257
8168
|
__name: "LewMenu",
|
|
8258
8169
|
props: /* @__PURE__ */ mergeModels(menuProps, {
|
|
8259
8170
|
"modelValue": {},
|
|
@@ -8268,16 +8179,16 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
8268
8179
|
emit2("change", item);
|
|
8269
8180
|
};
|
|
8270
8181
|
return (_ctx, _cache) => {
|
|
8271
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8182
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
8272
8183
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item) => {
|
|
8273
8184
|
return openBlock(), createElementBlock(Fragment, {
|
|
8274
8185
|
key: item.label
|
|
8275
8186
|
}, [
|
|
8276
|
-
createElementVNode("div", _hoisted_2$
|
|
8187
|
+
createElementVNode("div", _hoisted_2$n, [
|
|
8277
8188
|
createVNode(unref(LewTextTrim), {
|
|
8278
8189
|
text: item.label
|
|
8279
8190
|
}, null, 8, ["text"]),
|
|
8280
|
-
item.tagText ? (openBlock(), createBlock(unref(_sfc_main
|
|
8191
|
+
item.tagText ? (openBlock(), createBlock(unref(_sfc_main$$), {
|
|
8281
8192
|
key: 0,
|
|
8282
8193
|
color: item.tagColor,
|
|
8283
8194
|
round: "",
|
|
@@ -8307,7 +8218,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
8307
8218
|
createVNode(unref(LewTextTrim), {
|
|
8308
8219
|
text: cItem.label
|
|
8309
8220
|
}, null, 8, ["text"]),
|
|
8310
|
-
cItem.tagText ? (openBlock(), createBlock(unref(_sfc_main
|
|
8221
|
+
cItem.tagText ? (openBlock(), createBlock(unref(_sfc_main$$), {
|
|
8311
8222
|
key: 1,
|
|
8312
8223
|
color: cItem.tagColor,
|
|
8313
8224
|
round: "",
|
|
@@ -8319,7 +8230,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
8319
8230
|
]),
|
|
8320
8231
|
_: 2
|
|
8321
8232
|
}, 1032, ["color", "type"])) : createCommentVNode("", true)
|
|
8322
|
-
], 10, _hoisted_3$
|
|
8233
|
+
], 10, _hoisted_3$h);
|
|
8323
8234
|
}), 128))
|
|
8324
8235
|
], 64);
|
|
8325
8236
|
}), 128))
|
|
@@ -8327,7 +8238,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
8327
8238
|
};
|
|
8328
8239
|
}
|
|
8329
8240
|
});
|
|
8330
|
-
const LewMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8241
|
+
const LewMenu = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-4af03d56"]]);
|
|
8331
8242
|
const menuTreeModel = {
|
|
8332
8243
|
modelValue: {
|
|
8333
8244
|
type: String,
|
|
@@ -8352,13 +8263,6 @@ const menuTreeModel = {
|
|
|
8352
8263
|
description: "菜单树是否折叠。"
|
|
8353
8264
|
}
|
|
8354
8265
|
};
|
|
8355
|
-
const menuTreeItemModel = {
|
|
8356
|
-
modelValue: {
|
|
8357
|
-
type: Boolean,
|
|
8358
|
-
default: false,
|
|
8359
|
-
description: "菜单树项的展开状态,true 表示展开,false 表示折叠。"
|
|
8360
|
-
}
|
|
8361
|
-
};
|
|
8362
8266
|
const menuTreeProps = {
|
|
8363
8267
|
options: {
|
|
8364
8268
|
type: Array,
|
|
@@ -8402,20 +8306,11 @@ const menuTreeItemProps = {
|
|
|
8402
8306
|
},
|
|
8403
8307
|
description: "菜单树项的图标。"
|
|
8404
8308
|
},
|
|
8405
|
-
|
|
8406
|
-
type:
|
|
8407
|
-
default:
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
tagType: {
|
|
8411
|
-
type: String,
|
|
8412
|
-
default: "light",
|
|
8413
|
-
description: "菜单树项的标签类型。"
|
|
8414
|
-
},
|
|
8415
|
-
tagColor: {
|
|
8416
|
-
type: String,
|
|
8417
|
-
default: "error",
|
|
8418
|
-
description: "菜单树项的标签颜色。"
|
|
8309
|
+
renderLabel: {
|
|
8310
|
+
type: Function,
|
|
8311
|
+
default: () => {
|
|
8312
|
+
},
|
|
8313
|
+
description: "自定义渲染标签内容的函数。"
|
|
8419
8314
|
},
|
|
8420
8315
|
disabled: {
|
|
8421
8316
|
type: Boolean,
|
|
@@ -8433,29 +8328,15 @@ const menuTreeItemProps = {
|
|
|
8433
8328
|
description: "是否为叶子节点。"
|
|
8434
8329
|
}
|
|
8435
8330
|
};
|
|
8436
|
-
const _hoisted_1$
|
|
8437
|
-
const _sfc_main$
|
|
8331
|
+
const _hoisted_1$E = { class: "lew-menu-tree-item" };
|
|
8332
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
8438
8333
|
__name: "LewMenuTreeItem",
|
|
8439
|
-
props:
|
|
8440
|
-
...menuTreeItemProps,
|
|
8441
|
-
renderLabel: {
|
|
8442
|
-
type: Function,
|
|
8443
|
-
default: () => {
|
|
8444
|
-
},
|
|
8445
|
-
description: "自定义渲染标签内容的函数。"
|
|
8446
|
-
}
|
|
8447
|
-
},
|
|
8334
|
+
props: menuTreeItemProps,
|
|
8448
8335
|
emits: ["change"],
|
|
8449
8336
|
setup(__props2, { emit: __emit2 }) {
|
|
8450
8337
|
const props2 = __props2;
|
|
8451
|
-
const { modelValue: modelValue2, expandKeys, modelValueKeyPath, collapsed } = inject("menu-tree");
|
|
8338
|
+
const { modelValue: modelValue2, expandKeys, modelValueKeyPath, collapsed } = inject("lew-menu-tree");
|
|
8452
8339
|
const emit2 = __emit2;
|
|
8453
|
-
const tagRef = ref();
|
|
8454
|
-
const tagWidth = ref(0);
|
|
8455
|
-
onMounted(() => {
|
|
8456
|
-
var _a, _b;
|
|
8457
|
-
tagWidth.value = (_b = (_a = tagRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.offsetWidth;
|
|
8458
|
-
});
|
|
8459
8340
|
const change2 = () => {
|
|
8460
8341
|
if (props2.disabled) return;
|
|
8461
8342
|
if (!props2.isLeaf) {
|
|
@@ -8476,8 +8357,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8476
8357
|
return (_ctx, _cache) => {
|
|
8477
8358
|
var _a;
|
|
8478
8359
|
const _component_lew_text_trim = resolveComponent("lew-text-trim");
|
|
8479
|
-
|
|
8480
|
-
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
8360
|
+
return openBlock(), createElementBlock("div", _hoisted_1$E, [
|
|
8481
8361
|
createVNode(unref(LewFlex), {
|
|
8482
8362
|
x: "start",
|
|
8483
8363
|
y: "center",
|
|
@@ -8501,7 +8381,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8501
8381
|
props: props2
|
|
8502
8382
|
}, void 0, true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
8503
8383
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon()), { class: "lew-menu-tree-item-icon" })),
|
|
8504
|
-
|
|
8384
|
+
_ctx.renderLabel() ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderLabel()), {
|
|
8505
8385
|
key: 0,
|
|
8506
8386
|
class: "lew-menu-tree-item-text"
|
|
8507
8387
|
})) : (openBlock(), createBlock(_component_lew_text_trim, {
|
|
@@ -8509,27 +8389,13 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8509
8389
|
class: "lew-menu-tree-item-text",
|
|
8510
8390
|
placement: "right",
|
|
8511
8391
|
style: normalizeStyle({
|
|
8512
|
-
maxWidth: `calc(100% - ${_ctx.renderIcon()
|
|
8392
|
+
maxWidth: `calc(100% - ${_ctx.renderIcon() ? 30 : 0}px)`
|
|
8513
8393
|
}),
|
|
8514
8394
|
text: _ctx.label,
|
|
8515
8395
|
delay: [250, 250]
|
|
8516
8396
|
}, null, 8, ["style", "text"])),
|
|
8517
|
-
_ctx.tagText ? (openBlock(), createBlock(_component_lew_tag, {
|
|
8518
|
-
key: 2,
|
|
8519
|
-
ref_key: "tagRef",
|
|
8520
|
-
ref: tagRef,
|
|
8521
|
-
color: _ctx.tagColor,
|
|
8522
|
-
type: _ctx.tagType,
|
|
8523
|
-
round: "",
|
|
8524
|
-
size: "small"
|
|
8525
|
-
}, {
|
|
8526
|
-
default: withCtx(() => [
|
|
8527
|
-
createTextVNode(toDisplayString$1(_ctx.tagText), 1)
|
|
8528
|
-
]),
|
|
8529
|
-
_: 1
|
|
8530
|
-
}, 8, ["color", "type"])) : createCommentVNode("", true),
|
|
8531
8397
|
!_ctx.isLeaf ? (openBlock(), createBlock(Icon, {
|
|
8532
|
-
key:
|
|
8398
|
+
key: 2,
|
|
8533
8399
|
class: "lew-menu-tree-item-chevron-right",
|
|
8534
8400
|
size: 14,
|
|
8535
8401
|
style: normalizeStyle({
|
|
@@ -8560,8 +8426,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8560
8426
|
};
|
|
8561
8427
|
}
|
|
8562
8428
|
});
|
|
8563
|
-
const LewMenuTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8564
|
-
const _sfc_main$
|
|
8429
|
+
const LewMenuTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-fc6ce882"]]);
|
|
8430
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
8565
8431
|
__name: "LewMenuTree",
|
|
8566
8432
|
props: /* @__PURE__ */ mergeModels(menuTreeProps, {
|
|
8567
8433
|
"modelValue": {},
|
|
@@ -8593,7 +8459,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8593
8459
|
};
|
|
8594
8460
|
return findKeyPath(props2.options) || [];
|
|
8595
8461
|
});
|
|
8596
|
-
provide("menu-tree", {
|
|
8462
|
+
provide("lew-menu-tree", {
|
|
8597
8463
|
modelValue: modelValue2,
|
|
8598
8464
|
expandKeys,
|
|
8599
8465
|
collapsed,
|
|
@@ -8603,13 +8469,13 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8603
8469
|
width: collapsed.value ? any2px(44) : any2px(props2.width)
|
|
8604
8470
|
}));
|
|
8605
8471
|
const hoverMenu = resolveDirective("hover-menu");
|
|
8606
|
-
const
|
|
8472
|
+
const transformTree2 = (tree) => {
|
|
8607
8473
|
return tree.map((item) => {
|
|
8608
8474
|
var _a;
|
|
8609
8475
|
return {
|
|
8610
8476
|
...item,
|
|
8611
8477
|
active: item.value === modelValue2.value || getModelValueKeyPath.value.includes(item.value),
|
|
8612
|
-
children: ((_a = item.children) == null ? void 0 : _a.length) ?
|
|
8478
|
+
children: ((_a = item.children) == null ? void 0 : _a.length) ? transformTree2(item.children) : void 0
|
|
8613
8479
|
};
|
|
8614
8480
|
});
|
|
8615
8481
|
};
|
|
@@ -8619,7 +8485,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8619
8485
|
return [
|
|
8620
8486
|
{ label: item2.label, disabled: true },
|
|
8621
8487
|
{ isDividerLine: true },
|
|
8622
|
-
...
|
|
8488
|
+
...transformTree2(item2.children) || []
|
|
8623
8489
|
];
|
|
8624
8490
|
};
|
|
8625
8491
|
const handleMenuSelect = (item2) => {
|
|
@@ -8648,16 +8514,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8648
8514
|
}
|
|
8649
8515
|
]
|
|
8650
8516
|
] : [];
|
|
8651
|
-
const {
|
|
8652
|
-
tagText,
|
|
8653
|
-
tagType,
|
|
8654
|
-
tagColor,
|
|
8655
|
-
disabled,
|
|
8656
|
-
renderIcon,
|
|
8657
|
-
renderLabel,
|
|
8658
|
-
label,
|
|
8659
|
-
value
|
|
8660
|
-
} = item;
|
|
8517
|
+
const { disabled, renderIcon, renderLabel, label, value } = item;
|
|
8661
8518
|
return withDirectives(
|
|
8662
8519
|
h(
|
|
8663
8520
|
LewMenuTreeItem,
|
|
@@ -8667,9 +8524,6 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8667
8524
|
level,
|
|
8668
8525
|
isLeaf: !((_a = item.children) == null ? void 0 : _a.length),
|
|
8669
8526
|
disabled,
|
|
8670
|
-
tagText,
|
|
8671
|
-
tagType,
|
|
8672
|
-
tagColor,
|
|
8673
8527
|
renderIcon: () => renderIcon,
|
|
8674
8528
|
renderLabel: () => renderLabel,
|
|
8675
8529
|
onChange: () => emit2("change", item)
|
|
@@ -8683,6 +8537,10 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8683
8537
|
);
|
|
8684
8538
|
};
|
|
8685
8539
|
const emit2 = __emit2;
|
|
8540
|
+
onMounted(() => {
|
|
8541
|
+
expandKeys.value = cloneDeep(expandKeys.value);
|
|
8542
|
+
modelValue2.value = cloneDeep(modelValue2.value);
|
|
8543
|
+
});
|
|
8686
8544
|
return (_ctx, _cache) => {
|
|
8687
8545
|
return openBlock(), createElementBlock("div", {
|
|
8688
8546
|
style: normalizeStyle(menuTreeStyle.value),
|
|
@@ -8697,7 +8555,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8697
8555
|
};
|
|
8698
8556
|
}
|
|
8699
8557
|
});
|
|
8700
|
-
const LewMenuTree = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8558
|
+
const LewMenuTree = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-232bc2f6"]]);
|
|
8701
8559
|
const dropdownModel = {
|
|
8702
8560
|
selectedKeys: {
|
|
8703
8561
|
type: Array,
|
|
@@ -8767,7 +8625,7 @@ const dropdownProps = {
|
|
|
8767
8625
|
description: "是否开启checkbox模式"
|
|
8768
8626
|
}
|
|
8769
8627
|
};
|
|
8770
|
-
const _sfc_main$
|
|
8628
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
8771
8629
|
__name: "LewDropdown",
|
|
8772
8630
|
props: /* @__PURE__ */ mergeModels(dropdownProps, {
|
|
8773
8631
|
"selectedKeys": {},
|
|
@@ -8868,13 +8726,13 @@ const breadcrumbProps = {
|
|
|
8868
8726
|
}
|
|
8869
8727
|
}
|
|
8870
8728
|
};
|
|
8871
|
-
const _hoisted_1$
|
|
8872
|
-
const _hoisted_2$
|
|
8873
|
-
const _hoisted_3$
|
|
8729
|
+
const _hoisted_1$D = { class: "lew-breadcrumb" };
|
|
8730
|
+
const _hoisted_2$m = ["onClick"];
|
|
8731
|
+
const _hoisted_3$g = {
|
|
8874
8732
|
key: 0,
|
|
8875
8733
|
class: "lew-breadcrumb-parting"
|
|
8876
8734
|
};
|
|
8877
|
-
const _hoisted_4$
|
|
8735
|
+
const _hoisted_4$c = {
|
|
8878
8736
|
key: 0,
|
|
8879
8737
|
viewBox: "0 0 48 48",
|
|
8880
8738
|
fill: "none",
|
|
@@ -8894,14 +8752,14 @@ const _hoisted_5$7 = {
|
|
|
8894
8752
|
"stroke-linecap": "butt",
|
|
8895
8753
|
"stroke-linejoin": "miter"
|
|
8896
8754
|
};
|
|
8897
|
-
const _sfc_main$
|
|
8755
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
8898
8756
|
__name: "LewBreadcrumb",
|
|
8899
8757
|
props: breadcrumbProps,
|
|
8900
8758
|
emits: ["change"],
|
|
8901
8759
|
setup(__props2, { emit: __emit2 }) {
|
|
8902
8760
|
const emit2 = __emit2;
|
|
8903
8761
|
return (_ctx, _cache) => {
|
|
8904
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8762
|
+
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
8905
8763
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
8906
8764
|
return openBlock(), createElementBlock("div", {
|
|
8907
8765
|
key: index2,
|
|
@@ -8910,9 +8768,9 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
8910
8768
|
createElementVNode("span", {
|
|
8911
8769
|
class: normalizeClass({ "lew-breadcrumb-isPath": !!item.value }),
|
|
8912
8770
|
onClick: ($event) => emit2("change", item)
|
|
8913
|
-
}, toDisplayString$1(item.label), 11, _hoisted_2$
|
|
8914
|
-
index2 != _ctx.options.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
8915
|
-
_ctx.separator === "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$
|
|
8771
|
+
}, toDisplayString$1(item.label), 11, _hoisted_2$m),
|
|
8772
|
+
index2 != _ctx.options.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_3$g, [
|
|
8773
|
+
_ctx.separator === "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$c, _cache[0] || (_cache[0] = [
|
|
8916
8774
|
createElementVNode("path", { d: "M29.506 6.502 18.493 41.498" }, null, -1)
|
|
8917
8775
|
]))) : createCommentVNode("", true),
|
|
8918
8776
|
_ctx.separator === "shoulder" ? (openBlock(), createElementBlock("svg", _hoisted_5$7, _cache[1] || (_cache[1] = [
|
|
@@ -8925,9 +8783,9 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
8925
8783
|
};
|
|
8926
8784
|
}
|
|
8927
8785
|
});
|
|
8928
|
-
const LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8929
|
-
const _hoisted_1$
|
|
8930
|
-
const _sfc_main$
|
|
8786
|
+
const LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-52d91f51"]]);
|
|
8787
|
+
const _hoisted_1$C = ["width", "height"];
|
|
8788
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
8931
8789
|
__name: "RequiredIcon",
|
|
8932
8790
|
props: {
|
|
8933
8791
|
size: {
|
|
@@ -8952,7 +8810,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
8952
8810
|
fill: "#DF3F52",
|
|
8953
8811
|
"p-id": "10883"
|
|
8954
8812
|
}, null, -1)
|
|
8955
|
-
]), 8, _hoisted_1$
|
|
8813
|
+
]), 8, _hoisted_1$C);
|
|
8956
8814
|
};
|
|
8957
8815
|
}
|
|
8958
8816
|
});
|
|
@@ -9232,7 +9090,7 @@ const formTypeAsMap = {
|
|
|
9232
9090
|
upload: "array",
|
|
9233
9091
|
"input-number": "number"
|
|
9234
9092
|
};
|
|
9235
|
-
const _sfc_main$
|
|
9093
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
9236
9094
|
__name: "LewGetLabelWidth",
|
|
9237
9095
|
props: {
|
|
9238
9096
|
size: {
|
|
@@ -9272,7 +9130,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
9272
9130
|
key: index2
|
|
9273
9131
|
}, {
|
|
9274
9132
|
default: withCtx(() => [
|
|
9275
|
-
item.required && item.label ? (openBlock(), createBlock(_sfc_main$
|
|
9133
|
+
item.required && item.label ? (openBlock(), createBlock(_sfc_main$N, {
|
|
9276
9134
|
key: 0,
|
|
9277
9135
|
size: unref(requiredIconSizeMap)[__props2.size]
|
|
9278
9136
|
}, null, 8, ["size"])) : createCommentVNode("", true),
|
|
@@ -9291,7 +9149,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
9291
9149
|
};
|
|
9292
9150
|
}
|
|
9293
9151
|
});
|
|
9294
|
-
const LewGetLabelWidth = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
9152
|
+
const LewGetLabelWidth = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-8bc09ff2"]]);
|
|
9295
9153
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
9296
9154
|
function getDefaultExportFromCjs(x2) {
|
|
9297
9155
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -11552,11 +11410,11 @@ class ArraySchema extends Schema {
|
|
|
11552
11410
|
}
|
|
11553
11411
|
}
|
|
11554
11412
|
create$2.prototype = ArraySchema.prototype;
|
|
11555
|
-
const _hoisted_1$
|
|
11413
|
+
const _hoisted_1$B = {
|
|
11556
11414
|
key: 0,
|
|
11557
11415
|
class: "lew-label-box"
|
|
11558
11416
|
};
|
|
11559
|
-
const _sfc_main$
|
|
11417
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
11560
11418
|
__name: "LewFormItem",
|
|
11561
11419
|
props: /* @__PURE__ */ mergeModels(formItemProps, {
|
|
11562
11420
|
"modelValue": {
|
|
@@ -11703,8 +11561,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11703
11561
|
style: normalizeStyle(_ctx.direction === "x" ? `width:${unref(any2px)(_ctx.labelWidth)}` : ""),
|
|
11704
11562
|
class: "lew-label-box-wrapper"
|
|
11705
11563
|
}, [
|
|
11706
|
-
_ctx.as ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11707
|
-
unref(curRequired) && _ctx.label ? (openBlock(), createBlock(_sfc_main$
|
|
11564
|
+
_ctx.as ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
11565
|
+
unref(curRequired) && _ctx.label ? (openBlock(), createBlock(_sfc_main$N, {
|
|
11708
11566
|
key: 0,
|
|
11709
11567
|
size: unref(requiredIconSizeMap)[_ctx.size]
|
|
11710
11568
|
}, null, 8, ["size"])) : createCommentVNode("", true),
|
|
@@ -11752,8 +11610,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
11752
11610
|
};
|
|
11753
11611
|
}
|
|
11754
11612
|
});
|
|
11755
|
-
const LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11756
|
-
const _sfc_main$
|
|
11613
|
+
const LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-5eb9eff7"]]);
|
|
11614
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
11757
11615
|
__name: "LewForm",
|
|
11758
11616
|
props: formProps,
|
|
11759
11617
|
emits: ["change", "mounted"],
|
|
@@ -11879,7 +11737,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
11879
11737
|
};
|
|
11880
11738
|
}
|
|
11881
11739
|
});
|
|
11882
|
-
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11740
|
+
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-20503251"]]);
|
|
11883
11741
|
const inputModel = {
|
|
11884
11742
|
modelValue: {
|
|
11885
11743
|
type: [String, Number],
|
|
@@ -12063,16 +11921,16 @@ const inputProps = {
|
|
|
12063
11921
|
description: "是否允许通过回车键确认输入"
|
|
12064
11922
|
}
|
|
12065
11923
|
};
|
|
12066
|
-
const _hoisted_1$
|
|
11924
|
+
const _hoisted_1$A = {
|
|
12067
11925
|
key: 0,
|
|
12068
11926
|
class: "lew-input-prefixes"
|
|
12069
11927
|
};
|
|
12070
|
-
const _hoisted_2$
|
|
12071
|
-
const _hoisted_3$
|
|
11928
|
+
const _hoisted_2$l = { key: 0 };
|
|
11929
|
+
const _hoisted_3$f = {
|
|
12072
11930
|
key: 1,
|
|
12073
11931
|
class: "lew-input-prefixes-icon"
|
|
12074
11932
|
};
|
|
12075
|
-
const _hoisted_4$
|
|
11933
|
+
const _hoisted_4$b = {
|
|
12076
11934
|
key: 2,
|
|
12077
11935
|
class: "lew-input-prefixes-select"
|
|
12078
11936
|
};
|
|
@@ -12102,7 +11960,7 @@ const _hoisted_12$2 = {
|
|
|
12102
11960
|
key: 2,
|
|
12103
11961
|
class: "lew-input-suffix-select"
|
|
12104
11962
|
};
|
|
12105
|
-
const _sfc_main$
|
|
11963
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
12106
11964
|
__name: "LewInput",
|
|
12107
11965
|
props: /* @__PURE__ */ mergeModels(inputProps, {
|
|
12108
11966
|
"modelValue": { required: true },
|
|
@@ -12244,16 +12102,16 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
12244
12102
|
class: normalizeClass(["lew-input-view", unref(getInputClassNames)]),
|
|
12245
12103
|
style: normalizeStyle({ width: _ctx.autoWidth ? "auto" : unref(any2px)(_ctx.width) })
|
|
12246
12104
|
}, [
|
|
12247
|
-
_ctx.prefixes ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
12248
|
-
_ctx.prefixes === "text" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12249
|
-
_ctx.prefixes === "icon" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
12105
|
+
_ctx.prefixes ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
12106
|
+
_ctx.prefixes === "text" ? (openBlock(), createElementBlock("div", _hoisted_2$l, toDisplayString$1(prefixesValue.value), 1)) : createCommentVNode("", true),
|
|
12107
|
+
_ctx.prefixes === "icon" ? (openBlock(), createElementBlock("div", _hoisted_3$f, [
|
|
12250
12108
|
createVNode(Icon, {
|
|
12251
12109
|
size: unref(getIconSize),
|
|
12252
12110
|
type: prefixesValue.value
|
|
12253
12111
|
}, null, 8, ["size", "type"])
|
|
12254
12112
|
])) : createCommentVNode("", true),
|
|
12255
|
-
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
12256
|
-
createVNode(unref(_sfc_main$
|
|
12113
|
+
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$b, [
|
|
12114
|
+
createVNode(unref(_sfc_main$P), {
|
|
12257
12115
|
placement: "bottom",
|
|
12258
12116
|
trigger: "click",
|
|
12259
12117
|
options: _ctx.prefixesOptions,
|
|
@@ -12383,7 +12241,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
12383
12241
|
}, null, 8, ["size", "type"])
|
|
12384
12242
|
])) : createCommentVNode("", true),
|
|
12385
12243
|
_ctx.suffix === "select" ? (openBlock(), createElementBlock("div", _hoisted_12$2, [
|
|
12386
|
-
createVNode(unref(_sfc_main$
|
|
12244
|
+
createVNode(unref(_sfc_main$P), {
|
|
12387
12245
|
placement: "bottom",
|
|
12388
12246
|
trigger: "click",
|
|
12389
12247
|
options: _ctx.suffixOptions,
|
|
@@ -12423,7 +12281,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
12423
12281
|
};
|
|
12424
12282
|
}
|
|
12425
12283
|
});
|
|
12426
|
-
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12284
|
+
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-349c1ed8"]]);
|
|
12427
12285
|
const inputNumberModel = {
|
|
12428
12286
|
modelValue: {
|
|
12429
12287
|
type: Number,
|
|
@@ -12534,8 +12392,8 @@ const inputNumberProps = {
|
|
|
12534
12392
|
description: "聚焦时是否选中内容"
|
|
12535
12393
|
}
|
|
12536
12394
|
};
|
|
12537
|
-
const _hoisted_1$
|
|
12538
|
-
const _sfc_main$
|
|
12395
|
+
const _hoisted_1$z = ["placeholder", "min", "max", "step"];
|
|
12396
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
12539
12397
|
__name: "LewInputNumber",
|
|
12540
12398
|
props: /* @__PURE__ */ mergeModels(inputNumberProps, {
|
|
12541
12399
|
"modelValue": { required: true },
|
|
@@ -12681,7 +12539,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
12681
12539
|
onChange: changeFn,
|
|
12682
12540
|
onBlur: blur,
|
|
12683
12541
|
onFocus: focus
|
|
12684
|
-
}, null, 44, _hoisted_1$
|
|
12542
|
+
}, null, 44, _hoisted_1$z), [
|
|
12685
12543
|
[_directive_tooltip, {
|
|
12686
12544
|
content: unref(validationMessage),
|
|
12687
12545
|
triggerFrom: "input-number"
|
|
@@ -12721,7 +12579,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
12721
12579
|
};
|
|
12722
12580
|
}
|
|
12723
12581
|
});
|
|
12724
|
-
const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12582
|
+
const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-0d81db44"]]);
|
|
12725
12583
|
const textareaModel = {
|
|
12726
12584
|
modelValue: {
|
|
12727
12585
|
type: String,
|
|
@@ -12835,12 +12693,12 @@ const textareaProps = {
|
|
|
12835
12693
|
description: "是否启用回车键确认(启用后,Shift+Enter可换行)"
|
|
12836
12694
|
}
|
|
12837
12695
|
};
|
|
12838
|
-
const _hoisted_1$
|
|
12839
|
-
const _hoisted_2$
|
|
12696
|
+
const _hoisted_1$y = ["placeholder", "maxlength", "disabled", "readonly"];
|
|
12697
|
+
const _hoisted_2$k = {
|
|
12840
12698
|
key: 0,
|
|
12841
12699
|
class: "lew-textarea-count"
|
|
12842
12700
|
};
|
|
12843
|
-
const _sfc_main$
|
|
12701
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
12844
12702
|
__name: "LewTextarea",
|
|
12845
12703
|
props: /* @__PURE__ */ mergeModels(textareaProps, {
|
|
12846
12704
|
"modelValue": {},
|
|
@@ -12977,10 +12835,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
12977
12835
|
onBlur: blur,
|
|
12978
12836
|
onInput: _cache[1] || (_cache[1] = ($event) => emit2("input", modelValue2.value)),
|
|
12979
12837
|
onChange: _cache[2] || (_cache[2] = ($event) => emit2("change", modelValue2.value))
|
|
12980
|
-
}, null, 40, _hoisted_1$
|
|
12838
|
+
}, null, 40, _hoisted_1$y), [
|
|
12981
12839
|
[vModelText, modelValue2.value]
|
|
12982
12840
|
]),
|
|
12983
|
-
modelValue2.value && _ctx.showCount ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12841
|
+
modelValue2.value && _ctx.showCount ? (openBlock(), createElementBlock("div", _hoisted_2$k, toDisplayString$1(modelValue2.value.length) + toDisplayString$1(_ctx.maxLength ? " / " + _ctx.maxLength : ""), 1)) : createCommentVNode("", true),
|
|
12984
12842
|
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
12985
12843
|
default: withCtx(() => [
|
|
12986
12844
|
_ctx.clearable && modelValue2.value && !_ctx.readonly ? (openBlock(), createBlock(Icon, {
|
|
@@ -13002,7 +12860,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13002
12860
|
};
|
|
13003
12861
|
}
|
|
13004
12862
|
});
|
|
13005
|
-
const LewTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12863
|
+
const LewTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-c1810ae2"]]);
|
|
13006
12864
|
const inputTagModel = {
|
|
13007
12865
|
modelValue: {
|
|
13008
12866
|
type: Array,
|
|
@@ -13052,7 +12910,7 @@ const inputTagProps = {
|
|
|
13052
12910
|
description: "输入框宽度,支持数字(单位:像素)或带单位的字符串"
|
|
13053
12911
|
}
|
|
13054
12912
|
};
|
|
13055
|
-
const _sfc_main$
|
|
12913
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
13056
12914
|
__name: "LewInputTag",
|
|
13057
12915
|
props: /* @__PURE__ */ mergeModels(inputTagProps, {
|
|
13058
12916
|
"modelValue": {},
|
|
@@ -13185,7 +13043,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13185
13043
|
createVNode(TransitionGroup, { name: "tag-list" }, {
|
|
13186
13044
|
default: withCtx(() => [
|
|
13187
13045
|
(openBlock(true), createElementBlock(Fragment, null, renderList(modelValue2.value, (item, index2) => {
|
|
13188
|
-
return openBlock(), createBlock(unref(_sfc_main
|
|
13046
|
+
return openBlock(), createBlock(unref(_sfc_main$$), {
|
|
13189
13047
|
key: index2,
|
|
13190
13048
|
type: "light",
|
|
13191
13049
|
style: normalizeStyle({
|
|
@@ -13242,7 +13100,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13242
13100
|
};
|
|
13243
13101
|
}
|
|
13244
13102
|
});
|
|
13245
|
-
const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13103
|
+
const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-835c2532"]]);
|
|
13246
13104
|
const checkboxModel = {
|
|
13247
13105
|
modelValue: {
|
|
13248
13106
|
type: Boolean,
|
|
@@ -13382,16 +13240,16 @@ const checkboxGroupProps = {
|
|
|
13382
13240
|
description: "是否显示复选框的图标(仅在块状模式下生效)"
|
|
13383
13241
|
}
|
|
13384
13242
|
};
|
|
13385
|
-
const _hoisted_1$
|
|
13243
|
+
const _hoisted_1$x = {
|
|
13386
13244
|
key: 0,
|
|
13387
13245
|
class: "lew-checkbox-icon-box"
|
|
13388
13246
|
};
|
|
13389
|
-
const _hoisted_2$
|
|
13390
|
-
const _hoisted_3$
|
|
13247
|
+
const _hoisted_2$j = { class: "lew-checkbox-icon-certain" };
|
|
13248
|
+
const _hoisted_3$e = {
|
|
13391
13249
|
key: 1,
|
|
13392
13250
|
class: "lew-checkbox-label"
|
|
13393
13251
|
};
|
|
13394
|
-
const _sfc_main$
|
|
13252
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
13395
13253
|
__name: "LewCheckbox",
|
|
13396
13254
|
props: /* @__PURE__ */ mergeModels(checkboxProps, {
|
|
13397
13255
|
"modelValue": {
|
|
@@ -13443,8 +13301,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13443
13301
|
class: normalizeClass(["lew-checkbox", unref(getCheckboxClassName)]),
|
|
13444
13302
|
onClick: withModifiers(setChecked, ["stop"])
|
|
13445
13303
|
}, [
|
|
13446
|
-
_ctx.iconable || !_ctx.iconable && !_ctx.block ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
13447
|
-
withDirectives(createElementVNode("i", _hoisted_2$
|
|
13304
|
+
_ctx.iconable || !_ctx.iconable && !_ctx.block ? (openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
13305
|
+
withDirectives(createElementVNode("i", _hoisted_2$j, null, 512), [
|
|
13448
13306
|
[vShow, _ctx.certain]
|
|
13449
13307
|
]),
|
|
13450
13308
|
createVNode(Icon, {
|
|
@@ -13454,13 +13312,13 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13454
13312
|
size: unref(getIconSize)
|
|
13455
13313
|
}, null, 8, ["size"])
|
|
13456
13314
|
])) : createCommentVNode("", true),
|
|
13457
|
-
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
13315
|
+
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString$1(_ctx.label), 1)) : createCommentVNode("", true)
|
|
13458
13316
|
], 2);
|
|
13459
13317
|
};
|
|
13460
13318
|
}
|
|
13461
13319
|
});
|
|
13462
|
-
const LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13463
|
-
const _sfc_main$
|
|
13320
|
+
const LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-3a44fadd"]]);
|
|
13321
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
13464
13322
|
__name: "LewCheckboxGroup",
|
|
13465
13323
|
props: /* @__PURE__ */ mergeModels(checkboxGroupProps, {
|
|
13466
13324
|
"modelValue": {
|
|
@@ -13550,7 +13408,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
13550
13408
|
};
|
|
13551
13409
|
}
|
|
13552
13410
|
});
|
|
13553
|
-
const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13411
|
+
const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-59d7549a"]]);
|
|
13554
13412
|
const radioProps = {
|
|
13555
13413
|
checked: {
|
|
13556
13414
|
type: Boolean,
|
|
@@ -13667,15 +13525,15 @@ const radioGroupProps = {
|
|
|
13667
13525
|
}
|
|
13668
13526
|
}
|
|
13669
13527
|
};
|
|
13670
|
-
const _hoisted_1$
|
|
13528
|
+
const _hoisted_1$w = {
|
|
13671
13529
|
key: 0,
|
|
13672
13530
|
class: "lew-icon-radio-box"
|
|
13673
13531
|
};
|
|
13674
|
-
const _hoisted_2$
|
|
13532
|
+
const _hoisted_2$i = {
|
|
13675
13533
|
key: 1,
|
|
13676
13534
|
class: "lew-radio-label"
|
|
13677
13535
|
};
|
|
13678
|
-
const _sfc_main$
|
|
13536
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
13679
13537
|
__name: "LewRadio",
|
|
13680
13538
|
props: radioProps,
|
|
13681
13539
|
emits: ["change"],
|
|
@@ -13716,7 +13574,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
13716
13574
|
class: normalizeClass(["lew-radio", unref(getRadioClassName)]),
|
|
13717
13575
|
onClick: withModifiers(setChecked, ["stop"])
|
|
13718
13576
|
}, [
|
|
13719
|
-
_ctx.iconable || !_ctx.iconable && !_ctx.block ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
13577
|
+
_ctx.iconable || !_ctx.iconable && !_ctx.block ? (openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
13720
13578
|
createVNode(Icon, {
|
|
13721
13579
|
"stroke-width": 4,
|
|
13722
13580
|
class: "lew-icon-radio",
|
|
@@ -13724,13 +13582,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
13724
13582
|
size: unref(getIconSize)
|
|
13725
13583
|
}, null, 8, ["size"])
|
|
13726
13584
|
])) : createCommentVNode("", true),
|
|
13727
|
-
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
13585
|
+
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_2$i, toDisplayString$1(_ctx.label), 1)) : createCommentVNode("", true)
|
|
13728
13586
|
], 2);
|
|
13729
13587
|
};
|
|
13730
13588
|
}
|
|
13731
13589
|
});
|
|
13732
|
-
const LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13733
|
-
const _sfc_main$
|
|
13590
|
+
const LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-a3035b1f"]]);
|
|
13591
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
13734
13592
|
__name: "LewRadioGroup",
|
|
13735
13593
|
props: /* @__PURE__ */ mergeModels(radioGroupProps, {
|
|
13736
13594
|
"modelValue": {},
|
|
@@ -13783,7 +13641,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
13783
13641
|
};
|
|
13784
13642
|
}
|
|
13785
13643
|
});
|
|
13786
|
-
const LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13644
|
+
const LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-502691be"]]);
|
|
13787
13645
|
const tabsModel = {
|
|
13788
13646
|
modelValue: {
|
|
13789
13647
|
type: [String, Number],
|
|
@@ -13885,8 +13743,8 @@ const tabsProps = {
|
|
|
13885
13743
|
description: "是否将所有标签页设置为只读状态"
|
|
13886
13744
|
}
|
|
13887
13745
|
};
|
|
13888
|
-
const _hoisted_1$
|
|
13889
|
-
const _sfc_main$
|
|
13746
|
+
const _hoisted_1$v = ["onClick"];
|
|
13747
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
13890
13748
|
__name: "LewTabs",
|
|
13891
13749
|
props: /* @__PURE__ */ mergeModels(tabsProps, {
|
|
13892
13750
|
"modelValue": {
|
|
@@ -14058,7 +13916,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
14058
13916
|
class: normalizeClass(["lew-tabs-item", { "lew-tabs-item-active": tabsValue.value === item.value }]),
|
|
14059
13917
|
style: normalizeStyle(unref(getItemStyle)),
|
|
14060
13918
|
onClick: ($event) => selectItem(item.value)
|
|
14061
|
-
}, toDisplayString$1(item.label), 15, _hoisted_1$
|
|
13919
|
+
}, toDisplayString$1(item.label), 15, _hoisted_1$v);
|
|
14062
13920
|
}), 128))
|
|
14063
13921
|
], 544)
|
|
14064
13922
|
], 6)
|
|
@@ -14066,7 +13924,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
14066
13924
|
};
|
|
14067
13925
|
}
|
|
14068
13926
|
});
|
|
14069
|
-
const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
13927
|
+
const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-0d554416"]]);
|
|
14070
13928
|
function vue3h(ele, props2, children) {
|
|
14071
13929
|
const { attrs, on, ...rest } = props2;
|
|
14072
13930
|
let event = {};
|
|
@@ -15125,14 +14983,14 @@ const defaultSearchMethod = (params) => {
|
|
|
15125
14983
|
});
|
|
15126
14984
|
return flattenOptions(group);
|
|
15127
14985
|
};
|
|
15128
|
-
const _hoisted_1$
|
|
15129
|
-
const _hoisted_2$
|
|
15130
|
-
const _hoisted_3$
|
|
14986
|
+
const _hoisted_1$u = ["readonly", "placeholder"];
|
|
14987
|
+
const _hoisted_2$h = { class: "lew-select-options-box" };
|
|
14988
|
+
const _hoisted_3$d = {
|
|
15131
14989
|
key: 1,
|
|
15132
14990
|
class: "lew-result-count"
|
|
15133
14991
|
};
|
|
15134
|
-
const _hoisted_4$
|
|
15135
|
-
const _sfc_main$
|
|
14992
|
+
const _hoisted_4$a = ["onClick"];
|
|
14993
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
15136
14994
|
__name: "LewSelect",
|
|
15137
14995
|
props: /* @__PURE__ */ mergeModels(selectProps, {
|
|
15138
14996
|
"modelValue": {},
|
|
@@ -15325,6 +15183,9 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
15325
15183
|
inputRef.value.blur();
|
|
15326
15184
|
emit2("blur");
|
|
15327
15185
|
};
|
|
15186
|
+
const isShowScrollBar = computed(() => {
|
|
15187
|
+
return getVirtualHeight.value >= 280;
|
|
15188
|
+
});
|
|
15328
15189
|
watch(
|
|
15329
15190
|
() => selectValue.value,
|
|
15330
15191
|
() => {
|
|
@@ -15393,7 +15254,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
15393
15254
|
placeholder: unref(state).keywordBackup || _ctx.placeholder ? _ctx.placeholder : unref(locale).t("select.placeholder"),
|
|
15394
15255
|
onInput: _cache[1] || (_cache[1] = //@ts-ignore
|
|
15395
15256
|
(...args) => unref(searchDebounce) && unref(searchDebounce)(...args))
|
|
15396
|
-
}, null, 44, _hoisted_1$
|
|
15257
|
+
}, null, 44, _hoisted_1$u), [
|
|
15397
15258
|
[vModelText, unref(state).keyword]
|
|
15398
15259
|
])
|
|
15399
15260
|
], 2)
|
|
@@ -15404,11 +15265,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
15404
15265
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
15405
15266
|
}, [
|
|
15406
15267
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
15407
|
-
createElementVNode("div", _hoisted_2$
|
|
15268
|
+
createElementVNode("div", _hoisted_2$h, [
|
|
15408
15269
|
unref(state).options && unref(state).options.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
15409
15270
|
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(LewFlex), {
|
|
15410
15271
|
key: 1,
|
|
15411
15272
|
direction: "y",
|
|
15273
|
+
x: "center",
|
|
15412
15274
|
class: "lew-not-found"
|
|
15413
15275
|
}, {
|
|
15414
15276
|
default: withCtx(() => [
|
|
@@ -15417,61 +15279,58 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
15417
15279
|
_: 1
|
|
15418
15280
|
}))
|
|
15419
15281
|
], 64)) : createCommentVNode("", true),
|
|
15420
|
-
_ctx.searchable && unref(state).options && unref(state).options.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15282
|
+
_ctx.searchable && unref(state).options && unref(state).options.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$d, " 共 " + toDisplayString$1(unref(getResultNum)) + " 条结果 ", 1)) : createCommentVNode("", true),
|
|
15283
|
+
createVNode(Transition, { name: "fade" }, {
|
|
15284
|
+
default: withCtx(() => [
|
|
15285
|
+
unref(state).options.length > 0 && unref(state).visible ? (openBlock(), createBlock(unref(VirtList), {
|
|
15286
|
+
key: 0,
|
|
15287
|
+
ref_key: "virtListRef",
|
|
15288
|
+
ref: virtListRef,
|
|
15289
|
+
list: unref(state).options,
|
|
15290
|
+
minSize: _ctx.itemHeight,
|
|
15291
|
+
buffer: 5,
|
|
15292
|
+
"item-key": "value",
|
|
15293
|
+
class: "lew-select-options-list lew-scrollbar",
|
|
15294
|
+
style: normalizeStyle({
|
|
15295
|
+
height: `${unref(getVirtualHeight)}px`,
|
|
15296
|
+
paddingRight: unref(isShowScrollBar) ? "5px" : "0px"
|
|
15297
|
+
})
|
|
15298
|
+
}, {
|
|
15299
|
+
default: withCtx(({ itemData: templateProps }) => [
|
|
15300
|
+
createElementVNode("div", {
|
|
15301
|
+
style: normalizeStyle({ height: _ctx.itemHeight + "px" }),
|
|
15302
|
+
onClick: ($event) => selectHandle(templateProps)
|
|
15303
|
+
}, [
|
|
15304
|
+
_ctx.$slots.item ? renderSlot(_ctx.$slots, "item", {
|
|
15305
|
+
key: 0,
|
|
15306
|
+
props: {
|
|
15307
|
+
...templateProps,
|
|
15308
|
+
checked: unref(getChecked)(templateProps.value)
|
|
15309
|
+
}
|
|
15310
|
+
}, void 0, true) : (openBlock(), createElementBlock("div", {
|
|
15311
|
+
key: 1,
|
|
15312
|
+
class: normalizeClass(["lew-select-item", getSelectItemClassName(templateProps)])
|
|
15443
15313
|
}, [
|
|
15444
|
-
|
|
15314
|
+
createVNode(unref(LewTextTrim), {
|
|
15315
|
+
text: templateProps.isGroup ? `${templateProps.label} (${templateProps.total})` : templateProps.label,
|
|
15316
|
+
delay: [500, 0],
|
|
15317
|
+
class: "lew-select-label"
|
|
15318
|
+
}, null, 8, ["text"]),
|
|
15319
|
+
unref(getChecked)(templateProps.value) && _ctx.showCheckIcon ? (openBlock(), createBlock(Icon, {
|
|
15445
15320
|
key: 0,
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
}
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
unref(getChecked)(templateProps.value) && _ctx.showCheckIcon ? (openBlock(), createBlock(Icon, {
|
|
15460
|
-
key: 0,
|
|
15461
|
-
class: "lew-icon-check",
|
|
15462
|
-
size: 16,
|
|
15463
|
-
strokeWidth: 3,
|
|
15464
|
-
type: "check"
|
|
15465
|
-
})) : createCommentVNode("", true)
|
|
15466
|
-
], 2))
|
|
15467
|
-
], 12, _hoisted_4$b)
|
|
15468
|
-
]),
|
|
15469
|
-
_: 3
|
|
15470
|
-
}, 8, ["list", "minSize"])) : createCommentVNode("", true)
|
|
15471
|
-
]),
|
|
15472
|
-
_: 3
|
|
15473
|
-
})
|
|
15474
|
-
], 4)
|
|
15321
|
+
class: "lew-icon-check",
|
|
15322
|
+
size: 16,
|
|
15323
|
+
strokeWidth: 3,
|
|
15324
|
+
type: "check"
|
|
15325
|
+
})) : createCommentVNode("", true)
|
|
15326
|
+
], 2))
|
|
15327
|
+
], 12, _hoisted_4$a)
|
|
15328
|
+
]),
|
|
15329
|
+
_: 3
|
|
15330
|
+
}, 8, ["list", "minSize", "style"])) : createCommentVNode("", true)
|
|
15331
|
+
]),
|
|
15332
|
+
_: 3
|
|
15333
|
+
})
|
|
15475
15334
|
]),
|
|
15476
15335
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
15477
15336
|
], 6)
|
|
@@ -15481,7 +15340,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
15481
15340
|
};
|
|
15482
15341
|
}
|
|
15483
15342
|
});
|
|
15484
|
-
const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15343
|
+
const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-499efdf9"]]);
|
|
15485
15344
|
const selectMultipleModel = {
|
|
15486
15345
|
modelValue: {
|
|
15487
15346
|
type: Array,
|
|
@@ -15591,17 +15450,17 @@ const selectMultipleProps = {
|
|
|
15591
15450
|
description: "选择框默认值"
|
|
15592
15451
|
}
|
|
15593
15452
|
};
|
|
15594
|
-
const _hoisted_1$
|
|
15453
|
+
const _hoisted_1$t = {
|
|
15595
15454
|
key: 0,
|
|
15596
15455
|
class: "lew-search-input"
|
|
15597
15456
|
};
|
|
15598
|
-
const _hoisted_2$
|
|
15599
|
-
const _hoisted_3$
|
|
15457
|
+
const _hoisted_2$g = { class: "lew-select-options-box" };
|
|
15458
|
+
const _hoisted_3$c = {
|
|
15600
15459
|
key: 1,
|
|
15601
15460
|
class: "lew-result-count"
|
|
15602
15461
|
};
|
|
15603
|
-
const _hoisted_4$
|
|
15604
|
-
const _sfc_main$
|
|
15462
|
+
const _hoisted_4$9 = ["onClick"];
|
|
15463
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
15605
15464
|
__name: "LewSelectMultiple",
|
|
15606
15465
|
props: /* @__PURE__ */ mergeModels(selectMultipleProps, {
|
|
15607
15466
|
"modelValue": {},
|
|
@@ -15798,6 +15657,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15798
15657
|
height = height >= 280 ? 280 : height;
|
|
15799
15658
|
return height;
|
|
15800
15659
|
});
|
|
15660
|
+
const isShowScrollBar = computed(() => {
|
|
15661
|
+
return getVirtualHeight.value >= 280;
|
|
15662
|
+
});
|
|
15801
15663
|
const hideHandle = () => {
|
|
15802
15664
|
state.visible = false;
|
|
15803
15665
|
emit2("blur");
|
|
@@ -15873,7 +15735,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15873
15735
|
createVNode(TransitionGroup, { name: "list" }, {
|
|
15874
15736
|
default: withCtx(() => [
|
|
15875
15737
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSelectedRows), (item) => {
|
|
15876
|
-
return openBlock(), createBlock(unref(_sfc_main
|
|
15738
|
+
return openBlock(), createBlock(unref(_sfc_main$$), {
|
|
15877
15739
|
key: item.value,
|
|
15878
15740
|
type: "light",
|
|
15879
15741
|
size: _ctx.size,
|
|
@@ -15921,7 +15783,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15921
15783
|
}, {
|
|
15922
15784
|
default: withCtx(() => [
|
|
15923
15785
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSelectedRows), (item) => {
|
|
15924
|
-
return openBlock(), createBlock(unref(_sfc_main
|
|
15786
|
+
return openBlock(), createBlock(unref(_sfc_main$$), {
|
|
15925
15787
|
key: item.value,
|
|
15926
15788
|
type: "light",
|
|
15927
15789
|
size: _ctx.size,
|
|
@@ -15957,7 +15819,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15957
15819
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
15958
15820
|
}, [
|
|
15959
15821
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
15960
|
-
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
15822
|
+
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
15961
15823
|
withDirectives(createElementVNode("input", {
|
|
15962
15824
|
ref_key: "searchInputRef",
|
|
15963
15825
|
ref: searchInputRef,
|
|
@@ -15969,11 +15831,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15969
15831
|
[vModelText, unref(state).keyword]
|
|
15970
15832
|
])
|
|
15971
15833
|
])) : createCommentVNode("", true),
|
|
15972
|
-
createElementVNode("div", _hoisted_2$
|
|
15834
|
+
createElementVNode("div", _hoisted_2$g, [
|
|
15973
15835
|
unref(state).options && unref(state).options.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
15974
15836
|
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(LewFlex), {
|
|
15975
15837
|
key: 1,
|
|
15976
15838
|
direction: "y",
|
|
15839
|
+
x: "center",
|
|
15977
15840
|
class: "lew-not-found"
|
|
15978
15841
|
}, {
|
|
15979
15842
|
default: withCtx(() => [
|
|
@@ -15982,7 +15845,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15982
15845
|
_: 1
|
|
15983
15846
|
}))
|
|
15984
15847
|
], 64)) : createCommentVNode("", true),
|
|
15985
|
-
_ctx.searchable && unref(state).options && unref(state).options.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
15848
|
+
_ctx.searchable && unref(state).options && unref(state).options.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$c, " 共 " + toDisplayString$1(unref(getResultNum)) + " 条结果 ", 1)) : createCommentVNode("", true),
|
|
15986
15849
|
createVNode(Transition, { name: "fade" }, {
|
|
15987
15850
|
default: withCtx(() => [
|
|
15988
15851
|
unref(state).options.length > 0 && unref(state).visible ? (openBlock(), createBlock(unref(VirtList), {
|
|
@@ -15994,7 +15857,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
15994
15857
|
buffer: 5,
|
|
15995
15858
|
itemKey: "value",
|
|
15996
15859
|
style: normalizeStyle({
|
|
15997
|
-
height: `${unref(getVirtualHeight)}px
|
|
15860
|
+
height: `${unref(getVirtualHeight)}px`,
|
|
15861
|
+
paddingRight: unref(isShowScrollBar) ? "5px" : "0px"
|
|
15998
15862
|
}),
|
|
15999
15863
|
class: "lew-select-options-list lew-scrollbar"
|
|
16000
15864
|
}, {
|
|
@@ -16024,7 +15888,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
16024
15888
|
class: normalizeClass(["lew-select-label", { "is-group": templateProps.isGroup }])
|
|
16025
15889
|
}, null, 8, ["text", "class"])
|
|
16026
15890
|
], 2))
|
|
16027
|
-
], 12, _hoisted_4$
|
|
15891
|
+
], 12, _hoisted_4$9)
|
|
16028
15892
|
]),
|
|
16029
15893
|
_: 3
|
|
16030
15894
|
}, 8, ["list", "minSize", "style"])) : createCommentVNode("", true)
|
|
@@ -16040,7 +15904,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
16040
15904
|
};
|
|
16041
15905
|
}
|
|
16042
15906
|
});
|
|
16043
|
-
const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15907
|
+
const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-184bf6d0"]]);
|
|
16044
15908
|
const getMonthDate = (year, month) => {
|
|
16045
15909
|
const ret = [];
|
|
16046
15910
|
if (!year || !month) {
|
|
@@ -16432,10 +16296,10 @@ var dayjs_min = { exports: {} };
|
|
|
16432
16296
|
})(dayjs_min);
|
|
16433
16297
|
var dayjs_minExports = dayjs_min.exports;
|
|
16434
16298
|
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
16435
|
-
const _hoisted_1$
|
|
16436
|
-
const _hoisted_2$
|
|
16437
|
-
const _hoisted_3$
|
|
16438
|
-
const _hoisted_4$
|
|
16299
|
+
const _hoisted_1$s = { class: "lew-date" };
|
|
16300
|
+
const _hoisted_2$f = { class: "lew-date-control-left" };
|
|
16301
|
+
const _hoisted_3$b = { class: "cur-date" };
|
|
16302
|
+
const _hoisted_4$8 = { class: "lew-date-control-right" };
|
|
16439
16303
|
const _hoisted_5$5 = { class: "lew-date-box" };
|
|
16440
16304
|
const _hoisted_6$4 = { class: "lew-date-num" };
|
|
16441
16305
|
const _hoisted_7$2 = ["onClick"];
|
|
@@ -16445,7 +16309,7 @@ const _hoisted_9$2 = {
|
|
|
16445
16309
|
class: "lew-date-item-today"
|
|
16446
16310
|
};
|
|
16447
16311
|
const _hoisted_10$2 = { class: "lew-date-value" };
|
|
16448
|
-
const _sfc_main$
|
|
16312
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
16449
16313
|
__name: "LewDate",
|
|
16450
16314
|
props: /* @__PURE__ */ mergeModels(dateProps, {
|
|
16451
16315
|
"modelValue": {},
|
|
@@ -16530,14 +16394,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
16530
16394
|
];
|
|
16531
16395
|
});
|
|
16532
16396
|
return (_ctx, _cache) => {
|
|
16533
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
16397
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
16534
16398
|
createVNode(unref(LewFlex), {
|
|
16535
16399
|
x: "start",
|
|
16536
16400
|
mode: "between",
|
|
16537
16401
|
class: "lew-date-control"
|
|
16538
16402
|
}, {
|
|
16539
16403
|
default: withCtx(() => [
|
|
16540
|
-
createElementVNode("div", _hoisted_2$
|
|
16404
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
16541
16405
|
createVNode(unref(LewButton), {
|
|
16542
16406
|
type: "light",
|
|
16543
16407
|
color: "gray",
|
|
@@ -16563,8 +16427,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
16563
16427
|
_: 1
|
|
16564
16428
|
})
|
|
16565
16429
|
]),
|
|
16566
|
-
createElementVNode("div", _hoisted_3$
|
|
16567
|
-
createElementVNode("div", _hoisted_4$
|
|
16430
|
+
createElementVNode("div", _hoisted_3$b, toDisplayString$1(unref(dayjs)(`${unref(dateState).year}-${unref(dateState).month}`).format("YYYY-MM")), 1),
|
|
16431
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
16568
16432
|
createVNode(unref(LewButton), {
|
|
16569
16433
|
type: "light",
|
|
16570
16434
|
color: "gray",
|
|
@@ -16619,10 +16483,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
16619
16483
|
};
|
|
16620
16484
|
}
|
|
16621
16485
|
});
|
|
16622
|
-
const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16623
|
-
const _hoisted_1$
|
|
16624
|
-
const _hoisted_2$
|
|
16625
|
-
const _sfc_main$
|
|
16486
|
+
const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-76ca625a"]]);
|
|
16487
|
+
const _hoisted_1$r = { class: "lew-date-picker-view" };
|
|
16488
|
+
const _hoisted_2$e = ["onClick"];
|
|
16489
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
16626
16490
|
__name: "LewDatePicker",
|
|
16627
16491
|
props: /* @__PURE__ */ mergeModels(datePickerProps, {
|
|
16628
16492
|
"modelValue": {},
|
|
@@ -16713,7 +16577,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
16713
16577
|
onHide: hideHandle
|
|
16714
16578
|
}, {
|
|
16715
16579
|
trigger: withCtx(() => [
|
|
16716
|
-
createElementVNode("div", _hoisted_1$
|
|
16580
|
+
createElementVNode("div", _hoisted_1$r, [
|
|
16717
16581
|
createElementVNode("div", {
|
|
16718
16582
|
class: normalizeClass(["lew-date-picker", unref(lewDatePickerClassNames)]),
|
|
16719
16583
|
style: normalizeStyle(unref(getDatePickerInputStyle))
|
|
@@ -16779,7 +16643,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
16779
16643
|
]])
|
|
16780
16644
|
}, [
|
|
16781
16645
|
createTextVNode(toDisplayString$1(item.label), 1)
|
|
16782
|
-
], 10, _hoisted_2$
|
|
16646
|
+
], 10, _hoisted_2$e)), [
|
|
16783
16647
|
[_directive_tooltip, {
|
|
16784
16648
|
content: unref(dayjs)(item.value).format(_ctx.valueFormat),
|
|
16785
16649
|
placement: "right",
|
|
@@ -16810,7 +16674,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
16810
16674
|
};
|
|
16811
16675
|
}
|
|
16812
16676
|
});
|
|
16813
|
-
const LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16677
|
+
const LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-76499cb8"]]);
|
|
16814
16678
|
const dateRangePickerModel = {
|
|
16815
16679
|
modelValue: {
|
|
16816
16680
|
type: Object,
|
|
@@ -16924,10 +16788,10 @@ const dateRangeProps = {
|
|
|
16924
16788
|
description: "日期格式化字符串"
|
|
16925
16789
|
}
|
|
16926
16790
|
};
|
|
16927
|
-
const _hoisted_1$
|
|
16928
|
-
const _hoisted_2$
|
|
16929
|
-
const _hoisted_3$
|
|
16930
|
-
const _hoisted_4$
|
|
16791
|
+
const _hoisted_1$q = { class: "lew-date-range" };
|
|
16792
|
+
const _hoisted_2$d = { class: "lew-date" };
|
|
16793
|
+
const _hoisted_3$a = { class: "lew-date-control-left" };
|
|
16794
|
+
const _hoisted_4$7 = { class: "cur-date" };
|
|
16931
16795
|
const _hoisted_5$4 = { class: "lew-date-control-right" };
|
|
16932
16796
|
const _hoisted_6$3 = { class: "lew-date-box" };
|
|
16933
16797
|
const _hoisted_7$1 = { class: "lew-date-num" };
|
|
@@ -16947,7 +16811,7 @@ const _hoisted_17 = {
|
|
|
16947
16811
|
key: 0,
|
|
16948
16812
|
class: "lew-date-item-today"
|
|
16949
16813
|
};
|
|
16950
|
-
const _sfc_main$
|
|
16814
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
16951
16815
|
__name: "LewDateRange",
|
|
16952
16816
|
props: /* @__PURE__ */ mergeModels(dateRangeProps, {
|
|
16953
16817
|
"modelValue": {},
|
|
@@ -17210,15 +17074,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17210
17074
|
];
|
|
17211
17075
|
});
|
|
17212
17076
|
return (_ctx, _cache) => {
|
|
17213
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17214
|
-
createElementVNode("div", _hoisted_2$
|
|
17077
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
17078
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
17215
17079
|
createVNode(unref(LewFlex), {
|
|
17216
17080
|
x: "start",
|
|
17217
17081
|
mode: "between",
|
|
17218
17082
|
class: "lew-date-control"
|
|
17219
17083
|
}, {
|
|
17220
17084
|
default: withCtx(() => [
|
|
17221
|
-
createElementVNode("div", _hoisted_3$
|
|
17085
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
17222
17086
|
createVNode(unref(LewButton), {
|
|
17223
17087
|
type: "light",
|
|
17224
17088
|
color: "gray",
|
|
@@ -17244,7 +17108,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17244
17108
|
_: 1
|
|
17245
17109
|
})
|
|
17246
17110
|
]),
|
|
17247
|
-
createElementVNode("div", _hoisted_4$
|
|
17111
|
+
createElementVNode("div", _hoisted_4$7, toDisplayString$1(unref(dayjs)(`${unref(dateState).year1}-${unref(dateState).month1}`).format("YYYY-MM")), 1),
|
|
17248
17112
|
createElementVNode("div", _hoisted_5$4, [
|
|
17249
17113
|
createVNode(unref(LewButton), {
|
|
17250
17114
|
type: "light",
|
|
@@ -17397,17 +17261,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17397
17261
|
};
|
|
17398
17262
|
}
|
|
17399
17263
|
});
|
|
17400
|
-
const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17401
|
-
const _hoisted_1$
|
|
17402
|
-
const _hoisted_2$
|
|
17264
|
+
const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-ae73681c"]]);
|
|
17265
|
+
const _hoisted_1$p = { class: "lew-date-range-picker-view" };
|
|
17266
|
+
const _hoisted_2$c = {
|
|
17403
17267
|
key: 0,
|
|
17404
17268
|
class: "lew-date-range-picker-placeholder"
|
|
17405
17269
|
};
|
|
17406
|
-
const _hoisted_3$
|
|
17270
|
+
const _hoisted_3$9 = {
|
|
17407
17271
|
key: 1,
|
|
17408
17272
|
class: "lew-date-range-picker-dateValue lew-date-range-picker-start"
|
|
17409
17273
|
};
|
|
17410
|
-
const _hoisted_4$
|
|
17274
|
+
const _hoisted_4$6 = { class: "lew-date-range-picker-mid" };
|
|
17411
17275
|
const _hoisted_5$3 = {
|
|
17412
17276
|
key: 2,
|
|
17413
17277
|
class: "lew-date-range-picker-placeholder"
|
|
@@ -17416,7 +17280,7 @@ const _hoisted_6$2 = {
|
|
|
17416
17280
|
key: 3,
|
|
17417
17281
|
class: "lew-date-range-picker-dateValue lew-date-range-picker-end"
|
|
17418
17282
|
};
|
|
17419
|
-
const _sfc_main$
|
|
17283
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
17420
17284
|
__name: "LewDateRangePicker",
|
|
17421
17285
|
props: /* @__PURE__ */ mergeModels(dateRangePickerProps, {
|
|
17422
17286
|
"modelValue": {},
|
|
@@ -17504,7 +17368,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
17504
17368
|
onHide: hideHandle
|
|
17505
17369
|
}, {
|
|
17506
17370
|
trigger: withCtx(() => [
|
|
17507
|
-
createElementVNode("div", _hoisted_1$
|
|
17371
|
+
createElementVNode("div", _hoisted_1$p, [
|
|
17508
17372
|
createElementVNode("div", {
|
|
17509
17373
|
class: normalizeClass(["lew-date-range-picker", unref(lewDateRangeClassNames)]),
|
|
17510
17374
|
style: normalizeStyle(unref(getDateRangePickerInputStyle))
|
|
@@ -17517,8 +17381,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
17517
17381
|
})
|
|
17518
17382
|
}, {
|
|
17519
17383
|
default: withCtx(() => [
|
|
17520
|
-
!modelValue2.value || !modelValue2.value[unref(startKey)] ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
17521
|
-
createElementVNode("div", _hoisted_4$
|
|
17384
|
+
!modelValue2.value || !modelValue2.value[unref(startKey)] ? (openBlock(), createElementBlock("div", _hoisted_2$c, toDisplayString$1(_ctx.placeholderStart ? _ctx.placeholderStart : unref(locale).t("dateRangePicker.placeholderStart")), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$9, toDisplayString$1(modelValue2.value[unref(startKey)]), 1)),
|
|
17385
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
17522
17386
|
createVNode(Icon, {
|
|
17523
17387
|
size: 14,
|
|
17524
17388
|
type: "minus"
|
|
@@ -17567,7 +17431,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
17567
17431
|
};
|
|
17568
17432
|
}
|
|
17569
17433
|
});
|
|
17570
|
-
const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17434
|
+
const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-2df69772"]]);
|
|
17571
17435
|
const cascaderModel = {
|
|
17572
17436
|
modelValue: {
|
|
17573
17437
|
type: [String, Number],
|
|
@@ -17655,13 +17519,13 @@ const cascaderProps = {
|
|
|
17655
17519
|
description: "是否只读"
|
|
17656
17520
|
}
|
|
17657
17521
|
};
|
|
17658
|
-
const _hoisted_1$
|
|
17659
|
-
const _hoisted_2$
|
|
17522
|
+
const _hoisted_1$o = { key: 1 };
|
|
17523
|
+
const _hoisted_2$b = {
|
|
17660
17524
|
class: "lew-cascader-item-padding",
|
|
17661
17525
|
style: { height: "38px" }
|
|
17662
17526
|
};
|
|
17663
|
-
const _hoisted_3$
|
|
17664
|
-
const _sfc_main$
|
|
17527
|
+
const _hoisted_3$8 = ["onClick"];
|
|
17528
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
17665
17529
|
__name: "LewCascader",
|
|
17666
17530
|
props: /* @__PURE__ */ mergeModels(cascaderProps, {
|
|
17667
17531
|
"modelValue": {
|
|
@@ -18007,7 +17871,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
18007
17871
|
_ctx.showAllLevels ? (openBlock(), createBlock(unref(LewTextTrim), {
|
|
18008
17872
|
key: 0,
|
|
18009
17873
|
text: unref(getLabel).join(" / ")
|
|
18010
|
-
}, null, 8, ["text"])) : unref(getLabel) ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
17874
|
+
}, null, 8, ["text"])) : unref(getLabel) ? (openBlock(), createElementBlock("span", _hoisted_1$o, toDisplayString$1(unref(getLabel)[unref(getLabel).length - 1]), 1)) : createCommentVNode("", true)
|
|
18011
17875
|
], 4), [
|
|
18012
17876
|
[vShow, unref(getLabel) && unref(getLabel).length > 0]
|
|
18013
17877
|
]),
|
|
@@ -18060,7 +17924,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
18060
17924
|
}
|
|
18061
17925
|
}, {
|
|
18062
17926
|
default: withCtx(({ itemData: templateProps }) => [
|
|
18063
|
-
createElementVNode("div", _hoisted_2$
|
|
17927
|
+
createElementVNode("div", _hoisted_2$b, [
|
|
18064
17928
|
createElementVNode("div", {
|
|
18065
17929
|
class: normalizeClass(["lew-cascader-item", {
|
|
18066
17930
|
"lew-cascader-item-disabled": templateProps.disabled,
|
|
@@ -18099,7 +17963,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
18099
17963
|
class: "lew-cascader-icon",
|
|
18100
17964
|
type: "chevron-right"
|
|
18101
17965
|
})) : createCommentVNode("", true)
|
|
18102
|
-
], 10, _hoisted_3$
|
|
17966
|
+
], 10, _hoisted_3$8)
|
|
18103
17967
|
])
|
|
18104
17968
|
]),
|
|
18105
17969
|
_: 2
|
|
@@ -18150,7 +18014,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
18150
18014
|
};
|
|
18151
18015
|
}
|
|
18152
18016
|
});
|
|
18153
|
-
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18017
|
+
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-45aeb534"]]);
|
|
18154
18018
|
const treeSelectModel = {
|
|
18155
18019
|
modelValue: {
|
|
18156
18020
|
type: [String, Number],
|
|
@@ -18203,7 +18067,7 @@ const treeSelectProps = {
|
|
|
18203
18067
|
default: false,
|
|
18204
18068
|
description: "是否可清空"
|
|
18205
18069
|
},
|
|
18206
|
-
|
|
18070
|
+
checkable: {
|
|
18207
18071
|
type: Boolean,
|
|
18208
18072
|
default: false,
|
|
18209
18073
|
description: "是否显示复选框"
|
|
@@ -18305,14 +18169,14 @@ const treeSelectProps = {
|
|
|
18305
18169
|
description: "异步加载子节点数据的方法"
|
|
18306
18170
|
}
|
|
18307
18171
|
};
|
|
18308
|
-
const _hoisted_1$
|
|
18309
|
-
const _hoisted_2$
|
|
18310
|
-
const _hoisted_3$
|
|
18172
|
+
const _hoisted_1$n = ["readonly", "placeholder"];
|
|
18173
|
+
const _hoisted_2$a = { class: "lew-select-options-box" };
|
|
18174
|
+
const _hoisted_3$7 = {
|
|
18311
18175
|
key: 0,
|
|
18312
18176
|
class: "result-count"
|
|
18313
18177
|
};
|
|
18314
|
-
const _hoisted_4$
|
|
18315
|
-
const _sfc_main$
|
|
18178
|
+
const _hoisted_4$5 = { class: "tree-select-wrapper lew-scrollbar" };
|
|
18179
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
18316
18180
|
__name: "LewTreeSelect",
|
|
18317
18181
|
props: /* @__PURE__ */ mergeModels(treeSelectProps, {
|
|
18318
18182
|
"modelValue": {},
|
|
@@ -18344,14 +18208,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18344
18208
|
// 树加载
|
|
18345
18209
|
initLoading: true,
|
|
18346
18210
|
// 初始化 loading
|
|
18347
|
-
|
|
18348
|
-
//
|
|
18349
|
-
hideBySelect: false,
|
|
18350
|
-
// 记录是否通过选择隐藏
|
|
18211
|
+
valueIsChange: false,
|
|
18212
|
+
// 记录
|
|
18351
18213
|
keyword: props2.defaultValue || treeSelectValue.value,
|
|
18352
18214
|
// 搜索关键字
|
|
18353
|
-
keywordBackup: props2.defaultValue
|
|
18215
|
+
keywordBackup: props2.defaultValue,
|
|
18354
18216
|
// 搜索关键字备份
|
|
18217
|
+
resultText: ""
|
|
18355
18218
|
});
|
|
18356
18219
|
const getSelectWidth = () => {
|
|
18357
18220
|
var _a2;
|
|
@@ -18369,18 +18232,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18369
18232
|
const search = async (e) => {
|
|
18370
18233
|
const keyword = e.target.value;
|
|
18371
18234
|
if (props2.searchable) {
|
|
18372
|
-
|
|
18373
|
-
await lewTreeRef.value.init(keyword);
|
|
18374
|
-
state.treeList = lewTreeRef.value.getTreeList();
|
|
18375
|
-
state.searchLoading = false;
|
|
18235
|
+
await lewTreeRef.value.search(keyword);
|
|
18376
18236
|
}
|
|
18377
18237
|
};
|
|
18378
|
-
const change2 = (
|
|
18379
|
-
|
|
18380
|
-
|
|
18381
|
-
|
|
18382
|
-
|
|
18383
|
-
emit2("change",
|
|
18238
|
+
const change2 = (e) => {
|
|
18239
|
+
const { value } = e;
|
|
18240
|
+
treeSelectValue.value = value;
|
|
18241
|
+
state.valueIsChange = true;
|
|
18242
|
+
getKeywordLabel(value);
|
|
18243
|
+
emit2("change", e);
|
|
18384
18244
|
setTimeout(() => {
|
|
18385
18245
|
hide2();
|
|
18386
18246
|
}, 100);
|
|
@@ -18395,22 +18255,6 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18395
18255
|
const getValueStyle = computed(() => {
|
|
18396
18256
|
return state.visible ? "opacity:0.6" : "";
|
|
18397
18257
|
});
|
|
18398
|
-
const findKeyword = () => {
|
|
18399
|
-
if (lewTreeRef.value && treeSelectValue.value) {
|
|
18400
|
-
state.treeList = lewTreeRef.value.getTreeList();
|
|
18401
|
-
const treeItem = state.treeList.find((e) => {
|
|
18402
|
-
return e[props2.keyField] === treeSelectValue.value;
|
|
18403
|
-
});
|
|
18404
|
-
if (treeItem !== void 0) {
|
|
18405
|
-
if (props2.showAllLevels && treeItem.labelPaths && treeItem.labelPaths.length > 0) {
|
|
18406
|
-
state.keyword = treeItem.labelPaths.join(" / ");
|
|
18407
|
-
} else {
|
|
18408
|
-
state.keyword = treeItem.label[0];
|
|
18409
|
-
}
|
|
18410
|
-
}
|
|
18411
|
-
}
|
|
18412
|
-
};
|
|
18413
|
-
findKeyword();
|
|
18414
18258
|
const getSelectClassName = computed(() => {
|
|
18415
18259
|
let { clearable, size, align, disabled, readonly: readonly2, searchable } = props2;
|
|
18416
18260
|
clearable = clearable ? !!treeSelectValue.value : false;
|
|
@@ -18437,40 +18281,48 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18437
18281
|
};
|
|
18438
18282
|
return size[props2.size];
|
|
18439
18283
|
});
|
|
18284
|
+
const getKeywordLabel = (value) => {
|
|
18285
|
+
if (lewTreeRef.value && value) {
|
|
18286
|
+
let tree = lewTreeRef.value.getTree();
|
|
18287
|
+
const treeItem = findNodeByKey(value, tree);
|
|
18288
|
+
if (treeItem !== void 0) {
|
|
18289
|
+
const { labelPaths, label } = treeItem;
|
|
18290
|
+
if (props2.showAllLevels && labelPaths && labelPaths.length > 0) {
|
|
18291
|
+
state.keyword = labelPaths.join(" / ");
|
|
18292
|
+
} else {
|
|
18293
|
+
state.keyword = label[0];
|
|
18294
|
+
}
|
|
18295
|
+
}
|
|
18296
|
+
}
|
|
18297
|
+
};
|
|
18298
|
+
getKeywordLabel(treeSelectValue.value);
|
|
18440
18299
|
const showHandle = () => {
|
|
18441
18300
|
state.visible = true;
|
|
18442
18301
|
state.keywordBackup = cloneDeep(state.keyword);
|
|
18302
|
+
state.valueIsChange = false;
|
|
18443
18303
|
if (props2.searchable) {
|
|
18444
18304
|
state.keyword = "";
|
|
18445
18305
|
}
|
|
18446
|
-
state.hideBySelect = false;
|
|
18447
18306
|
getSelectWidth();
|
|
18448
|
-
if (props2.searchable
|
|
18307
|
+
if (props2.searchable) {
|
|
18449
18308
|
search({ target: { value: "" } });
|
|
18450
18309
|
}
|
|
18451
18310
|
};
|
|
18452
18311
|
const hideHandle = () => {
|
|
18453
18312
|
state.visible = false;
|
|
18454
|
-
if (!state.
|
|
18455
|
-
|
|
18313
|
+
if (!state.valueIsChange && treeSelectValue.value) {
|
|
18314
|
+
state.keywordBackup ? state.keyword = state.keywordBackup : getKeywordLabel(treeSelectValue.value);
|
|
18456
18315
|
}
|
|
18457
18316
|
if (!treeSelectValue.value && state.keyword) {
|
|
18458
18317
|
state.keyword = "";
|
|
18459
18318
|
state.keywordBackup = "";
|
|
18460
18319
|
}
|
|
18461
18320
|
inputRef.value.blur();
|
|
18321
|
+
lewTreeRef.value.reset();
|
|
18462
18322
|
emit2("blur");
|
|
18463
18323
|
};
|
|
18464
|
-
|
|
18465
|
-
|
|
18466
|
-
() => {
|
|
18467
|
-
findKeyword();
|
|
18468
|
-
}
|
|
18469
|
-
);
|
|
18470
|
-
const searchCount = computed(() => {
|
|
18471
|
-
return state.treeList.filter((e) => {
|
|
18472
|
-
return e.level === 0;
|
|
18473
|
-
}).length;
|
|
18324
|
+
const getPlaceholder = computed(() => {
|
|
18325
|
+
return state.keywordBackup || props2.placeholder;
|
|
18474
18326
|
});
|
|
18475
18327
|
__expose2({ show, hide: hide2 });
|
|
18476
18328
|
return (_ctx, _cache) => {
|
|
@@ -18526,10 +18378,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18526
18378
|
class: "value",
|
|
18527
18379
|
style: normalizeStyle(unref(getValueStyle)),
|
|
18528
18380
|
readonly: !_ctx.searchable,
|
|
18529
|
-
placeholder: unref(
|
|
18381
|
+
placeholder: unref(getPlaceholder),
|
|
18530
18382
|
onInput: _cache[1] || (_cache[1] = //@ts-ignore
|
|
18531
18383
|
(...args) => unref(searchDebounce) && unref(searchDebounce)(...args))
|
|
18532
|
-
}, null, 44, _hoisted_1$
|
|
18384
|
+
}, null, 44, _hoisted_1$n), [
|
|
18533
18385
|
[vModelText, unref(state).keyword]
|
|
18534
18386
|
])
|
|
18535
18387
|
], 2)
|
|
@@ -18540,9 +18392,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18540
18392
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
18541
18393
|
}, [
|
|
18542
18394
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
18543
|
-
createElementVNode("div", _hoisted_2$
|
|
18544
|
-
_ctx.searchable &&
|
|
18545
|
-
createElementVNode("div", _hoisted_4$
|
|
18395
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
18396
|
+
_ctx.searchable && unref(state).resultText ? (openBlock(), createElementBlock("div", _hoisted_3$7, toDisplayString$1(unref(state).resultText), 1)) : createCommentVNode("", true),
|
|
18397
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
18546
18398
|
createVNode(unref(LewTree), mergeProps({
|
|
18547
18399
|
ref_key: "lewTreeRef",
|
|
18548
18400
|
ref: lewTreeRef,
|
|
@@ -18553,14 +18405,16 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18553
18405
|
labelField: _ctx.labelField,
|
|
18554
18406
|
disabledField: _ctx.disabledField,
|
|
18555
18407
|
showLine: _ctx.showLine,
|
|
18556
|
-
|
|
18408
|
+
checkable: _ctx.checkable,
|
|
18409
|
+
searchable: _ctx.searchable,
|
|
18557
18410
|
dataSource: _ctx.dataSource,
|
|
18558
18411
|
loadMethod: _ctx.loadMethod,
|
|
18559
18412
|
initTree: _ctx.initTree,
|
|
18560
18413
|
expandAll: _ctx.expandAll
|
|
18561
18414
|
}, {
|
|
18562
18415
|
"is-select": true,
|
|
18563
|
-
|
|
18416
|
+
onLoadStart: _cache[3] || (_cache[3] = ($event) => unref(state).searchLoading = true),
|
|
18417
|
+
onLoadEnd: _cache[4] || (_cache[4] = ($event) => (unref(state).searchLoading = false, unref(state).initLoading = false, unref(state).resultText = $event)),
|
|
18564
18418
|
onChange: change2
|
|
18565
18419
|
}), createSlots({ _: 2 }, [
|
|
18566
18420
|
_ctx.$slots.empty ? {
|
|
@@ -18588,9 +18442,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
18588
18442
|
};
|
|
18589
18443
|
}
|
|
18590
18444
|
});
|
|
18591
|
-
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18592
|
-
const _hoisted_1$
|
|
18593
|
-
const _sfc_main$
|
|
18445
|
+
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-d895e863"]]);
|
|
18446
|
+
const _hoisted_1$m = { class: "lew-form-modal lew-scrollbar" };
|
|
18447
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
18594
18448
|
__name: "FormModal",
|
|
18595
18449
|
props: {
|
|
18596
18450
|
options: {
|
|
@@ -18660,7 +18514,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18660
18514
|
title: `${unref(editIndex) >= 0 ? "编辑" : "新增"}数据`
|
|
18661
18515
|
}, {
|
|
18662
18516
|
default: withCtx(() => [
|
|
18663
|
-
createElementVNode("div", _hoisted_1$
|
|
18517
|
+
createElementVNode("div", _hoisted_1$m, [
|
|
18664
18518
|
createVNode(unref(LewForm), {
|
|
18665
18519
|
siz: __props2.size,
|
|
18666
18520
|
onMounted: formMounted,
|
|
@@ -18676,7 +18530,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
18676
18530
|
};
|
|
18677
18531
|
}
|
|
18678
18532
|
});
|
|
18679
|
-
const FormModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18533
|
+
const FormModal = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-b9fc98a8"]]);
|
|
18680
18534
|
const inputTableModel = {
|
|
18681
18535
|
modelValue: {
|
|
18682
18536
|
type: Array,
|
|
@@ -18814,7 +18668,7 @@ const inputTableProps = {
|
|
|
18814
18668
|
description: "指定一个不可重复的字段,用于添加数据时检查重复"
|
|
18815
18669
|
}
|
|
18816
18670
|
};
|
|
18817
|
-
const _sfc_main$
|
|
18671
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
18818
18672
|
__name: "LewInputTable",
|
|
18819
18673
|
props: /* @__PURE__ */ mergeModels(inputTableProps, {
|
|
18820
18674
|
"modelValue": { required: true },
|
|
@@ -18992,7 +18846,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
18992
18846
|
})
|
|
18993
18847
|
}, {
|
|
18994
18848
|
default: withCtx(() => [
|
|
18995
|
-
createVNode(unref(_sfc_main$
|
|
18849
|
+
createVNode(unref(_sfc_main$h), {
|
|
18996
18850
|
size: _ctx.size,
|
|
18997
18851
|
checkable: _ctx.batchDeletable,
|
|
18998
18852
|
"row-key": _ctx.rowKey,
|
|
@@ -19152,7 +19006,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
19152
19006
|
};
|
|
19153
19007
|
}
|
|
19154
19008
|
});
|
|
19155
|
-
const LewInputTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19009
|
+
const LewInputTable = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-fad857e7"]]);
|
|
19156
19010
|
const switchModel = {
|
|
19157
19011
|
modelValue: {
|
|
19158
19012
|
type: Boolean,
|
|
@@ -19215,8 +19069,8 @@ const switchProps = {
|
|
|
19215
19069
|
description: "是否显示加载状态"
|
|
19216
19070
|
}
|
|
19217
19071
|
};
|
|
19218
|
-
const _hoisted_1$
|
|
19219
|
-
const _sfc_main$
|
|
19072
|
+
const _hoisted_1$l = ["disabled"];
|
|
19073
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
19220
19074
|
__name: "LewSwitch",
|
|
19221
19075
|
props: /* @__PURE__ */ mergeModels(switchProps, {
|
|
19222
19076
|
"modelValue": {},
|
|
@@ -19314,7 +19168,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
19314
19168
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue2.value = $event),
|
|
19315
19169
|
type: "checkbox",
|
|
19316
19170
|
disabled: _ctx.disabled
|
|
19317
|
-
}, null, 8, _hoisted_1$
|
|
19171
|
+
}, null, 8, _hoisted_1$l), [
|
|
19318
19172
|
[vShow, false],
|
|
19319
19173
|
[vModelCheckbox, modelValue2.value]
|
|
19320
19174
|
]),
|
|
@@ -19323,7 +19177,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
19323
19177
|
};
|
|
19324
19178
|
}
|
|
19325
19179
|
});
|
|
19326
|
-
const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19180
|
+
const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-5c9f9ee3"]]);
|
|
19327
19181
|
const sliderModel = {
|
|
19328
19182
|
modelValue: {
|
|
19329
19183
|
type: [Number, void 0],
|
|
@@ -19413,9 +19267,9 @@ const sliderProps = {
|
|
|
19413
19267
|
description: "格式化 tooltip 内容"
|
|
19414
19268
|
}
|
|
19415
19269
|
};
|
|
19416
|
-
const _hoisted_1$
|
|
19417
|
-
const _hoisted_2$
|
|
19418
|
-
const _sfc_main$
|
|
19270
|
+
const _hoisted_1$k = { class: "lew-slider-track-line" };
|
|
19271
|
+
const _hoisted_2$9 = ["onClick"];
|
|
19272
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
19419
19273
|
__name: "LewSlider",
|
|
19420
19274
|
props: /* @__PURE__ */ mergeModels(sliderProps, {
|
|
19421
19275
|
"modelValue": {},
|
|
@@ -19624,7 +19478,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
19624
19478
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
19625
19479
|
}, ["stop"]))
|
|
19626
19480
|
}, null, 4),
|
|
19627
|
-
createElementVNode("div", _hoisted_1$
|
|
19481
|
+
createElementVNode("div", _hoisted_1$k, [
|
|
19628
19482
|
createElementVNode("div", {
|
|
19629
19483
|
class: "lew-slider-track-line-range",
|
|
19630
19484
|
style: normalizeStyle({
|
|
@@ -19661,7 +19515,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
19661
19515
|
class: normalizeClass(["lew-slider-track-step-label-text", {
|
|
19662
19516
|
"lew-slider-track-step-label-text-disabled": Number(item.value) < Number(unref(getMin)) || Number(item.value) > Number(unref(getMax))
|
|
19663
19517
|
}])
|
|
19664
|
-
}, toDisplayString$1(item.label), 11, _hoisted_2$
|
|
19518
|
+
}, toDisplayString$1(item.label), 11, _hoisted_2$9)
|
|
19665
19519
|
], 4);
|
|
19666
19520
|
}), 128))
|
|
19667
19521
|
]),
|
|
@@ -19688,7 +19542,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
19688
19542
|
};
|
|
19689
19543
|
}
|
|
19690
19544
|
});
|
|
19691
|
-
const LewSlider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19545
|
+
const LewSlider = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-45230045"]]);
|
|
19692
19546
|
const sliderRangeModel = {
|
|
19693
19547
|
modelValue: {
|
|
19694
19548
|
type: Array,
|
|
@@ -19778,8 +19632,8 @@ const sliderRangeProps = {
|
|
|
19778
19632
|
description: "格式化 tooltip 内容"
|
|
19779
19633
|
}
|
|
19780
19634
|
};
|
|
19781
|
-
const _hoisted_1$
|
|
19782
|
-
const _sfc_main$
|
|
19635
|
+
const _hoisted_1$j = { class: "lew-slider-track-line" };
|
|
19636
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
19783
19637
|
__name: "LewSliderRange",
|
|
19784
19638
|
props: /* @__PURE__ */ mergeModels(sliderRangeProps, {
|
|
19785
19639
|
"modelValue": {},
|
|
@@ -19998,7 +19852,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
19998
19852
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
19999
19853
|
}, ["stop"]))
|
|
20000
19854
|
}, null, 4),
|
|
20001
|
-
createElementVNode("div", _hoisted_1$
|
|
19855
|
+
createElementVNode("div", _hoisted_1$j, [
|
|
20002
19856
|
createElementVNode("div", {
|
|
20003
19857
|
class: "lew-slider-track-line-range",
|
|
20004
19858
|
style: normalizeStyle({
|
|
@@ -20079,7 +19933,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
20079
19933
|
};
|
|
20080
19934
|
}
|
|
20081
19935
|
});
|
|
20082
|
-
const LewSliderRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19936
|
+
const LewSliderRange = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-4ea82a0c"]]);
|
|
20083
19937
|
const colorPickerModel = {
|
|
20084
19938
|
modelValue: {
|
|
20085
19939
|
type: String,
|
|
@@ -20113,8 +19967,8 @@ const colorPickerProps = {
|
|
|
20113
19967
|
description: "是否只读"
|
|
20114
19968
|
}
|
|
20115
19969
|
};
|
|
20116
|
-
const _hoisted_1$
|
|
20117
|
-
const _sfc_main$
|
|
19970
|
+
const _hoisted_1$i = ["placeholder"];
|
|
19971
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
20118
19972
|
__name: "LewColorPicker",
|
|
20119
19973
|
props: /* @__PURE__ */ mergeModels(colorPickerProps, {
|
|
20120
19974
|
"modelValue": {},
|
|
@@ -20228,7 +20082,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
20228
20082
|
onFocus: focus,
|
|
20229
20083
|
onBlur: blur,
|
|
20230
20084
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue2.value = $event)
|
|
20231
|
-
}, null, 44, _hoisted_1$
|
|
20085
|
+
}, null, 44, _hoisted_1$i), [
|
|
20232
20086
|
[vModelText, modelValue2.value]
|
|
20233
20087
|
])
|
|
20234
20088
|
], 6)
|
|
@@ -20236,7 +20090,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
20236
20090
|
};
|
|
20237
20091
|
}
|
|
20238
20092
|
});
|
|
20239
|
-
const LewColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
20093
|
+
const LewColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-dbf02989"]]);
|
|
20240
20094
|
const uploadProps = {
|
|
20241
20095
|
accept: {
|
|
20242
20096
|
type: String,
|
|
@@ -20370,27 +20224,18 @@ const uploadByCardProps = {
|
|
|
20370
20224
|
}
|
|
20371
20225
|
}
|
|
20372
20226
|
};
|
|
20373
|
-
const
|
|
20374
|
-
pending: "待上传",
|
|
20375
|
-
success: "上传成功",
|
|
20376
|
-
fail: "上传失败",
|
|
20377
|
-
uploading: "上传中",
|
|
20378
|
-
complete: "已上传",
|
|
20379
|
-
wrong_type: "非法格式",
|
|
20380
|
-
wrong_size: "文件大小超出限制"
|
|
20381
|
-
};
|
|
20382
|
-
const statusColorMap = {
|
|
20383
|
-
pending: "gray",
|
|
20384
|
-
success: "green",
|
|
20385
|
-
fail: "red",
|
|
20386
|
-
uploading: "blue",
|
|
20387
|
-
complete: "gray",
|
|
20388
|
-
wrong_type: "red",
|
|
20389
|
-
wrong_size: "red"
|
|
20227
|
+
const statusConfig = {
|
|
20228
|
+
pending: { text: "待上传", color: "gray" },
|
|
20229
|
+
success: { text: "上传成功", color: "green" },
|
|
20230
|
+
fail: { text: "上传失败", color: "red" },
|
|
20231
|
+
uploading: { text: "上传中", color: "blue" },
|
|
20232
|
+
complete: { text: "已上传", color: "gray" },
|
|
20233
|
+
wrong_type: { text: "非法格式", color: "red" },
|
|
20234
|
+
wrong_size: { text: "文件大小超出限制", color: "red" }
|
|
20390
20235
|
};
|
|
20391
|
-
const _hoisted_1$
|
|
20392
|
-
const _hoisted_2$
|
|
20393
|
-
const _sfc_main$
|
|
20236
|
+
const _hoisted_1$h = ["src"];
|
|
20237
|
+
const _hoisted_2$8 = { key: 1 };
|
|
20238
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
20394
20239
|
__name: "LewUploadByList",
|
|
20395
20240
|
props: /* @__PURE__ */ mergeModels(uploadByListProps, {
|
|
20396
20241
|
"modelValue": {},
|
|
@@ -20448,6 +20293,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20448
20293
|
const urlParts = url.split("/");
|
|
20449
20294
|
return urlParts[urlParts.length - 1];
|
|
20450
20295
|
};
|
|
20296
|
+
const getStatus = computed(() => (item) => {
|
|
20297
|
+
return statusConfig[item.status || "complete"];
|
|
20298
|
+
});
|
|
20451
20299
|
return (_ctx, _cache) => {
|
|
20452
20300
|
return withDirectives((openBlock(), createBlock(unref(LewFlex), {
|
|
20453
20301
|
direction: "y",
|
|
@@ -20487,7 +20335,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20487
20335
|
key: 1,
|
|
20488
20336
|
class: "lew-upload-file-icon",
|
|
20489
20337
|
src: unref(getFileIcon)(item.name)
|
|
20490
|
-
}, null, 8, _hoisted_1$
|
|
20338
|
+
}, null, 8, _hoisted_1$h))
|
|
20491
20339
|
]),
|
|
20492
20340
|
_: 2
|
|
20493
20341
|
}, 1032, ["style"]),
|
|
@@ -20600,7 +20448,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20600
20448
|
item.status === "uploading" && item.percent && item.size ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
20601
20449
|
createTextVNode(toDisplayString$1(unref(formatBytes)(item.percent / 100 * item.size) + " / "), 1)
|
|
20602
20450
|
], 64)) : createCommentVNode("", true),
|
|
20603
|
-
item.size ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
20451
|
+
item.size ? (openBlock(), createElementBlock("span", _hoisted_2$8, toDisplayString$1(unref(formatBytes)(item.size)), 1)) : createCommentVNode("", true)
|
|
20604
20452
|
], 4),
|
|
20605
20453
|
createVNode(unref(LewFlex), {
|
|
20606
20454
|
style: { "max-width": "200px" },
|
|
@@ -20608,11 +20456,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20608
20456
|
x: "end"
|
|
20609
20457
|
}, {
|
|
20610
20458
|
default: withCtx(() => [
|
|
20611
|
-
item.status && item.status !== "pending" ? (openBlock(), createBlock(unref(_sfc_main
|
|
20612
|
-
key: 0,
|
|
20459
|
+
item.status && item.status !== "pending" ? (openBlock(), createBlock(unref(_sfc_main$$), {
|
|
20613
20460
|
type: "light",
|
|
20614
20461
|
size: "small",
|
|
20615
|
-
|
|
20462
|
+
key: item.status,
|
|
20463
|
+
color: unref(getStatus)(item).color
|
|
20616
20464
|
}, {
|
|
20617
20465
|
left: withCtx(() => [
|
|
20618
20466
|
createVNode(Icon, {
|
|
@@ -20623,7 +20471,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20623
20471
|
}, null, 8, ["type", "loading"])
|
|
20624
20472
|
]),
|
|
20625
20473
|
default: withCtx(() => [
|
|
20626
|
-
createTextVNode(" " + toDisplayString$1(unref(
|
|
20474
|
+
createTextVNode(" " + toDisplayString$1(unref(getStatus)(item).text), 1)
|
|
20627
20475
|
]),
|
|
20628
20476
|
_: 2
|
|
20629
20477
|
}, 1032, ["color"])) : createCommentVNode("", true)
|
|
@@ -20651,9 +20499,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
20651
20499
|
};
|
|
20652
20500
|
}
|
|
20653
20501
|
});
|
|
20654
|
-
const LewUploadByList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
20655
|
-
const _hoisted_1$
|
|
20656
|
-
const _sfc_main$
|
|
20502
|
+
const LewUploadByList = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-9eb98361"]]);
|
|
20503
|
+
const _hoisted_1$g = ["src"];
|
|
20504
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
20657
20505
|
__name: "LewUploadByCard",
|
|
20658
20506
|
props: /* @__PURE__ */ mergeModels(uploadByCardProps, {
|
|
20659
20507
|
"modelValue": {},
|
|
@@ -20692,6 +20540,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
20692
20540
|
medium: 80,
|
|
20693
20541
|
large: 88
|
|
20694
20542
|
};
|
|
20543
|
+
const getStatus = computed(() => (item) => {
|
|
20544
|
+
return statusConfig[item.status || "complete"];
|
|
20545
|
+
});
|
|
20695
20546
|
const emit2 = __emit2;
|
|
20696
20547
|
const modelValue2 = useModel(__props2, "modelValue");
|
|
20697
20548
|
return (_ctx, _cache) => {
|
|
@@ -20752,13 +20603,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
20752
20603
|
createVNode(Icon, {
|
|
20753
20604
|
size: rightTopBtnIconSizeMap[_ctx.size],
|
|
20754
20605
|
type: "tips",
|
|
20755
|
-
color: unref(
|
|
20606
|
+
color: unref(getStatus)(item).color
|
|
20756
20607
|
}, null, 8, ["size", "color"])
|
|
20757
20608
|
]),
|
|
20758
20609
|
_: 2
|
|
20759
20610
|
}, 1032, ["style"])), [
|
|
20760
20611
|
[_directive_tooltip, {
|
|
20761
|
-
content: unref(
|
|
20612
|
+
content: unref(getStatus)(item).text,
|
|
20762
20613
|
trigger: "mouseenter"
|
|
20763
20614
|
}]
|
|
20764
20615
|
]) : createCommentVNode("", true),
|
|
@@ -20808,7 +20659,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
20808
20659
|
}),
|
|
20809
20660
|
class: "lew-upload-file-icon",
|
|
20810
20661
|
src: unref(getFileIcon)(item.name)
|
|
20811
|
-
}, null, 12, _hoisted_1$
|
|
20662
|
+
}, null, 12, _hoisted_1$g))
|
|
20812
20663
|
]),
|
|
20813
20664
|
_: 2
|
|
20814
20665
|
}, 1032, ["style"])
|
|
@@ -20852,9 +20703,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
20852
20703
|
};
|
|
20853
20704
|
}
|
|
20854
20705
|
});
|
|
20855
|
-
const LewUploadByCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
20856
|
-
const _hoisted_1$
|
|
20857
|
-
const _sfc_main$
|
|
20706
|
+
const LewUploadByCard = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-cf133017"]]);
|
|
20707
|
+
const _hoisted_1$f = ["multiple", "accept"];
|
|
20708
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
20858
20709
|
__name: "LewUpload",
|
|
20859
20710
|
props: /* @__PURE__ */ mergeModels(uploadProps, {
|
|
20860
20711
|
"modelValue": {},
|
|
@@ -21173,7 +21024,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
21173
21024
|
multiple: _ctx.multiple,
|
|
21174
21025
|
accept: _ctx.accept,
|
|
21175
21026
|
onChange: withModifiers(clickUpload, ["stop"])
|
|
21176
|
-
}, null, 40, _hoisted_1$
|
|
21027
|
+
}, null, 40, _hoisted_1$f),
|
|
21177
21028
|
createElementVNode("input", {
|
|
21178
21029
|
class: "lew-upload-input",
|
|
21179
21030
|
ref_key: "inputPasteRef",
|
|
@@ -21203,7 +21054,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
21203
21054
|
};
|
|
21204
21055
|
}
|
|
21205
21056
|
});
|
|
21206
|
-
const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21057
|
+
const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-f27730be"]]);
|
|
21207
21058
|
const rateModel = {
|
|
21208
21059
|
modelValue: {
|
|
21209
21060
|
type: Number,
|
|
@@ -21247,8 +21098,8 @@ const rateProps = {
|
|
|
21247
21098
|
description: "是否禁用"
|
|
21248
21099
|
}
|
|
21249
21100
|
};
|
|
21250
|
-
const _hoisted_1$
|
|
21251
|
-
const _sfc_main$
|
|
21101
|
+
const _hoisted_1$e = ["onMousemove", "onClick"];
|
|
21102
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
21252
21103
|
__name: "LewRate",
|
|
21253
21104
|
props: /* @__PURE__ */ mergeModels(rateProps, {
|
|
21254
21105
|
"modelValue": {},
|
|
@@ -21357,7 +21208,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
21357
21208
|
withDirectives(createVNode(Icon, {
|
|
21358
21209
|
class: "lew-rate-star",
|
|
21359
21210
|
style: normalizeStyle({
|
|
21360
|
-
fill: Number(unref(tobeValue)) >= i ? "var(--lew-color-yellow)" : "var(--lew-
|
|
21211
|
+
fill: Number(unref(tobeValue)) >= i ? "var(--lew-color-yellow)" : "var(--lew-form-bgcolor-2)"
|
|
21361
21212
|
}),
|
|
21362
21213
|
type: "star",
|
|
21363
21214
|
strokeWidth: 0,
|
|
@@ -21368,7 +21219,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
21368
21219
|
trigger: "hover"
|
|
21369
21220
|
}]
|
|
21370
21221
|
])
|
|
21371
|
-
], 44, _hoisted_1$
|
|
21222
|
+
], 44, _hoisted_1$e);
|
|
21372
21223
|
}), 128))
|
|
21373
21224
|
]),
|
|
21374
21225
|
_: 1
|
|
@@ -21376,7 +21227,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
21376
21227
|
};
|
|
21377
21228
|
}
|
|
21378
21229
|
});
|
|
21379
|
-
const LewRate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21230
|
+
const LewRate = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-9d59e2d2"]]);
|
|
21380
21231
|
const tableModel = {
|
|
21381
21232
|
selectedKeys: {
|
|
21382
21233
|
type: [Array, String, Number, void 0],
|
|
@@ -21465,7 +21316,7 @@ const tableProps = {
|
|
|
21465
21316
|
}
|
|
21466
21317
|
}
|
|
21467
21318
|
};
|
|
21468
|
-
const _sfc_main$
|
|
21319
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
21469
21320
|
__name: "SortIcon",
|
|
21470
21321
|
props: {
|
|
21471
21322
|
sortValue: {
|
|
@@ -21526,11 +21377,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21526
21377
|
};
|
|
21527
21378
|
}
|
|
21528
21379
|
});
|
|
21529
|
-
const SortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
21530
|
-
const _hoisted_1$
|
|
21531
|
-
const _hoisted_2$
|
|
21532
|
-
const _hoisted_3$
|
|
21533
|
-
const _hoisted_4$
|
|
21380
|
+
const SortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-62110f01"]]);
|
|
21381
|
+
const _hoisted_1$d = { class: "lew-table-wrapper" };
|
|
21382
|
+
const _hoisted_2$7 = { class: "lew-table-header" };
|
|
21383
|
+
const _hoisted_3$6 = { class: "lew-table-tr" };
|
|
21384
|
+
const _hoisted_4$4 = { class: "lew-table-title-span" };
|
|
21534
21385
|
const _hoisted_5$2 = { class: "lew-table-main" };
|
|
21535
21386
|
const _hoisted_6$1 = { class: "lew-table-tr" };
|
|
21536
21387
|
const _hoisted_7 = { class: "lew-table-title-span" };
|
|
@@ -21549,7 +21400,7 @@ const _hoisted_14 = {
|
|
|
21549
21400
|
};
|
|
21550
21401
|
const _hoisted_15 = ["onMouseenter"];
|
|
21551
21402
|
const _hoisted_16 = { class: "lew-table-footer" };
|
|
21552
|
-
const _sfc_main$
|
|
21403
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
21553
21404
|
__name: "LewTable",
|
|
21554
21405
|
props: /* @__PURE__ */ mergeModels(tableProps, {
|
|
21555
21406
|
"selectedKeys": {},
|
|
@@ -21893,7 +21744,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
21893
21744
|
}
|
|
21894
21745
|
});
|
|
21895
21746
|
return (_ctx, _cache) => {
|
|
21896
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
21747
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
21897
21748
|
createElementVNode("i", {
|
|
21898
21749
|
style: normalizeStyle({ left: unref(any2px)(unref(state).fixedLeftWidth) }),
|
|
21899
21750
|
class: normalizeClass([{
|
|
@@ -21906,7 +21757,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
21906
21757
|
"lew-hide-line-right": !unref(state).isScrollbarVisible || !unref(state).isInitialized || ["all", "right"].includes(unref(state).hiddenScrollLine)
|
|
21907
21758
|
}, "lew-table-scroll-line-right"])
|
|
21908
21759
|
}, null, 6),
|
|
21909
|
-
createElementVNode("div", _hoisted_2$
|
|
21760
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
21910
21761
|
renderSlot(_ctx.$slots, "table-header")
|
|
21911
21762
|
]),
|
|
21912
21763
|
createElementVNode("div", {
|
|
@@ -21931,7 +21782,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
21931
21782
|
ref: fixedLeftRef,
|
|
21932
21783
|
class: "lew-table-fixed-left"
|
|
21933
21784
|
}, [
|
|
21934
|
-
createElementVNode("div", _hoisted_3$
|
|
21785
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
21935
21786
|
_ctx.checkable ? (openBlock(), createBlock(unref(LewFlex), {
|
|
21936
21787
|
key: 0,
|
|
21937
21788
|
class: "lew-table-td",
|
|
@@ -21964,7 +21815,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
21964
21815
|
onClick: ($event) => sort(column)
|
|
21965
21816
|
}, {
|
|
21966
21817
|
default: withCtx(() => [
|
|
21967
|
-
createElementVNode("span", _hoisted_4$
|
|
21818
|
+
createElementVNode("span", _hoisted_4$4, [
|
|
21968
21819
|
createTextVNode(toDisplayString$1(column.title) + " ", 1),
|
|
21969
21820
|
column.sortable ? (openBlock(), createBlock(SortIcon, {
|
|
21970
21821
|
key: 0,
|
|
@@ -22283,8 +22134,8 @@ const paginationProps = {
|
|
|
22283
22134
|
}
|
|
22284
22135
|
}
|
|
22285
22136
|
};
|
|
22286
|
-
const _hoisted_1$
|
|
22287
|
-
const _sfc_main$
|
|
22137
|
+
const _hoisted_1$c = ["onClick"];
|
|
22138
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
22288
22139
|
__name: "LewPagination",
|
|
22289
22140
|
props: /* @__PURE__ */ mergeModels(paginationProps, {
|
|
22290
22141
|
"total": { default: 0 },
|
|
@@ -22467,7 +22318,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
22467
22318
|
active: Number(page) === Number(currentPage.value)
|
|
22468
22319
|
}]),
|
|
22469
22320
|
onClick: ($event) => changePage(page)
|
|
22470
|
-
}, toDisplayString$1(page), 11, _hoisted_1$
|
|
22321
|
+
}, toDisplayString$1(page), 11, _hoisted_1$c);
|
|
22471
22322
|
}), 128)),
|
|
22472
22323
|
unref(endEllipsis) ? (openBlock(), createElementBlock("div", {
|
|
22473
22324
|
key: 3,
|
|
@@ -22533,7 +22384,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
22533
22384
|
};
|
|
22534
22385
|
}
|
|
22535
22386
|
});
|
|
22536
|
-
const LewPagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
22387
|
+
const LewPagination = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-27faebf9"]]);
|
|
22537
22388
|
const treeModel = {
|
|
22538
22389
|
modelValue: {
|
|
22539
22390
|
type: [Array, String],
|
|
@@ -22559,15 +22410,25 @@ const treeProps = {
|
|
|
22559
22410
|
return true;
|
|
22560
22411
|
}
|
|
22561
22412
|
},
|
|
22413
|
+
height: {
|
|
22414
|
+
type: String,
|
|
22415
|
+
default: "100%",
|
|
22416
|
+
description: "树组件的高度"
|
|
22417
|
+
},
|
|
22562
22418
|
multiple: {
|
|
22563
22419
|
type: Boolean,
|
|
22564
22420
|
default: false,
|
|
22565
22421
|
description: "是否允许多选"
|
|
22566
22422
|
},
|
|
22567
|
-
|
|
22423
|
+
checkable: {
|
|
22568
22424
|
type: Boolean,
|
|
22569
22425
|
default: false,
|
|
22570
|
-
description: "
|
|
22426
|
+
description: "是否显示选框"
|
|
22427
|
+
},
|
|
22428
|
+
searchable: {
|
|
22429
|
+
type: Boolean,
|
|
22430
|
+
default: false,
|
|
22431
|
+
description: "是否显示搜索框"
|
|
22571
22432
|
},
|
|
22572
22433
|
expandAll: {
|
|
22573
22434
|
type: Boolean,
|
|
@@ -22584,23 +22445,6 @@ const treeProps = {
|
|
|
22584
22445
|
default: false,
|
|
22585
22446
|
description: "是否显示连接线"
|
|
22586
22447
|
},
|
|
22587
|
-
trigger: {
|
|
22588
|
-
type: String,
|
|
22589
|
-
default: "click",
|
|
22590
|
-
description: "节点展开收起的触发方式",
|
|
22591
|
-
validator: (value) => {
|
|
22592
|
-
if (!["click", "hover"].includes(value)) {
|
|
22593
|
-
console.warn('[LewTree] trigger必须是 "click" 或 "hover"');
|
|
22594
|
-
return false;
|
|
22595
|
-
}
|
|
22596
|
-
return true;
|
|
22597
|
-
}
|
|
22598
|
-
},
|
|
22599
|
-
placeholder: {
|
|
22600
|
-
type: String,
|
|
22601
|
-
default: "请选择",
|
|
22602
|
-
description: "选择框默认文本"
|
|
22603
|
-
},
|
|
22604
22448
|
keyField: {
|
|
22605
22449
|
type: String,
|
|
22606
22450
|
default: "key",
|
|
@@ -22629,43 +22473,80 @@ const treeProps = {
|
|
|
22629
22473
|
isSelect: {
|
|
22630
22474
|
type: Boolean,
|
|
22631
22475
|
default: false,
|
|
22476
|
+
hidden: true,
|
|
22632
22477
|
description: "是否作为选择器使用"
|
|
22633
22478
|
}
|
|
22634
22479
|
};
|
|
22635
|
-
const
|
|
22636
|
-
|
|
22637
|
-
|
|
22638
|
-
|
|
22639
|
-
|
|
22640
|
-
}
|
|
22480
|
+
const treeItemProps = {
|
|
22481
|
+
label: {
|
|
22482
|
+
type: String,
|
|
22483
|
+
default: "",
|
|
22484
|
+
description: '菜单树项的标题文本。也可以使用具名插槽 "label" 自定义标题内容。'
|
|
22485
|
+
},
|
|
22486
|
+
__key: {
|
|
22487
|
+
type: [String, Number],
|
|
22488
|
+
required: true,
|
|
22489
|
+
description: "菜单树项的唯一标识符。",
|
|
22490
|
+
validator(value) {
|
|
22491
|
+
if (value === "") {
|
|
22492
|
+
console.warn("[LewTreeItem] key 不能为空。");
|
|
22493
|
+
return false;
|
|
22494
|
+
}
|
|
22495
|
+
return true;
|
|
22496
|
+
}
|
|
22497
|
+
},
|
|
22498
|
+
render: {
|
|
22499
|
+
type: Function,
|
|
22500
|
+
default: () => {
|
|
22501
|
+
},
|
|
22502
|
+
description: "菜单树项的图标。"
|
|
22503
|
+
},
|
|
22504
|
+
disabled: {
|
|
22505
|
+
type: Boolean,
|
|
22506
|
+
default: false,
|
|
22507
|
+
description: "菜单树项是否禁用。"
|
|
22508
|
+
},
|
|
22509
|
+
level: {
|
|
22510
|
+
type: Number,
|
|
22511
|
+
default: 1,
|
|
22512
|
+
description: "菜单树项的层级,从 1 开始。"
|
|
22513
|
+
},
|
|
22514
|
+
isLeaf: {
|
|
22515
|
+
type: Boolean,
|
|
22516
|
+
default: false,
|
|
22517
|
+
description: "是否为叶子节点。"
|
|
22518
|
+
},
|
|
22519
|
+
extend: {
|
|
22520
|
+
type: Object,
|
|
22521
|
+
default: () => {
|
|
22522
|
+
},
|
|
22523
|
+
description: "扩展数据。"
|
|
22524
|
+
}
|
|
22641
22525
|
};
|
|
22642
22526
|
const findAllNodes = (tree = [], keyField = "key") => {
|
|
22643
22527
|
const nodes = /* @__PURE__ */ new Set();
|
|
22644
|
-
|
|
22528
|
+
const traverse = (node) => {
|
|
22529
|
+
var _a;
|
|
22645
22530
|
nodes.add(node[keyField]);
|
|
22646
|
-
(node.children
|
|
22647
|
-
traverse(child);
|
|
22648
|
-
}
|
|
22649
|
-
}
|
|
22650
|
-
tree.forEach((node) =>
|
|
22651
|
-
|
|
22652
|
-
});
|
|
22653
|
-
return Array.from(nodes) || [];
|
|
22531
|
+
if (((_a = node.children) == null ? void 0 : _a.length) > 0) {
|
|
22532
|
+
node.children.forEach((child) => traverse(child));
|
|
22533
|
+
}
|
|
22534
|
+
};
|
|
22535
|
+
tree.forEach((node) => traverse(node));
|
|
22536
|
+
return Array.from(nodes);
|
|
22654
22537
|
};
|
|
22655
22538
|
const findLeafNodes = (tree = [], keyField = "key") => {
|
|
22656
22539
|
const leafNodes = /* @__PURE__ */ new Set();
|
|
22657
|
-
|
|
22658
|
-
|
|
22540
|
+
const traverse = (node) => {
|
|
22541
|
+
var _a;
|
|
22542
|
+
if (!((_a = node.children) == null ? void 0 : _a.length)) {
|
|
22659
22543
|
leafNodes.add(node[keyField]);
|
|
22544
|
+
} else {
|
|
22545
|
+
node.children.forEach((child) => traverse(child));
|
|
22660
22546
|
}
|
|
22661
|
-
|
|
22662
|
-
|
|
22663
|
-
|
|
22664
|
-
}
|
|
22665
|
-
tree.forEach((node) => {
|
|
22666
|
-
traverse(node);
|
|
22667
|
-
});
|
|
22668
|
-
return Array.from(leafNodes) || [];
|
|
22547
|
+
};
|
|
22548
|
+
tree.forEach((node) => traverse(node));
|
|
22549
|
+
return Array.from(leafNodes);
|
|
22669
22550
|
};
|
|
22670
22551
|
const formatTree = ({
|
|
22671
22552
|
dataSource,
|
|
@@ -22678,39 +22559,46 @@ const formatTree = ({
|
|
|
22678
22559
|
}) => {
|
|
22679
22560
|
return dataSource.map((node, index2) => {
|
|
22680
22561
|
const { children, ...rest } = node;
|
|
22562
|
+
const key = rest[keyField];
|
|
22563
|
+
const label = rest[labelField];
|
|
22564
|
+
const keyPaths = [...parentKeyPaths, key];
|
|
22565
|
+
const labelPaths = [...parentLabelPaths, label];
|
|
22566
|
+
const isLeaf = has(rest, "isLeaf") ? rest.isLeaf : !(children == null ? void 0 : children.length);
|
|
22681
22567
|
const currentNode = {
|
|
22682
22568
|
...rest,
|
|
22683
|
-
key
|
|
22684
|
-
label
|
|
22685
|
-
keyPaths
|
|
22686
|
-
labelPaths
|
|
22687
|
-
isLeaf
|
|
22688
|
-
parentKey: parent ? parent[keyField]
|
|
22569
|
+
key,
|
|
22570
|
+
label,
|
|
22571
|
+
keyPaths,
|
|
22572
|
+
labelPaths,
|
|
22573
|
+
isLeaf,
|
|
22574
|
+
parentKey: (parent == null ? void 0 : parent[keyField]) ?? null,
|
|
22689
22575
|
level: parentKeyPaths.length,
|
|
22690
22576
|
parentKeyPaths,
|
|
22691
22577
|
parentLabelPaths,
|
|
22692
22578
|
treeIndex: index2
|
|
22693
22579
|
};
|
|
22694
|
-
if (!free) {
|
|
22695
|
-
currentNode.leafNodeValues = findLeafNodes(children);
|
|
22696
|
-
currentNode.allNodeValues = findAllNodes(children);
|
|
22580
|
+
if (!free && (children == null ? void 0 : children.length) > 0) {
|
|
22581
|
+
currentNode.leafNodeValues = findLeafNodes(children, keyField);
|
|
22582
|
+
currentNode.allNodeValues = findAllNodes(children, keyField);
|
|
22583
|
+
} else if (!free) {
|
|
22584
|
+
currentNode.leafNodeValues = [];
|
|
22585
|
+
currentNode.allNodeValues = [];
|
|
22697
22586
|
}
|
|
22698
|
-
|
|
22587
|
+
return {
|
|
22699
22588
|
...currentNode,
|
|
22700
|
-
children: children ? formatTree({
|
|
22589
|
+
children: (children == null ? void 0 : children.length) > 0 ? formatTree({
|
|
22701
22590
|
dataSource: children,
|
|
22702
22591
|
parent: currentNode,
|
|
22703
|
-
parentKeyPaths:
|
|
22704
|
-
parentLabelPaths:
|
|
22592
|
+
parentKeyPaths: keyPaths,
|
|
22593
|
+
parentLabelPaths: labelPaths,
|
|
22705
22594
|
keyField,
|
|
22706
22595
|
labelField,
|
|
22707
22596
|
free
|
|
22708
22597
|
}) : []
|
|
22709
22598
|
};
|
|
22710
|
-
return formattedNode;
|
|
22711
22599
|
});
|
|
22712
22600
|
};
|
|
22713
|
-
const
|
|
22601
|
+
const transformTree = async ({
|
|
22714
22602
|
initTree = null,
|
|
22715
22603
|
dataSource = [],
|
|
22716
22604
|
keyField = "key",
|
|
@@ -22719,307 +22607,502 @@ const tree2List = async ({
|
|
|
22719
22607
|
keyword = ""
|
|
22720
22608
|
}) => {
|
|
22721
22609
|
let tree = [];
|
|
22722
|
-
|
|
22723
|
-
|
|
22724
|
-
if (
|
|
22610
|
+
const status = "success";
|
|
22611
|
+
try {
|
|
22612
|
+
if (initTree) {
|
|
22613
|
+
try {
|
|
22614
|
+
const _tree = await initTree();
|
|
22615
|
+
if (isArray$1(_tree)) {
|
|
22616
|
+
tree = formatTree({
|
|
22617
|
+
dataSource: _tree,
|
|
22618
|
+
parentKeyPaths: [],
|
|
22619
|
+
parentLabelPaths: [],
|
|
22620
|
+
keyField,
|
|
22621
|
+
labelField,
|
|
22622
|
+
free
|
|
22623
|
+
});
|
|
22624
|
+
} else {
|
|
22625
|
+
return {
|
|
22626
|
+
status: "error",
|
|
22627
|
+
result: [],
|
|
22628
|
+
error: new Error(
|
|
22629
|
+
"The initTree function should return a Promise that resolves to an array"
|
|
22630
|
+
)
|
|
22631
|
+
};
|
|
22632
|
+
}
|
|
22633
|
+
} catch (error2) {
|
|
22634
|
+
return {
|
|
22635
|
+
status: "error",
|
|
22636
|
+
result: [],
|
|
22637
|
+
error: error2 instanceof Error ? error2 : new Error(String(error2))
|
|
22638
|
+
};
|
|
22639
|
+
}
|
|
22640
|
+
} else if ((dataSource == null ? void 0 : dataSource.length) > 0) {
|
|
22725
22641
|
tree = formatTree({
|
|
22726
|
-
dataSource
|
|
22642
|
+
dataSource,
|
|
22643
|
+
parentKeyPaths: [],
|
|
22644
|
+
parentLabelPaths: [],
|
|
22727
22645
|
keyField,
|
|
22728
22646
|
labelField,
|
|
22729
22647
|
free
|
|
22730
22648
|
});
|
|
22731
|
-
} else {
|
|
22732
|
-
return new Error(
|
|
22733
|
-
"The initTree function should return a Promise that resolves to an array"
|
|
22734
|
-
);
|
|
22735
22649
|
}
|
|
22736
|
-
|
|
22737
|
-
|
|
22738
|
-
|
|
22739
|
-
|
|
22740
|
-
|
|
22741
|
-
|
|
22742
|
-
|
|
22743
|
-
|
|
22744
|
-
|
|
22745
|
-
|
|
22746
|
-
|
|
22747
|
-
|
|
22748
|
-
}
|
|
22650
|
+
if (keyword) {
|
|
22651
|
+
const _tree = [];
|
|
22652
|
+
const filterTree = (nodes) => {
|
|
22653
|
+
nodes.forEach((node) => {
|
|
22654
|
+
const { labelPaths, children } = node;
|
|
22655
|
+
if (labelPaths == null ? void 0 : labelPaths.some(
|
|
22656
|
+
(label) => String(label).toLowerCase().includes(keyword.toLowerCase())
|
|
22657
|
+
)) {
|
|
22658
|
+
_tree.push(node);
|
|
22659
|
+
} else if (children && children.length > 0) {
|
|
22660
|
+
filterTree(children);
|
|
22661
|
+
}
|
|
22662
|
+
});
|
|
22663
|
+
};
|
|
22664
|
+
filterTree(tree);
|
|
22665
|
+
if (_tree.length > 0) {
|
|
22666
|
+
tree = formatTree({
|
|
22667
|
+
dataSource: _tree,
|
|
22668
|
+
parentKeyPaths: [],
|
|
22669
|
+
parentLabelPaths: [],
|
|
22670
|
+
keyField,
|
|
22671
|
+
labelField,
|
|
22672
|
+
free
|
|
22673
|
+
});
|
|
22674
|
+
} else {
|
|
22675
|
+
tree = [];
|
|
22749
22676
|
}
|
|
22677
|
+
}
|
|
22678
|
+
return { status, result: tree };
|
|
22679
|
+
} catch (error2) {
|
|
22680
|
+
return {
|
|
22681
|
+
status: "error",
|
|
22682
|
+
result: [],
|
|
22683
|
+
error: error2 instanceof Error ? error2 : new Error(String(error2))
|
|
22750
22684
|
};
|
|
22751
|
-
|
|
22752
|
-
|
|
22753
|
-
|
|
22685
|
+
}
|
|
22686
|
+
};
|
|
22687
|
+
const _hoisted_1$b = {
|
|
22688
|
+
key: 0,
|
|
22689
|
+
class: "lew-tree-item-main"
|
|
22690
|
+
};
|
|
22691
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
22692
|
+
__name: "LewTreeItem",
|
|
22693
|
+
props: treeItemProps,
|
|
22694
|
+
emits: ["change", "expand"],
|
|
22695
|
+
setup(__props2, { emit: __emit2 }) {
|
|
22696
|
+
const props2 = __props2;
|
|
22697
|
+
const {
|
|
22698
|
+
modelValue: modelValue2,
|
|
22699
|
+
expandKeys,
|
|
22700
|
+
multiple,
|
|
22701
|
+
checkable,
|
|
22702
|
+
expandAll,
|
|
22703
|
+
_dataSource,
|
|
22704
|
+
loadMethod,
|
|
22754
22705
|
keyField,
|
|
22755
22706
|
labelField,
|
|
22756
|
-
free
|
|
22707
|
+
free,
|
|
22708
|
+
cacheDataSource
|
|
22709
|
+
} = inject("lew-tree");
|
|
22710
|
+
const emit2 = __emit2;
|
|
22711
|
+
const loading = ref(false);
|
|
22712
|
+
const loaded = ref(false);
|
|
22713
|
+
const areSomeChildrenSelected = (node) => {
|
|
22714
|
+
if (!node.children || node.children.length === 0) return false;
|
|
22715
|
+
const childKeys = findAllChildrenKeys(node);
|
|
22716
|
+
return childKeys.some((key) => modelValue2.value.includes(key)) && !childKeys.every((key) => modelValue2.value.includes(key));
|
|
22717
|
+
};
|
|
22718
|
+
const select = () => {
|
|
22719
|
+
if (props2.disabled) return;
|
|
22720
|
+
let newModelValue = cloneDeep(modelValue2.value);
|
|
22721
|
+
if (multiple) {
|
|
22722
|
+
const index2 = newModelValue.indexOf(props2.__key);
|
|
22723
|
+
if (free) {
|
|
22724
|
+
if (index2 > -1) {
|
|
22725
|
+
newModelValue.splice(index2, 1);
|
|
22726
|
+
} else {
|
|
22727
|
+
newModelValue.push(props2.__key);
|
|
22728
|
+
}
|
|
22729
|
+
} else {
|
|
22730
|
+
if (index2 > -1) {
|
|
22731
|
+
newModelValue.splice(index2, 1);
|
|
22732
|
+
if (props2.extend && props2.extend.children && props2.extend.children.length > 0) {
|
|
22733
|
+
const childKeys = findAllChildrenKeys(props2.extend);
|
|
22734
|
+
newModelValue = newModelValue.filter(
|
|
22735
|
+
(key) => !childKeys.includes(key)
|
|
22736
|
+
);
|
|
22737
|
+
}
|
|
22738
|
+
if (props2.extend && props2.extend.parentKeyPaths && props2.extend.parentKeyPaths.length > 0) {
|
|
22739
|
+
props2.extend.parentKeyPaths.forEach((parentKey) => {
|
|
22740
|
+
const parentIndex = newModelValue.indexOf(parentKey);
|
|
22741
|
+
if (parentIndex > -1) {
|
|
22742
|
+
newModelValue.splice(parentIndex, 1);
|
|
22743
|
+
}
|
|
22744
|
+
});
|
|
22745
|
+
}
|
|
22746
|
+
} else {
|
|
22747
|
+
newModelValue.push(props2.__key);
|
|
22748
|
+
if (props2.extend && props2.extend.children && props2.extend.children.length > 0) {
|
|
22749
|
+
const childKeys = findAllChildrenKeys(props2.extend);
|
|
22750
|
+
childKeys.forEach((key) => {
|
|
22751
|
+
if (!newModelValue.includes(key)) {
|
|
22752
|
+
newModelValue.push(key);
|
|
22753
|
+
}
|
|
22754
|
+
});
|
|
22755
|
+
}
|
|
22756
|
+
}
|
|
22757
|
+
if (props2.extend && props2.extend.parentKey && props2.extend.parentKeyPaths) {
|
|
22758
|
+
const parentKey = props2.extend.parentKey;
|
|
22759
|
+
const parentNode = findNodeByKey(parentKey, _dataSource.value);
|
|
22760
|
+
const siblingKeys = ((parentNode == null ? void 0 : parentNode.children) || []).map((e) => e.key);
|
|
22761
|
+
if (siblingKeys.length > 0 && siblingKeys.every(
|
|
22762
|
+
(key) => newModelValue.includes(key)
|
|
22763
|
+
)) {
|
|
22764
|
+
if (!newModelValue.includes(parentKey)) {
|
|
22765
|
+
newModelValue.push(parentKey);
|
|
22766
|
+
}
|
|
22767
|
+
} else {
|
|
22768
|
+
newModelValue = newModelValue.filter(
|
|
22769
|
+
(key) => key !== parentKey
|
|
22770
|
+
);
|
|
22771
|
+
}
|
|
22772
|
+
}
|
|
22773
|
+
}
|
|
22774
|
+
} else {
|
|
22775
|
+
newModelValue = props2.__key;
|
|
22776
|
+
}
|
|
22777
|
+
modelValue2.value = newModelValue;
|
|
22778
|
+
emit2("change");
|
|
22779
|
+
};
|
|
22780
|
+
const expand = async () => {
|
|
22781
|
+
if (!props2.isLeaf) {
|
|
22782
|
+
const index2 = expandKeys.value.indexOf(props2.__key);
|
|
22783
|
+
if (index2 > -1) {
|
|
22784
|
+
expandKeys.value.splice(index2, 1);
|
|
22785
|
+
} else if (loadMethod && !loading.value && !loaded.value) {
|
|
22786
|
+
loading.value = true;
|
|
22787
|
+
let _tree = await loadMethod(
|
|
22788
|
+
cloneDeep({
|
|
22789
|
+
...props2,
|
|
22790
|
+
key: props2.__key,
|
|
22791
|
+
value: props2.__key,
|
|
22792
|
+
extend: props2.extend
|
|
22793
|
+
})
|
|
22794
|
+
) || [];
|
|
22795
|
+
const { status, result, error: error2 } = await transformTree({
|
|
22796
|
+
dataSource: _tree,
|
|
22797
|
+
keyField,
|
|
22798
|
+
labelField,
|
|
22799
|
+
free
|
|
22800
|
+
});
|
|
22801
|
+
if (status === "success") {
|
|
22802
|
+
loaded.value = true;
|
|
22803
|
+
insertChildByKey(
|
|
22804
|
+
_dataSource.value,
|
|
22805
|
+
props2.__key,
|
|
22806
|
+
result
|
|
22807
|
+
);
|
|
22808
|
+
_dataSource.value = formatTree({
|
|
22809
|
+
dataSource: _dataSource.value,
|
|
22810
|
+
keyField,
|
|
22811
|
+
labelField,
|
|
22812
|
+
free
|
|
22813
|
+
});
|
|
22814
|
+
cacheDataSource.value = cloneDeep(_dataSource.value);
|
|
22815
|
+
console.log(_dataSource.value, "lew-tree-item");
|
|
22816
|
+
expandKeys.value = [
|
|
22817
|
+
...expandKeys.value,
|
|
22818
|
+
props2.__key
|
|
22819
|
+
];
|
|
22820
|
+
} else {
|
|
22821
|
+
loaded.value = false;
|
|
22822
|
+
LewMessage$1.error(error2.message);
|
|
22823
|
+
}
|
|
22824
|
+
loading.value = false;
|
|
22825
|
+
} else {
|
|
22826
|
+
expandKeys.value.push(props2.__key);
|
|
22827
|
+
}
|
|
22828
|
+
}
|
|
22829
|
+
expandKeys.value = cloneDeep(expandKeys.value);
|
|
22830
|
+
emit2("expand");
|
|
22831
|
+
};
|
|
22832
|
+
const isNodeSelected = computed(() => {
|
|
22833
|
+
if (multiple) {
|
|
22834
|
+
return modelValue2.value.includes(props2.__key);
|
|
22835
|
+
} else {
|
|
22836
|
+
return modelValue2.value === props2.__key;
|
|
22837
|
+
}
|
|
22838
|
+
});
|
|
22839
|
+
const isNodePartiallySelected = computed(() => {
|
|
22840
|
+
if (!multiple || free) return false;
|
|
22841
|
+
return props2.extend && areSomeChildrenSelected(props2.extend);
|
|
22757
22842
|
});
|
|
22843
|
+
return (_ctx, _cache) => {
|
|
22844
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
22845
|
+
createElementVNode("div", {
|
|
22846
|
+
class: normalizeClass(["lew-tree-item", {
|
|
22847
|
+
"lew-tree-item-expand-all": unref(expandAll),
|
|
22848
|
+
"lew-tree-item-expand": (unref(expandKeys) || []).includes(_ctx.__key),
|
|
22849
|
+
"lew-tree-item-certain": unref(isNodePartiallySelected),
|
|
22850
|
+
"lew-tree-item-selected": unref(isNodeSelected),
|
|
22851
|
+
"lew-tree-item-leaf": _ctx.isLeaf,
|
|
22852
|
+
"lew-tree-item-disabled": _ctx.disabled
|
|
22853
|
+
}])
|
|
22854
|
+
}, [
|
|
22855
|
+
createElementVNode("div", {
|
|
22856
|
+
onClick: withModifiers(expand, ["stop"]),
|
|
22857
|
+
class: "lew-tree-chevron-right"
|
|
22858
|
+
}, [
|
|
22859
|
+
unref(loading) ? (openBlock(), createBlock(Icon, {
|
|
22860
|
+
key: 0,
|
|
22861
|
+
size: 14,
|
|
22862
|
+
loading: "",
|
|
22863
|
+
class: "lew-cascader-loading-icon",
|
|
22864
|
+
type: "loader"
|
|
22865
|
+
})) : (openBlock(), createBlock(Icon, {
|
|
22866
|
+
key: 1,
|
|
22867
|
+
class: "lew-tree-chevron-right-icon",
|
|
22868
|
+
size: 14,
|
|
22869
|
+
type: "chevron-right"
|
|
22870
|
+
}))
|
|
22871
|
+
]),
|
|
22872
|
+
createElementVNode("div", {
|
|
22873
|
+
class: "lew-tree-item-label",
|
|
22874
|
+
onClick: select
|
|
22875
|
+
}, [
|
|
22876
|
+
unref(checkable) ? (openBlock(), createBlock(unref(LewCheckbox), {
|
|
22877
|
+
key: 0,
|
|
22878
|
+
certain: unref(isNodePartiallySelected),
|
|
22879
|
+
checked: unref(isNodeSelected),
|
|
22880
|
+
class: "lew-tree-checkbox"
|
|
22881
|
+
}, null, 8, ["certain", "checked"])) : createCommentVNode("", true),
|
|
22882
|
+
_ctx.$slots.item ? renderSlot(_ctx.$slots, "item", {
|
|
22883
|
+
key: 1,
|
|
22884
|
+
props: {
|
|
22885
|
+
...props2,
|
|
22886
|
+
checked: unref(isNodeSelected),
|
|
22887
|
+
certain: unref(isNodePartiallySelected)
|
|
22888
|
+
}
|
|
22889
|
+
}, void 0, true) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
22890
|
+
_ctx.render() ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.render()), {
|
|
22891
|
+
key: 0,
|
|
22892
|
+
class: "lew-tree-item-text"
|
|
22893
|
+
})) : (openBlock(), createBlock(unref(LewTextTrim), {
|
|
22894
|
+
key: 1,
|
|
22895
|
+
class: "lew-tree-item-text",
|
|
22896
|
+
placement: "right",
|
|
22897
|
+
text: _ctx.label,
|
|
22898
|
+
delay: [250, 250]
|
|
22899
|
+
}, null, 8, ["text"]))
|
|
22900
|
+
], 64))
|
|
22901
|
+
])
|
|
22902
|
+
], 2),
|
|
22903
|
+
!_ctx.isLeaf ? (openBlock(), createBlock(unref(LewCollapseTransition), { key: 0 }, {
|
|
22904
|
+
default: withCtx(() => [
|
|
22905
|
+
(unref(expandKeys) || []).length > 0 && unref(expandKeys).includes(_ctx.__key) || unref(expandAll) ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
22906
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
22907
|
+
])) : createCommentVNode("", true)
|
|
22908
|
+
]),
|
|
22909
|
+
_: 3
|
|
22910
|
+
})) : createCommentVNode("", true)
|
|
22911
|
+
], 64);
|
|
22912
|
+
};
|
|
22758
22913
|
}
|
|
22759
|
-
|
|
22760
|
-
|
|
22761
|
-
|
|
22762
|
-
};
|
|
22763
|
-
};
|
|
22764
|
-
const _hoisted_1$a = ["onClick"];
|
|
22765
|
-
const _hoisted_2$7 = ["onClick"];
|
|
22766
|
-
const _hoisted_3$6 = {
|
|
22914
|
+
});
|
|
22915
|
+
const LewTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-85641b32"]]);
|
|
22916
|
+
const _hoisted_1$a = {
|
|
22767
22917
|
key: 0,
|
|
22768
|
-
class: "lew-
|
|
22918
|
+
class: "lew-result-count"
|
|
22769
22919
|
};
|
|
22770
|
-
const
|
|
22920
|
+
const DEBOUNCE_TIME = 250;
|
|
22771
22921
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
22772
22922
|
__name: "LewTree",
|
|
22773
22923
|
props: /* @__PURE__ */ mergeModels(treeProps, {
|
|
22774
|
-
"modelValue": {
|
|
22775
|
-
default: void 0
|
|
22776
|
-
},
|
|
22924
|
+
"modelValue": {},
|
|
22777
22925
|
"modelModifiers": {},
|
|
22778
|
-
"
|
|
22779
|
-
|
|
22780
|
-
},
|
|
22781
|
-
"expandedKeysModifiers": {}
|
|
22926
|
+
"expandKeys": { required: false, default: [] },
|
|
22927
|
+
"expandKeysModifiers": {}
|
|
22782
22928
|
}),
|
|
22783
|
-
emits: /* @__PURE__ */ mergeModels(["change", "
|
|
22929
|
+
emits: /* @__PURE__ */ mergeModels(["change", "expand", "loadStart", "loadEnd"], ["update:modelValue", "update:expandKeys"]),
|
|
22784
22930
|
setup(__props2, { expose: __expose2, emit: __emit2 }) {
|
|
22785
|
-
var _a;
|
|
22786
|
-
const app2 = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
22787
|
-
if (app2 && !app2.directive("loading")) {
|
|
22788
|
-
app2.use(LewLoading);
|
|
22789
|
-
}
|
|
22790
22931
|
const props2 = __props2;
|
|
22791
|
-
const emit2 = __emit2;
|
|
22792
22932
|
const modelValue2 = useModel(__props2, "modelValue");
|
|
22793
|
-
const
|
|
22794
|
-
|
|
22795
|
-
"expandedKeys"
|
|
22796
|
-
);
|
|
22797
|
-
const certainKeys = ref([]);
|
|
22798
|
-
const loadingKeys = ref([]);
|
|
22933
|
+
const expandKeys = useModel(__props2, "expandKeys");
|
|
22934
|
+
const _dataSource = ref([]);
|
|
22799
22935
|
const loading = ref(false);
|
|
22800
|
-
const
|
|
22801
|
-
|
|
22802
|
-
const
|
|
22803
|
-
|
|
22936
|
+
const keyword = ref("");
|
|
22937
|
+
const lastSearchKeyword = ref("");
|
|
22938
|
+
const searchTimer = ref(null);
|
|
22939
|
+
const cacheDataSource = ref([]);
|
|
22940
|
+
provide("lew-tree", {
|
|
22941
|
+
modelValue: modelValue2,
|
|
22942
|
+
expandKeys,
|
|
22943
|
+
multiple: props2.multiple,
|
|
22944
|
+
checkable: props2.checkable,
|
|
22945
|
+
expandAll: props2.expandAll,
|
|
22946
|
+
free: props2.free,
|
|
22947
|
+
showLine: props2.showLine,
|
|
22948
|
+
loadMethod: props2.loadMethod,
|
|
22949
|
+
keyField: props2.keyField,
|
|
22950
|
+
labelField: props2.labelField,
|
|
22951
|
+
cacheDataSource,
|
|
22952
|
+
_dataSource
|
|
22953
|
+
});
|
|
22954
|
+
const renderMenuTreeItem = (item, level = 0) => {
|
|
22955
|
+
const { disabled, label, key, isLeaf, children } = item;
|
|
22956
|
+
return h(
|
|
22957
|
+
LewTreeItem,
|
|
22958
|
+
{
|
|
22959
|
+
label,
|
|
22960
|
+
key,
|
|
22961
|
+
__key: key,
|
|
22962
|
+
level,
|
|
22963
|
+
isLeaf: isLeaf !== void 0 ? isLeaf : (children || []).length === 0,
|
|
22964
|
+
disabled,
|
|
22965
|
+
extend: item,
|
|
22966
|
+
onChange: () => emit2("change", cloneDeep({ extend: item, key, value: key })),
|
|
22967
|
+
onExpand: () => emit2("expand", cloneDeep({ extend: item, key, value: key }))
|
|
22968
|
+
},
|
|
22969
|
+
() => (item.children || []).map(
|
|
22970
|
+
(child) => renderMenuTreeItem(child, level + 1)
|
|
22971
|
+
)
|
|
22972
|
+
);
|
|
22973
|
+
};
|
|
22974
|
+
const emit2 = __emit2;
|
|
22975
|
+
const init = async (searchKeyword = "") => {
|
|
22976
|
+
if (searchKeyword === "" && cacheDataSource.value.length > 0) {
|
|
22977
|
+
_dataSource.value = cacheDataSource.value;
|
|
22978
|
+
emit2("loadEnd", getResultText.value);
|
|
22979
|
+
return;
|
|
22980
|
+
}
|
|
22804
22981
|
if (!props2.isSelect) {
|
|
22805
22982
|
loading.value = true;
|
|
22806
22983
|
}
|
|
22807
|
-
emit2("
|
|
22984
|
+
emit2("loadStart");
|
|
22985
|
+
lastSearchKeyword.value = searchKeyword;
|
|
22808
22986
|
const { dataSource, initTree, keyField, labelField, free } = props2;
|
|
22809
|
-
const {
|
|
22987
|
+
const { status, result, error: error2 } = await transformTree({
|
|
22810
22988
|
initTree,
|
|
22811
22989
|
dataSource,
|
|
22812
22990
|
keyField,
|
|
22813
22991
|
labelField,
|
|
22814
22992
|
free,
|
|
22815
|
-
keyword
|
|
22993
|
+
keyword: searchKeyword
|
|
22816
22994
|
});
|
|
22817
|
-
|
|
22818
|
-
|
|
22819
|
-
treeList.value = _treeList;
|
|
22820
|
-
expandedKeys.value = [];
|
|
22821
|
-
certainKeys.value = [];
|
|
22822
|
-
loadingKeys.value = [];
|
|
22823
|
-
loading.value = false;
|
|
22824
|
-
emit2("initEnd");
|
|
22825
|
-
return _treeList;
|
|
22826
|
-
};
|
|
22827
|
-
init();
|
|
22828
|
-
const expandHandle = async (item) => {
|
|
22829
|
-
if (props2.expandAll || item.isLeaf) {
|
|
22995
|
+
if (lastSearchKeyword.value !== searchKeyword) {
|
|
22996
|
+
loading.value = false;
|
|
22830
22997
|
return;
|
|
22831
22998
|
}
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
expandedKeys.value = _expandedKeys;
|
|
22837
|
-
} else if (props2.loadMethod && !loadingKeys.value.includes(item.key)) {
|
|
22838
|
-
const index2 = treeList.value.findIndex(
|
|
22839
|
-
(e) => e.parentKey === item.key
|
|
22840
|
-
);
|
|
22841
|
-
if (index2 < 0) {
|
|
22842
|
-
loadingKeys.value.push(item.key);
|
|
22843
|
-
let _tree = await props2.loadMethod(cloneDeep(item)) || [];
|
|
22844
|
-
insertChildByKey(treeBackup, item.key, _tree);
|
|
22845
|
-
const { newTree, newTreeList } = await tree2List({
|
|
22846
|
-
dataSource: treeBackup,
|
|
22847
|
-
keyField: props2.keyField,
|
|
22848
|
-
labelField: props2.labelField,
|
|
22849
|
-
free: props2.free
|
|
22850
|
-
});
|
|
22851
|
-
treeBackup = newTree;
|
|
22852
|
-
treeList.value = newTreeList;
|
|
22853
|
-
const i2 = loadingKeys.value.findIndex((e) => e === item.key);
|
|
22854
|
-
if (i2 >= 0) {
|
|
22855
|
-
loadingKeys.value.splice(i2, 1);
|
|
22856
|
-
}
|
|
22999
|
+
if (status === "success") {
|
|
23000
|
+
_dataSource.value = result;
|
|
23001
|
+
if (searchKeyword === "" && cacheDataSource.value.length === 0) {
|
|
23002
|
+
cacheDataSource.value = cloneDeep(result);
|
|
22857
23003
|
}
|
|
22858
|
-
expandedKeys.value = [
|
|
22859
|
-
...expandedKeys.value,
|
|
22860
|
-
item.key
|
|
22861
|
-
];
|
|
22862
23004
|
} else {
|
|
22863
|
-
|
|
23005
|
+
LewMessage.error(error2.message);
|
|
22864
23006
|
}
|
|
23007
|
+
expandKeys.value = cloneDeep(expandKeys.value);
|
|
23008
|
+
modelValue2.value = cloneDeep(modelValue2.value);
|
|
23009
|
+
loading.value = false;
|
|
23010
|
+
emit2("loadEnd", getResultText.value);
|
|
22865
23011
|
};
|
|
22866
|
-
const
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
tree[index2].children = newChild;
|
|
22870
|
-
} else {
|
|
22871
|
-
forEach$1(tree, (node) => {
|
|
22872
|
-
insertChildByKey(node.children, key, newChild);
|
|
22873
|
-
});
|
|
22874
|
-
}
|
|
23012
|
+
const reset = () => {
|
|
23013
|
+
_dataSource.value = cloneDeep(cacheDataSource.value);
|
|
23014
|
+
emit2("loadEnd", getResultText.value);
|
|
22875
23015
|
};
|
|
22876
|
-
const
|
|
22877
|
-
|
|
22878
|
-
|
|
22879
|
-
if (_modelValue && isArray$1(_modelValue) && _modelValue.includes(item.key)) {
|
|
22880
|
-
const i = _modelValue.findIndex((e) => e === item.key);
|
|
22881
|
-
_modelValue.splice(i, 1);
|
|
22882
|
-
if (!props2.free) {
|
|
22883
|
-
_modelValue = uniq(
|
|
22884
|
-
difference(_modelValue, item.allNodeValues)
|
|
22885
|
-
);
|
|
22886
|
-
}
|
|
22887
|
-
} else {
|
|
22888
|
-
_modelValue && _modelValue.push(item.key);
|
|
22889
|
-
if (!props2.free && isArray$1(_modelValue)) {
|
|
22890
|
-
_modelValue = uniq([..._modelValue, ...item.allNodeValues]);
|
|
22891
|
-
}
|
|
22892
|
-
}
|
|
22893
|
-
if (!props2.free) {
|
|
22894
|
-
const { __certainKeys, __modelValue } = formatValues({
|
|
22895
|
-
tree: treeList.value,
|
|
22896
|
-
values: _modelValue
|
|
22897
|
-
});
|
|
22898
|
-
certainKeys.value = __certainKeys;
|
|
22899
|
-
modelValue2.value = __modelValue;
|
|
22900
|
-
} else {
|
|
22901
|
-
modelValue2.value = _modelValue;
|
|
22902
|
-
}
|
|
22903
|
-
} else {
|
|
22904
|
-
modelValue2.value = modelValue2.value === item.key ? "" : item.key;
|
|
22905
|
-
}
|
|
22906
|
-
emit2("change", { item, value: modelValue2.value });
|
|
22907
|
-
};
|
|
22908
|
-
const formatValues = ({ tree, values }) => {
|
|
22909
|
-
let _modelValue = new Set(values);
|
|
22910
|
-
let _certainKeys = new Set(values);
|
|
22911
|
-
const stack = cloneDeep(tree);
|
|
22912
|
-
while (stack.length > 0) {
|
|
22913
|
-
const currentNode = stack.pop();
|
|
22914
|
-
const key = currentNode.key;
|
|
22915
|
-
const childValues = currentNode.leafNodeValues || [];
|
|
22916
|
-
const isAllChildValuesInValues = childValues.every(
|
|
22917
|
-
(value) => _modelValue.has(value)
|
|
22918
|
-
);
|
|
22919
|
-
if (!isAllChildValuesInValues && childValues.length > 0) {
|
|
22920
|
-
_modelValue.delete(key);
|
|
22921
|
-
} else if (childValues.length > 0) {
|
|
22922
|
-
_modelValue.add(key);
|
|
22923
|
-
}
|
|
22924
|
-
const array1 = Array.from(childValues);
|
|
22925
|
-
const array2 = Array.from(_modelValue);
|
|
22926
|
-
if (intersection(array1, array2).length > 0 && !_modelValue.has(key)) {
|
|
22927
|
-
_certainKeys.add(key);
|
|
22928
|
-
} else {
|
|
22929
|
-
_certainKeys.delete(key);
|
|
22930
|
-
}
|
|
23016
|
+
const search = (keyword2) => {
|
|
23017
|
+
if (searchTimer.value !== null) {
|
|
23018
|
+
clearTimeout(searchTimer.value);
|
|
22931
23019
|
}
|
|
22932
|
-
|
|
22933
|
-
|
|
22934
|
-
|
|
22935
|
-
};
|
|
22936
|
-
};
|
|
22937
|
-
const getTreeList = () => {
|
|
22938
|
-
return cloneDeep(treeList.value);
|
|
23020
|
+
searchTimer.value = setTimeout(() => {
|
|
23021
|
+
init(keyword2);
|
|
23022
|
+
searchTimer.value = null;
|
|
23023
|
+
}, DEBOUNCE_TIME);
|
|
22939
23024
|
};
|
|
22940
|
-
|
|
23025
|
+
const getResultText = computed(() => {
|
|
23026
|
+
return _dataSource.value.length > 0 ? `共 ${numFormat(_dataSource.value.length)} 条结果` : "";
|
|
23027
|
+
});
|
|
23028
|
+
__expose2({
|
|
23029
|
+
search,
|
|
23030
|
+
reset,
|
|
23031
|
+
getTree: () => _dataSource.value
|
|
23032
|
+
});
|
|
23033
|
+
onMounted(() => {
|
|
23034
|
+
init();
|
|
23035
|
+
});
|
|
22941
23036
|
return (_ctx, _cache) => {
|
|
23037
|
+
const _component_lew_input = resolveComponent("lew-input");
|
|
23038
|
+
const _component_lew_empty = resolveComponent("lew-empty");
|
|
22942
23039
|
const _directive_loading = resolveDirective("loading");
|
|
22943
|
-
return withDirectives((openBlock(),
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22947
|
-
},
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
key:
|
|
23040
|
+
return withDirectives((openBlock(), createBlock(unref(LewFlex), {
|
|
23041
|
+
direction: "y",
|
|
23042
|
+
gap: "0",
|
|
23043
|
+
class: "lew-tree-wrapper"
|
|
23044
|
+
}, {
|
|
23045
|
+
default: withCtx(() => [
|
|
23046
|
+
_ctx.searchable && !_ctx.isSelect ? (openBlock(), createBlock(unref(LewFlex), {
|
|
23047
|
+
key: 0,
|
|
22951
23048
|
direction: "y",
|
|
22952
|
-
gap: "
|
|
22953
|
-
|
|
23049
|
+
gap: "0",
|
|
23050
|
+
class: "lew-tree-header"
|
|
22954
23051
|
}, {
|
|
22955
23052
|
default: withCtx(() => [
|
|
22956
|
-
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
|
|
22964
|
-
|
|
22965
|
-
}]),
|
|
22966
|
-
style: normalizeStyle({
|
|
22967
|
-
paddingLeft: `${item.level * 26}px`
|
|
22968
|
-
})
|
|
22969
|
-
}, [
|
|
22970
|
-
createElementVNode("div", {
|
|
22971
|
-
class: "lew-tree-chevron-right",
|
|
22972
|
-
onClick: withModifiers(($event) => expandHandle(item), ["stop"])
|
|
22973
|
-
}, [
|
|
22974
|
-
unref(loadingKeys).includes(item.key) ? (openBlock(), createBlock(Icon, {
|
|
22975
|
-
key: 0,
|
|
22976
|
-
size: 14,
|
|
22977
|
-
loading: "",
|
|
22978
|
-
class: "lew-cascader-loading-icon",
|
|
22979
|
-
type: "loader"
|
|
22980
|
-
})) : (openBlock(), createBlock(Icon, {
|
|
22981
|
-
key: 1,
|
|
22982
|
-
class: "lew-tree-chevron-right-icon",
|
|
22983
|
-
size: 14,
|
|
22984
|
-
type: "chevron-right"
|
|
22985
|
-
}))
|
|
22986
|
-
], 8, _hoisted_1$a),
|
|
22987
|
-
createElementVNode("div", {
|
|
22988
|
-
class: "lew-tree-item-label",
|
|
22989
|
-
onClick: ($event) => select(item)
|
|
22990
|
-
}, [
|
|
22991
|
-
item.level > 0 && _ctx.showLine ? (openBlock(), createElementBlock("div", _hoisted_3$6)) : createCommentVNode("", true),
|
|
22992
|
-
_ctx.showCheckbox ? (openBlock(), createBlock(unref(LewCheckbox), {
|
|
22993
|
-
key: 1,
|
|
22994
|
-
certain: _ctx.multiple && unref(certainKeys).includes(item.key) && !(modelValue2.value || []).includes(item.key),
|
|
22995
|
-
checked: _ctx.multiple ? (modelValue2.value || []).includes(item.key) : modelValue2.value === item.key,
|
|
22996
|
-
class: "lew-tree-checkbox"
|
|
22997
|
-
}, null, 8, ["certain", "checked"])) : createCommentVNode("", true),
|
|
22998
|
-
_ctx.$slots.item ? renderSlot(_ctx.$slots, "item", {
|
|
22999
|
-
key: 2,
|
|
23000
|
-
props: {
|
|
23001
|
-
...item,
|
|
23002
|
-
checked: _ctx.multiple ? (modelValue2.value || []).includes(item.key) : modelValue2.value === item.key
|
|
23003
|
-
}
|
|
23004
|
-
}, void 0, true) : (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString$1(item.label), 1))
|
|
23005
|
-
], 8, _hoisted_2$7)
|
|
23006
|
-
], 6)) : createCommentVNode("", true)
|
|
23053
|
+
createVNode(_component_lew_input, {
|
|
23054
|
+
width: "100%",
|
|
23055
|
+
modelValue: unref(keyword),
|
|
23056
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(keyword) ? keyword.value = $event : null),
|
|
23057
|
+
size: "small",
|
|
23058
|
+
placeholder: "搜索",
|
|
23059
|
+
onInput: _cache[1] || (_cache[1] = ($event) => search(unref(keyword)))
|
|
23060
|
+
}, null, 8, ["modelValue"]),
|
|
23061
|
+
_ctx.searchable && unref(getResultText) ? (openBlock(), createElementBlock("div", _hoisted_1$a, toDisplayString$1(unref(getResultText)), 1)) : createCommentVNode("", true)
|
|
23007
23062
|
]),
|
|
23008
|
-
_:
|
|
23009
|
-
},
|
|
23010
|
-
|
|
23011
|
-
|
|
23012
|
-
|
|
23013
|
-
|
|
23014
|
-
|
|
23015
|
-
|
|
23016
|
-
|
|
23017
|
-
|
|
23063
|
+
_: 1
|
|
23064
|
+
})) : createCommentVNode("", true),
|
|
23065
|
+
unref(_dataSource) && unref(_dataSource).length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
23066
|
+
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(LewFlex), {
|
|
23067
|
+
key: 1,
|
|
23068
|
+
direction: "y",
|
|
23069
|
+
x: "center",
|
|
23070
|
+
class: "lew-not-found"
|
|
23071
|
+
}, {
|
|
23072
|
+
default: withCtx(() => [
|
|
23073
|
+
createVNode(_component_lew_empty, { title: "暂无结果" })
|
|
23074
|
+
]),
|
|
23075
|
+
_: 1
|
|
23076
|
+
}))
|
|
23077
|
+
], 64)) : createCommentVNode("", true),
|
|
23078
|
+
createVNode(unref(LewFlex), {
|
|
23079
|
+
direction: "y",
|
|
23080
|
+
y: "start",
|
|
23081
|
+
gap: "0",
|
|
23082
|
+
class: normalizeClass(["lew-tree lew-scrollbar", { "lew-tree-line": _ctx.showLine }]),
|
|
23083
|
+
style: normalizeStyle({ height: unref(any2px)(_ctx.height) })
|
|
23084
|
+
}, {
|
|
23085
|
+
default: withCtx(() => [
|
|
23086
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(_dataSource), (item) => {
|
|
23087
|
+
return openBlock(), createBlock(resolveDynamicComponent(renderMenuTreeItem(item)), {
|
|
23088
|
+
key: item.key
|
|
23089
|
+
});
|
|
23090
|
+
}), 128))
|
|
23091
|
+
]),
|
|
23092
|
+
_: 1
|
|
23093
|
+
}, 8, ["class", "style"])
|
|
23094
|
+
]),
|
|
23095
|
+
_: 3
|
|
23096
|
+
})), [
|
|
23097
|
+
[_directive_loading, {
|
|
23098
|
+
visible: unref(loading),
|
|
23099
|
+
text: "加载中..."
|
|
23100
|
+
}]
|
|
23018
23101
|
]);
|
|
23019
23102
|
};
|
|
23020
23103
|
}
|
|
23021
23104
|
});
|
|
23022
|
-
const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
23105
|
+
const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-11fe5966"]]);
|
|
23023
23106
|
const collapseModel = {
|
|
23024
23107
|
modelValue: {
|
|
23025
23108
|
type: [Array, String],
|
|
@@ -25056,7 +25139,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
25056
25139
|
LewAlert,
|
|
25057
25140
|
LewAvatar,
|
|
25058
25141
|
LewBackTop,
|
|
25059
|
-
LewBadge: _sfc_main$
|
|
25142
|
+
LewBadge: _sfc_main$_,
|
|
25060
25143
|
LewBreadcrumb,
|
|
25061
25144
|
LewButton,
|
|
25062
25145
|
LewCascader,
|
|
@@ -25073,7 +25156,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
25073
25156
|
LewDesc,
|
|
25074
25157
|
LewDescItem,
|
|
25075
25158
|
LewDrawer: _sfc_main$4,
|
|
25076
|
-
LewDropdown: _sfc_main$
|
|
25159
|
+
LewDropdown: _sfc_main$P,
|
|
25077
25160
|
LewEmpty: _sfc_main$2,
|
|
25078
25161
|
LewExpand,
|
|
25079
25162
|
LewFlex,
|
|
@@ -25099,11 +25182,11 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
25099
25182
|
LewSelectMultiple,
|
|
25100
25183
|
LewSlider,
|
|
25101
25184
|
LewSliderRange,
|
|
25102
|
-
LewSteps: _sfc_main$
|
|
25185
|
+
LewSteps: _sfc_main$T,
|
|
25103
25186
|
LewSwitch,
|
|
25104
|
-
LewTable: _sfc_main$
|
|
25187
|
+
LewTable: _sfc_main$h,
|
|
25105
25188
|
LewTabs,
|
|
25106
|
-
LewTag: _sfc_main
|
|
25189
|
+
LewTag: _sfc_main$$,
|
|
25107
25190
|
LewTextTrim,
|
|
25108
25191
|
LewTextarea,
|
|
25109
25192
|
LewTitle,
|
|
@@ -25159,7 +25242,6 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
25159
25242
|
markProps,
|
|
25160
25243
|
menuModel,
|
|
25161
25244
|
menuProps,
|
|
25162
|
-
menuTreeItemModel,
|
|
25163
25245
|
menuTreeItemProps,
|
|
25164
25246
|
menuTreeModel,
|
|
25165
25247
|
menuTreeProps,
|
|
@@ -25184,8 +25266,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
25184
25266
|
sliderProps,
|
|
25185
25267
|
sliderRangeModel,
|
|
25186
25268
|
sliderRangeProps,
|
|
25187
|
-
|
|
25188
|
-
statusMap,
|
|
25269
|
+
statusConfig,
|
|
25189
25270
|
stepsModel,
|
|
25190
25271
|
stepsProps,
|
|
25191
25272
|
switchModel,
|
|
@@ -25200,6 +25281,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
25200
25281
|
textareaProps,
|
|
25201
25282
|
tipsIconSizeMap,
|
|
25202
25283
|
titleProps,
|
|
25284
|
+
treeItemProps,
|
|
25203
25285
|
treeModel,
|
|
25204
25286
|
treeProps,
|
|
25205
25287
|
treeSelectModel,
|
|
@@ -27944,11 +28026,11 @@ const generate = (ast, options = {}) => {
|
|
|
27944
28026
|
generator.deindent(needIndent);
|
|
27945
28027
|
generator.push(`}`);
|
|
27946
28028
|
delete ast.helpers;
|
|
27947
|
-
const { code, map
|
|
28029
|
+
const { code, map } = generator.context();
|
|
27948
28030
|
return {
|
|
27949
28031
|
ast,
|
|
27950
28032
|
code,
|
|
27951
|
-
map:
|
|
28033
|
+
map: map ? map.toJSON() : void 0
|
|
27952
28034
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
27953
28035
|
};
|
|
27954
28036
|
};
|
|
@@ -32217,7 +32299,7 @@ export {
|
|
|
32217
32299
|
LewAvatar,
|
|
32218
32300
|
LewBackTop,
|
|
32219
32301
|
index$1 as LewBacktop,
|
|
32220
|
-
_sfc_main$
|
|
32302
|
+
_sfc_main$_ as LewBadge,
|
|
32221
32303
|
LewBreadcrumb,
|
|
32222
32304
|
LewButton,
|
|
32223
32305
|
LewCascader,
|
|
@@ -32236,7 +32318,7 @@ export {
|
|
|
32236
32318
|
LewDescItem,
|
|
32237
32319
|
LewDialog$1 as LewDialog,
|
|
32238
32320
|
_sfc_main$4 as LewDrawer,
|
|
32239
|
-
_sfc_main$
|
|
32321
|
+
_sfc_main$P as LewDropdown,
|
|
32240
32322
|
_sfc_main$2 as LewEmpty,
|
|
32241
32323
|
LewExpand,
|
|
32242
32324
|
LewFlex,
|
|
@@ -32265,11 +32347,11 @@ export {
|
|
|
32265
32347
|
LewSelectMultiple,
|
|
32266
32348
|
LewSlider,
|
|
32267
32349
|
LewSliderRange,
|
|
32268
|
-
_sfc_main$
|
|
32350
|
+
_sfc_main$T as LewSteps,
|
|
32269
32351
|
LewSwitch,
|
|
32270
|
-
_sfc_main$
|
|
32352
|
+
_sfc_main$h as LewTable,
|
|
32271
32353
|
LewTabs,
|
|
32272
|
-
_sfc_main
|
|
32354
|
+
_sfc_main$$ as LewTag,
|
|
32273
32355
|
LewTextTrim,
|
|
32274
32356
|
LewTextarea,
|
|
32275
32357
|
LewTitle,
|
|
@@ -32320,6 +32402,8 @@ export {
|
|
|
32320
32402
|
en,
|
|
32321
32403
|
es,
|
|
32322
32404
|
expandProps,
|
|
32405
|
+
findAllChildrenKeys,
|
|
32406
|
+
findNodeByKey,
|
|
32323
32407
|
flattenNestedObject,
|
|
32324
32408
|
flexProps,
|
|
32325
32409
|
formItemProps,
|
|
@@ -32347,6 +32431,7 @@ export {
|
|
|
32347
32431
|
inputTableProps,
|
|
32348
32432
|
inputTagModel,
|
|
32349
32433
|
inputTagProps,
|
|
32434
|
+
insertChildByKey,
|
|
32350
32435
|
isValidCssValue,
|
|
32351
32436
|
it,
|
|
32352
32437
|
ja,
|
|
@@ -32356,7 +32441,6 @@ export {
|
|
|
32356
32441
|
markProps,
|
|
32357
32442
|
menuModel,
|
|
32358
32443
|
menuProps,
|
|
32359
|
-
menuTreeItemModel,
|
|
32360
32444
|
menuTreeItemProps,
|
|
32361
32445
|
menuTreeModel,
|
|
32362
32446
|
menuTreeProps,
|
|
@@ -32388,8 +32472,7 @@ export {
|
|
|
32388
32472
|
sliderProps,
|
|
32389
32473
|
sliderRangeModel,
|
|
32390
32474
|
sliderRangeProps,
|
|
32391
|
-
|
|
32392
|
-
statusMap,
|
|
32475
|
+
statusConfig,
|
|
32393
32476
|
stepsModel,
|
|
32394
32477
|
stepsProps,
|
|
32395
32478
|
switchModel,
|
|
@@ -32404,6 +32487,7 @@ export {
|
|
|
32404
32487
|
textareaProps,
|
|
32405
32488
|
tipsIconSizeMap,
|
|
32406
32489
|
titleProps,
|
|
32490
|
+
treeItemProps,
|
|
32407
32491
|
treeModel,
|
|
32408
32492
|
treeProps,
|
|
32409
32493
|
treeSelectModel,
|