lew-ui 1.1.3 → 1.1.4
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/lew.es.ts +468 -353
- package/dist/lew.umd.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/package.json +1 -1
package/dist/lew.es.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, onUnmounted, onMounted, getCurrentInstance, unref, ref, watch, createElementVNode, Fragment, renderList, toDisplayString, createCommentVNode, pushScopeId, popScopeId,
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, onUnmounted, onMounted, getCurrentInstance, unref, ref, watch, createElementVNode, Fragment, renderList, toDisplayString, createCommentVNode, pushScopeId, popScopeId, resolveComponent, createBlock, withCtx, createStaticVNode, provide, inject, computed, onBeforeMount, h, withDirectives, vModelText, vModelDynamic, createVNode, withModifiers, vShow, createTextVNode, nextTick, toRaw, isRef, vModelCheckbox, Teleport, Transition, resolveDirective, shallowRef, createApp, getCurrentScope, onScopeDispose } from "vue";
|
|
2
2
|
var LewFlex_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3
3
|
var _export_sfc = (sfc, props) => {
|
|
4
4
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -102,7 +102,8 @@ function useDOMCreate(nodeId) {
|
|
|
102
102
|
node.id = nodeId;
|
|
103
103
|
document.body.appendChild(node);
|
|
104
104
|
onUnmounted(() => {
|
|
105
|
-
|
|
105
|
+
if (node)
|
|
106
|
+
document.body.removeChild(node);
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
109
|
let instance;
|
|
@@ -300,7 +301,7 @@ var LewSteps = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-5
|
|
|
300
301
|
var LewBreadcrumb_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
301
302
|
const _withScopeId$3 = (n) => (pushScopeId("data-v-5303b0ef"), n = n(), popScopeId(), n);
|
|
302
303
|
const _hoisted_1$L = { class: "lew-breadcrumb" };
|
|
303
|
-
const _hoisted_2$
|
|
304
|
+
const _hoisted_2$C = ["onClick"];
|
|
304
305
|
const _hoisted_3$z = {
|
|
305
306
|
key: 0,
|
|
306
307
|
class: "lew-breadcrumb-parting"
|
|
@@ -363,7 +364,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
363
364
|
createElementVNode("span", {
|
|
364
365
|
class: normalizeClass({ "lew-breadcrumb-isPath": !!item.to }),
|
|
365
366
|
onClick: ($event) => unref(lewTo)(item.to)
|
|
366
|
-
}, toDisplayString(item.label), 11, _hoisted_2$
|
|
367
|
+
}, toDisplayString(item.label), 11, _hoisted_2$C),
|
|
367
368
|
index2 != __props.options.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
368
369
|
__props.iconType == "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$h, _hoisted_6$7)) : createCommentVNode("v-if", true),
|
|
369
370
|
__props.iconType == "shoulder" ? (openBlock(), createElementBlock("svg", _hoisted_7$6, _hoisted_9$3)) : createCommentVNode("v-if", true)
|
|
@@ -375,49 +376,49 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
375
376
|
}
|
|
376
377
|
});
|
|
377
378
|
var LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-5303b0ef"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/breadcrumb/src/LewBreadcrumb.vue"]]);
|
|
379
|
+
const _props$2 = {
|
|
380
|
+
options: {
|
|
381
|
+
type: Array,
|
|
382
|
+
default() {
|
|
383
|
+
return [];
|
|
384
|
+
},
|
|
385
|
+
required: true,
|
|
386
|
+
validator(value) {
|
|
387
|
+
return value.length >= 0;
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
trigger: {
|
|
391
|
+
type: String,
|
|
392
|
+
default: "hover"
|
|
393
|
+
},
|
|
394
|
+
placement: {
|
|
395
|
+
type: String,
|
|
396
|
+
default: "bottom"
|
|
397
|
+
},
|
|
398
|
+
arrow: {
|
|
399
|
+
type: Boolean,
|
|
400
|
+
default: true
|
|
401
|
+
},
|
|
402
|
+
width: {
|
|
403
|
+
type: String,
|
|
404
|
+
default: ""
|
|
405
|
+
},
|
|
406
|
+
maxHeight: {
|
|
407
|
+
type: String,
|
|
408
|
+
default: "300px"
|
|
409
|
+
},
|
|
410
|
+
align: {
|
|
411
|
+
type: String,
|
|
412
|
+
default: "left"
|
|
413
|
+
}
|
|
414
|
+
};
|
|
378
415
|
var LewDropdown_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
379
416
|
const _hoisted_1$K = ["onClick"];
|
|
380
417
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
381
418
|
__name: "LewDropdown",
|
|
382
|
-
props:
|
|
383
|
-
options: {
|
|
384
|
-
type: Array,
|
|
385
|
-
default() {
|
|
386
|
-
return [];
|
|
387
|
-
},
|
|
388
|
-
required: true,
|
|
389
|
-
validator(value) {
|
|
390
|
-
return value.length >= 0;
|
|
391
|
-
}
|
|
392
|
-
},
|
|
393
|
-
trigger: {
|
|
394
|
-
type: String,
|
|
395
|
-
default: "hover"
|
|
396
|
-
},
|
|
397
|
-
placement: {
|
|
398
|
-
type: String,
|
|
399
|
-
default: "bottom"
|
|
400
|
-
},
|
|
401
|
-
arrow: {
|
|
402
|
-
type: Boolean,
|
|
403
|
-
default: true
|
|
404
|
-
},
|
|
405
|
-
width: {
|
|
406
|
-
type: String,
|
|
407
|
-
default: ""
|
|
408
|
-
},
|
|
409
|
-
maxHeight: {
|
|
410
|
-
type: String,
|
|
411
|
-
default: "300px"
|
|
412
|
-
},
|
|
413
|
-
align: {
|
|
414
|
-
type: String,
|
|
415
|
-
default: "left"
|
|
416
|
-
}
|
|
417
|
-
},
|
|
419
|
+
props: _props$2,
|
|
418
420
|
emits: ["change"],
|
|
419
421
|
setup(__props, { expose, emit }) {
|
|
420
|
-
const props = __props;
|
|
421
422
|
let lewPopoverRef = ref();
|
|
422
423
|
let show = () => {
|
|
423
424
|
lewPopoverRef.value.show();
|
|
@@ -426,47 +427,32 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
426
427
|
lewPopoverRef.value.hide();
|
|
427
428
|
};
|
|
428
429
|
const change = (item) => {
|
|
429
|
-
emit("change", { show, hide: hide2
|
|
430
|
-
setTimeout(() => {
|
|
431
|
-
lewPopoverRef.value.hide();
|
|
432
|
-
}, 80);
|
|
430
|
+
emit("change", item, { show, hide: hide2 });
|
|
433
431
|
};
|
|
434
432
|
expose({ show, hide: hide2 });
|
|
435
|
-
const _options = computed(() => {
|
|
436
|
-
if (Array.isArray(props.options) && Object.prototype.toString.call(props.options[0]) != "[object Object]") {
|
|
437
|
-
return props.options.map((e) => {
|
|
438
|
-
return {
|
|
439
|
-
label: e,
|
|
440
|
-
value: e
|
|
441
|
-
};
|
|
442
|
-
});
|
|
443
|
-
} else {
|
|
444
|
-
return props.options;
|
|
445
|
-
}
|
|
446
|
-
});
|
|
447
433
|
return (_ctx, _cache) => {
|
|
448
434
|
const _component_lew_popover = resolveComponent("lew-popover");
|
|
449
435
|
return openBlock(), createBlock(_component_lew_popover, {
|
|
450
436
|
ref_key: "lewPopoverRef",
|
|
451
437
|
ref: lewPopoverRef,
|
|
452
|
-
trigger:
|
|
453
|
-
arrow:
|
|
454
|
-
placement:
|
|
438
|
+
trigger: _ctx.trigger,
|
|
439
|
+
arrow: _ctx.arrow,
|
|
440
|
+
placement: _ctx.placement
|
|
455
441
|
}, {
|
|
456
442
|
trigger: withCtx(() => [
|
|
457
443
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
458
444
|
]),
|
|
459
445
|
"popover-body": withCtx(() => [
|
|
460
|
-
|
|
446
|
+
_ctx.options.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
461
447
|
key: 0,
|
|
462
448
|
class: "lew-dropdown-body",
|
|
463
|
-
style: normalizeStyle(`width:${
|
|
449
|
+
style: normalizeStyle(`width:${_ctx.width};max-height:${_ctx.maxHeight}`)
|
|
464
450
|
}, [
|
|
465
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
451
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
466
452
|
return openBlock(), createElementBlock("div", {
|
|
467
453
|
key: index2,
|
|
468
454
|
class: "lew-dropdown-option",
|
|
469
|
-
style: normalizeStyle(`text-align:${
|
|
455
|
+
style: normalizeStyle(`text-align:${_ctx.align}`),
|
|
470
456
|
onClick: ($event) => change(item)
|
|
471
457
|
}, toDisplayString(item.label), 13, _hoisted_1$K);
|
|
472
458
|
}), 128))
|
|
@@ -483,7 +469,7 @@ const _hoisted_1$J = {
|
|
|
483
469
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
484
470
|
viewBox: "0 0 512 512"
|
|
485
471
|
};
|
|
486
|
-
const _hoisted_2$
|
|
472
|
+
const _hoisted_2$B = /* @__PURE__ */ createElementVNode(
|
|
487
473
|
"path",
|
|
488
474
|
{
|
|
489
475
|
d: "M414 321.94L274.22 158.82a24 24 0 0 0-36.44 0L98 321.94c-13.34 15.57-2.28 39.62 18.22 39.62h279.6c20.5 0 31.56-24.05 18.18-39.62z",
|
|
@@ -492,7 +478,7 @@ const _hoisted_2$C = /* @__PURE__ */ createElementVNode(
|
|
|
492
478
|
null,
|
|
493
479
|
-1
|
|
494
480
|
);
|
|
495
|
-
const _hoisted_3$y = [_hoisted_2$
|
|
481
|
+
const _hoisted_3$y = [_hoisted_2$B];
|
|
496
482
|
var CaretUp = defineComponent({
|
|
497
483
|
name: "CaretUp",
|
|
498
484
|
render: function render(_ctx, _cache) {
|
|
@@ -504,7 +490,7 @@ const _hoisted_1$I = {
|
|
|
504
490
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
505
491
|
viewBox: "0 0 512 512"
|
|
506
492
|
};
|
|
507
|
-
const _hoisted_2$
|
|
493
|
+
const _hoisted_2$A = /* @__PURE__ */ createElementVNode(
|
|
508
494
|
"path",
|
|
509
495
|
{
|
|
510
496
|
fill: "none",
|
|
@@ -517,7 +503,7 @@ const _hoisted_2$B = /* @__PURE__ */ createElementVNode(
|
|
|
517
503
|
null,
|
|
518
504
|
-1
|
|
519
505
|
);
|
|
520
|
-
const _hoisted_3$x = [_hoisted_2$
|
|
506
|
+
const _hoisted_3$x = [_hoisted_2$A];
|
|
521
507
|
var ChevronBackOutline = defineComponent({
|
|
522
508
|
name: "ChevronBackOutline",
|
|
523
509
|
render: function render2(_ctx, _cache) {
|
|
@@ -529,7 +515,7 @@ const _hoisted_1$H = {
|
|
|
529
515
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
530
516
|
viewBox: "0 0 512 512"
|
|
531
517
|
};
|
|
532
|
-
const _hoisted_2$
|
|
518
|
+
const _hoisted_2$z = /* @__PURE__ */ createElementVNode(
|
|
533
519
|
"path",
|
|
534
520
|
{
|
|
535
521
|
fill: "none",
|
|
@@ -542,7 +528,7 @@ const _hoisted_2$A = /* @__PURE__ */ createElementVNode(
|
|
|
542
528
|
null,
|
|
543
529
|
-1
|
|
544
530
|
);
|
|
545
|
-
const _hoisted_3$w = [_hoisted_2$
|
|
531
|
+
const _hoisted_3$w = [_hoisted_2$z];
|
|
546
532
|
var ChevronDown = defineComponent({
|
|
547
533
|
name: "ChevronDown",
|
|
548
534
|
render: function render3(_ctx, _cache) {
|
|
@@ -554,7 +540,7 @@ const _hoisted_1$G = {
|
|
|
554
540
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
555
541
|
viewBox: "0 0 512 512"
|
|
556
542
|
};
|
|
557
|
-
const _hoisted_2$
|
|
543
|
+
const _hoisted_2$y = /* @__PURE__ */ createElementVNode(
|
|
558
544
|
"path",
|
|
559
545
|
{
|
|
560
546
|
fill: "none",
|
|
@@ -567,7 +553,7 @@ const _hoisted_2$z = /* @__PURE__ */ createElementVNode(
|
|
|
567
553
|
null,
|
|
568
554
|
-1
|
|
569
555
|
);
|
|
570
|
-
const _hoisted_3$v = [_hoisted_2$
|
|
556
|
+
const _hoisted_3$v = [_hoisted_2$y];
|
|
571
557
|
var ChevronForwardOutline = defineComponent({
|
|
572
558
|
name: "ChevronForwardOutline",
|
|
573
559
|
render: function render4(_ctx, _cache) {
|
|
@@ -579,7 +565,7 @@ const _hoisted_1$F = {
|
|
|
579
565
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
580
566
|
viewBox: "0 0 512 512"
|
|
581
567
|
};
|
|
582
|
-
const _hoisted_2$
|
|
568
|
+
const _hoisted_2$x = /* @__PURE__ */ createElementVNode(
|
|
583
569
|
"path",
|
|
584
570
|
{
|
|
585
571
|
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",
|
|
@@ -617,7 +603,7 @@ const _hoisted_4$g = /* @__PURE__ */ createElementVNode(
|
|
|
617
603
|
null,
|
|
618
604
|
-1
|
|
619
605
|
);
|
|
620
|
-
const _hoisted_5$b = [_hoisted_2$
|
|
606
|
+
const _hoisted_5$b = [_hoisted_2$x, _hoisted_3$u, _hoisted_4$g];
|
|
621
607
|
var CloseCircleOutline = defineComponent({
|
|
622
608
|
name: "CloseCircleOutline",
|
|
623
609
|
render: function render5(_ctx, _cache) {
|
|
@@ -629,7 +615,7 @@ const _hoisted_1$E = {
|
|
|
629
615
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
630
616
|
viewBox: "0 0 512 512"
|
|
631
617
|
};
|
|
632
|
-
const _hoisted_2$
|
|
618
|
+
const _hoisted_2$w = /* @__PURE__ */ createElementVNode(
|
|
633
619
|
"circle",
|
|
634
620
|
{
|
|
635
621
|
cx: "256",
|
|
@@ -662,7 +648,7 @@ const _hoisted_4$f = /* @__PURE__ */ createElementVNode(
|
|
|
662
648
|
null,
|
|
663
649
|
-1
|
|
664
650
|
);
|
|
665
|
-
const _hoisted_5$a = [_hoisted_2$
|
|
651
|
+
const _hoisted_5$a = [_hoisted_2$w, _hoisted_3$t, _hoisted_4$f];
|
|
666
652
|
var EllipsisHorizontal = defineComponent({
|
|
667
653
|
name: "EllipsisHorizontal",
|
|
668
654
|
render: function render6(_ctx, _cache) {
|
|
@@ -674,8 +660,8 @@ const _hoisted_1$D = {
|
|
|
674
660
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
675
661
|
viewBox: "0 0 512 512"
|
|
676
662
|
};
|
|
677
|
-
const _hoisted_2$
|
|
678
|
-
const _hoisted_7$5 = [_hoisted_2$
|
|
663
|
+
const _hoisted_2$v = /* @__PURE__ */ createStaticVNode('<path d="M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z" fill="currentColor"></path><path d="M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z" fill="currentColor"></path><path d="M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z" fill="currentColor"></path><path d="M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z" fill="currentColor"></path><path d="M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z" fill="currentColor"></path>', 5);
|
|
664
|
+
const _hoisted_7$5 = [_hoisted_2$v];
|
|
679
665
|
var EyeOffOutline = defineComponent({
|
|
680
666
|
name: "EyeOffOutline",
|
|
681
667
|
render: function render7(_ctx, _cache) {
|
|
@@ -687,7 +673,7 @@ const _hoisted_1$C = {
|
|
|
687
673
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
688
674
|
viewBox: "0 0 512 512"
|
|
689
675
|
};
|
|
690
|
-
const _hoisted_2$
|
|
676
|
+
const _hoisted_2$u = /* @__PURE__ */ createElementVNode(
|
|
691
677
|
"path",
|
|
692
678
|
{
|
|
693
679
|
d: "M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",
|
|
@@ -714,7 +700,7 @@ const _hoisted_3$s = /* @__PURE__ */ createElementVNode(
|
|
|
714
700
|
null,
|
|
715
701
|
-1
|
|
716
702
|
);
|
|
717
|
-
const _hoisted_4$e = [_hoisted_2$
|
|
703
|
+
const _hoisted_4$e = [_hoisted_2$u, _hoisted_3$s];
|
|
718
704
|
var EyeOutline = defineComponent({
|
|
719
705
|
name: "EyeOutline",
|
|
720
706
|
render: function render8(_ctx, _cache) {
|
|
@@ -1204,7 +1190,7 @@ const inputProps = {
|
|
|
1204
1190
|
default: ""
|
|
1205
1191
|
},
|
|
1206
1192
|
modelValue: {
|
|
1207
|
-
type:
|
|
1193
|
+
type: String,
|
|
1208
1194
|
default: ""
|
|
1209
1195
|
},
|
|
1210
1196
|
size: {
|
|
@@ -1258,7 +1244,7 @@ const inputProps = {
|
|
|
1258
1244
|
};
|
|
1259
1245
|
var LewInput_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
1260
1246
|
const _hoisted_1$B = ["disabled", "readonly", "placeholder"];
|
|
1261
|
-
const _hoisted_2$
|
|
1247
|
+
const _hoisted_2$t = ["disabled", "placeholder", "type", "readonly"];
|
|
1262
1248
|
const _hoisted_3$r = {
|
|
1263
1249
|
key: 2,
|
|
1264
1250
|
class: "input-auto-width"
|
|
@@ -1321,7 +1307,6 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1321
1307
|
(_b = lewInputRef.value) == null ? void 0 : _b.focus();
|
|
1322
1308
|
}
|
|
1323
1309
|
};
|
|
1324
|
-
expose({ focusFn });
|
|
1325
1310
|
let _type = ref(props.type);
|
|
1326
1311
|
const showPasswordFn = () => {
|
|
1327
1312
|
_type.value == "text" ? _type.value = "password" : _type.value = "text";
|
|
@@ -1351,6 +1336,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1351
1336
|
return Math.trunc(len);
|
|
1352
1337
|
}
|
|
1353
1338
|
};
|
|
1339
|
+
const getEl = () => {
|
|
1340
|
+
if (props.type == "textarea") {
|
|
1341
|
+
return lewTextareaRef.value;
|
|
1342
|
+
} else {
|
|
1343
|
+
return lewInputRef.value;
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1346
|
+
expose({ getEl, focusFn });
|
|
1354
1347
|
return (_ctx, _cache) => {
|
|
1355
1348
|
return openBlock(), createElementBlock("div", {
|
|
1356
1349
|
class: normalizeClass(["lew-input-view", `
|
|
@@ -1393,7 +1386,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1393
1386
|
onChange: _cache[5] || (_cache[5] = ($event) => emit("change", v.value)),
|
|
1394
1387
|
onBlur: _cache[6] || (_cache[6] = ($event) => emit("blur", v.value)),
|
|
1395
1388
|
onFocus: _cache[7] || (_cache[7] = ($event) => emit("focus", v.value))
|
|
1396
|
-
}, null, 40, _hoisted_2$
|
|
1389
|
+
}, null, 40, _hoisted_2$t)), [
|
|
1397
1390
|
[vModelDynamic, v.value]
|
|
1398
1391
|
]),
|
|
1399
1392
|
_ctx.autoWidth ? (openBlock(), createElementBlock("label", _hoisted_3$r, toDisplayString(v.value), 1)) : createCommentVNode("v-if", true),
|
|
@@ -1443,7 +1436,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1443
1436
|
}
|
|
1444
1437
|
});
|
|
1445
1438
|
var LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-156ce1e1"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input/src/LewInput.vue"]]);
|
|
1446
|
-
const
|
|
1439
|
+
const _props$1 = {
|
|
1447
1440
|
type: {
|
|
1448
1441
|
type: String,
|
|
1449
1442
|
default: ""
|
|
@@ -1523,7 +1516,7 @@ var LewInputPro_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
|
1523
1516
|
const _hoisted_1$A = { class: "lew-input-pro" };
|
|
1524
1517
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
1525
1518
|
__name: "LewInputPro",
|
|
1526
|
-
props:
|
|
1519
|
+
props: _props$1,
|
|
1527
1520
|
emits: [
|
|
1528
1521
|
"update:modelValue",
|
|
1529
1522
|
"clear",
|
|
@@ -1539,10 +1532,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1539
1532
|
() => props.modelValue,
|
|
1540
1533
|
() => {
|
|
1541
1534
|
v.value = props.modelValue;
|
|
1535
|
+
hide2();
|
|
1542
1536
|
}
|
|
1543
1537
|
);
|
|
1544
1538
|
let lewDropdownRef = ref();
|
|
1545
|
-
let lewInputProRef = ref();
|
|
1546
1539
|
const input = (value) => {
|
|
1547
1540
|
emit("update:modelValue", value);
|
|
1548
1541
|
emit("input", value);
|
|
@@ -1553,13 +1546,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1553
1546
|
emit("update:modelValue", v.value);
|
|
1554
1547
|
};
|
|
1555
1548
|
const selectFn = (e) => {
|
|
1556
|
-
v.value = e.value
|
|
1549
|
+
v.value = e.value;
|
|
1557
1550
|
emit("update:modelValue", v.value);
|
|
1558
1551
|
emit("input", v.value);
|
|
1559
1552
|
emit("change", v.value);
|
|
1560
|
-
setTimeout(() => {
|
|
1561
|
-
hide2();
|
|
1562
|
-
}, 500);
|
|
1563
1553
|
};
|
|
1564
1554
|
const open = () => {
|
|
1565
1555
|
if (props.options.length == 0)
|
|
@@ -1588,12 +1578,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1588
1578
|
}, {
|
|
1589
1579
|
default: withCtx(() => [
|
|
1590
1580
|
createVNode(_component_lew_input, {
|
|
1591
|
-
ref_key: "lewInputProRef",
|
|
1592
|
-
ref: lewInputProRef,
|
|
1593
1581
|
modelValue: v.value,
|
|
1594
1582
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => v.value = $event),
|
|
1595
1583
|
type: _ctx.type,
|
|
1596
|
-
|
|
1584
|
+
"auto-width": _ctx.autoWidth,
|
|
1597
1585
|
size: _ctx.size,
|
|
1598
1586
|
align: _ctx.align,
|
|
1599
1587
|
placeholder: _ctx.placeholder,
|
|
@@ -1603,9 +1591,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1603
1591
|
onInput: input,
|
|
1604
1592
|
onChange: _cache[2] || (_cache[2] = ($event) => emit("change", v.value)),
|
|
1605
1593
|
onBlur: _cache[3] || (_cache[3] = ($event) => emit("blur", v.value)),
|
|
1606
|
-
onFocus: _cache[4] || (_cache[4] = ($event) => (
|
|
1594
|
+
onFocus: _cache[4] || (_cache[4] = ($event) => (emit("focus", v.value), open())),
|
|
1607
1595
|
onClear: clear
|
|
1608
|
-
}, null, 8, ["modelValue", "type", "
|
|
1596
|
+
}, null, 8, ["modelValue", "type", "auto-width", "size", "align", "placeholder", "clearable"])
|
|
1609
1597
|
]),
|
|
1610
1598
|
_: 1
|
|
1611
1599
|
}, 8, ["trigger", "arrow", "placement", "align", "width", "options"]),
|
|
@@ -1632,7 +1620,7 @@ const _hoisted_1$z = {
|
|
|
1632
1620
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1633
1621
|
viewBox: "0 0 16 16"
|
|
1634
1622
|
};
|
|
1635
|
-
const _hoisted_2$
|
|
1623
|
+
const _hoisted_2$s = /* @__PURE__ */ createElementVNode(
|
|
1636
1624
|
"g",
|
|
1637
1625
|
{
|
|
1638
1626
|
fill: "none"
|
|
@@ -1645,7 +1633,7 @@ const _hoisted_2$t = /* @__PURE__ */ createElementVNode(
|
|
|
1645
1633
|
],
|
|
1646
1634
|
-1
|
|
1647
1635
|
);
|
|
1648
|
-
const _hoisted_3$q = [_hoisted_2$
|
|
1636
|
+
const _hoisted_3$q = [_hoisted_2$s];
|
|
1649
1637
|
var Add16Regular = defineComponent({
|
|
1650
1638
|
name: "Add16Regular",
|
|
1651
1639
|
render: function render9(_ctx, _cache) {
|
|
@@ -1657,7 +1645,7 @@ const _hoisted_1$y = {
|
|
|
1657
1645
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1658
1646
|
viewBox: "0 0 24 24"
|
|
1659
1647
|
};
|
|
1660
|
-
const _hoisted_2$
|
|
1648
|
+
const _hoisted_2$r = /* @__PURE__ */ createElementVNode(
|
|
1661
1649
|
"g",
|
|
1662
1650
|
{
|
|
1663
1651
|
fill: "none"
|
|
@@ -1670,7 +1658,7 @@ const _hoisted_2$s = /* @__PURE__ */ createElementVNode(
|
|
|
1670
1658
|
],
|
|
1671
1659
|
-1
|
|
1672
1660
|
);
|
|
1673
|
-
const _hoisted_3$p = [_hoisted_2$
|
|
1661
|
+
const _hoisted_3$p = [_hoisted_2$r];
|
|
1674
1662
|
var Alert24Regular = defineComponent({
|
|
1675
1663
|
name: "Alert24Regular",
|
|
1676
1664
|
render: function render10(_ctx, _cache) {
|
|
@@ -1682,7 +1670,7 @@ const _hoisted_1$x = {
|
|
|
1682
1670
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1683
1671
|
viewBox: "0 0 12 12"
|
|
1684
1672
|
};
|
|
1685
|
-
const _hoisted_2$
|
|
1673
|
+
const _hoisted_2$q = /* @__PURE__ */ createElementVNode(
|
|
1686
1674
|
"g",
|
|
1687
1675
|
{
|
|
1688
1676
|
fill: "none"
|
|
@@ -1695,7 +1683,7 @@ const _hoisted_2$r = /* @__PURE__ */ createElementVNode(
|
|
|
1695
1683
|
],
|
|
1696
1684
|
-1
|
|
1697
1685
|
);
|
|
1698
|
-
const _hoisted_3$o = [_hoisted_2$
|
|
1686
|
+
const _hoisted_3$o = [_hoisted_2$q];
|
|
1699
1687
|
var CalendarLtr12Regular = defineComponent({
|
|
1700
1688
|
name: "CalendarLtr12Regular",
|
|
1701
1689
|
render: function render11(_ctx, _cache) {
|
|
@@ -1707,7 +1695,7 @@ const _hoisted_1$w = {
|
|
|
1707
1695
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1708
1696
|
viewBox: "0 0 24 24"
|
|
1709
1697
|
};
|
|
1710
|
-
const _hoisted_2$
|
|
1698
|
+
const _hoisted_2$p = /* @__PURE__ */ createElementVNode(
|
|
1711
1699
|
"g",
|
|
1712
1700
|
{
|
|
1713
1701
|
fill: "none"
|
|
@@ -1720,7 +1708,7 @@ const _hoisted_2$q = /* @__PURE__ */ createElementVNode(
|
|
|
1720
1708
|
],
|
|
1721
1709
|
-1
|
|
1722
1710
|
);
|
|
1723
|
-
const _hoisted_3$n = [_hoisted_2$
|
|
1711
|
+
const _hoisted_3$n = [_hoisted_2$p];
|
|
1724
1712
|
var CheckmarkCircle24Regular = defineComponent({
|
|
1725
1713
|
name: "CheckmarkCircle24Regular",
|
|
1726
1714
|
render: function render12(_ctx, _cache) {
|
|
@@ -1732,7 +1720,7 @@ const _hoisted_1$v = {
|
|
|
1732
1720
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1733
1721
|
viewBox: "0 0 16 16"
|
|
1734
1722
|
};
|
|
1735
|
-
const _hoisted_2$
|
|
1723
|
+
const _hoisted_2$o = /* @__PURE__ */ createElementVNode(
|
|
1736
1724
|
"g",
|
|
1737
1725
|
{
|
|
1738
1726
|
fill: "none"
|
|
@@ -1745,7 +1733,7 @@ const _hoisted_2$p = /* @__PURE__ */ createElementVNode(
|
|
|
1745
1733
|
],
|
|
1746
1734
|
-1
|
|
1747
1735
|
);
|
|
1748
|
-
const _hoisted_3$m = [_hoisted_2$
|
|
1736
|
+
const _hoisted_3$m = [_hoisted_2$o];
|
|
1749
1737
|
var ChevronDoubleLeft16Filled = defineComponent({
|
|
1750
1738
|
name: "ChevronDoubleLeft16Filled",
|
|
1751
1739
|
render: function render13(_ctx, _cache) {
|
|
@@ -1757,7 +1745,7 @@ const _hoisted_1$u = {
|
|
|
1757
1745
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1758
1746
|
viewBox: "0 0 16 16"
|
|
1759
1747
|
};
|
|
1760
|
-
const _hoisted_2$
|
|
1748
|
+
const _hoisted_2$n = /* @__PURE__ */ createElementVNode(
|
|
1761
1749
|
"g",
|
|
1762
1750
|
{
|
|
1763
1751
|
fill: "none"
|
|
@@ -1770,7 +1758,7 @@ const _hoisted_2$o = /* @__PURE__ */ createElementVNode(
|
|
|
1770
1758
|
],
|
|
1771
1759
|
-1
|
|
1772
1760
|
);
|
|
1773
|
-
const _hoisted_3$l = [_hoisted_2$
|
|
1761
|
+
const _hoisted_3$l = [_hoisted_2$n];
|
|
1774
1762
|
var ChevronDoubleRight16Filled = defineComponent({
|
|
1775
1763
|
name: "ChevronDoubleRight16Filled",
|
|
1776
1764
|
render: function render14(_ctx, _cache) {
|
|
@@ -1782,7 +1770,7 @@ const _hoisted_1$t = {
|
|
|
1782
1770
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1783
1771
|
viewBox: "0 0 16 16"
|
|
1784
1772
|
};
|
|
1785
|
-
const _hoisted_2$
|
|
1773
|
+
const _hoisted_2$m = /* @__PURE__ */ createElementVNode(
|
|
1786
1774
|
"g",
|
|
1787
1775
|
{
|
|
1788
1776
|
fill: "none"
|
|
@@ -1795,7 +1783,7 @@ const _hoisted_2$n = /* @__PURE__ */ createElementVNode(
|
|
|
1795
1783
|
],
|
|
1796
1784
|
-1
|
|
1797
1785
|
);
|
|
1798
|
-
const _hoisted_3$k = [_hoisted_2$
|
|
1786
|
+
const _hoisted_3$k = [_hoisted_2$m];
|
|
1799
1787
|
var ChevronLeft16Filled = defineComponent({
|
|
1800
1788
|
name: "ChevronLeft16Filled",
|
|
1801
1789
|
render: function render15(_ctx, _cache) {
|
|
@@ -1807,7 +1795,7 @@ const _hoisted_1$s = {
|
|
|
1807
1795
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1808
1796
|
viewBox: "0 0 16 16"
|
|
1809
1797
|
};
|
|
1810
|
-
const _hoisted_2$
|
|
1798
|
+
const _hoisted_2$l = /* @__PURE__ */ createElementVNode(
|
|
1811
1799
|
"g",
|
|
1812
1800
|
{
|
|
1813
1801
|
fill: "none"
|
|
@@ -1820,7 +1808,7 @@ const _hoisted_2$m = /* @__PURE__ */ createElementVNode(
|
|
|
1820
1808
|
],
|
|
1821
1809
|
-1
|
|
1822
1810
|
);
|
|
1823
|
-
const _hoisted_3$j = [_hoisted_2$
|
|
1811
|
+
const _hoisted_3$j = [_hoisted_2$l];
|
|
1824
1812
|
var ChevronRight16Filled = defineComponent({
|
|
1825
1813
|
name: "ChevronRight16Filled",
|
|
1826
1814
|
render: function render16(_ctx, _cache) {
|
|
@@ -1832,7 +1820,7 @@ const _hoisted_1$r = {
|
|
|
1832
1820
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1833
1821
|
viewBox: "0 0 24 24"
|
|
1834
1822
|
};
|
|
1835
|
-
const _hoisted_2$
|
|
1823
|
+
const _hoisted_2$k = /* @__PURE__ */ createElementVNode(
|
|
1836
1824
|
"g",
|
|
1837
1825
|
{
|
|
1838
1826
|
fill: "none"
|
|
@@ -1845,7 +1833,7 @@ const _hoisted_2$l = /* @__PURE__ */ createElementVNode(
|
|
|
1845
1833
|
],
|
|
1846
1834
|
-1
|
|
1847
1835
|
);
|
|
1848
|
-
const _hoisted_3$i = [_hoisted_2$
|
|
1836
|
+
const _hoisted_3$i = [_hoisted_2$k];
|
|
1849
1837
|
var ChevronUp24Regular = defineComponent({
|
|
1850
1838
|
name: "ChevronUp24Regular",
|
|
1851
1839
|
render: function render17(_ctx, _cache) {
|
|
@@ -1857,7 +1845,7 @@ const _hoisted_1$q = {
|
|
|
1857
1845
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1858
1846
|
viewBox: "0 0 24 24"
|
|
1859
1847
|
};
|
|
1860
|
-
const _hoisted_2$
|
|
1848
|
+
const _hoisted_2$j = /* @__PURE__ */ createElementVNode(
|
|
1861
1849
|
"g",
|
|
1862
1850
|
{
|
|
1863
1851
|
fill: "none"
|
|
@@ -1870,7 +1858,7 @@ const _hoisted_2$k = /* @__PURE__ */ createElementVNode(
|
|
|
1870
1858
|
],
|
|
1871
1859
|
-1
|
|
1872
1860
|
);
|
|
1873
|
-
const _hoisted_3$h = [_hoisted_2$
|
|
1861
|
+
const _hoisted_3$h = [_hoisted_2$j];
|
|
1874
1862
|
var Code24Regular = defineComponent({
|
|
1875
1863
|
name: "Code24Regular",
|
|
1876
1864
|
render: function render18(_ctx, _cache) {
|
|
@@ -1882,7 +1870,7 @@ const _hoisted_1$p = {
|
|
|
1882
1870
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1883
1871
|
viewBox: "0 0 24 24"
|
|
1884
1872
|
};
|
|
1885
|
-
const _hoisted_2$
|
|
1873
|
+
const _hoisted_2$i = /* @__PURE__ */ createElementVNode(
|
|
1886
1874
|
"g",
|
|
1887
1875
|
{
|
|
1888
1876
|
fill: "none"
|
|
@@ -1895,7 +1883,7 @@ const _hoisted_2$j = /* @__PURE__ */ createElementVNode(
|
|
|
1895
1883
|
],
|
|
1896
1884
|
-1
|
|
1897
1885
|
);
|
|
1898
|
-
const _hoisted_3$g = [_hoisted_2$
|
|
1886
|
+
const _hoisted_3$g = [_hoisted_2$i];
|
|
1899
1887
|
var Dismiss24Filled = defineComponent({
|
|
1900
1888
|
name: "Dismiss24Filled",
|
|
1901
1889
|
render: function render19(_ctx, _cache) {
|
|
@@ -1907,7 +1895,7 @@ const _hoisted_1$o = {
|
|
|
1907
1895
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1908
1896
|
viewBox: "0 0 24 24"
|
|
1909
1897
|
};
|
|
1910
|
-
const _hoisted_2$
|
|
1898
|
+
const _hoisted_2$h = /* @__PURE__ */ createElementVNode(
|
|
1911
1899
|
"g",
|
|
1912
1900
|
{
|
|
1913
1901
|
fill: "none"
|
|
@@ -1920,7 +1908,7 @@ const _hoisted_2$i = /* @__PURE__ */ createElementVNode(
|
|
|
1920
1908
|
],
|
|
1921
1909
|
-1
|
|
1922
1910
|
);
|
|
1923
|
-
const _hoisted_3$f = [_hoisted_2$
|
|
1911
|
+
const _hoisted_3$f = [_hoisted_2$h];
|
|
1924
1912
|
var ErrorCircle24Regular = defineComponent({
|
|
1925
1913
|
name: "ErrorCircle24Regular",
|
|
1926
1914
|
render: function render20(_ctx, _cache) {
|
|
@@ -1932,7 +1920,7 @@ const _hoisted_1$n = {
|
|
|
1932
1920
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1933
1921
|
viewBox: "0 0 24 24"
|
|
1934
1922
|
};
|
|
1935
|
-
const _hoisted_2$
|
|
1923
|
+
const _hoisted_2$g = /* @__PURE__ */ createElementVNode(
|
|
1936
1924
|
"g",
|
|
1937
1925
|
{
|
|
1938
1926
|
fill: "none"
|
|
@@ -1945,7 +1933,7 @@ const _hoisted_2$h = /* @__PURE__ */ createElementVNode(
|
|
|
1945
1933
|
],
|
|
1946
1934
|
-1
|
|
1947
1935
|
);
|
|
1948
|
-
const _hoisted_3$e = [_hoisted_2$
|
|
1936
|
+
const _hoisted_3$e = [_hoisted_2$g];
|
|
1949
1937
|
var Info24Regular = defineComponent({
|
|
1950
1938
|
name: "Info24Regular",
|
|
1951
1939
|
render: function render21(_ctx, _cache) {
|
|
@@ -1957,7 +1945,7 @@ const _hoisted_1$m = {
|
|
|
1957
1945
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1958
1946
|
viewBox: "0 0 24 24"
|
|
1959
1947
|
};
|
|
1960
|
-
const _hoisted_2$
|
|
1948
|
+
const _hoisted_2$f = /* @__PURE__ */ createElementVNode(
|
|
1961
1949
|
"g",
|
|
1962
1950
|
{
|
|
1963
1951
|
fill: "none"
|
|
@@ -1970,7 +1958,7 @@ const _hoisted_2$g = /* @__PURE__ */ createElementVNode(
|
|
|
1970
1958
|
],
|
|
1971
1959
|
-1
|
|
1972
1960
|
);
|
|
1973
|
-
const _hoisted_3$d = [_hoisted_2$
|
|
1961
|
+
const _hoisted_3$d = [_hoisted_2$f];
|
|
1974
1962
|
var Warning24Regular = defineComponent({
|
|
1975
1963
|
name: "Warning24Regular",
|
|
1976
1964
|
render: function render22(_ctx, _cache) {
|
|
@@ -2121,7 +2109,7 @@ const _hoisted_1$j = {
|
|
|
2121
2109
|
key: 0,
|
|
2122
2110
|
class: "icon-checkbox-box"
|
|
2123
2111
|
};
|
|
2124
|
-
const _hoisted_2$
|
|
2112
|
+
const _hoisted_2$e = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
2125
2113
|
class: "icon-checkbox",
|
|
2126
2114
|
viewBox: "0 0 24 24",
|
|
2127
2115
|
width: "24",
|
|
@@ -2135,7 +2123,7 @@ const _hoisted_2$f = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ create
|
|
|
2135
2123
|
/* @__PURE__ */ createElementVNode("polyline", { points: "20 6 9 17 4 12" })
|
|
2136
2124
|
], -1));
|
|
2137
2125
|
const _hoisted_3$c = [
|
|
2138
|
-
_hoisted_2$
|
|
2126
|
+
_hoisted_2$e
|
|
2139
2127
|
];
|
|
2140
2128
|
const _hoisted_4$c = ["checked"];
|
|
2141
2129
|
const _hoisted_5$8 = {
|
|
@@ -2167,11 +2155,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2167
2155
|
type: Boolean,
|
|
2168
2156
|
default: true
|
|
2169
2157
|
},
|
|
2158
|
+
disabled: {
|
|
2159
|
+
type: Boolean,
|
|
2160
|
+
default: false
|
|
2161
|
+
},
|
|
2170
2162
|
checked: {
|
|
2171
2163
|
type: Boolean,
|
|
2172
2164
|
default: () => {
|
|
2173
2165
|
return false;
|
|
2174
2166
|
}
|
|
2167
|
+
},
|
|
2168
|
+
size: {
|
|
2169
|
+
type: String,
|
|
2170
|
+
default: "medium"
|
|
2175
2171
|
}
|
|
2176
2172
|
},
|
|
2177
2173
|
emits: ["change"],
|
|
@@ -2187,13 +2183,20 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2187
2183
|
);
|
|
2188
2184
|
let _checked = ref(props.checked || false);
|
|
2189
2185
|
const setChecked = (e) => {
|
|
2186
|
+
if (props.disabled) {
|
|
2187
|
+
return;
|
|
2188
|
+
}
|
|
2190
2189
|
_checked.value = e.target.checked;
|
|
2191
2190
|
emit("change", _checked.value);
|
|
2192
2191
|
};
|
|
2193
2192
|
return (_ctx, _cache) => {
|
|
2194
2193
|
return openBlock(), createElementBlock("label", {
|
|
2195
|
-
class: normalizeClass(["lew-checkbox",
|
|
2194
|
+
class: normalizeClass(["lew-checkbox", `
|
|
2195
|
+
${__props.block ? "lew-checkbox-block" : ""}
|
|
2196
|
+
${__props.round ? "lew-checkbox-round" : ""}
|
|
2197
|
+
${unref(_checked) ? "lew-checkbox-checked" : ""}
|
|
2196
2198
|
${!__props.iconable ? "lew-checkbox-unicon" : ""}
|
|
2199
|
+
${__props.size ? "lew-checkbox-" + __props.size : ""}
|
|
2197
2200
|
`])
|
|
2198
2201
|
}, [
|
|
2199
2202
|
__props.iconable ? (openBlock(), createElementBlock("div", _hoisted_1$j, _hoisted_3$c)) : createCommentVNode("v-if", true),
|
|
@@ -2241,6 +2244,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2241
2244
|
type: Boolean,
|
|
2242
2245
|
default: true
|
|
2243
2246
|
},
|
|
2247
|
+
size: {
|
|
2248
|
+
type: String,
|
|
2249
|
+
default: "medium"
|
|
2250
|
+
},
|
|
2244
2251
|
options: {
|
|
2245
2252
|
type: Array,
|
|
2246
2253
|
default: () => {
|
|
@@ -2287,10 +2294,11 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2287
2294
|
block: __props.block,
|
|
2288
2295
|
iconable: __props.iconable,
|
|
2289
2296
|
round: __props.round,
|
|
2297
|
+
size: __props.size,
|
|
2290
2298
|
label: option.label,
|
|
2291
2299
|
checked: getChecked(option.value),
|
|
2292
2300
|
onChange: ($event) => check(option.value, $event)
|
|
2293
|
-
}, null, 8, ["block", "iconable", "round", "label", "checked", "onChange"]);
|
|
2301
|
+
}, null, 8, ["block", "iconable", "round", "size", "label", "checked", "onChange"]);
|
|
2294
2302
|
}), 128))
|
|
2295
2303
|
]),
|
|
2296
2304
|
_: 1
|
|
@@ -2305,9 +2313,9 @@ const _hoisted_1$i = {
|
|
|
2305
2313
|
key: 0,
|
|
2306
2314
|
class: "icon-radio-box"
|
|
2307
2315
|
};
|
|
2308
|
-
const _hoisted_2$
|
|
2316
|
+
const _hoisted_2$d = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "icon-radio" }, null, -1));
|
|
2309
2317
|
const _hoisted_3$b = [
|
|
2310
|
-
_hoisted_2$
|
|
2318
|
+
_hoisted_2$d
|
|
2311
2319
|
];
|
|
2312
2320
|
const _hoisted_4$b = ["checked"];
|
|
2313
2321
|
const _hoisted_5$7 = {
|
|
@@ -2333,6 +2341,10 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2333
2341
|
},
|
|
2334
2342
|
checked: {
|
|
2335
2343
|
type: Boolean
|
|
2344
|
+
},
|
|
2345
|
+
size: {
|
|
2346
|
+
type: String,
|
|
2347
|
+
default: "medium"
|
|
2336
2348
|
}
|
|
2337
2349
|
},
|
|
2338
2350
|
emits: ["update:checked"],
|
|
@@ -2345,7 +2357,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2345
2357
|
class: normalizeClass(["lew-radio", `
|
|
2346
2358
|
${__props.block ? "lew-radio-block" : ""}
|
|
2347
2359
|
${__props.checked ? "lew-radio-checked" : ""}
|
|
2348
|
-
${!__props.iconable ? "lew-radio-unicon" : ""}
|
|
2360
|
+
${!__props.iconable ? "lew-radio-unicon" : ""}
|
|
2361
|
+
${__props.size ? "lew-radio-" + __props.size : ""}
|
|
2362
|
+
`])
|
|
2349
2363
|
}, [
|
|
2350
2364
|
__props.iconable ? (openBlock(), createElementBlock("div", _hoisted_1$i, _hoisted_3$b)) : createCommentVNode("v-if", true),
|
|
2351
2365
|
withDirectives(createElementVNode("input", {
|
|
@@ -2386,6 +2400,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2386
2400
|
type: String,
|
|
2387
2401
|
default: "x"
|
|
2388
2402
|
},
|
|
2403
|
+
size: {
|
|
2404
|
+
type: String,
|
|
2405
|
+
default: "medium"
|
|
2406
|
+
},
|
|
2389
2407
|
options: {
|
|
2390
2408
|
type: Array,
|
|
2391
2409
|
default: () => {
|
|
@@ -2422,9 +2440,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2422
2440
|
block: __props.block,
|
|
2423
2441
|
iconable: __props.iconable,
|
|
2424
2442
|
label: option.label,
|
|
2443
|
+
size: __props.size,
|
|
2425
2444
|
checked: __props.modelValue == option.value,
|
|
2426
2445
|
"onUpdate:checked": ($event) => check(option.value)
|
|
2427
|
-
}, null, 8, ["block", "iconable", "label", "checked", "onUpdate:checked"]);
|
|
2446
|
+
}, null, 8, ["block", "iconable", "label", "size", "checked", "onUpdate:checked"]);
|
|
2428
2447
|
}), 128))
|
|
2429
2448
|
]),
|
|
2430
2449
|
_: 1
|
|
@@ -2444,8 +2463,19 @@ const selectProps = {
|
|
|
2444
2463
|
return [];
|
|
2445
2464
|
},
|
|
2446
2465
|
required: true,
|
|
2447
|
-
validator(
|
|
2448
|
-
|
|
2466
|
+
validator(options) {
|
|
2467
|
+
const _options = toRaw(options);
|
|
2468
|
+
if (_options.length == 0) {
|
|
2469
|
+
throw new Error(
|
|
2470
|
+
"lew-select\uFF1Aoptions \u5FC5\u987B\u4E3A\u957F\u5EA6\u5927\u4E8E 0 \u7684 Array"
|
|
2471
|
+
);
|
|
2472
|
+
}
|
|
2473
|
+
const arr = _options.map((e) => e.value);
|
|
2474
|
+
const newSet = new Set(arr);
|
|
2475
|
+
if (arr.length !== newSet.size) {
|
|
2476
|
+
throw new Error("lew-select\uFF1Aoptions \u4E2D value \u4E0D\u80FD\u91CD\u590D");
|
|
2477
|
+
}
|
|
2478
|
+
return options.length > 0;
|
|
2449
2479
|
}
|
|
2450
2480
|
},
|
|
2451
2481
|
placement: {
|
|
@@ -2463,6 +2493,14 @@ const selectProps = {
|
|
|
2463
2493
|
type: Boolean,
|
|
2464
2494
|
default: false
|
|
2465
2495
|
},
|
|
2496
|
+
showIcon: {
|
|
2497
|
+
type: Boolean,
|
|
2498
|
+
default: true
|
|
2499
|
+
},
|
|
2500
|
+
labelSlot: {
|
|
2501
|
+
type: Boolean,
|
|
2502
|
+
default: false
|
|
2503
|
+
},
|
|
2466
2504
|
size: {
|
|
2467
2505
|
type: String,
|
|
2468
2506
|
default: "medium"
|
|
@@ -2474,14 +2512,20 @@ const _hoisted_1$h = {
|
|
|
2474
2512
|
key: 0,
|
|
2475
2513
|
class: "lew-select-placeholder"
|
|
2476
2514
|
};
|
|
2477
|
-
const _hoisted_2$
|
|
2515
|
+
const _hoisted_2$c = { class: "lew-select-label-multiple" };
|
|
2478
2516
|
const _hoisted_3$a = {
|
|
2479
2517
|
style: { "margin-left": "5px" },
|
|
2480
2518
|
class: "lew-isSelect-label-num"
|
|
2481
2519
|
};
|
|
2482
|
-
const _hoisted_4$a = { class: "options-box" };
|
|
2483
|
-
const _hoisted_5$6 =
|
|
2484
|
-
|
|
2520
|
+
const _hoisted_4$a = { class: "lew-select-options-box" };
|
|
2521
|
+
const _hoisted_5$6 = {
|
|
2522
|
+
key: 0,
|
|
2523
|
+
class: "lew-select-label"
|
|
2524
|
+
};
|
|
2525
|
+
const _hoisted_6$5 = {
|
|
2526
|
+
key: 1,
|
|
2527
|
+
class: "lew-select-slot-item"
|
|
2528
|
+
};
|
|
2485
2529
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2486
2530
|
__name: "LewSelect",
|
|
2487
2531
|
props: selectProps,
|
|
@@ -2495,27 +2539,25 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2495
2539
|
watch(
|
|
2496
2540
|
() => props.modelValue,
|
|
2497
2541
|
() => {
|
|
2498
|
-
|
|
2542
|
+
var _a2, _b;
|
|
2543
|
+
hide2();
|
|
2544
|
+
if (!props.modelValue) {
|
|
2545
|
+
return;
|
|
2546
|
+
}
|
|
2547
|
+
if (props.multiple && props.modelValue instanceof Array) {
|
|
2499
2548
|
multipleV.value = props.modelValue;
|
|
2500
2549
|
multipleLabelStr.value = filterSelect(
|
|
2501
2550
|
props.modelValue,
|
|
2502
2551
|
props.options
|
|
2503
2552
|
);
|
|
2504
|
-
} else {
|
|
2553
|
+
} else if (typeof props.modelValue == "string") {
|
|
2505
2554
|
v.value = props.modelValue;
|
|
2506
|
-
labelStr.value =
|
|
2555
|
+
labelStr.value = ((_b = (_a2 = props.options) == null ? void 0 : _a2.find((e) => e.value == props.modelValue)) == null ? void 0 : _b.label) || "";
|
|
2507
2556
|
}
|
|
2508
2557
|
},
|
|
2509
2558
|
{ deep: true }
|
|
2510
2559
|
);
|
|
2511
2560
|
let lewSelectRef = ref();
|
|
2512
|
-
onMounted(() => {
|
|
2513
|
-
if (props.multiple) {
|
|
2514
|
-
multipleLabelStr.value = filterSelect(props.modelValue, props.options);
|
|
2515
|
-
} else {
|
|
2516
|
-
labelStr.value = filterSelect([props.modelValue], props.options)[0] || "";
|
|
2517
|
-
}
|
|
2518
|
-
});
|
|
2519
2561
|
const filterSelect = (v2, options) => {
|
|
2520
2562
|
let _v = [];
|
|
2521
2563
|
if (v2 && options) {
|
|
@@ -2529,32 +2571,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2529
2571
|
}
|
|
2530
2572
|
return _v;
|
|
2531
2573
|
};
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
if (index2 >= 0) {
|
|
2536
|
-
multipleLabelStr.value.splice(index2, 1);
|
|
2537
|
-
multipleV.value.splice(index2, 1);
|
|
2538
|
-
} else {
|
|
2539
|
-
multipleLabelStr.value.push(item.label);
|
|
2540
|
-
multipleV.value.push(item.value);
|
|
2541
|
-
}
|
|
2542
|
-
emit("update:modelValue", multipleV.value);
|
|
2543
|
-
emit("change", multipleV.value);
|
|
2544
|
-
} else {
|
|
2545
|
-
if (v.value == item.value) {
|
|
2546
|
-
labelStr.value = "";
|
|
2547
|
-
v.value = "";
|
|
2548
|
-
} else {
|
|
2549
|
-
labelStr.value = item.label;
|
|
2550
|
-
v.value = item.value;
|
|
2551
|
-
}
|
|
2552
|
-
setTimeout(() => {
|
|
2553
|
-
hide2();
|
|
2554
|
-
}, 150);
|
|
2555
|
-
emit("update:modelValue", v.value);
|
|
2556
|
-
emit("change", v.value);
|
|
2557
|
-
}
|
|
2574
|
+
const getChecked = (_value) => {
|
|
2575
|
+
var _a2;
|
|
2576
|
+
return (_a2 = props.modelValue) == null ? void 0 : _a2.includes(_value);
|
|
2558
2577
|
};
|
|
2559
2578
|
let isShowOptions = ref(false);
|
|
2560
2579
|
let lewPopverRef1 = ref();
|
|
@@ -2574,6 +2593,27 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2574
2593
|
return ((_a2 = lewSelectRef.value) == null ? void 0 : _a2.offsetWidth) - 12 + "px";
|
|
2575
2594
|
}
|
|
2576
2595
|
);
|
|
2596
|
+
const check = (_value, checked) => {
|
|
2597
|
+
if (props.modelValue instanceof Array) {
|
|
2598
|
+
let updatedValue = [...props.modelValue];
|
|
2599
|
+
if (checked) {
|
|
2600
|
+
updatedValue.push(_value);
|
|
2601
|
+
} else {
|
|
2602
|
+
updatedValue.splice(updatedValue.indexOf(_value), 1);
|
|
2603
|
+
}
|
|
2604
|
+
emit("update:modelValue", updatedValue);
|
|
2605
|
+
} else {
|
|
2606
|
+
if (v.value == _value) {
|
|
2607
|
+
labelStr.value = "";
|
|
2608
|
+
v.value = "";
|
|
2609
|
+
} else {
|
|
2610
|
+
labelStr.value = _value;
|
|
2611
|
+
v.value = _value;
|
|
2612
|
+
}
|
|
2613
|
+
emit("update:modelValue", v.value);
|
|
2614
|
+
emit("change", v.value);
|
|
2615
|
+
}
|
|
2616
|
+
};
|
|
2577
2617
|
const show = () => {
|
|
2578
2618
|
lewPopverRef1.value.show();
|
|
2579
2619
|
};
|
|
@@ -2581,6 +2621,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2581
2621
|
lewPopverRef1.value.hide();
|
|
2582
2622
|
};
|
|
2583
2623
|
expose({ show, hide: hide2 });
|
|
2624
|
+
onMounted(() => {
|
|
2625
|
+
var _a2, _b;
|
|
2626
|
+
if (props.multiple && props.modelValue instanceof Array) {
|
|
2627
|
+
multipleLabelStr.value = filterSelect(props.modelValue, props.options);
|
|
2628
|
+
} else if (typeof props.modelValue == "string") {
|
|
2629
|
+
labelStr.value = labelStr.value = ((_b = (_a2 = props.options) == null ? void 0 : _a2.find((e) => e.value == props.modelValue)) == null ? void 0 : _b.label) || "";
|
|
2630
|
+
}
|
|
2631
|
+
});
|
|
2584
2632
|
return (_ctx, _cache) => {
|
|
2585
2633
|
const _component_lew_tag = resolveComponent("lew-tag");
|
|
2586
2634
|
const _component_lew_flex = resolveComponent("lew-flex");
|
|
@@ -2616,7 +2664,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2616
2664
|
[vShow, !_ctx.multiple]
|
|
2617
2665
|
]),
|
|
2618
2666
|
createCommentVNode(" \u591A\u9009 "),
|
|
2619
|
-
withDirectives(createElementVNode("div", _hoisted_2$
|
|
2667
|
+
withDirectives(createElementVNode("div", _hoisted_2$c, [
|
|
2620
2668
|
withDirectives(createVNode(_component_lew_tag, {
|
|
2621
2669
|
type: "primary",
|
|
2622
2670
|
size: _ctx.size,
|
|
@@ -2659,13 +2707,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2659
2707
|
class: "lew-isSelect-label-box"
|
|
2660
2708
|
}, {
|
|
2661
2709
|
default: withCtx(() => [
|
|
2662
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(multipleLabelStr.value, (item,
|
|
2710
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(multipleLabelStr.value, (item, index2) => {
|
|
2663
2711
|
return openBlock(), createBlock(_component_lew_tag, {
|
|
2664
|
-
key:
|
|
2712
|
+
key: index2,
|
|
2665
2713
|
type: "primary",
|
|
2666
2714
|
closable: "",
|
|
2667
2715
|
size: _ctx.size,
|
|
2668
|
-
onClose: ($event) => delTag(
|
|
2716
|
+
onClose: ($event) => delTag(index2)
|
|
2669
2717
|
}, {
|
|
2670
2718
|
default: withCtx(() => [
|
|
2671
2719
|
createTextVNode(toDisplayString(item), 1)
|
|
@@ -2688,31 +2736,55 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2688
2736
|
]),
|
|
2689
2737
|
"popover-body": withCtx(() => [
|
|
2690
2738
|
createElementVNode("div", {
|
|
2691
|
-
class: normalizeClass(["lew-select-body",
|
|
2739
|
+
class: normalizeClass(["lew-select-body", `
|
|
2740
|
+
${_ctx.size ? "lew-select-body-" + _ctx.size : ""}
|
|
2741
|
+
${_ctx.multiple ? "lew-select-multiple-body" : ""}
|
|
2742
|
+
`]),
|
|
2692
2743
|
style: normalizeStyle(`width:${unref(lewSelectWidth)}`)
|
|
2693
2744
|
}, [
|
|
2745
|
+
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
2694
2746
|
createElementVNode("div", _hoisted_4$a, [
|
|
2695
2747
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item) => {
|
|
2696
|
-
return openBlock(), createElementBlock("
|
|
2697
|
-
key: item.value
|
|
2698
|
-
class: normalizeClass(["item", {
|
|
2699
|
-
"lew-select-checked": _ctx.multiple ? multipleV.value.includes(item.value) : v.value == item.value
|
|
2700
|
-
}]),
|
|
2701
|
-
onClick: ($event) => changeFn(item)
|
|
2748
|
+
return openBlock(), createElementBlock("label", {
|
|
2749
|
+
key: item.value
|
|
2702
2750
|
}, [
|
|
2703
|
-
|
|
2751
|
+
createCommentVNode(" \u539F\u751F "),
|
|
2752
|
+
!_ctx.labelSlot ? (openBlock(), createElementBlock("div", {
|
|
2704
2753
|
key: 0,
|
|
2705
|
-
class: "lew-select-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
},
|
|
2709
|
-
|
|
2710
|
-
|
|
2754
|
+
class: normalizeClass(["lew-select-item", `
|
|
2755
|
+
${item.disabled ? "lew-select-item-disabled" : ""}
|
|
2756
|
+
`])
|
|
2757
|
+
}, [
|
|
2758
|
+
withDirectives(createVNode(unref(LewCheckbox), {
|
|
2759
|
+
size: _ctx.size,
|
|
2760
|
+
class: "lew-select-checkbox",
|
|
2761
|
+
label: item.label,
|
|
2762
|
+
disabled: item.disabled,
|
|
2763
|
+
checked: getChecked(item.value),
|
|
2764
|
+
onChange: ($event) => check(item.value, $event)
|
|
2765
|
+
}, null, 8, ["size", "label", "disabled", "checked", "onChange"]), [
|
|
2766
|
+
[vShow, _ctx.showIcon]
|
|
2767
|
+
]),
|
|
2768
|
+
!_ctx.showIcon ? (openBlock(), createElementBlock("div", _hoisted_5$6, toDisplayString(item.label), 1)) : createCommentVNode("v-if", true)
|
|
2769
|
+
], 2)) : (openBlock(), createElementBlock("div", _hoisted_6$5, [
|
|
2770
|
+
renderSlot(_ctx.$slots, "label", {
|
|
2771
|
+
item,
|
|
2772
|
+
checked: getChecked(item.value)
|
|
2773
|
+
}, void 0, true),
|
|
2774
|
+
withDirectives(createVNode(unref(LewCheckbox), {
|
|
2775
|
+
checked: getChecked(item.value),
|
|
2776
|
+
onChange: ($event) => check(item.value, $event)
|
|
2777
|
+
}, null, 8, ["checked", "onChange"]), [
|
|
2778
|
+
[vShow, false]
|
|
2779
|
+
])
|
|
2780
|
+
]))
|
|
2781
|
+
]);
|
|
2711
2782
|
}), 128))
|
|
2712
|
-
])
|
|
2783
|
+
]),
|
|
2784
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
2713
2785
|
], 6)
|
|
2714
2786
|
]),
|
|
2715
|
-
_:
|
|
2787
|
+
_: 3
|
|
2716
2788
|
}, 8, ["class", "trigger", "placement"]);
|
|
2717
2789
|
};
|
|
2718
2790
|
}
|
|
@@ -6752,7 +6824,7 @@ hooks.HTML5_FMT = {
|
|
|
6752
6824
|
};
|
|
6753
6825
|
var LewDate_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
6754
6826
|
const _hoisted_1$f = { class: "lew-date" };
|
|
6755
|
-
const _hoisted_2$
|
|
6827
|
+
const _hoisted_2$b = { class: "lew-date-control-left" };
|
|
6756
6828
|
const _hoisted_3$9 = { class: "cur-date" };
|
|
6757
6829
|
const _hoisted_4$9 = { class: "lew-date-control-right" };
|
|
6758
6830
|
const _hoisted_5$5 = { class: "lew-date-box" };
|
|
@@ -6841,7 +6913,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
6841
6913
|
class: "lew-date-control"
|
|
6842
6914
|
}, {
|
|
6843
6915
|
default: withCtx(() => [
|
|
6844
|
-
createElementVNode("div", _hoisted_2$
|
|
6916
|
+
createElementVNode("div", _hoisted_2$b, [
|
|
6845
6917
|
createCommentVNode(" \u4E0A\u4E00\u5E74 "),
|
|
6846
6918
|
createVNode(_component_lew_button, {
|
|
6847
6919
|
type: "normal",
|
|
@@ -6928,7 +7000,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
6928
7000
|
var LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-29f4866a"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDate.vue"]]);
|
|
6929
7001
|
var LewDateRange_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
6930
7002
|
const _hoisted_1$e = { class: "lew-date-range" };
|
|
6931
|
-
const _hoisted_2$
|
|
7003
|
+
const _hoisted_2$a = { class: "lew-date" };
|
|
6932
7004
|
const _hoisted_3$8 = { class: "lew-date-control-left" };
|
|
6933
7005
|
const _hoisted_4$8 = { class: "cur-date" };
|
|
6934
7006
|
const _hoisted_5$4 = { class: "lew-date-control-right" };
|
|
@@ -7217,7 +7289,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
7217
7289
|
const _component_lew_button = resolveComponent("lew-button");
|
|
7218
7290
|
const _component_lew_flex = resolveComponent("lew-flex");
|
|
7219
7291
|
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
7220
|
-
createElementVNode("div", _hoisted_2$
|
|
7292
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
7221
7293
|
createVNode(_component_lew_flex, {
|
|
7222
7294
|
x: "start",
|
|
7223
7295
|
mode: "between",
|
|
@@ -7483,7 +7555,7 @@ var LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "dat
|
|
|
7483
7555
|
var LewDateRangePicker_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
7484
7556
|
const _withScopeId = (n) => (pushScopeId("data-v-f13243de"), n = n(), popScopeId(), n);
|
|
7485
7557
|
const _hoisted_1$c = { class: "lew-date-picker-placeholder" };
|
|
7486
|
-
const _hoisted_2$
|
|
7558
|
+
const _hoisted_2$9 = { class: "lew-date-picker-dateValue lew-date-picker-start" };
|
|
7487
7559
|
const _hoisted_3$7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "lew-date-picker-mid" }, "-", -1));
|
|
7488
7560
|
const _hoisted_4$7 = { class: "lew-date-picker-dateValue lew-date-picker-end" };
|
|
7489
7561
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
@@ -7534,7 +7606,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
7534
7606
|
withDirectives(createElementVNode("div", _hoisted_1$c, " \u8BF7\u9009\u62E9\u65E5\u671F ", 512), [
|
|
7535
7607
|
[vShow, !unref(dateValue)]
|
|
7536
7608
|
]),
|
|
7537
|
-
createElementVNode("div", _hoisted_2$
|
|
7609
|
+
createElementVNode("div", _hoisted_2$9, toDisplayString(unref(dateValue)[0]), 1),
|
|
7538
7610
|
_hoisted_3$7,
|
|
7539
7611
|
createElementVNode("div", _hoisted_4$7, toDisplayString(unref(dateValue)[1]), 1),
|
|
7540
7612
|
createVNode(unref(Icon), {
|
|
@@ -7798,7 +7870,7 @@ const paginationProps = {
|
|
|
7798
7870
|
};
|
|
7799
7871
|
var LewPagination_vue_vue_type_style_index_0_lang = "";
|
|
7800
7872
|
const _hoisted_1$a = ["onClick"];
|
|
7801
|
-
const _hoisted_2$
|
|
7873
|
+
const _hoisted_2$8 = /* @__PURE__ */ createElementVNode("div", { class: "page-label" }, "/ \u9875", -1);
|
|
7802
7874
|
const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("div", { class: "page-label" }, "\u8DF3\u8F6C\u81F3", -1);
|
|
7803
7875
|
const _hoisted_4$6 = /* @__PURE__ */ createElementVNode("div", { class: "page-label" }, "\u9875", -1);
|
|
7804
7876
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
@@ -8006,7 +8078,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
8006
8078
|
disabled: ""
|
|
8007
8079
|
}, {
|
|
8008
8080
|
right: withCtx(() => [
|
|
8009
|
-
_hoisted_2$
|
|
8081
|
+
_hoisted_2$8
|
|
8010
8082
|
]),
|
|
8011
8083
|
_: 1
|
|
8012
8084
|
}, 8, ["modelValue", "options"]),
|
|
@@ -8038,46 +8110,55 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
8038
8110
|
}
|
|
8039
8111
|
});
|
|
8040
8112
|
var LewPagination = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/pagination/src/LewPagination.vue"]]);
|
|
8113
|
+
const avatarProps = {
|
|
8114
|
+
round: {
|
|
8115
|
+
type: Boolean,
|
|
8116
|
+
default: false
|
|
8117
|
+
},
|
|
8118
|
+
status: {
|
|
8119
|
+
type: String,
|
|
8120
|
+
default: ""
|
|
8121
|
+
},
|
|
8122
|
+
statusPosition: {
|
|
8123
|
+
type: String,
|
|
8124
|
+
default: ""
|
|
8125
|
+
},
|
|
8126
|
+
width: { type: String, default: "40px" },
|
|
8127
|
+
height: { type: String, default: "40px" },
|
|
8128
|
+
src: {
|
|
8129
|
+
type: String,
|
|
8130
|
+
default: ""
|
|
8131
|
+
},
|
|
8132
|
+
alt: {
|
|
8133
|
+
type: String,
|
|
8134
|
+
default: ""
|
|
8135
|
+
}
|
|
8136
|
+
};
|
|
8041
8137
|
var LewAvatar_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
8042
|
-
const _hoisted_1$9 =
|
|
8043
|
-
const _hoisted_2$8 = ["src", "alt"];
|
|
8138
|
+
const _hoisted_1$9 = ["src", "alt"];
|
|
8044
8139
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
8045
8140
|
__name: "LewAvatar",
|
|
8046
|
-
props:
|
|
8047
|
-
round: {
|
|
8048
|
-
type: Boolean,
|
|
8049
|
-
default: false
|
|
8050
|
-
},
|
|
8051
|
-
status: {
|
|
8052
|
-
type: String,
|
|
8053
|
-
default: ""
|
|
8054
|
-
},
|
|
8055
|
-
statusPosition: {
|
|
8056
|
-
type: String,
|
|
8057
|
-
default: ""
|
|
8058
|
-
},
|
|
8059
|
-
src: {
|
|
8060
|
-
type: String,
|
|
8061
|
-
default: ""
|
|
8062
|
-
},
|
|
8063
|
-
alt: {
|
|
8064
|
-
type: String,
|
|
8065
|
-
default: ""
|
|
8066
|
-
}
|
|
8067
|
-
},
|
|
8141
|
+
props: avatarProps,
|
|
8068
8142
|
setup(__props) {
|
|
8143
|
+
const props = __props;
|
|
8144
|
+
const getAvatarStyle = computed(() => {
|
|
8145
|
+
return `width:${props.width};height:${props.height}`;
|
|
8146
|
+
});
|
|
8069
8147
|
return (_ctx, _cache) => {
|
|
8070
|
-
return openBlock(), createElementBlock("div",
|
|
8148
|
+
return openBlock(), createElementBlock("div", {
|
|
8149
|
+
class: "lew-avatar",
|
|
8150
|
+
style: normalizeStyle(unref(getAvatarStyle))
|
|
8151
|
+
}, [
|
|
8071
8152
|
createElementVNode("img", {
|
|
8072
|
-
src:
|
|
8073
|
-
alt:
|
|
8074
|
-
class: normalizeClass(
|
|
8075
|
-
}, null, 10,
|
|
8076
|
-
|
|
8153
|
+
src: _ctx.src,
|
|
8154
|
+
alt: _ctx.alt,
|
|
8155
|
+
class: normalizeClass(_ctx.round ? "lew-avatar-round" : "")
|
|
8156
|
+
}, null, 10, _hoisted_1$9),
|
|
8157
|
+
_ctx.status ? (openBlock(), createElementBlock("span", {
|
|
8077
8158
|
key: 0,
|
|
8078
|
-
class: normalizeClass(["dot", `dot-${
|
|
8159
|
+
class: normalizeClass(["dot", `dot-${_ctx.status} dot-${_ctx.statusPosition}`])
|
|
8079
8160
|
}, null, 2)) : createCommentVNode("v-if", true)
|
|
8080
|
-
]);
|
|
8161
|
+
], 4);
|
|
8081
8162
|
};
|
|
8082
8163
|
}
|
|
8083
8164
|
});
|
|
@@ -8172,6 +8253,9 @@ const buttonProps = {
|
|
|
8172
8253
|
type: Boolean,
|
|
8173
8254
|
default: false
|
|
8174
8255
|
},
|
|
8256
|
+
request: {
|
|
8257
|
+
type: Function
|
|
8258
|
+
},
|
|
8175
8259
|
disabled: {
|
|
8176
8260
|
type: Boolean,
|
|
8177
8261
|
default: false
|
|
@@ -8198,10 +8282,22 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
8198
8282
|
emits: ["click"],
|
|
8199
8283
|
setup(__props, { emit }) {
|
|
8200
8284
|
const props = __props;
|
|
8201
|
-
|
|
8285
|
+
let _loading = ref(false);
|
|
8286
|
+
if (props.request && props.loading) {
|
|
8287
|
+
throw new Error("request \u548C loading \u4E0D\u80FD\u540C\u65F6\u8BBE\u7F6E");
|
|
8288
|
+
}
|
|
8289
|
+
const handleClick = async (e) => {
|
|
8202
8290
|
if (props.disabled)
|
|
8203
8291
|
return;
|
|
8204
8292
|
emit("click", e);
|
|
8293
|
+
if (typeof props.request === "function") {
|
|
8294
|
+
if (_loading.value) {
|
|
8295
|
+
return;
|
|
8296
|
+
}
|
|
8297
|
+
_loading.value = true;
|
|
8298
|
+
await props.request();
|
|
8299
|
+
_loading.value = false;
|
|
8300
|
+
}
|
|
8205
8301
|
};
|
|
8206
8302
|
return (_ctx, _cache) => {
|
|
8207
8303
|
return openBlock(), createElementBlock("button", {
|
|
@@ -8211,14 +8307,16 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
8211
8307
|
${_ctx.type ? "lew-button-" + _ctx.type : ""}
|
|
8212
8308
|
${_ctx.round ? "lew-button-round" : ""}
|
|
8213
8309
|
${_ctx.isIcon ? "lew-button-icon" : ""}
|
|
8214
|
-
${_ctx.loading ? "lew-button-loading" : ""}
|
|
8310
|
+
${unref(_loading) || _ctx.loading ? "lew-button-loading" : ""}
|
|
8215
8311
|
`]),
|
|
8216
8312
|
disabled: _ctx.disabled,
|
|
8217
8313
|
onClick: handleClick
|
|
8218
8314
|
}, [
|
|
8219
8315
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
8220
8316
|
createElementVNode("div", {
|
|
8221
|
-
class: normalizeClass(["lew-loading-icon", {
|
|
8317
|
+
class: normalizeClass(["lew-loading-icon", {
|
|
8318
|
+
"lew-loading-icon-show": (unref(_loading) || _ctx.loading) && !_ctx.disabled
|
|
8319
|
+
}])
|
|
8222
8320
|
}, null, 2)
|
|
8223
8321
|
], 10, _hoisted_1$7);
|
|
8224
8322
|
};
|
|
@@ -11324,6 +11422,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11324
11422
|
type: String,
|
|
11325
11423
|
default: "top"
|
|
11326
11424
|
},
|
|
11425
|
+
triggerTarget: {
|
|
11426
|
+
type: Element,
|
|
11427
|
+
default: null,
|
|
11428
|
+
required: false
|
|
11429
|
+
},
|
|
11327
11430
|
arrow: {
|
|
11328
11431
|
type: Boolean,
|
|
11329
11432
|
default: true
|
|
@@ -11337,6 +11440,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11337
11440
|
let instance2;
|
|
11338
11441
|
onMounted(() => {
|
|
11339
11442
|
let trigger = props.trigger;
|
|
11443
|
+
let triggerTarget = props.triggerTarget;
|
|
11340
11444
|
let placement = props.placement;
|
|
11341
11445
|
if (trigger == "hover") {
|
|
11342
11446
|
trigger = "mouseenter";
|
|
@@ -11344,6 +11448,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11344
11448
|
instance2 = tippy$1(triggerRef.value, {
|
|
11345
11449
|
theme: "light",
|
|
11346
11450
|
trigger,
|
|
11451
|
+
triggerTarget,
|
|
11347
11452
|
content: bodyRef.value,
|
|
11348
11453
|
animation: "shift-away-subtle",
|
|
11349
11454
|
interactive: true,
|
|
@@ -11365,10 +11470,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11365
11470
|
emit("onHide");
|
|
11366
11471
|
}
|
|
11367
11472
|
});
|
|
11368
|
-
instance2.popper.children[0].setAttribute(
|
|
11369
|
-
"data-lew",
|
|
11370
|
-
props.arrow ? "popover" : "custom"
|
|
11371
|
-
);
|
|
11473
|
+
instance2.popper.children[0].setAttribute("data-lew", "popover");
|
|
11372
11474
|
});
|
|
11373
11475
|
const show = () => {
|
|
11374
11476
|
instance2.show();
|
|
@@ -11379,7 +11481,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11379
11481
|
expose({ show, hide: hide2 });
|
|
11380
11482
|
return (_ctx, _cache) => {
|
|
11381
11483
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
11382
|
-
createElementVNode("
|
|
11484
|
+
createElementVNode("label", {
|
|
11383
11485
|
ref_key: "triggerRef",
|
|
11384
11486
|
ref: triggerRef
|
|
11385
11487
|
}, [
|
|
@@ -11964,7 +12066,7 @@ const addMessage = (type, content) => {
|
|
|
11964
12066
|
warning: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z" fill="currentColor"></path></g></svg>`,
|
|
11965
12067
|
error: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z" fill="currentColor"></path></g></svg>`,
|
|
11966
12068
|
normal: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z" fill="currentColor"></path></g></svg>`,
|
|
11967
|
-
info: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0
|
|
12069
|
+
info: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20"><g fill="none"><path d="M12.45 16.002a2.5 2.5 0 0 1-4.9 0h4.9zM9.998 2c3.149 0 5.744 2.335 5.984 5.355l.013.223l.005.224l-.001 3.606l.954 2.587l.025.085l.016.086l.005.089c0 .315-.196.59-.522.707l-.114.033l-.114.01H3.751a.75.75 0 0 1-.259-.047c-.287-.105-.476-.372-.482-.716l.004-.117l.034-.13l.95-2.584L4 7.793l.004-.225C4.127 4.451 6.771 2 9.998 2z" fill="currentColor"></path></g></svg>`
|
|
11968
12070
|
};
|
|
11969
12071
|
newMessage.innerHTML = `${svgArr[type]}<div class="content">${content}</div>`;
|
|
11970
12072
|
LewMessageDom == null ? void 0 : LewMessageDom.appendChild(newMessage, LewMessageDom == null ? void 0 : LewMessageDom.childNodes[0]);
|
|
@@ -11980,7 +12082,8 @@ const addMessage = (type, content) => {
|
|
|
11980
12082
|
`message message-${type} message-hidden`
|
|
11981
12083
|
);
|
|
11982
12084
|
setTimeout(() => {
|
|
11983
|
-
|
|
12085
|
+
if (newMessage)
|
|
12086
|
+
LewMessageDom == null ? void 0 : LewMessageDom.removeChild(newMessage);
|
|
11984
12087
|
}, 250);
|
|
11985
12088
|
}, 3e3);
|
|
11986
12089
|
}, 10);
|
|
@@ -11997,16 +12100,16 @@ var LewDialog_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
|
11997
12100
|
var LewDialog_vue_vue_type_style_index_1_lang = "";
|
|
11998
12101
|
const _hoisted_1 = { class: "left" };
|
|
11999
12102
|
const _hoisted_2 = { class: "right" };
|
|
12000
|
-
const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
12001
|
-
const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
|
|
12103
|
+
const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88 ");
|
|
12104
|
+
const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4 ");
|
|
12002
12105
|
const _hoisted_5 = {
|
|
12003
12106
|
key: 1,
|
|
12004
12107
|
class: "lew-dialog-box lew-dialog-box-easy"
|
|
12005
12108
|
};
|
|
12006
12109
|
const _hoisted_6 = { class: "left" };
|
|
12007
12110
|
const _hoisted_7 = { class: "right" };
|
|
12008
|
-
const _hoisted_8 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
12009
|
-
const _hoisted_9 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
|
|
12111
|
+
const _hoisted_8 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88 ");
|
|
12112
|
+
const _hoisted_9 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4 ");
|
|
12010
12113
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12011
12114
|
__name: "LewDialog",
|
|
12012
12115
|
props: {
|
|
@@ -12014,9 +12117,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12014
12117
|
type: Boolean,
|
|
12015
12118
|
default: false
|
|
12016
12119
|
},
|
|
12017
|
-
|
|
12120
|
+
closeonClickOverlay: {
|
|
12018
12121
|
type: Boolean,
|
|
12019
|
-
default:
|
|
12122
|
+
default: false
|
|
12020
12123
|
},
|
|
12021
12124
|
type: {
|
|
12022
12125
|
type: String,
|
|
@@ -12036,8 +12139,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12036
12139
|
emits: ["update:visible"],
|
|
12037
12140
|
setup(__props, { emit }) {
|
|
12038
12141
|
const props = __props;
|
|
12039
|
-
|
|
12040
|
-
|
|
12142
|
+
let loading = ref(false);
|
|
12143
|
+
const onClickOverlay = () => {
|
|
12144
|
+
if (props == null ? void 0 : props.closeonClickOverlay) {
|
|
12041
12145
|
close();
|
|
12042
12146
|
}
|
|
12043
12147
|
};
|
|
@@ -12048,9 +12152,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12048
12152
|
emit("update:visible", false);
|
|
12049
12153
|
}, 245);
|
|
12050
12154
|
};
|
|
12051
|
-
const okFn = () => {
|
|
12155
|
+
const okFn = async () => {
|
|
12052
12156
|
if (typeof props.ok === "function") {
|
|
12053
|
-
|
|
12157
|
+
loading.value = true;
|
|
12158
|
+
await props.ok();
|
|
12159
|
+
loading.value = false;
|
|
12054
12160
|
}
|
|
12055
12161
|
close();
|
|
12056
12162
|
};
|
|
@@ -12061,124 +12167,126 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12061
12167
|
close();
|
|
12062
12168
|
};
|
|
12063
12169
|
return (_ctx, _cache) => {
|
|
12064
|
-
return openBlock(),
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
class: "lew-dialog",
|
|
12068
|
-
style: normalizeStyle(
|
|
12069
|
-
unref(isShowDialog) ? "animation: lewDialogOpen 0.25s;" : "animation: lewDialogClose 0.25s;"
|
|
12070
|
-
),
|
|
12071
|
-
onClick: OnClickOverlay
|
|
12072
|
-
}, [
|
|
12073
|
-
__props.layout == "normal" ? (openBlock(), createElementBlock("div", {
|
|
12170
|
+
return openBlock(), createElementBlock("div", null, [
|
|
12171
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
12172
|
+
__props.visible ? (openBlock(), createElementBlock("div", {
|
|
12074
12173
|
key: 0,
|
|
12075
|
-
class: "lew-dialog
|
|
12076
|
-
|
|
12077
|
-
|
|
12174
|
+
class: "lew-dialog",
|
|
12175
|
+
style: normalizeStyle(
|
|
12176
|
+
unref(isShowDialog) ? "animation: lewDialogOpen 0.25s;" : "animation: lewDialogClose 0.25s;"
|
|
12177
|
+
),
|
|
12178
|
+
onClick: onClickOverlay
|
|
12078
12179
|
}, [
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12180
|
+
__props.layout == "normal" ? (openBlock(), createElementBlock("div", {
|
|
12181
|
+
key: 0,
|
|
12182
|
+
class: "lew-dialog-box lew-dialog-box-normal",
|
|
12183
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
12184
|
+
}, ["stop"]))
|
|
12082
12185
|
}, [
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
size: "32",
|
|
12093
|
-
class: normalizeClass(`icon-${__props.type}`)
|
|
12094
|
-
}, {
|
|
12095
|
-
default: withCtx(() => [
|
|
12096
|
-
__props.type == `normal` ? (openBlock(), createBlock(unref(Info24Regular), { key: 0 })) : createCommentVNode("v-if", true),
|
|
12097
|
-
__props.type == `warning` ? (openBlock(), createBlock(unref(Warning24Regular), { key: 1 })) : createCommentVNode("v-if", true),
|
|
12098
|
-
__props.type == `success` ? (openBlock(), createBlock(unref(CheckmarkCircle24Regular), { key: 2 })) : createCommentVNode("v-if", true),
|
|
12099
|
-
__props.type == `error` ? (openBlock(), createBlock(unref(ErrorCircle24Regular), { key: 3 })) : createCommentVNode("v-if", true),
|
|
12100
|
-
__props.type == `info` ? (openBlock(), createBlock(unref(Alert24Regular), { key: 4 })) : createCommentVNode("v-if", true)
|
|
12101
|
-
]),
|
|
12102
|
-
_: 1
|
|
12103
|
-
}, 8, ["class"])
|
|
12104
|
-
]),
|
|
12105
|
-
createElementVNode("div", _hoisted_2, [
|
|
12106
|
-
createElementVNode("header", null, [
|
|
12107
|
-
renderSlot(_ctx.$slots, "title", {}, void 0, true),
|
|
12108
|
-
createElementVNode("span", {
|
|
12109
|
-
class: "gulu-dialog-close",
|
|
12110
|
-
onClick: close
|
|
12186
|
+
createElementVNode("div", {
|
|
12187
|
+
class: "btn-close",
|
|
12188
|
+
onClick: cancelFn
|
|
12189
|
+
}, [
|
|
12190
|
+
createVNode(unref(Icon), { size: "18" }, {
|
|
12191
|
+
default: withCtx(() => [
|
|
12192
|
+
createVNode(unref(Dismiss24Filled))
|
|
12193
|
+
]),
|
|
12194
|
+
_: 1
|
|
12111
12195
|
})
|
|
12112
12196
|
]),
|
|
12113
|
-
createElementVNode("
|
|
12114
|
-
|
|
12197
|
+
createElementVNode("div", _hoisted_1, [
|
|
12198
|
+
createVNode(unref(Icon), {
|
|
12199
|
+
size: "32",
|
|
12200
|
+
class: normalizeClass(`icon-${__props.type}`)
|
|
12201
|
+
}, {
|
|
12202
|
+
default: withCtx(() => [
|
|
12203
|
+
__props.type == `normal` ? (openBlock(), createBlock(unref(Info24Regular), { key: 0 })) : createCommentVNode("v-if", true),
|
|
12204
|
+
__props.type == `warning` ? (openBlock(), createBlock(unref(Warning24Regular), { key: 1 })) : createCommentVNode("v-if", true),
|
|
12205
|
+
__props.type == `success` ? (openBlock(), createBlock(unref(CheckmarkCircle24Regular), { key: 2 })) : createCommentVNode("v-if", true),
|
|
12206
|
+
__props.type == `error` ? (openBlock(), createBlock(unref(ErrorCircle24Regular), { key: 3 })) : createCommentVNode("v-if", true),
|
|
12207
|
+
__props.type == `info` ? (openBlock(), createBlock(unref(Alert24Regular), { key: 4 })) : createCommentVNode("v-if", true)
|
|
12208
|
+
]),
|
|
12209
|
+
_: 1
|
|
12210
|
+
}, 8, ["class"])
|
|
12211
|
+
]),
|
|
12212
|
+
createElementVNode("div", _hoisted_2, [
|
|
12213
|
+
createElementVNode("header", null, [
|
|
12214
|
+
renderSlot(_ctx.$slots, "title", {}, void 0, true),
|
|
12215
|
+
createElementVNode("span", {
|
|
12216
|
+
class: "gulu-dialog-close",
|
|
12217
|
+
onClick: close
|
|
12218
|
+
})
|
|
12219
|
+
]),
|
|
12220
|
+
createElementVNode("main", null, [
|
|
12221
|
+
renderSlot(_ctx.$slots, "content", {}, void 0, true)
|
|
12222
|
+
]),
|
|
12223
|
+
createElementVNode("footer", null, [
|
|
12224
|
+
createVNode(unref(LewButton), {
|
|
12225
|
+
type: "blank",
|
|
12226
|
+
onClick: cancelFn
|
|
12227
|
+
}, {
|
|
12228
|
+
default: withCtx(() => [
|
|
12229
|
+
_hoisted_3
|
|
12230
|
+
]),
|
|
12231
|
+
_: 1
|
|
12232
|
+
}),
|
|
12233
|
+
createVNode(unref(LewButton), {
|
|
12234
|
+
loading: unref(loading),
|
|
12235
|
+
onClick: okFn
|
|
12236
|
+
}, {
|
|
12237
|
+
default: withCtx(() => [
|
|
12238
|
+
_hoisted_4
|
|
12239
|
+
]),
|
|
12240
|
+
_: 1
|
|
12241
|
+
}, 8, ["loading"])
|
|
12242
|
+
])
|
|
12243
|
+
])
|
|
12244
|
+
])) : createCommentVNode("v-if", true),
|
|
12245
|
+
__props.layout == "easy" ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
12246
|
+
createElementVNode("div", _hoisted_6, [
|
|
12247
|
+
createVNode(unref(Icon), {
|
|
12248
|
+
size: "22",
|
|
12249
|
+
class: normalizeClass(`icon-${__props.type}`)
|
|
12250
|
+
}, {
|
|
12251
|
+
default: withCtx(() => [
|
|
12252
|
+
__props.type == `normal` ? (openBlock(), createBlock(unref(Info24Regular), { key: 0 })) : createCommentVNode("v-if", true),
|
|
12253
|
+
__props.type == `warning` ? (openBlock(), createBlock(unref(Warning24Regular), { key: 1 })) : createCommentVNode("v-if", true),
|
|
12254
|
+
__props.type == `success` ? (openBlock(), createBlock(unref(CheckmarkCircle24Regular), { key: 2 })) : createCommentVNode("v-if", true),
|
|
12255
|
+
__props.type == `error` ? (openBlock(), createBlock(unref(ErrorCircle24Regular), { key: 3 })) : createCommentVNode("v-if", true),
|
|
12256
|
+
__props.type == `info` ? (openBlock(), createBlock(unref(Alert24Regular), { key: 4 })) : createCommentVNode("v-if", true)
|
|
12257
|
+
]),
|
|
12258
|
+
_: 1
|
|
12259
|
+
}, 8, ["class"])
|
|
12115
12260
|
]),
|
|
12116
|
-
createElementVNode("
|
|
12261
|
+
createElementVNode("div", _hoisted_7, [
|
|
12262
|
+
createElementVNode("main", null, [
|
|
12263
|
+
renderSlot(_ctx.$slots, "content", {}, void 0, true)
|
|
12264
|
+
]),
|
|
12117
12265
|
createVNode(unref(LewButton), {
|
|
12266
|
+
style: { "margin-right": "10px" },
|
|
12267
|
+
type: "normal",
|
|
12118
12268
|
size: "small",
|
|
12119
|
-
type: "blank",
|
|
12120
12269
|
onClick: cancelFn
|
|
12121
12270
|
}, {
|
|
12122
12271
|
default: withCtx(() => [
|
|
12123
|
-
|
|
12272
|
+
_hoisted_8
|
|
12124
12273
|
]),
|
|
12125
12274
|
_: 1
|
|
12126
12275
|
}),
|
|
12127
12276
|
createVNode(unref(LewButton), {
|
|
12128
|
-
|
|
12129
|
-
|
|
12277
|
+
onClick: okFn,
|
|
12278
|
+
loading: unref(loading),
|
|
12279
|
+
size: "small"
|
|
12130
12280
|
}, {
|
|
12131
12281
|
default: withCtx(() => [
|
|
12132
|
-
|
|
12282
|
+
_hoisted_9
|
|
12133
12283
|
]),
|
|
12134
12284
|
_: 1
|
|
12135
|
-
})
|
|
12285
|
+
}, 8, ["loading"])
|
|
12136
12286
|
])
|
|
12137
|
-
])
|
|
12138
|
-
])) : createCommentVNode("v-if", true)
|
|
12139
|
-
|
|
12140
|
-
createElementVNode("div", _hoisted_6, [
|
|
12141
|
-
createVNode(unref(Icon), {
|
|
12142
|
-
size: "22",
|
|
12143
|
-
class: normalizeClass(`icon-${__props.type}`)
|
|
12144
|
-
}, {
|
|
12145
|
-
default: withCtx(() => [
|
|
12146
|
-
__props.type == `normal` ? (openBlock(), createBlock(unref(Info24Regular), { key: 0 })) : createCommentVNode("v-if", true),
|
|
12147
|
-
__props.type == `warning` ? (openBlock(), createBlock(unref(Warning24Regular), { key: 1 })) : createCommentVNode("v-if", true),
|
|
12148
|
-
__props.type == `success` ? (openBlock(), createBlock(unref(CheckmarkCircle24Regular), { key: 2 })) : createCommentVNode("v-if", true),
|
|
12149
|
-
__props.type == `error` ? (openBlock(), createBlock(unref(ErrorCircle24Regular), { key: 3 })) : createCommentVNode("v-if", true),
|
|
12150
|
-
__props.type == `info` ? (openBlock(), createBlock(unref(Alert24Regular), { key: 4 })) : createCommentVNode("v-if", true)
|
|
12151
|
-
]),
|
|
12152
|
-
_: 1
|
|
12153
|
-
}, 8, ["class"])
|
|
12154
|
-
]),
|
|
12155
|
-
createElementVNode("div", _hoisted_7, [
|
|
12156
|
-
createElementVNode("main", null, [
|
|
12157
|
-
renderSlot(_ctx.$slots, "content", {}, void 0, true)
|
|
12158
|
-
]),
|
|
12159
|
-
createVNode(unref(LewButton), {
|
|
12160
|
-
style: { "margin-right": "10px" },
|
|
12161
|
-
type: "normal",
|
|
12162
|
-
size: "small",
|
|
12163
|
-
onClick: cancelFn
|
|
12164
|
-
}, {
|
|
12165
|
-
default: withCtx(() => [
|
|
12166
|
-
_hoisted_8
|
|
12167
|
-
]),
|
|
12168
|
-
_: 1
|
|
12169
|
-
}),
|
|
12170
|
-
createVNode(unref(LewButton), {
|
|
12171
|
-
size: "small",
|
|
12172
|
-
onClick: okFn
|
|
12173
|
-
}, {
|
|
12174
|
-
default: withCtx(() => [
|
|
12175
|
-
_hoisted_9
|
|
12176
|
-
]),
|
|
12177
|
-
_: 1
|
|
12178
|
-
})
|
|
12179
|
-
])
|
|
12180
|
-
])) : createCommentVNode("v-if", true)
|
|
12181
|
-
], 4)) : createCommentVNode("v-if", true)
|
|
12287
|
+
])) : createCommentVNode("v-if", true)
|
|
12288
|
+
], 4)) : createCommentVNode("v-if", true)
|
|
12289
|
+
]))
|
|
12182
12290
|
]);
|
|
12183
12291
|
};
|
|
12184
12292
|
}
|
|
@@ -12440,6 +12548,7 @@ const add = (type, title, content, delay) => {
|
|
|
12440
12548
|
`lew-notification lew-notification-${type}`
|
|
12441
12549
|
);
|
|
12442
12550
|
let timer = void 0;
|
|
12551
|
+
let lock = false;
|
|
12443
12552
|
function startTimer() {
|
|
12444
12553
|
if (delay > 0) {
|
|
12445
12554
|
({ stop: timer } = useTimeoutFn(() => {
|
|
@@ -12451,18 +12560,24 @@ const add = (type, title, content, delay) => {
|
|
|
12451
12560
|
timer == null ? void 0 : timer();
|
|
12452
12561
|
}
|
|
12453
12562
|
function handleClose() {
|
|
12563
|
+
if (lock) {
|
|
12564
|
+
return;
|
|
12565
|
+
}
|
|
12566
|
+
lock = true;
|
|
12454
12567
|
newMessage.setAttribute(
|
|
12455
12568
|
"class",
|
|
12456
12569
|
`lew-notification lew-notification-${type} lew-notification-hidden`
|
|
12457
12570
|
);
|
|
12458
12571
|
setTimeout(() => {
|
|
12459
|
-
|
|
12572
|
+
if (newMessage)
|
|
12573
|
+
LewMessageDom == null ? void 0 : LewMessageDom.removeChild(newMessage);
|
|
12460
12574
|
}, 250);
|
|
12461
12575
|
}
|
|
12462
12576
|
newMessage.children[0].children[2].addEventListener("click", handleClose);
|
|
12463
12577
|
newMessage.addEventListener("mouseenter", clearTimer);
|
|
12464
12578
|
newMessage.addEventListener("mouseleave", startTimer);
|
|
12465
12579
|
setTimeout(() => {
|
|
12580
|
+
lock = false;
|
|
12466
12581
|
newMessage.setAttribute(
|
|
12467
12582
|
"class",
|
|
12468
12583
|
`lew-notification lew-notification-${type} lew-notification-show`
|