snail.vue 2.0.4 → 2.0.6
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/README.md +2 -12
- package/dist/snail.vue.d.ts +241 -121
- package/dist/snail.vue.js +340 -327
- package/dist/snail.vue.umd.js +338 -325
- package/dist/styles/snail.vue.vue.css +18 -18
- package/package.json +11 -11
package/dist/snail.vue.umd.js
CHANGED
|
@@ -20,17 +20,13 @@
|
|
|
20
20
|
setup(__props) {
|
|
21
21
|
return (_ctx, _cache) => {
|
|
22
22
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
23
|
-
class: vue.normalizeClass(["snail-button", [
|
|
24
|
-
title:
|
|
25
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮"))])], 10, _hoisted_1$h);
|
|
23
|
+
class: vue.normalizeClass(["snail-button", [__props.size, __props.type]]),
|
|
24
|
+
title: __props.title
|
|
25
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮", -1))])], 10, _hoisted_1$h);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
31
|
-
|
|
32
|
-
addLink("/styles/snail.vue.vue.css");
|
|
33
|
-
|
|
34
30
|
function getSvgDraw(iconType, draw) {
|
|
35
31
|
switch (iconType) {
|
|
36
32
|
case "success":
|
|
@@ -93,20 +89,20 @@
|
|
|
93
89
|
const isMouseEnterRef = vue.shallowRef(false);
|
|
94
90
|
return (_ctx, _cache) => {
|
|
95
91
|
return vue.openBlock(), vue.createElementBlock("svg", {
|
|
96
|
-
class: vue.normalizeClass(["snail-icon",
|
|
92
|
+
class: vue.normalizeClass(["snail-icon", __props.type]),
|
|
97
93
|
viewBox: "0 0 1024 1024",
|
|
98
|
-
style: vue.normalizeStyle(
|
|
99
|
-
width:
|
|
100
|
-
height:
|
|
94
|
+
style: vue.normalizeStyle(__props.rotate ? `transform: rotate(${__props.rotate}deg);` : ""),
|
|
95
|
+
width: __props.size || 24,
|
|
96
|
+
height: __props.size || 24,
|
|
101
97
|
onMouseenter: _cache[0] || (_cache[0] = $event => isMouseEnterRef.value = true),
|
|
102
98
|
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
103
99
|
}, [vue.createElementVNode("title", {
|
|
104
|
-
textContent: vue.toDisplayString(
|
|
105
|
-
}, null, 8, _hoisted_2$a), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSvgDraw)(
|
|
100
|
+
textContent: vue.toDisplayString(__props.title || "")
|
|
101
|
+
}, null, 8, _hoisted_2$a), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSvgDraw)(__props.type, __props.draw), draw => {
|
|
106
102
|
return vue.openBlock(), vue.createElementBlock("path", {
|
|
107
|
-
fill: isMouseEnterRef.value ?
|
|
108
|
-
stroke:
|
|
109
|
-
"stroke-width":
|
|
103
|
+
fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
|
|
104
|
+
stroke: __props.stroke,
|
|
105
|
+
"stroke-width": __props.strokeWidth,
|
|
110
106
|
d: draw
|
|
111
107
|
}, null, 8, _hoisted_3$7);
|
|
112
108
|
}), 256))], 46, _hoisted_1$g);
|
|
@@ -178,12 +174,12 @@
|
|
|
178
174
|
}
|
|
179
175
|
return (_ctx, _cache) => {
|
|
180
176
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
181
|
-
class: vue.normalizeClass(["snail-choose", [vue.unref(type), vue.unref(mode), vue.unref(layout),
|
|
177
|
+
class: vue.normalizeClass(["snail-choose", [vue.unref(type), vue.unref(mode), vue.unref(layout), __props.readonly ? "readonly" : ""]])
|
|
182
178
|
}, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(chooseItemsRef.value, (node, index) => {
|
|
183
179
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
184
180
|
key: vue.unref(getKey)(node.item),
|
|
185
181
|
class: vue.normalizeClass(["choose-item", node.selected ? "selected" : ""]),
|
|
186
|
-
style: vue.normalizeStyle(vue.unref(snail_view.css).buildStyle(
|
|
182
|
+
style: vue.normalizeStyle(vue.unref(snail_view.css).buildStyle(__props.itemStyle)),
|
|
187
183
|
title: node.item.text,
|
|
188
184
|
onClick: $event => onItemClick(node)
|
|
189
185
|
}, [vue.unref(mode) == "native" ? (vue.openBlock(), vue.createElementBlock("input", {
|
|
@@ -197,7 +193,7 @@
|
|
|
197
193
|
key: 0,
|
|
198
194
|
type: "success",
|
|
199
195
|
size: 12,
|
|
200
|
-
color:
|
|
196
|
+
color: __props.readonly ? "#8a9099" : "white"
|
|
201
197
|
}, null, 8, ["color"])) : vue.createCommentVNode("", true)], 2)) : vue.createCommentVNode("", true), node.item.text ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
202
198
|
key: 2,
|
|
203
199
|
class: "item-text",
|
|
@@ -212,6 +208,10 @@
|
|
|
212
208
|
}
|
|
213
209
|
});
|
|
214
210
|
|
|
211
|
+
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
212
|
+
|
|
213
|
+
addLink("/styles/snail.vue.vue.css");
|
|
214
|
+
|
|
215
215
|
const _hoisted_1$e = ["id"];
|
|
216
216
|
var _sfc_main$r = vue.defineComponent({
|
|
217
217
|
__name: "datepicker",
|
|
@@ -398,20 +398,20 @@
|
|
|
398
398
|
return (_ctx, _cache) => {
|
|
399
399
|
return vue.openBlock(), vue.createElementBlock("footer", {
|
|
400
400
|
class: vue.normalizeClass(["snail-footer", {
|
|
401
|
-
"start-divider":
|
|
402
|
-
},
|
|
403
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
401
|
+
"start-divider": __props.divider
|
|
402
|
+
}, __props.align || "right"])
|
|
403
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [__props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
|
|
404
404
|
key: 0,
|
|
405
405
|
size: "max",
|
|
406
406
|
type: "default",
|
|
407
407
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
408
|
-
textContent: vue.toDisplayString(
|
|
409
|
-
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true),
|
|
408
|
+
textContent: vue.toDisplayString(__props.cancelName || "取消")
|
|
409
|
+
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), __props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
|
|
410
410
|
key: 1,
|
|
411
411
|
size: "max",
|
|
412
412
|
type: "primary",
|
|
413
413
|
onClick: _cache[1] || (_cache[1] = $event => emits("confirm")),
|
|
414
|
-
textContent: vue.toDisplayString(
|
|
414
|
+
textContent: vue.toDisplayString(__props.confirmName || "确定")
|
|
415
415
|
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true)])], 2);
|
|
416
416
|
};
|
|
417
417
|
}
|
|
@@ -450,18 +450,18 @@
|
|
|
450
450
|
const emits = __emit;
|
|
451
451
|
return (_ctx, _cache) => {
|
|
452
452
|
return vue.openBlock(), vue.createElementBlock("header", {
|
|
453
|
-
class: vue.normalizeClass(["snail-header",
|
|
454
|
-
"start-divider":
|
|
453
|
+
class: vue.normalizeClass(["snail-header", __props.useTo, {
|
|
454
|
+
"start-divider": __props.divider
|
|
455
455
|
}])
|
|
456
|
-
}, [
|
|
456
|
+
}, [__props.title != "" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
457
457
|
key: 0,
|
|
458
|
-
textContent: vue.toDisplayString(
|
|
459
|
-
class: vue.normalizeClass(["header-title",
|
|
460
|
-
}, null, 10, _hoisted_1$d)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"),
|
|
458
|
+
textContent: vue.toDisplayString(__props.title),
|
|
459
|
+
class: vue.normalizeClass(["header-title", __props.titleAlign])
|
|
460
|
+
}, null, 10, _hoisted_1$d)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
461
461
|
key: 1,
|
|
462
462
|
type: "close",
|
|
463
463
|
size: 22,
|
|
464
|
-
color:
|
|
464
|
+
color: __props.useTo == "page" ? "#2e3033" : "#464953",
|
|
465
465
|
class: "close-icon",
|
|
466
466
|
onClick: _cache[0] || (_cache[0] = $event => emits("close"))
|
|
467
467
|
}, null, 8, ["color"])) : vue.createCommentVNode("", true)], 2);
|
|
@@ -469,9 +469,94 @@
|
|
|
469
469
|
}
|
|
470
470
|
});
|
|
471
471
|
|
|
472
|
-
const _hoisted_1$c = ["
|
|
473
|
-
const
|
|
472
|
+
const _hoisted_1$c = ["textContent"];
|
|
473
|
+
const _hoisted_2$8 = {
|
|
474
|
+
key: 0,
|
|
475
|
+
class: "required",
|
|
476
|
+
textContent: "*"
|
|
477
|
+
};
|
|
478
|
+
const _hoisted_3$5 = {
|
|
479
|
+
class: "input-body"
|
|
480
|
+
};
|
|
481
|
+
const _hoisted_4$3 = ["type", "value", "readonly", "placeholder", "title"];
|
|
482
|
+
const _hoisted_5$1 = ["title"];
|
|
474
483
|
var _sfc_main$o = vue.defineComponent({
|
|
484
|
+
...{
|
|
485
|
+
name: "Input",
|
|
486
|
+
inheritAttrs: true
|
|
487
|
+
},
|
|
488
|
+
__name: "input",
|
|
489
|
+
props: vue.mergeModels({
|
|
490
|
+
readonly: {
|
|
491
|
+
type: Boolean
|
|
492
|
+
},
|
|
493
|
+
placeholder: {},
|
|
494
|
+
title: {},
|
|
495
|
+
type: {},
|
|
496
|
+
required: {
|
|
497
|
+
type: Boolean
|
|
498
|
+
},
|
|
499
|
+
titleStyle: {}
|
|
500
|
+
}, {
|
|
501
|
+
"modelValue": {
|
|
502
|
+
default: ""
|
|
503
|
+
},
|
|
504
|
+
"modelModifiers": {}
|
|
505
|
+
}),
|
|
506
|
+
emits: vue.mergeModels(["click", "change"], ["update:modelValue"]),
|
|
507
|
+
setup(__props, _ref) {
|
|
508
|
+
let {
|
|
509
|
+
emit: __emit
|
|
510
|
+
} = _ref;
|
|
511
|
+
const props = __props;
|
|
512
|
+
const emits = __emit;
|
|
513
|
+
const inputDom = vue.useTemplateRef("input-el");
|
|
514
|
+
const inputModel = vue.useModel(__props, "modelValue");
|
|
515
|
+
const validateRef = vue.shallowRef();
|
|
516
|
+
const titleStyleRef = vue.computed(() => snail_view.css.buildStyle(props.titleStyle));
|
|
517
|
+
function onValueChange() {
|
|
518
|
+
const text = inputDom.value.value || "";
|
|
519
|
+
inputModel.value = text;
|
|
520
|
+
vue.nextTick(() => emits("change", text));
|
|
521
|
+
}
|
|
522
|
+
console.warn("Input:还没实现 验证相关逻辑");
|
|
523
|
+
return (_ctx, _cache) => {
|
|
524
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
525
|
+
class: vue.normalizeClass(["snail-input", {
|
|
526
|
+
"readonly": __props.readonly
|
|
527
|
+
}])
|
|
528
|
+
}, [!!__props.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
529
|
+
key: 0,
|
|
530
|
+
class: "input-title",
|
|
531
|
+
style: vue.normalizeStyle(titleStyleRef.value)
|
|
532
|
+
}, [vue.createElementVNode("span", {
|
|
533
|
+
class: "text",
|
|
534
|
+
textContent: vue.toDisplayString(__props.title)
|
|
535
|
+
}, null, 8, _hoisted_1$c), __props.readonly != true && __props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$8)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$5, [vue.createElementVNode("input", {
|
|
536
|
+
ref: "input-el",
|
|
537
|
+
type: __props.type || "text",
|
|
538
|
+
value: inputModel.value,
|
|
539
|
+
readonly: __props.readonly == true,
|
|
540
|
+
placeholder: __props.placeholder,
|
|
541
|
+
title: inputModel.value,
|
|
542
|
+
onChange: onValueChange,
|
|
543
|
+
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
544
|
+
}, null, 40, _hoisted_4$3), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
545
|
+
key: 0,
|
|
546
|
+
class: "validate",
|
|
547
|
+
title: validateRef.value
|
|
548
|
+
}, [vue.createVNode(_sfc_main$t, {
|
|
549
|
+
type: "error",
|
|
550
|
+
size: 16,
|
|
551
|
+
color: "red"
|
|
552
|
+
})], 8, _hoisted_5$1)) : vue.createCommentVNode("", true)])], 2);
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
const _hoisted_1$b = ["placeholder", "readonly"];
|
|
558
|
+
const searchIon = "M 860.16 824.32 l -163.84 -163.84 c 102.4 -120.32 97.28 -302.08 -17.92 -414.72 c -120.32 -120.32 -314.88 -120.32 -435.2 0 c -120.32 120.32 -120.32 314.88 0 435.2 c 112.64 112.64 294.4 120.32 414.72 17.92 l 163.84 163.84 c 10.24 10.24 25.6 10.24 35.84 0 c 12.8 -12.8 12.8 -28.16 2.56 -38.4 Z M 281.6 642.56 C 181.76 542.72 181.76 381.44 281.6 281.6 c 99.84 -99.84 261.12 -99.84 360.96 0 c 99.84 99.84 99.84 261.12 0 360.96 c -99.84 102.4 -261.12 102.4 -360.96 0 Z";
|
|
559
|
+
var _sfc_main$n = vue.defineComponent({
|
|
475
560
|
...{
|
|
476
561
|
name: "Search",
|
|
477
562
|
inheritAttrs: true
|
|
@@ -509,14 +594,14 @@
|
|
|
509
594
|
}
|
|
510
595
|
return (_ctx, _cache) => {
|
|
511
596
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
512
|
-
class: vue.normalizeClass(["snail-search",
|
|
597
|
+
class: vue.normalizeClass(["snail-search", __props.readonly ? "readonly" : ""])
|
|
513
598
|
}, [vue.withDirectives(vue.createElementVNode("input", {
|
|
514
599
|
type: "search",
|
|
515
|
-
placeholder:
|
|
516
|
-
readonly:
|
|
600
|
+
placeholder: __props.placeholder,
|
|
601
|
+
readonly: __props.readonly,
|
|
517
602
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
|
|
518
603
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
519
|
-
}, null, 40, _hoisted_1$
|
|
604
|
+
}, null, 40, _hoisted_1$b), [[vue.vModelText, textModel.value, void 0, {
|
|
520
605
|
trim: true
|
|
521
606
|
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$t, {
|
|
522
607
|
class: "search-button",
|
|
@@ -739,11 +824,11 @@
|
|
|
739
824
|
}
|
|
740
825
|
}
|
|
741
826
|
|
|
742
|
-
const _hoisted_1$
|
|
827
|
+
const _hoisted_1$a = {
|
|
743
828
|
class: "snail-confirm flex-column"
|
|
744
829
|
};
|
|
745
|
-
const _hoisted_2$
|
|
746
|
-
var _sfc_main$
|
|
830
|
+
const _hoisted_2$7 = ["innerHTML"];
|
|
831
|
+
var _sfc_main$m = vue.defineComponent({
|
|
747
832
|
...{
|
|
748
833
|
name: "ConfirmContainer",
|
|
749
834
|
inheritAttrs: true
|
|
@@ -770,27 +855,27 @@
|
|
|
770
855
|
},
|
|
771
856
|
setup(__props) {
|
|
772
857
|
return (_ctx, _cache) => {
|
|
773
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
858
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createVNode(_sfc_main$p, {
|
|
774
859
|
"use-to": "dialog",
|
|
775
|
-
title:
|
|
776
|
-
onClose: _cache[0] || (_cache[0] = $event =>
|
|
860
|
+
title: __props.title || "提示",
|
|
861
|
+
onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
|
|
777
862
|
}, null, 8, ["title"]), vue.createElementVNode("div", {
|
|
778
863
|
class: "confirm-body",
|
|
779
|
-
innerHTML:
|
|
780
|
-
}, null, 8, _hoisted_2$
|
|
864
|
+
innerHTML: __props.message || "请确认?"
|
|
865
|
+
}, null, 8, _hoisted_2$7), vue.createVNode(_sfc_main$q, {
|
|
781
866
|
align: "right",
|
|
782
|
-
"cancel-name":
|
|
783
|
-
"cancel-disabled":
|
|
784
|
-
"confirm-name":
|
|
785
|
-
"confirm-disabled":
|
|
786
|
-
onCancel: _cache[1] || (_cache[1] = $event =>
|
|
787
|
-
onConfirm: _cache[2] || (_cache[2] = $event =>
|
|
867
|
+
"cancel-name": __props.cancelName,
|
|
868
|
+
"cancel-disabled": __props.cancelDisabled,
|
|
869
|
+
"confirm-name": __props.confirmName,
|
|
870
|
+
"confirm-disabled": __props.confirmDisabled,
|
|
871
|
+
onCancel: _cache[1] || (_cache[1] = $event => __props.closePopup(false)),
|
|
872
|
+
onConfirm: _cache[2] || (_cache[2] = $event => __props.closePopup(true))
|
|
788
873
|
}, null, 8, ["cancel-name", "cancel-disabled", "confirm-name", "confirm-disabled"])]);
|
|
789
874
|
};
|
|
790
875
|
}
|
|
791
876
|
});
|
|
792
877
|
|
|
793
|
-
var _sfc_main$
|
|
878
|
+
var _sfc_main$l = vue.defineComponent({
|
|
794
879
|
...{
|
|
795
880
|
name: "Loading",
|
|
796
881
|
inheritAttrs: true
|
|
@@ -815,13 +900,13 @@
|
|
|
815
900
|
setup(__props) {
|
|
816
901
|
return (_ctx, _cache) => {
|
|
817
902
|
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
818
|
-
name:
|
|
903
|
+
name: __props.transition
|
|
819
904
|
}, {
|
|
820
|
-
default: vue.withCtx(() => [
|
|
905
|
+
default: vue.withCtx(() => [__props.show ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
821
906
|
key: 0,
|
|
822
907
|
class: vue.normalizeClass(["snail-loading", {
|
|
823
|
-
"show-mask":
|
|
824
|
-
},
|
|
908
|
+
"show-mask": __props.maskDisabled != true
|
|
909
|
+
}, __props.rootClass])
|
|
825
910
|
}, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)))], 2)) : vue.createCommentVNode("", true)]),
|
|
826
911
|
_: 3
|
|
827
912
|
}, 8, ["name"]);
|
|
@@ -866,7 +951,7 @@
|
|
|
866
951
|
return Object.freeze(manager);
|
|
867
952
|
}
|
|
868
953
|
|
|
869
|
-
var _sfc_main$
|
|
954
|
+
var _sfc_main$k = vue.defineComponent({
|
|
870
955
|
...{
|
|
871
956
|
name: "Dynamic",
|
|
872
957
|
inheritAttrs: false
|
|
@@ -928,7 +1013,7 @@
|
|
|
928
1013
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(dynamicComponentRef.value), vue.mergeProps({
|
|
929
1014
|
ref_key: "componentRef",
|
|
930
1015
|
ref: componentRef
|
|
931
|
-
},
|
|
1016
|
+
}, __props.props, _ctx.$attrs), vue.createSlots({
|
|
932
1017
|
_: 2
|
|
933
1018
|
}, [vue.renderList(_ctx.$slots, (_, name) => {
|
|
934
1019
|
return {
|
|
@@ -938,7 +1023,7 @@
|
|
|
938
1023
|
})]), 1040)), dynamicErrorRef.value != void 0 ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
939
1024
|
key: 0,
|
|
940
1025
|
class: "snail-dynamic-error"
|
|
941
|
-
}, _ctx.$attrs), [_cache[0] || (_cache[0] = vue.createTextVNode(" load component error:")), vue.createElementVNode("span", null, vue.toDisplayString(dynamicErrorRef.value), 1)], 16)) : dynamicComponentRef.value == void 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1026
|
+
}, _ctx.$attrs), [_cache[0] || (_cache[0] = vue.createTextVNode(" load component error:", -1)), vue.createElementVNode("span", null, vue.toDisplayString(dynamicErrorRef.value), 1)], 16)) : dynamicComponentRef.value == void 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
942
1027
|
key: 1,
|
|
943
1028
|
show: true,
|
|
944
1029
|
"mask-disabled": true
|
|
@@ -947,7 +1032,7 @@
|
|
|
947
1032
|
}
|
|
948
1033
|
});
|
|
949
1034
|
|
|
950
|
-
var _sfc_main$
|
|
1035
|
+
var _sfc_main$j = vue.defineComponent({
|
|
951
1036
|
...{
|
|
952
1037
|
name: "DialogContainer",
|
|
953
1038
|
inheritAttrs: true
|
|
@@ -985,18 +1070,18 @@
|
|
|
985
1070
|
});
|
|
986
1071
|
return (_ctx, _cache) => {
|
|
987
1072
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
988
|
-
class: vue.normalizeClass(["snail-dialog",
|
|
1073
|
+
class: vue.normalizeClass(["snail-dialog", __props.options.rootClass, __props.popupStatus.value, __props.popupTransition.value]),
|
|
989
1074
|
style: vue.normalizeStyle({
|
|
990
|
-
"z-index":
|
|
1075
|
+
"z-index": __props.zIndex
|
|
991
1076
|
}),
|
|
992
1077
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
|
|
993
|
-
|
|
1078
|
+
__props.options.closeOnMask && vue.unref(closePopup)();
|
|
994
1079
|
}, ["self"]))
|
|
995
|
-
}, [vue.createVNode(_sfc_main$
|
|
1080
|
+
}, [vue.createVNode(_sfc_main$k, vue.mergeProps({
|
|
996
1081
|
class: "dialog-body",
|
|
997
|
-
name:
|
|
998
|
-
component:
|
|
999
|
-
url:
|
|
1082
|
+
name: __props.options.name,
|
|
1083
|
+
component: __props.options.component,
|
|
1084
|
+
url: __props.options.url,
|
|
1000
1085
|
props: vue.unref(props)
|
|
1001
1086
|
}, vue.unref(dialogExtend), {
|
|
1002
1087
|
modelValue: vue.unref(model),
|
|
@@ -1006,7 +1091,7 @@
|
|
|
1006
1091
|
}
|
|
1007
1092
|
});
|
|
1008
1093
|
|
|
1009
|
-
var _sfc_main$
|
|
1094
|
+
var _sfc_main$i = vue.defineComponent({
|
|
1010
1095
|
...{
|
|
1011
1096
|
name: "FollowContainer",
|
|
1012
1097
|
inheritAttrs: true
|
|
@@ -1119,14 +1204,14 @@
|
|
|
1119
1204
|
});
|
|
1120
1205
|
});
|
|
1121
1206
|
return (_ctx, _cache) => {
|
|
1122
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1123
|
-
class: ["snail-follow initial", [
|
|
1207
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$k, vue.mergeProps({
|
|
1208
|
+
class: ["snail-follow initial", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1124
1209
|
style: {
|
|
1125
|
-
"z-index":
|
|
1210
|
+
"z-index": __props.zIndex
|
|
1126
1211
|
},
|
|
1127
|
-
name:
|
|
1128
|
-
component:
|
|
1129
|
-
url:
|
|
1212
|
+
name: __props.options.name,
|
|
1213
|
+
component: __props.options.component,
|
|
1214
|
+
url: __props.options.url,
|
|
1130
1215
|
props: vue.unref(props)
|
|
1131
1216
|
}, vue.unref(followExt), {
|
|
1132
1217
|
modelValue: vue.unref(model),
|
|
@@ -1136,7 +1221,7 @@
|
|
|
1136
1221
|
}
|
|
1137
1222
|
});
|
|
1138
1223
|
|
|
1139
|
-
var _sfc_main$
|
|
1224
|
+
var _sfc_main$h = vue.defineComponent({
|
|
1140
1225
|
...{
|
|
1141
1226
|
name: "PopupContainer",
|
|
1142
1227
|
inheritAttrs: true
|
|
@@ -1156,16 +1241,16 @@
|
|
|
1156
1241
|
model = vue.shallowRef(void 0)
|
|
1157
1242
|
} = __props.options;
|
|
1158
1243
|
return (_ctx, _cache) => {
|
|
1159
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1160
|
-
class: ["snail-popup", [
|
|
1244
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$k, vue.mergeProps({
|
|
1245
|
+
class: ["snail-popup", [__props.popupStatus.value, __props.popupTransition.value]],
|
|
1161
1246
|
style: {
|
|
1162
|
-
"z-index":
|
|
1247
|
+
"z-index": __props.zIndex
|
|
1163
1248
|
},
|
|
1164
|
-
name:
|
|
1165
|
-
component:
|
|
1166
|
-
url:
|
|
1249
|
+
name: __props.options.name,
|
|
1250
|
+
component: __props.options.component,
|
|
1251
|
+
url: __props.options.url,
|
|
1167
1252
|
props: vue.unref(props)
|
|
1168
|
-
},
|
|
1253
|
+
}, __props.extOptions, {
|
|
1169
1254
|
modelValue: vue.unref(model),
|
|
1170
1255
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => vue.isRef(model) ? model.value = $event : null)
|
|
1171
1256
|
}), null, 16, ["class", "style", "name", "component", "url", "props", "modelValue"]);
|
|
@@ -1173,12 +1258,12 @@
|
|
|
1173
1258
|
}
|
|
1174
1259
|
});
|
|
1175
1260
|
|
|
1176
|
-
const _hoisted_1$
|
|
1261
|
+
const _hoisted_1$9 = {
|
|
1177
1262
|
key: 0,
|
|
1178
1263
|
class: "icon"
|
|
1179
1264
|
};
|
|
1180
|
-
const _hoisted_2$
|
|
1181
|
-
var _sfc_main$
|
|
1265
|
+
const _hoisted_2$6 = ["innerHTML"];
|
|
1266
|
+
var _sfc_main$g = vue.defineComponent({
|
|
1182
1267
|
...{
|
|
1183
1268
|
name: "ToastContainer",
|
|
1184
1269
|
inheritAttrs: true
|
|
@@ -1209,9 +1294,9 @@
|
|
|
1209
1294
|
vue.onMounted(() => onMouseEvent(true));
|
|
1210
1295
|
return (_ctx, _cache) => {
|
|
1211
1296
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1212
|
-
class: vue.normalizeClass(["snail-toast", [
|
|
1297
|
+
class: vue.normalizeClass(["snail-toast", [__props.popupStatus.value, __props.popupTransition.value]]),
|
|
1213
1298
|
style: vue.normalizeStyle({
|
|
1214
|
-
"z-index":
|
|
1299
|
+
"z-index": __props.zIndex
|
|
1215
1300
|
}),
|
|
1216
1301
|
onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
|
|
1217
1302
|
onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
|
|
@@ -1225,21 +1310,21 @@
|
|
|
1225
1310
|
onClick: _cache[2] || (_cache[2] = $event => {
|
|
1226
1311
|
vue.unref(closePopup)();
|
|
1227
1312
|
})
|
|
1228
|
-
}, null, 8, ["fill"]), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1313
|
+
}, null, 8, ["fill"]), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [vue.createVNode(_sfc_main$t, {
|
|
1229
1314
|
type: vue.unref(props).type,
|
|
1230
1315
|
fill: "#707070",
|
|
1231
1316
|
size: 20
|
|
1232
1317
|
}, null, 8, ["type"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
1233
1318
|
class: "message",
|
|
1234
1319
|
innerHTML: vue.unref(props).message
|
|
1235
|
-
}, null, 8, _hoisted_2$
|
|
1320
|
+
}, null, 8, _hoisted_2$6)], 38);
|
|
1236
1321
|
};
|
|
1237
1322
|
}
|
|
1238
1323
|
});
|
|
1239
1324
|
|
|
1240
1325
|
function usePopup() {
|
|
1241
1326
|
function popup(options) {
|
|
1242
|
-
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$
|
|
1327
|
+
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$h, options);
|
|
1243
1328
|
return addScope2Scopes(scope);
|
|
1244
1329
|
}
|
|
1245
1330
|
function dialog(options) {
|
|
@@ -1272,7 +1357,7 @@
|
|
|
1272
1357
|
},
|
|
1273
1358
|
onBeforeClose: fn => hook.register("onBeforeClose", fn)
|
|
1274
1359
|
});
|
|
1275
|
-
const descriptor = openPopup(_sfc_main$
|
|
1360
|
+
const descriptor = openPopup(_sfc_main$j, options, extOptions);
|
|
1276
1361
|
scope = snail_core.useAsyncScope(deferred.promise);
|
|
1277
1362
|
monitorDialog(descriptor, scope, deferred);
|
|
1278
1363
|
}
|
|
@@ -1290,14 +1375,14 @@
|
|
|
1290
1375
|
inPopup: "follow",
|
|
1291
1376
|
target
|
|
1292
1377
|
};
|
|
1293
|
-
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$
|
|
1378
|
+
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$i, options, extOptions);
|
|
1294
1379
|
}
|
|
1295
1380
|
return addScope2Scopes(scope);
|
|
1296
1381
|
}
|
|
1297
1382
|
function confirm(title, message, options) {
|
|
1298
1383
|
options = options || Object.create(null);
|
|
1299
1384
|
return dialog({
|
|
1300
|
-
component: _sfc_main$
|
|
1385
|
+
component: _sfc_main$m,
|
|
1301
1386
|
closeOnEscape: true,
|
|
1302
1387
|
props: {
|
|
1303
1388
|
...options,
|
|
@@ -1307,7 +1392,7 @@
|
|
|
1307
1392
|
});
|
|
1308
1393
|
}
|
|
1309
1394
|
function toast(type, message, options) {
|
|
1310
|
-
return popupInCustomContainer(_sfc_main$
|
|
1395
|
+
return popupInCustomContainer(_sfc_main$g, {
|
|
1311
1396
|
url: "#ToastContainer",
|
|
1312
1397
|
props: {
|
|
1313
1398
|
...(options || Object.create(null)),
|
|
@@ -1340,7 +1425,7 @@
|
|
|
1340
1425
|
},
|
|
1341
1426
|
...extOptions
|
|
1342
1427
|
});
|
|
1343
|
-
const descriptor = openPopup(container || _sfc_main$
|
|
1428
|
+
const descriptor = openPopup(container || _sfc_main$h, options, extOptions);
|
|
1344
1429
|
const scope = snail_core.useAsyncScope(deferred.promise);
|
|
1345
1430
|
scope.onDestroy(() => destroyPopup(descriptor, deferred));
|
|
1346
1431
|
return scope;
|
|
@@ -1478,12 +1563,12 @@
|
|
|
1478
1563
|
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyREREODhFQ0M5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyREREODhFREM5M0UxMUU5ODlFREVENzc4Njk0RjQ2MiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjJEREQ4OEVBQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjJEREQ4OEVCQzkzRTExRTk4OUVERUQ3Nzg2OTRGNDYyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8++keGxAAAA5lJREFUeNrsmktoE0EYx3eSTdpsk2abvnwcFBVp8QFqVPDgQaGgIogIoictelKKVhARBA8q+KAVrFqooh4qXgRfiHpTEHqw9iCKXqQHSVstpqlt0yabrP9p52K1yW72GTMf/JhZMrM7/3l+37REVVWhlMwjlJhxwVwwF8wFc8FcMBfsnIlGKg98TxRa9RbYAFYXUnl+XbjoRpiKXVXMU9qns3xK76CC/YC4QfA1MAg26aiTZGlQQ9la8AZ0g3VuENwLqsArsFVnXW+e30PgKVgGnoA+Nwi+Cw6DAHgGdmqoMwJoXJrJUcYPHoGN4C3Yl6e8rWv4Nmhma/kh2J6n/HW2JsdylLkKtoAPYAeYcPxYmmX32AjcAVHwPEfZFxreR2fAJ9Z5CbMaSYzceMxxDtN198vKo8Vt57ClYh0d4f/OtTTgOjpquaa8WEhldISM5DRYWYCXZdTS4DVoR9tSegdI9y6Nl1KBL5k/7JRto99HW/ZAtGralJ7DTtCPEUKUmqqKPlH0rtXgMZk2utms2jk0PEqPqt3gEOiybJdGjy5BcobmI7LUC7HrbRQ7HaR4PORoOBRoY+f0RbSp3spjqQNIPtEb8/vEqFMnixTwH0T6gPnwbZYIRk/uZWtHqApLQzaP7GyL1kSCPUinqIuKtjWZKhgvpFt1O82X+cXPXq9njdNHD2ZZC/aRTvZ4A20sN3OEz7IgXJDDkls8laV11aEBpHGaB62mCEbPNSA5QvNYO+88hDS6xcHABtbq9XiusMdTYJ4ZI3yBORdKZTBQ6zKnqq62OiQh7WdByzmjgqlzsWs6BAqW9xAiLHJdMECEY36f9zJ7pLt3oxHH4/j0O4kwWREoW8BuKvSYxG4utFoWjOoVHZErlg/+GP2I7ApwkgnXHy1h/VLntNJA76sROfgFI9CgoXh8OD72OJ3OHDA46Am4m3KhU7rSyJfRl2QiOaXVE3oPsU0mzPKw3RcAf5iiZEPaOkf9KsxcyVq7s1vu7SsZEQ5/LO81ydhk3I5Q05Y/tcQTExKLY/+9U2XV++PJVLMtZ7cdH0mlFfnnyPgIpm3s758y3Qj3NiNfY8sxlmeXNt2NhC/ej0grllXVdHIyVY/RbTD7G9iliZkXAIZsKqUspjjmjgolZlwwF1xigr8VoaYBI4I7ilBwl5Hw8JIwcx3aAha6XCj9t4ub4HzBjgfftLhgLpgL5oK5YC6YC+aCuWDt9luAAQC2EPxjL8cUkwAAAABJRU5ErkJggg==";
|
|
1479
1564
|
}
|
|
1480
1565
|
|
|
1481
|
-
const _hoisted_1$
|
|
1566
|
+
const _hoisted_1$8 = {
|
|
1482
1567
|
class: "snail-empty"
|
|
1483
1568
|
};
|
|
1484
|
-
const _hoisted_2$
|
|
1485
|
-
const _hoisted_3$
|
|
1486
|
-
var _sfc_main$
|
|
1569
|
+
const _hoisted_2$5 = ["src"];
|
|
1570
|
+
const _hoisted_3$4 = ["textContent"];
|
|
1571
|
+
var _sfc_main$f = vue.defineComponent({
|
|
1487
1572
|
...{
|
|
1488
1573
|
name: "Empty",
|
|
1489
1574
|
inheritAttrs: true
|
|
@@ -1496,23 +1581,23 @@
|
|
|
1496
1581
|
setup(__props) {
|
|
1497
1582
|
const defaultImageBase64 = getNoDataBase64Image();
|
|
1498
1583
|
return (_ctx, _cache) => {
|
|
1499
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1500
|
-
src:
|
|
1501
|
-
}, null, 8, _hoisted_2$
|
|
1584
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [vue.createElementVNode("img", {
|
|
1585
|
+
src: __props.imageUrl || vue.unref(defaultImageBase64)
|
|
1586
|
+
}, null, 8, _hoisted_2$5), vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createElementVNode("div", {
|
|
1502
1587
|
class: "message",
|
|
1503
|
-
textContent: vue.toDisplayString(
|
|
1504
|
-
}, null, 8, _hoisted_3$
|
|
1588
|
+
textContent: vue.toDisplayString(__props.message || "无数据")
|
|
1589
|
+
}, null, 8, _hoisted_3$4)])]);
|
|
1505
1590
|
};
|
|
1506
1591
|
}
|
|
1507
1592
|
});
|
|
1508
1593
|
|
|
1509
|
-
const _hoisted_1$
|
|
1510
|
-
const _hoisted_2$
|
|
1511
|
-
const _hoisted_3$
|
|
1594
|
+
const _hoisted_1$7 = ["title"];
|
|
1595
|
+
const _hoisted_2$4 = ["textContent"];
|
|
1596
|
+
const _hoisted_3$3 = {
|
|
1512
1597
|
key: 1,
|
|
1513
1598
|
class: "select-status"
|
|
1514
1599
|
};
|
|
1515
|
-
var _sfc_main$
|
|
1600
|
+
var _sfc_main$e = vue.defineComponent({
|
|
1516
1601
|
...{
|
|
1517
1602
|
name: "SelectNode",
|
|
1518
1603
|
inheritAttrs: true
|
|
@@ -1550,39 +1635,39 @@
|
|
|
1550
1635
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [showRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1551
1636
|
key: 0,
|
|
1552
1637
|
class: vue.normalizeClass(["select-node", classRef.value]),
|
|
1553
|
-
title:
|
|
1638
|
+
title: __props.item.text,
|
|
1554
1639
|
ref: "select-node",
|
|
1555
|
-
onMouseenter: _cache[0] || (_cache[0] = $event => emits("enter", rootDom.value,
|
|
1556
|
-
onClick: _cache[1] || (_cache[1] = () => emits("click",
|
|
1640
|
+
onMouseenter: _cache[0] || (_cache[0] = $event => emits("enter", rootDom.value, __props.item)),
|
|
1641
|
+
onClick: _cache[1] || (_cache[1] = () => emits("click", __props.item))
|
|
1557
1642
|
}, [vue.createElementVNode("div", {
|
|
1558
1643
|
class: "item-text ellipsis",
|
|
1559
|
-
textContent: vue.toDisplayString(
|
|
1560
|
-
}, null, 8, _hoisted_2$
|
|
1644
|
+
textContent: vue.toDisplayString(__props.item.text)
|
|
1645
|
+
}, null, 8, _hoisted_2$4), __props.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
1561
1646
|
key: 0,
|
|
1562
1647
|
type: "arrow",
|
|
1563
1648
|
color: "#8a9099"
|
|
1564
|
-
})) :
|
|
1649
|
+
})) : __props.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [vue.createVNode(_sfc_main$t, {
|
|
1565
1650
|
type: "success",
|
|
1566
1651
|
color: "white",
|
|
1567
1652
|
size: 12
|
|
1568
|
-
})])) : vue.createCommentVNode("", true)], 42, _hoisted_1$
|
|
1653
|
+
})])) : vue.createCommentVNode("", true)], 42, _hoisted_1$7)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
1569
1654
|
key: 1
|
|
1570
1655
|
}, vue.renderList(vue.unref(showChildrenRef), child => {
|
|
1571
1656
|
return vue.openBlock(), vue.createBlock(_component_SelectNode, {
|
|
1572
|
-
key:
|
|
1573
|
-
multiple:
|
|
1657
|
+
key: __props.context.getKey(child),
|
|
1658
|
+
multiple: __props.multiple,
|
|
1574
1659
|
item: child,
|
|
1575
|
-
context:
|
|
1660
|
+
context: __props.context,
|
|
1576
1661
|
"show-children": false,
|
|
1577
|
-
onEnter: el => emits("enter", el, child,
|
|
1578
|
-
onClick: $event => emits("click", child,
|
|
1662
|
+
onEnter: el => emits("enter", el, child, __props.item),
|
|
1663
|
+
onClick: $event => emits("click", child, __props.item)
|
|
1579
1664
|
}, null, 8, ["multiple", "item", "context", "onEnter", "onClick"]);
|
|
1580
1665
|
}), 128)) : vue.createCommentVNode("", true)], 64);
|
|
1581
1666
|
};
|
|
1582
1667
|
}
|
|
1583
1668
|
});
|
|
1584
1669
|
|
|
1585
|
-
var _sfc_main$
|
|
1670
|
+
var _sfc_main$d = vue.defineComponent({
|
|
1586
1671
|
...{
|
|
1587
1672
|
name: "Select2Popup",
|
|
1588
1673
|
inheritAttrs: true
|
|
@@ -1747,29 +1832,29 @@
|
|
|
1747
1832
|
return (_ctx, _cache) => {
|
|
1748
1833
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1749
1834
|
class: vue.normalizeClass(["snail-select-popup", classRef.value]),
|
|
1750
|
-
style: vue.normalizeStyle(
|
|
1835
|
+
style: vue.normalizeStyle(__props.popupStyle),
|
|
1751
1836
|
onMouseenter: onEnterPopup,
|
|
1752
1837
|
onMouseleave: onLeavePopup
|
|
1753
1838
|
}, [classRef.value["child-popup"] && classRef.value["placeholder"] ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1754
1839
|
key: 0
|
|
1755
1840
|
}, [vue.createTextVNode(" 暂无选项 ")], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1756
1841
|
key: 1
|
|
1757
|
-
}, [
|
|
1842
|
+
}, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$n, vue.mergeProps({
|
|
1758
1843
|
key: 0
|
|
1759
|
-
},
|
|
1844
|
+
}, __props.search, {
|
|
1760
1845
|
onSearch,
|
|
1761
1846
|
key: "select-search"
|
|
1762
1847
|
}), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
|
|
1763
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1848
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$e, {
|
|
1764
1849
|
key: vue.unref(context).getKey(item),
|
|
1765
|
-
multiple:
|
|
1850
|
+
multiple: __props.multiple,
|
|
1766
1851
|
item,
|
|
1767
1852
|
context: vue.unref(context),
|
|
1768
1853
|
"show-children": true,
|
|
1769
1854
|
onEnter: onEnterSelectNode,
|
|
1770
1855
|
onClick: onClickSelectNode
|
|
1771
1856
|
}, null, 8, ["multiple", "item", "context"]);
|
|
1772
|
-
}), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1857
|
+
}), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
|
|
1773
1858
|
key: 1,
|
|
1774
1859
|
message: "无结果"
|
|
1775
1860
|
})) : vue.createCommentVNode("", true), showClearButtonRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -1781,20 +1866,20 @@
|
|
|
1781
1866
|
}
|
|
1782
1867
|
});
|
|
1783
1868
|
|
|
1784
|
-
const _hoisted_1$
|
|
1869
|
+
const _hoisted_1$6 = {
|
|
1785
1870
|
key: 0,
|
|
1786
1871
|
class: "select-result"
|
|
1787
1872
|
};
|
|
1788
|
-
const _hoisted_2$
|
|
1789
|
-
const _hoisted_3$
|
|
1790
|
-
const _hoisted_4$
|
|
1873
|
+
const _hoisted_2$3 = ["title", "textContent"];
|
|
1874
|
+
const _hoisted_3$2 = ["textContent"];
|
|
1875
|
+
const _hoisted_4$2 = {
|
|
1791
1876
|
key: 1,
|
|
1792
1877
|
class: "placeholder"
|
|
1793
1878
|
};
|
|
1794
1879
|
onAppCreated((app, type) => {
|
|
1795
|
-
type == "popup" && app.component("SelectPopup", _sfc_main$
|
|
1880
|
+
type == "popup" && app.component("SelectPopup", _sfc_main$d);
|
|
1796
1881
|
});
|
|
1797
|
-
var _sfc_main$
|
|
1882
|
+
var _sfc_main$c = vue.defineComponent({
|
|
1798
1883
|
...{
|
|
1799
1884
|
name: "Select",
|
|
1800
1885
|
inheritAttrs: true
|
|
@@ -1919,22 +2004,22 @@
|
|
|
1919
2004
|
return (_ctx, _cache) => {
|
|
1920
2005
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1921
2006
|
class: vue.normalizeClass(["snail-select", {
|
|
1922
|
-
"readonly":
|
|
1923
|
-
"empty": !(
|
|
2007
|
+
"readonly": __props.readonly,
|
|
2008
|
+
"empty": !(__props.items && __props.items.length)
|
|
1924
2009
|
}]),
|
|
1925
2010
|
onClick: _cache[0] || (_cache[0] = $event => onClick()),
|
|
1926
2011
|
ref: "select"
|
|
1927
|
-
}, [
|
|
2012
|
+
}, [__props.items && __props.items.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1928
2013
|
key: 0
|
|
1929
|
-
}, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2014
|
+
}, [selectedItemsRef.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))), () => [vue.createElementVNode("div", {
|
|
1930
2015
|
class: "select-text ellipsis",
|
|
1931
2016
|
title: selectedTextRef.value,
|
|
1932
2017
|
textContent: vue.toDisplayString(selectedTextRef.value)
|
|
1933
|
-
}, null, 8, _hoisted_2$
|
|
2018
|
+
}, null, 8, _hoisted_2$3)])])) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
1934
2019
|
key: 1,
|
|
1935
2020
|
class: "placeholder",
|
|
1936
|
-
textContent: vue.toDisplayString(
|
|
1937
|
-
}, null, 8, _hoisted_3$
|
|
2021
|
+
textContent: vue.toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
|
|
2022
|
+
}, null, 8, _hoisted_3$2)), __props.readonly != true ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
1938
2023
|
key: 2,
|
|
1939
2024
|
type: "arrow",
|
|
1940
2025
|
size: 24,
|
|
@@ -1942,12 +2027,12 @@
|
|
|
1942
2027
|
style: {
|
|
1943
2028
|
"transform": "rotate(90deg)"
|
|
1944
2029
|
}
|
|
1945
|
-
})) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
2030
|
+
})) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, "暂无可选项"))], 2);
|
|
1946
2031
|
};
|
|
1947
2032
|
}
|
|
1948
2033
|
});
|
|
1949
2034
|
|
|
1950
|
-
var _sfc_main$
|
|
2035
|
+
var _sfc_main$b = vue.defineComponent({
|
|
1951
2036
|
...{
|
|
1952
2037
|
name: "Switch",
|
|
1953
2038
|
inheritAttrs: true
|
|
@@ -1983,33 +2068,33 @@
|
|
|
1983
2068
|
}
|
|
1984
2069
|
return (_ctx, _cache) => {
|
|
1985
2070
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1986
|
-
class: vue.normalizeClass(["snail-switch", [switchModel.value ? "on" : "off",
|
|
2071
|
+
class: vue.normalizeClass(["snail-switch", [switchModel.value ? "on" : "off", __props.readonly ? "readonly" : ""]]),
|
|
1987
2072
|
onClick: onSwitchChange
|
|
1988
|
-
}, _cache[0] || (_cache[0] = [vue.createElementVNode("div", {
|
|
2073
|
+
}, [...(_cache[0] || (_cache[0] = [vue.createElementVNode("div", {
|
|
1989
2074
|
class: "on"
|
|
1990
2075
|
}, null, -1), vue.createElementVNode("div", {
|
|
1991
2076
|
class: "off"
|
|
1992
2077
|
}, null, -1), vue.createElementVNode("div", {
|
|
1993
2078
|
class: "status"
|
|
1994
|
-
}, null, -1)]), 2);
|
|
2079
|
+
}, null, -1)]))], 2);
|
|
1995
2080
|
};
|
|
1996
2081
|
}
|
|
1997
2082
|
});
|
|
1998
2083
|
|
|
1999
|
-
const _hoisted_1$
|
|
2084
|
+
const _hoisted_1$5 = {
|
|
2000
2085
|
class: "fold-header"
|
|
2001
2086
|
};
|
|
2002
|
-
const _hoisted_2$
|
|
2003
|
-
const _hoisted_3$
|
|
2004
|
-
const _hoisted_4$
|
|
2087
|
+
const _hoisted_2$2 = ["textContent"];
|
|
2088
|
+
const _hoisted_3$1 = ["textContent"];
|
|
2089
|
+
const _hoisted_4$1 = {
|
|
2005
2090
|
key: 1,
|
|
2006
2091
|
class: "status"
|
|
2007
2092
|
};
|
|
2008
|
-
const _hoisted_5
|
|
2093
|
+
const _hoisted_5 = {
|
|
2009
2094
|
class: "fold-body",
|
|
2010
2095
|
ref: "foldBody"
|
|
2011
2096
|
};
|
|
2012
|
-
var _sfc_main$
|
|
2097
|
+
var _sfc_main$a = vue.defineComponent({
|
|
2013
2098
|
...{
|
|
2014
2099
|
name: "Fold",
|
|
2015
2100
|
inheritAttrs: true
|
|
@@ -2079,23 +2164,23 @@
|
|
|
2079
2164
|
return (_ctx, _cache) => {
|
|
2080
2165
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2081
2166
|
class: vue.normalizeClass(["snail-fold", statusModel.value])
|
|
2082
|
-
}, [vue.createElementVNode("div", _hoisted_1$
|
|
2167
|
+
}, [vue.createElementVNode("div", _hoisted_1$5, [vue.renderSlot(_ctx.$slots, "header", {}, () => [vue.createElementVNode("div", {
|
|
2083
2168
|
class: "title ellipsis",
|
|
2084
|
-
textContent: vue.toDisplayString(
|
|
2085
|
-
}, null, 8, _hoisted_2$
|
|
2169
|
+
textContent: vue.toDisplayString(__props.title)
|
|
2170
|
+
}, null, 8, _hoisted_2$2), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2086
2171
|
key: 0,
|
|
2087
2172
|
class: "subtitle ellipsis",
|
|
2088
|
-
textContent: vue.toDisplayString(
|
|
2089
|
-
}, null, 8, _hoisted_3$
|
|
2173
|
+
textContent: vue.toDisplayString(__props.subtitle)
|
|
2174
|
+
}, null, 8, _hoisted_3$1)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [vue.createVNode(_sfc_main$t, {
|
|
2090
2175
|
type: "arrow",
|
|
2091
2176
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
2092
2177
|
onClick: onStatusClick
|
|
2093
|
-
}, null, 8, ["title"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5
|
|
2178
|
+
}, null, 8, ["title"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_5, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
|
|
2094
2179
|
};
|
|
2095
2180
|
}
|
|
2096
2181
|
});
|
|
2097
2182
|
|
|
2098
|
-
var _sfc_main$
|
|
2183
|
+
var _sfc_main$9 = vue.defineComponent({
|
|
2099
2184
|
...{
|
|
2100
2185
|
name: "Scroll",
|
|
2101
2186
|
inheritAttrs: true
|
|
@@ -2212,15 +2297,15 @@
|
|
|
2212
2297
|
}
|
|
2213
2298
|
});
|
|
2214
2299
|
|
|
2215
|
-
const _hoisted_1$
|
|
2300
|
+
const _hoisted_1$4 = {
|
|
2216
2301
|
key: 0,
|
|
2217
2302
|
class: "layout-start"
|
|
2218
2303
|
};
|
|
2219
|
-
const _hoisted_2$
|
|
2304
|
+
const _hoisted_2$1 = {
|
|
2220
2305
|
key: 1,
|
|
2221
2306
|
class: "layout-end"
|
|
2222
2307
|
};
|
|
2223
|
-
var _sfc_main$
|
|
2308
|
+
var _sfc_main$8 = vue.defineComponent({
|
|
2224
2309
|
__name: "layout",
|
|
2225
2310
|
props: {
|
|
2226
2311
|
mode: {},
|
|
@@ -2229,27 +2314,24 @@
|
|
|
2229
2314
|
setup(__props) {
|
|
2230
2315
|
return (_ctx, _cache) => {
|
|
2231
2316
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2232
|
-
class: vue.normalizeClass(["snail-layout",
|
|
2233
|
-
}, [_ctx.$slots.start ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2317
|
+
class: vue.normalizeClass(["snail-layout", __props.mode])
|
|
2318
|
+
}, [_ctx.$slots.start ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [vue.renderSlot(_ctx.$slots, "start")])) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$9, vue.mergeProps({
|
|
2234
2319
|
class: "layout-body"
|
|
2235
|
-
},
|
|
2320
|
+
}, __props.scroll), {
|
|
2236
2321
|
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
2237
2322
|
_: 3
|
|
2238
|
-
}, 16), _ctx.$slots.end ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
2323
|
+
}, 16), _ctx.$slots.end ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "end")])) : vue.createCommentVNode("", true)], 2);
|
|
2239
2324
|
};
|
|
2240
2325
|
}
|
|
2241
2326
|
});
|
|
2242
2327
|
|
|
2243
|
-
var _sfc_main$
|
|
2328
|
+
var _sfc_main$7 = vue.defineComponent({
|
|
2244
2329
|
...{
|
|
2245
2330
|
name: "Sort",
|
|
2246
2331
|
inheritAttrs: true
|
|
2247
2332
|
},
|
|
2248
2333
|
__name: "sort",
|
|
2249
2334
|
props: {
|
|
2250
|
-
disabled: {
|
|
2251
|
-
type: Boolean
|
|
2252
|
-
},
|
|
2253
2335
|
changer: {},
|
|
2254
2336
|
draggable: {},
|
|
2255
2337
|
handle: {},
|
|
@@ -2257,9 +2339,15 @@
|
|
|
2257
2339
|
ghostClass: {},
|
|
2258
2340
|
filter: {},
|
|
2259
2341
|
group: {},
|
|
2260
|
-
animation: {}
|
|
2342
|
+
animation: {},
|
|
2343
|
+
disabled: {
|
|
2344
|
+
type: Boolean
|
|
2345
|
+
},
|
|
2346
|
+
sortDisabled: {
|
|
2347
|
+
type: Boolean
|
|
2348
|
+
}
|
|
2261
2349
|
},
|
|
2262
|
-
emits: ["update"],
|
|
2350
|
+
emits: ["start", "add", "remove", "end", "update"],
|
|
2263
2351
|
setup(__props, _ref) {
|
|
2264
2352
|
let {
|
|
2265
2353
|
emit: __emit
|
|
@@ -2283,8 +2371,16 @@
|
|
|
2283
2371
|
}
|
|
2284
2372
|
if (props.disabled != true && MODULE_Sortable != void 0) {
|
|
2285
2373
|
sortPanel.classList.add("sortable");
|
|
2374
|
+
const group = {
|
|
2375
|
+
name: void 0,
|
|
2376
|
+
pull: true,
|
|
2377
|
+
put: true
|
|
2378
|
+
};
|
|
2379
|
+
snail_core.isStringNotEmpty(props.group) ? group.name = props.group : snail_core.isObject(props.group) && Object.assign(group, props.group);
|
|
2380
|
+
group.name || (group.name = snail_core.newId());
|
|
2286
2381
|
sortInstance = new MODULE_Sortable(sortPanel, {
|
|
2287
|
-
group
|
|
2382
|
+
group,
|
|
2383
|
+
sort: props.sortDisabled != true,
|
|
2288
2384
|
draggable: props.draggable,
|
|
2289
2385
|
dragClass: props.dragClass || "snail-sort-drag",
|
|
2290
2386
|
ghostClass: props.ghostClass || "snail-sort-ghost",
|
|
@@ -2294,9 +2390,11 @@
|
|
|
2294
2390
|
animation: props.animation > 0 ? props.animation : 150,
|
|
2295
2391
|
forceFallback: true,
|
|
2296
2392
|
fallbackTolerance: 2,
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2393
|
+
onStart: evt => emits("start", evt),
|
|
2394
|
+
onAdd: evt => emits("add", evt),
|
|
2395
|
+
onRemove: evt => emits("remove", evt),
|
|
2396
|
+
onEnd: evt => emits("add", evt),
|
|
2397
|
+
onUpdate: evt => emits("update", evt.oldIndex, evt.newIndex)
|
|
2300
2398
|
});
|
|
2301
2399
|
}
|
|
2302
2400
|
}
|
|
@@ -2319,10 +2417,10 @@
|
|
|
2319
2417
|
}
|
|
2320
2418
|
});
|
|
2321
2419
|
|
|
2322
|
-
const _hoisted_1$
|
|
2420
|
+
const _hoisted_1$3 = {
|
|
2323
2421
|
class: "table-body"
|
|
2324
2422
|
};
|
|
2325
|
-
var _sfc_main$
|
|
2423
|
+
var _sfc_main$6 = vue.defineComponent({
|
|
2326
2424
|
...{
|
|
2327
2425
|
name: "Table",
|
|
2328
2426
|
inheritAttrs: true
|
|
@@ -2346,17 +2444,17 @@
|
|
|
2346
2444
|
const hStyleRef = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
|
|
2347
2445
|
const fStyleRef = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
|
|
2348
2446
|
return (_ctx, _cache) => {
|
|
2349
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2447
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$9, {
|
|
2350
2448
|
class: vue.normalizeClass(["snail-table", {
|
|
2351
|
-
"start-border":
|
|
2449
|
+
"start-border": __props.border == true
|
|
2352
2450
|
}]),
|
|
2353
|
-
"scroll-x":
|
|
2354
|
-
"scroll-y":
|
|
2451
|
+
"scroll-x": __props.scrollX,
|
|
2452
|
+
"scroll-y": __props.scrollY
|
|
2355
2453
|
}, {
|
|
2356
2454
|
default: vue.withCtx(() => [vue.createElementVNode("div", {
|
|
2357
2455
|
class: "table-header",
|
|
2358
2456
|
style: vue.normalizeStyle(hStyleRef.value)
|
|
2359
|
-
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$
|
|
2457
|
+
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$3, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
|
|
2360
2458
|
class: "table-footer",
|
|
2361
2459
|
style: vue.normalizeStyle(fStyleRef.value)
|
|
2362
2460
|
}, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
@@ -2366,7 +2464,7 @@
|
|
|
2366
2464
|
}
|
|
2367
2465
|
});
|
|
2368
2466
|
|
|
2369
|
-
var _sfc_main$
|
|
2467
|
+
var _sfc_main$5 = vue.defineComponent({
|
|
2370
2468
|
...{
|
|
2371
2469
|
name: "TableRow",
|
|
2372
2470
|
inheritAttrs: true
|
|
@@ -2389,7 +2487,7 @@
|
|
|
2389
2487
|
}
|
|
2390
2488
|
});
|
|
2391
2489
|
|
|
2392
|
-
var _sfc_main$
|
|
2490
|
+
var _sfc_main$4 = vue.defineComponent({
|
|
2393
2491
|
...{
|
|
2394
2492
|
name: "TableCol",
|
|
2395
2493
|
inheritAttrs: true
|
|
@@ -2428,27 +2526,27 @@
|
|
|
2428
2526
|
const styleRef = vue.computed(() => snail_view.css.buildStyle(props));
|
|
2429
2527
|
return (_ctx, _cache) => {
|
|
2430
2528
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2431
|
-
class: vue.normalizeClass(["table-col",
|
|
2529
|
+
class: vue.normalizeClass(["table-col", __props.textAlign]),
|
|
2432
2530
|
style: vue.normalizeStyle(styleRef.value)
|
|
2433
2531
|
}, [vue.renderSlot(_ctx.$slots, "default")], 6);
|
|
2434
2532
|
};
|
|
2435
2533
|
}
|
|
2436
2534
|
});
|
|
2437
2535
|
|
|
2438
|
-
const _hoisted_1$
|
|
2536
|
+
const _hoisted_1$2 = {
|
|
2439
2537
|
key: 0,
|
|
2440
2538
|
class: "node-fold"
|
|
2441
2539
|
};
|
|
2442
|
-
const _hoisted_2
|
|
2443
|
-
const _hoisted_3
|
|
2540
|
+
const _hoisted_2 = ["title", "textContent"];
|
|
2541
|
+
const _hoisted_3 = {
|
|
2444
2542
|
class: "node-slot ellipsis"
|
|
2445
2543
|
};
|
|
2446
|
-
const _hoisted_4
|
|
2544
|
+
const _hoisted_4 = {
|
|
2447
2545
|
key: 1,
|
|
2448
2546
|
class: "snail-tree-children hidden",
|
|
2449
2547
|
ref: "children"
|
|
2450
2548
|
};
|
|
2451
|
-
var _sfc_main$
|
|
2549
|
+
var _sfc_main$3 = vue.defineComponent({
|
|
2452
2550
|
...{
|
|
2453
2551
|
name: "TreeNode",
|
|
2454
2552
|
inheritAttrs: true
|
|
@@ -2554,19 +2652,19 @@
|
|
|
2554
2652
|
const _component_TreeNode = vue.resolveComponent("TreeNode", true);
|
|
2555
2653
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [showRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2556
2654
|
key: 0,
|
|
2557
|
-
class: vue.normalizeClass(["snail-tree-node",
|
|
2655
|
+
class: vue.normalizeClass(["snail-tree-node", __props.node.clickable ? "clickable" : "", `level-${__props.level}`]),
|
|
2558
2656
|
ref: "tree-node",
|
|
2559
2657
|
onMouseenter: _cache[0] || (_cache[0] = $event => isHoveredRef.value = true),
|
|
2560
2658
|
onMouseleave: _cache[1] || (_cache[1] = $event => isHoveredRef.value = false),
|
|
2561
|
-
onClick: _cache[2] || (_cache[2] = $event => onNodeClick(
|
|
2659
|
+
onClick: _cache[2] || (_cache[2] = $event => onNodeClick(__props.node)),
|
|
2562
2660
|
onDblclick: onNodeDoubleClick
|
|
2563
|
-
}, [
|
|
2661
|
+
}, [__props.options.rewrite == true ? vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.mergeProps({
|
|
2564
2662
|
key: 0
|
|
2565
2663
|
}, vue.unref(slotOptions)))) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2566
2664
|
key: 1
|
|
2567
2665
|
}, [_cache[4] || (_cache[4] = vue.createElementVNode("div", {
|
|
2568
2666
|
class: "indent"
|
|
2569
|
-
}, null, -1)),
|
|
2667
|
+
}, null, -1)), __props.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
2570
2668
|
key: 0,
|
|
2571
2669
|
class: vue.normalizeClass(statusRef.value),
|
|
2572
2670
|
type: "custom",
|
|
@@ -2576,32 +2674,32 @@
|
|
|
2576
2674
|
onClick: toggleFold
|
|
2577
2675
|
}, null, 8, ["class"])) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
|
|
2578
2676
|
class: "node-text ellipsis",
|
|
2579
|
-
title:
|
|
2580
|
-
textContent: vue.toDisplayString(
|
|
2581
|
-
}, null, 8, _hoisted_2
|
|
2677
|
+
title: __props.node.text,
|
|
2678
|
+
textContent: vue.toDisplayString(__props.node.text)
|
|
2679
|
+
}, null, 8, _hoisted_2), vue.createElementVNode("div", _hoisted_3, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 34)) : vue.createCommentVNode("", true), showRef.value && showChildrenRef.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.node.children, child => {
|
|
2582
2680
|
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
2583
|
-
key:
|
|
2681
|
+
key: __props.context.getKey(child),
|
|
2584
2682
|
node: child,
|
|
2585
|
-
parent:
|
|
2683
|
+
parent: __props.node,
|
|
2586
2684
|
level: nextLevel,
|
|
2587
|
-
options:
|
|
2588
|
-
context:
|
|
2685
|
+
options: __props.options,
|
|
2686
|
+
context: __props.context,
|
|
2589
2687
|
onClick: _cache[3] || (_cache[3] = (node, parents) => onChildNodeClick(node, parents))
|
|
2590
2688
|
}, {
|
|
2591
2689
|
default: vue.withCtx(slotProps => [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
2592
2690
|
ref_for: true
|
|
2593
2691
|
}, slotProps))]),
|
|
2594
|
-
_:
|
|
2595
|
-
},
|
|
2692
|
+
_: 3
|
|
2693
|
+
}, 8, ["node", "parent", "options", "context"]);
|
|
2596
2694
|
}), 128))], 512)) : vue.createCommentVNode("", true)], 64);
|
|
2597
2695
|
};
|
|
2598
2696
|
}
|
|
2599
2697
|
});
|
|
2600
2698
|
|
|
2601
|
-
const _hoisted_1$
|
|
2699
|
+
const _hoisted_1$1 = {
|
|
2602
2700
|
class: "snail-tree"
|
|
2603
2701
|
};
|
|
2604
|
-
var _sfc_main$
|
|
2702
|
+
var _sfc_main$2 = vue.defineComponent({
|
|
2605
2703
|
...{
|
|
2606
2704
|
name: "Tree",
|
|
2607
2705
|
inheritAttrs: true
|
|
@@ -2635,28 +2733,28 @@
|
|
|
2635
2733
|
emits("click", node, parents);
|
|
2636
2734
|
}
|
|
2637
2735
|
return (_ctx, _cache) => {
|
|
2638
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2736
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [__props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$n, vue.mergeProps({
|
|
2639
2737
|
key: 0
|
|
2640
|
-
},
|
|
2738
|
+
}, __props.search, {
|
|
2641
2739
|
onSearch
|
|
2642
|
-
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
2740
|
+
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$9, {
|
|
2643
2741
|
"scroll-y": true
|
|
2644
2742
|
}, {
|
|
2645
|
-
default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
2646
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2743
|
+
default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.nodes || [], node => {
|
|
2744
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$3, {
|
|
2647
2745
|
key: vue.unref(context).getKey(node),
|
|
2648
2746
|
node,
|
|
2649
2747
|
parent: void 0,
|
|
2650
2748
|
level: 1,
|
|
2651
|
-
options:
|
|
2749
|
+
options: __props.nodeOptions,
|
|
2652
2750
|
context: vue.unref(context),
|
|
2653
2751
|
onClick: onTreeNodeClick
|
|
2654
2752
|
}, {
|
|
2655
2753
|
default: vue.withCtx(slotProps => [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
2656
2754
|
ref_for: true
|
|
2657
2755
|
}, slotProps))]),
|
|
2658
|
-
_:
|
|
2659
|
-
},
|
|
2756
|
+
_: 3
|
|
2757
|
+
}, 8, ["node", "options", "context"]);
|
|
2660
2758
|
}), 128))]),
|
|
2661
2759
|
_: 3
|
|
2662
2760
|
})]);
|
|
@@ -2664,7 +2762,7 @@
|
|
|
2664
2762
|
}
|
|
2665
2763
|
});
|
|
2666
2764
|
|
|
2667
|
-
var _sfc_main$
|
|
2765
|
+
var _sfc_main$1 = vue.defineComponent({
|
|
2668
2766
|
__name: "wrapper",
|
|
2669
2767
|
props: {
|
|
2670
2768
|
readonly: {
|
|
@@ -2685,25 +2783,25 @@
|
|
|
2685
2783
|
const emits = __emit;
|
|
2686
2784
|
return (_ctx, _cache) => {
|
|
2687
2785
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2688
|
-
class: vue.normalizeClass(["snail-wrapper",
|
|
2689
|
-
}, [
|
|
2786
|
+
class: vue.normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
|
|
2787
|
+
}, [__props.header && __props.header.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$p, vue.mergeProps({
|
|
2690
2788
|
key: 0
|
|
2691
|
-
},
|
|
2789
|
+
}, __props.header || {
|
|
2692
2790
|
useTo: "dialog",
|
|
2693
2791
|
title: "对话框"
|
|
2694
2792
|
}, {
|
|
2695
2793
|
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
2696
|
-
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$
|
|
2794
|
+
}), null, 16)) : vue.createCommentVNode("", true), vue.createVNode(_sfc_main$9, vue.mergeProps({
|
|
2697
2795
|
class: "wrapper-body"
|
|
2698
|
-
},
|
|
2796
|
+
}, __props.content || {
|
|
2699
2797
|
scrollX: false,
|
|
2700
2798
|
scrollY: false
|
|
2701
2799
|
}), {
|
|
2702
2800
|
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
2703
2801
|
_: 3
|
|
2704
|
-
}, 16),
|
|
2802
|
+
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$q, vue.mergeProps({
|
|
2705
2803
|
key: 1
|
|
2706
|
-
},
|
|
2804
|
+
}, __props.footer || {}, {
|
|
2707
2805
|
onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
|
|
2708
2806
|
onConfirm: _cache[2] || (_cache[2] = $event => emits("confirm"))
|
|
2709
2807
|
}), null, 16)) : vue.createCommentVNode("", true)], 2);
|
|
@@ -2715,7 +2813,7 @@
|
|
|
2715
2813
|
snail_core.mustObject(options, "options");
|
|
2716
2814
|
target instanceof HTMLElement || snail_core.throwError("target must be a HTMLElement");
|
|
2717
2815
|
target.classList.add("snail-app");
|
|
2718
|
-
const app = vue.createApp(_sfc_main$
|
|
2816
|
+
const app = vue.createApp(_sfc_main$k, options);
|
|
2719
2817
|
triggerAppCreated(app);
|
|
2720
2818
|
app.mount(target);
|
|
2721
2819
|
const scope = snail_core.useScope().onDestroy(() => app.unmount());
|
|
@@ -2723,91 +2821,6 @@
|
|
|
2723
2821
|
return scope;
|
|
2724
2822
|
}
|
|
2725
2823
|
|
|
2726
|
-
const _hoisted_1$1 = ["textContent"];
|
|
2727
|
-
const _hoisted_2 = {
|
|
2728
|
-
key: 0,
|
|
2729
|
-
class: "required",
|
|
2730
|
-
textContent: "*"
|
|
2731
|
-
};
|
|
2732
|
-
const _hoisted_3 = {
|
|
2733
|
-
class: "input-body"
|
|
2734
|
-
};
|
|
2735
|
-
const _hoisted_4 = ["type", "value", "readonly", "placeholder", "title"];
|
|
2736
|
-
const _hoisted_5 = ["title"];
|
|
2737
|
-
var _sfc_main$1 = vue.defineComponent({
|
|
2738
|
-
...{
|
|
2739
|
-
name: "Input",
|
|
2740
|
-
inheritAttrs: true
|
|
2741
|
-
},
|
|
2742
|
-
__name: "input",
|
|
2743
|
-
props: vue.mergeModels({
|
|
2744
|
-
readonly: {
|
|
2745
|
-
type: Boolean
|
|
2746
|
-
},
|
|
2747
|
-
placeholder: {},
|
|
2748
|
-
title: {},
|
|
2749
|
-
type: {},
|
|
2750
|
-
required: {
|
|
2751
|
-
type: Boolean
|
|
2752
|
-
},
|
|
2753
|
-
titleStyle: {}
|
|
2754
|
-
}, {
|
|
2755
|
-
"modelValue": {
|
|
2756
|
-
default: ""
|
|
2757
|
-
},
|
|
2758
|
-
"modelModifiers": {}
|
|
2759
|
-
}),
|
|
2760
|
-
emits: vue.mergeModels(["click", "change"], ["update:modelValue"]),
|
|
2761
|
-
setup(__props, _ref) {
|
|
2762
|
-
let {
|
|
2763
|
-
emit: __emit
|
|
2764
|
-
} = _ref;
|
|
2765
|
-
const props = __props;
|
|
2766
|
-
const emits = __emit;
|
|
2767
|
-
const inputDom = vue.useTemplateRef("input-el");
|
|
2768
|
-
const inputModel = vue.useModel(__props, "modelValue");
|
|
2769
|
-
const validateRef = vue.shallowRef();
|
|
2770
|
-
const titleStyleRef = vue.computed(() => snail_view.css.buildStyle(props.titleStyle));
|
|
2771
|
-
function onValueChange() {
|
|
2772
|
-
const text = inputDom.value.value || "";
|
|
2773
|
-
inputModel.value = text;
|
|
2774
|
-
vue.nextTick(() => emits("change", text));
|
|
2775
|
-
}
|
|
2776
|
-
console.warn("Input:还没实现 验证相关逻辑");
|
|
2777
|
-
return (_ctx, _cache) => {
|
|
2778
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2779
|
-
class: vue.normalizeClass(["snail-input", {
|
|
2780
|
-
"readonly": _ctx.readonly
|
|
2781
|
-
}])
|
|
2782
|
-
}, [!!_ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2783
|
-
key: 0,
|
|
2784
|
-
class: "input-title",
|
|
2785
|
-
style: vue.normalizeStyle(titleStyleRef.value)
|
|
2786
|
-
}, [vue.createElementVNode("span", {
|
|
2787
|
-
class: "text",
|
|
2788
|
-
textContent: vue.toDisplayString(_ctx.title)
|
|
2789
|
-
}, null, 8, _hoisted_1$1), _ctx.readonly != true && _ctx.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3, [vue.createElementVNode("input", {
|
|
2790
|
-
ref: "input-el",
|
|
2791
|
-
type: _ctx.type || "text",
|
|
2792
|
-
value: inputModel.value,
|
|
2793
|
-
readonly: _ctx.readonly == true,
|
|
2794
|
-
placeholder: _ctx.placeholder,
|
|
2795
|
-
title: inputModel.value,
|
|
2796
|
-
onChange: onValueChange,
|
|
2797
|
-
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
2798
|
-
}, null, 40, _hoisted_4), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
2799
|
-
key: 0,
|
|
2800
|
-
class: "validate",
|
|
2801
|
-
title: validateRef.value
|
|
2802
|
-
}, [vue.createVNode(_sfc_main$t, {
|
|
2803
|
-
type: "error",
|
|
2804
|
-
size: 16,
|
|
2805
|
-
color: "red"
|
|
2806
|
-
})], 8, _hoisted_5)) : vue.createCommentVNode("", true)])], 2);
|
|
2807
|
-
};
|
|
2808
|
-
}
|
|
2809
|
-
});
|
|
2810
|
-
|
|
2811
2824
|
const _hoisted_1 = ["textContent"];
|
|
2812
2825
|
var _sfc_main = vue.defineComponent({
|
|
2813
2826
|
...{
|
|
@@ -2882,7 +2895,7 @@
|
|
|
2882
2895
|
})
|
|
2883
2896
|
}, null, 4), vue.createElementVNode("div", {
|
|
2884
2897
|
class: "verify-message",
|
|
2885
|
-
textContent: vue.toDisplayString(dragInfoRef.value.status == "success" ? "验证成功" :
|
|
2898
|
+
textContent: vue.toDisplayString(dragInfoRef.value.status == "success" ? "验证成功" : __props.message)
|
|
2886
2899
|
}, null, 8, _hoisted_1), vue.createElementVNode("div", {
|
|
2887
2900
|
class: "drag-handle",
|
|
2888
2901
|
ref: "dragHandle",
|
|
@@ -2916,23 +2929,23 @@
|
|
|
2916
2929
|
Footer: _sfc_main$q,
|
|
2917
2930
|
Header: _sfc_main$p,
|
|
2918
2931
|
Icon: _sfc_main$t,
|
|
2919
|
-
Search: _sfc_main$
|
|
2920
|
-
Select: _sfc_main$
|
|
2921
|
-
Switch: _sfc_main$
|
|
2922
|
-
Dynamic: _sfc_main$
|
|
2923
|
-
Fold: _sfc_main$
|
|
2924
|
-
Layout: _sfc_main$
|
|
2925
|
-
Scroll: _sfc_main$
|
|
2926
|
-
Sort: _sfc_main$
|
|
2927
|
-
Table: _sfc_main$
|
|
2928
|
-
TableRow: _sfc_main$
|
|
2929
|
-
TableCol: _sfc_main$
|
|
2930
|
-
Tree: _sfc_main$
|
|
2931
|
-
Wrapper: _sfc_main$
|
|
2932
|
-
Input: _sfc_main$
|
|
2932
|
+
Search: _sfc_main$n,
|
|
2933
|
+
Select: _sfc_main$c,
|
|
2934
|
+
Switch: _sfc_main$b,
|
|
2935
|
+
Dynamic: _sfc_main$k,
|
|
2936
|
+
Fold: _sfc_main$a,
|
|
2937
|
+
Layout: _sfc_main$8,
|
|
2938
|
+
Scroll: _sfc_main$9,
|
|
2939
|
+
Sort: _sfc_main$7,
|
|
2940
|
+
Table: _sfc_main$6,
|
|
2941
|
+
TableRow: _sfc_main$5,
|
|
2942
|
+
TableCol: _sfc_main$4,
|
|
2943
|
+
Tree: _sfc_main$2,
|
|
2944
|
+
Wrapper: _sfc_main$1,
|
|
2945
|
+
Input: _sfc_main$o,
|
|
2933
2946
|
DragVerify: _sfc_main,
|
|
2934
|
-
Empty: _sfc_main$
|
|
2935
|
-
Loading: _sfc_main$
|
|
2947
|
+
Empty: _sfc_main$f,
|
|
2948
|
+
Loading: _sfc_main$l
|
|
2936
2949
|
};
|
|
2937
2950
|
|
|
2938
2951
|
snail_core.onMountScope(scope => {
|