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