snail.vue 2.0.3 → 2.0.5
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 +41 -41
- package/dist/snail.vue.js +317 -315
- package/dist/snail.vue.umd.js +316 -314
- package/dist/styles/snail.vue.vue.css +12 -12
- package/package.json +11 -11
- package/vue.code-snippets +1 -1
package/dist/snail.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
import { link, css, useObserver, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
@@ -18,9 +18,9 @@ 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
|
});
|
|
@@ -91,20 +91,20 @@ var _sfc_main$t = defineComponent({
|
|
|
91
91
|
const isMouseEnterRef = shallowRef(false);
|
|
92
92
|
return (_ctx, _cache) => {
|
|
93
93
|
return openBlock(), createElementBlock("svg", {
|
|
94
|
-
class: normalizeClass(["snail-icon",
|
|
94
|
+
class: normalizeClass(["snail-icon", __props.type]),
|
|
95
95
|
viewBox: "0 0 1024 1024",
|
|
96
|
-
style: normalizeStyle(
|
|
97
|
-
width:
|
|
98
|
-
height:
|
|
96
|
+
style: normalizeStyle(__props.rotate ? `transform: rotate(${__props.rotate}deg);` : ""),
|
|
97
|
+
width: __props.size || 24,
|
|
98
|
+
height: __props.size || 24,
|
|
99
99
|
onMouseenter: _cache[0] || (_cache[0] = $event => isMouseEnterRef.value = true),
|
|
100
100
|
onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
|
|
101
101
|
}, [createElementVNode("title", {
|
|
102
|
-
textContent: toDisplayString(
|
|
103
|
-
}, null, 8, _hoisted_2$a), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSvgDraw)(
|
|
102
|
+
textContent: toDisplayString(__props.title || "")
|
|
103
|
+
}, null, 8, _hoisted_2$a), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSvgDraw)(__props.type, __props.draw), draw => {
|
|
104
104
|
return openBlock(), createElementBlock("path", {
|
|
105
|
-
fill: isMouseEnterRef.value ?
|
|
106
|
-
stroke:
|
|
107
|
-
"stroke-width":
|
|
105
|
+
fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
|
|
106
|
+
stroke: __props.stroke,
|
|
107
|
+
"stroke-width": __props.strokeWidth,
|
|
108
108
|
d: draw
|
|
109
109
|
}, null, 8, _hoisted_3$7);
|
|
110
110
|
}), 256))], 46, _hoisted_1$g);
|
|
@@ -176,12 +176,12 @@ var _sfc_main$s = defineComponent({
|
|
|
176
176
|
}
|
|
177
177
|
return (_ctx, _cache) => {
|
|
178
178
|
return openBlock(), createElementBlock("div", {
|
|
179
|
-
class: normalizeClass(["snail-choose", [unref(type), unref(mode), unref(layout),
|
|
179
|
+
class: normalizeClass(["snail-choose", [unref(type), unref(mode), unref(layout), __props.readonly ? "readonly" : ""]])
|
|
180
180
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(chooseItemsRef.value, (node, index) => {
|
|
181
181
|
return openBlock(), createElementBlock("div", {
|
|
182
182
|
key: unref(getKey)(node.item),
|
|
183
183
|
class: normalizeClass(["choose-item", node.selected ? "selected" : ""]),
|
|
184
|
-
style: normalizeStyle(unref(css).buildStyle(
|
|
184
|
+
style: normalizeStyle(unref(css).buildStyle(__props.itemStyle)),
|
|
185
185
|
title: node.item.text,
|
|
186
186
|
onClick: $event => onItemClick(node)
|
|
187
187
|
}, [unref(mode) == "native" ? (openBlock(), createElementBlock("input", {
|
|
@@ -195,7 +195,7 @@ var _sfc_main$s = defineComponent({
|
|
|
195
195
|
key: 0,
|
|
196
196
|
type: "success",
|
|
197
197
|
size: 12,
|
|
198
|
-
color:
|
|
198
|
+
color: __props.readonly ? "#8a9099" : "white"
|
|
199
199
|
}, null, 8, ["color"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), node.item.text ? (openBlock(), createElementBlock("span", {
|
|
200
200
|
key: 2,
|
|
201
201
|
class: "item-text",
|
|
@@ -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,18 +2312,18 @@ 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
|
|
@@ -2317,10 +2402,10 @@ var _sfc_main$8 = defineComponent({
|
|
|
2317
2402
|
}
|
|
2318
2403
|
});
|
|
2319
2404
|
|
|
2320
|
-
const _hoisted_1$
|
|
2405
|
+
const _hoisted_1$3 = {
|
|
2321
2406
|
class: "table-body"
|
|
2322
2407
|
};
|
|
2323
|
-
var _sfc_main$
|
|
2408
|
+
var _sfc_main$6 = defineComponent({
|
|
2324
2409
|
...{
|
|
2325
2410
|
name: "Table",
|
|
2326
2411
|
inheritAttrs: true
|
|
@@ -2344,17 +2429,17 @@ var _sfc_main$7 = defineComponent({
|
|
|
2344
2429
|
const hStyleRef = computed(() => css.buildStyle(props.headerStyle));
|
|
2345
2430
|
const fStyleRef = computed(() => css.buildStyle(props.footerStyle));
|
|
2346
2431
|
return (_ctx, _cache) => {
|
|
2347
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2432
|
+
return openBlock(), createBlock(_sfc_main$9, {
|
|
2348
2433
|
class: normalizeClass(["snail-table", {
|
|
2349
|
-
"start-border":
|
|
2434
|
+
"start-border": __props.border == true
|
|
2350
2435
|
}]),
|
|
2351
|
-
"scroll-x":
|
|
2352
|
-
"scroll-y":
|
|
2436
|
+
"scroll-x": __props.scrollX,
|
|
2437
|
+
"scroll-y": __props.scrollY
|
|
2353
2438
|
}, {
|
|
2354
2439
|
default: withCtx(() => [createElementVNode("div", {
|
|
2355
2440
|
class: "table-header",
|
|
2356
2441
|
style: normalizeStyle(hStyleRef.value)
|
|
2357
|
-
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$
|
|
2442
|
+
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$3, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
|
|
2358
2443
|
class: "table-footer",
|
|
2359
2444
|
style: normalizeStyle(fStyleRef.value)
|
|
2360
2445
|
}, [renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
@@ -2364,7 +2449,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
2364
2449
|
}
|
|
2365
2450
|
});
|
|
2366
2451
|
|
|
2367
|
-
var _sfc_main$
|
|
2452
|
+
var _sfc_main$5 = defineComponent({
|
|
2368
2453
|
...{
|
|
2369
2454
|
name: "TableRow",
|
|
2370
2455
|
inheritAttrs: true
|
|
@@ -2387,7 +2472,7 @@ var _sfc_main$6 = defineComponent({
|
|
|
2387
2472
|
}
|
|
2388
2473
|
});
|
|
2389
2474
|
|
|
2390
|
-
var _sfc_main$
|
|
2475
|
+
var _sfc_main$4 = defineComponent({
|
|
2391
2476
|
...{
|
|
2392
2477
|
name: "TableCol",
|
|
2393
2478
|
inheritAttrs: true
|
|
@@ -2426,27 +2511,27 @@ var _sfc_main$5 = defineComponent({
|
|
|
2426
2511
|
const styleRef = computed(() => css.buildStyle(props));
|
|
2427
2512
|
return (_ctx, _cache) => {
|
|
2428
2513
|
return openBlock(), createElementBlock("div", {
|
|
2429
|
-
class: normalizeClass(["table-col",
|
|
2514
|
+
class: normalizeClass(["table-col", __props.textAlign]),
|
|
2430
2515
|
style: normalizeStyle(styleRef.value)
|
|
2431
2516
|
}, [renderSlot(_ctx.$slots, "default")], 6);
|
|
2432
2517
|
};
|
|
2433
2518
|
}
|
|
2434
2519
|
});
|
|
2435
2520
|
|
|
2436
|
-
const _hoisted_1$
|
|
2521
|
+
const _hoisted_1$2 = {
|
|
2437
2522
|
key: 0,
|
|
2438
2523
|
class: "node-fold"
|
|
2439
2524
|
};
|
|
2440
|
-
const _hoisted_2
|
|
2441
|
-
const _hoisted_3
|
|
2525
|
+
const _hoisted_2 = ["title", "textContent"];
|
|
2526
|
+
const _hoisted_3 = {
|
|
2442
2527
|
class: "node-slot ellipsis"
|
|
2443
2528
|
};
|
|
2444
|
-
const _hoisted_4
|
|
2529
|
+
const _hoisted_4 = {
|
|
2445
2530
|
key: 1,
|
|
2446
2531
|
class: "snail-tree-children hidden",
|
|
2447
2532
|
ref: "children"
|
|
2448
2533
|
};
|
|
2449
|
-
var _sfc_main$
|
|
2534
|
+
var _sfc_main$3 = defineComponent({
|
|
2450
2535
|
...{
|
|
2451
2536
|
name: "TreeNode",
|
|
2452
2537
|
inheritAttrs: true
|
|
@@ -2536,8 +2621,10 @@ var _sfc_main$4 = defineComponent({
|
|
|
2536
2621
|
newValue && treeNodeDom.value.classList.add("hovered");
|
|
2537
2622
|
});
|
|
2538
2623
|
watcher(() => __props.context.isActived(__props.node), newValue => {
|
|
2539
|
-
treeNodeDom.value
|
|
2540
|
-
|
|
2624
|
+
if (treeNodeDom.value) {
|
|
2625
|
+
treeNodeDom.value.classList.remove("actived");
|
|
2626
|
+
newValue && treeNodeDom.value.classList.add("actived");
|
|
2627
|
+
}
|
|
2541
2628
|
});
|
|
2542
2629
|
onMounted(() => {
|
|
2543
2630
|
if (childrenDom.value) {
|
|
@@ -2550,19 +2637,19 @@ var _sfc_main$4 = defineComponent({
|
|
|
2550
2637
|
const _component_TreeNode = resolveComponent("TreeNode", true);
|
|
2551
2638
|
return openBlock(), createElementBlock(Fragment, null, [showRef.value ? (openBlock(), createElementBlock("div", {
|
|
2552
2639
|
key: 0,
|
|
2553
|
-
class: normalizeClass(["snail-tree-node",
|
|
2640
|
+
class: normalizeClass(["snail-tree-node", __props.node.clickable ? "clickable" : "", `level-${__props.level}`]),
|
|
2554
2641
|
ref: "tree-node",
|
|
2555
2642
|
onMouseenter: _cache[0] || (_cache[0] = $event => isHoveredRef.value = true),
|
|
2556
2643
|
onMouseleave: _cache[1] || (_cache[1] = $event => isHoveredRef.value = false),
|
|
2557
|
-
onClick: _cache[2] || (_cache[2] = $event => onNodeClick(
|
|
2644
|
+
onClick: _cache[2] || (_cache[2] = $event => onNodeClick(__props.node)),
|
|
2558
2645
|
onDblclick: onNodeDoubleClick
|
|
2559
|
-
}, [
|
|
2646
|
+
}, [__props.options.rewrite == true ? renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({
|
|
2560
2647
|
key: 0
|
|
2561
2648
|
}, unref(slotOptions)))) : (openBlock(), createElementBlock(Fragment, {
|
|
2562
2649
|
key: 1
|
|
2563
2650
|
}, [_cache[4] || (_cache[4] = createElementVNode("div", {
|
|
2564
2651
|
class: "indent"
|
|
2565
|
-
}, null, -1)),
|
|
2652
|
+
}, null, -1)), __props.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$2, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$t, {
|
|
2566
2653
|
key: 0,
|
|
2567
2654
|
class: normalizeClass(statusRef.value),
|
|
2568
2655
|
type: "custom",
|
|
@@ -2572,32 +2659,32 @@ var _sfc_main$4 = defineComponent({
|
|
|
2572
2659
|
onClick: toggleFold
|
|
2573
2660
|
}, null, 8, ["class"])) : createCommentVNode("", true)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
2574
2661
|
class: "node-text ellipsis",
|
|
2575
|
-
title:
|
|
2576
|
-
textContent: toDisplayString(
|
|
2577
|
-
}, null, 8, _hoisted_2
|
|
2662
|
+
title: __props.node.text,
|
|
2663
|
+
textContent: toDisplayString(__props.node.text)
|
|
2664
|
+
}, 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 => {
|
|
2578
2665
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
2579
|
-
key:
|
|
2666
|
+
key: __props.context.getKey(child),
|
|
2580
2667
|
node: child,
|
|
2581
|
-
parent:
|
|
2668
|
+
parent: __props.node,
|
|
2582
2669
|
level: nextLevel,
|
|
2583
|
-
options:
|
|
2584
|
-
context:
|
|
2670
|
+
options: __props.options,
|
|
2671
|
+
context: __props.context,
|
|
2585
2672
|
onClick: _cache[3] || (_cache[3] = (node, parents) => onChildNodeClick(node, parents))
|
|
2586
2673
|
}, {
|
|
2587
2674
|
default: withCtx(slotProps => [renderSlot(_ctx.$slots, "default", mergeProps({
|
|
2588
2675
|
ref_for: true
|
|
2589
2676
|
}, slotProps))]),
|
|
2590
|
-
_:
|
|
2591
|
-
},
|
|
2677
|
+
_: 3
|
|
2678
|
+
}, 8, ["node", "parent", "options", "context"]);
|
|
2592
2679
|
}), 128))], 512)) : createCommentVNode("", true)], 64);
|
|
2593
2680
|
};
|
|
2594
2681
|
}
|
|
2595
2682
|
});
|
|
2596
2683
|
|
|
2597
|
-
const _hoisted_1$
|
|
2684
|
+
const _hoisted_1$1 = {
|
|
2598
2685
|
class: "snail-tree"
|
|
2599
2686
|
};
|
|
2600
|
-
var _sfc_main$
|
|
2687
|
+
var _sfc_main$2 = defineComponent({
|
|
2601
2688
|
...{
|
|
2602
2689
|
name: "Tree",
|
|
2603
2690
|
inheritAttrs: true
|
|
@@ -2631,28 +2718,28 @@ var _sfc_main$3 = defineComponent({
|
|
|
2631
2718
|
emits("click", node, parents);
|
|
2632
2719
|
}
|
|
2633
2720
|
return (_ctx, _cache) => {
|
|
2634
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2721
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [__props.search ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
|
|
2635
2722
|
key: 0
|
|
2636
|
-
},
|
|
2723
|
+
}, __props.search, {
|
|
2637
2724
|
onSearch
|
|
2638
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
2725
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$9, {
|
|
2639
2726
|
"scroll-y": true
|
|
2640
2727
|
}, {
|
|
2641
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
2642
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2728
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes || [], node => {
|
|
2729
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
2643
2730
|
key: unref(context).getKey(node),
|
|
2644
2731
|
node,
|
|
2645
2732
|
parent: void 0,
|
|
2646
2733
|
level: 1,
|
|
2647
|
-
options:
|
|
2734
|
+
options: __props.nodeOptions,
|
|
2648
2735
|
context: unref(context),
|
|
2649
2736
|
onClick: onTreeNodeClick
|
|
2650
2737
|
}, {
|
|
2651
2738
|
default: withCtx(slotProps => [renderSlot(_ctx.$slots, "default", mergeProps({
|
|
2652
2739
|
ref_for: true
|
|
2653
2740
|
}, slotProps))]),
|
|
2654
|
-
_:
|
|
2655
|
-
},
|
|
2741
|
+
_: 3
|
|
2742
|
+
}, 8, ["node", "options", "context"]);
|
|
2656
2743
|
}), 128))]),
|
|
2657
2744
|
_: 3
|
|
2658
2745
|
})]);
|
|
@@ -2660,7 +2747,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
2660
2747
|
}
|
|
2661
2748
|
});
|
|
2662
2749
|
|
|
2663
|
-
var _sfc_main$
|
|
2750
|
+
var _sfc_main$1 = defineComponent({
|
|
2664
2751
|
__name: "wrapper",
|
|
2665
2752
|
props: {
|
|
2666
2753
|
readonly: {
|
|
@@ -2681,25 +2768,25 @@ var _sfc_main$2 = defineComponent({
|
|
|
2681
2768
|
const emits = __emit;
|
|
2682
2769
|
return (_ctx, _cache) => {
|
|
2683
2770
|
return openBlock(), createElementBlock("div", {
|
|
2684
|
-
class: normalizeClass(["snail-wrapper",
|
|
2685
|
-
}, [
|
|
2771
|
+
class: normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
|
|
2772
|
+
}, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$p, mergeProps({
|
|
2686
2773
|
key: 0
|
|
2687
|
-
},
|
|
2774
|
+
}, __props.header || {
|
|
2688
2775
|
useTo: "dialog",
|
|
2689
2776
|
title: "对话框"
|
|
2690
2777
|
}, {
|
|
2691
2778
|
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
2692
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
2779
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$9, mergeProps({
|
|
2693
2780
|
class: "wrapper-body"
|
|
2694
|
-
},
|
|
2781
|
+
}, __props.content || {
|
|
2695
2782
|
scrollX: false,
|
|
2696
2783
|
scrollY: false
|
|
2697
2784
|
}), {
|
|
2698
2785
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
2699
2786
|
_: 3
|
|
2700
|
-
}, 16),
|
|
2787
|
+
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$q, mergeProps({
|
|
2701
2788
|
key: 1
|
|
2702
|
-
},
|
|
2789
|
+
}, __props.footer || {}, {
|
|
2703
2790
|
onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
|
|
2704
2791
|
onConfirm: _cache[2] || (_cache[2] = $event => emits("confirm"))
|
|
2705
2792
|
}), null, 16)) : createCommentVNode("", true)], 2);
|
|
@@ -2711,7 +2798,7 @@ function mount(target, options, onDestroyed) {
|
|
|
2711
2798
|
mustObject(options, "options");
|
|
2712
2799
|
target instanceof HTMLElement || throwError("target must be a HTMLElement");
|
|
2713
2800
|
target.classList.add("snail-app");
|
|
2714
|
-
const app = createApp(_sfc_main$
|
|
2801
|
+
const app = createApp(_sfc_main$k, options);
|
|
2715
2802
|
triggerAppCreated(app);
|
|
2716
2803
|
app.mount(target);
|
|
2717
2804
|
const scope = useScope().onDestroy(() => app.unmount());
|
|
@@ -2719,91 +2806,6 @@ function mount(target, options, onDestroyed) {
|
|
|
2719
2806
|
return scope;
|
|
2720
2807
|
}
|
|
2721
2808
|
|
|
2722
|
-
const _hoisted_1$1 = ["textContent"];
|
|
2723
|
-
const _hoisted_2 = {
|
|
2724
|
-
key: 0,
|
|
2725
|
-
class: "required",
|
|
2726
|
-
textContent: "*"
|
|
2727
|
-
};
|
|
2728
|
-
const _hoisted_3 = {
|
|
2729
|
-
class: "input-body"
|
|
2730
|
-
};
|
|
2731
|
-
const _hoisted_4 = ["type", "value", "readonly", "placeholder", "title"];
|
|
2732
|
-
const _hoisted_5 = ["title"];
|
|
2733
|
-
var _sfc_main$1 = defineComponent({
|
|
2734
|
-
...{
|
|
2735
|
-
name: "Input",
|
|
2736
|
-
inheritAttrs: true
|
|
2737
|
-
},
|
|
2738
|
-
__name: "input",
|
|
2739
|
-
props: mergeModels({
|
|
2740
|
-
readonly: {
|
|
2741
|
-
type: Boolean
|
|
2742
|
-
},
|
|
2743
|
-
placeholder: {},
|
|
2744
|
-
title: {},
|
|
2745
|
-
type: {},
|
|
2746
|
-
required: {
|
|
2747
|
-
type: Boolean
|
|
2748
|
-
},
|
|
2749
|
-
titleStyle: {}
|
|
2750
|
-
}, {
|
|
2751
|
-
"modelValue": {
|
|
2752
|
-
default: ""
|
|
2753
|
-
},
|
|
2754
|
-
"modelModifiers": {}
|
|
2755
|
-
}),
|
|
2756
|
-
emits: mergeModels(["click", "change"], ["update:modelValue"]),
|
|
2757
|
-
setup(__props, _ref) {
|
|
2758
|
-
let {
|
|
2759
|
-
emit: __emit
|
|
2760
|
-
} = _ref;
|
|
2761
|
-
const props = __props;
|
|
2762
|
-
const emits = __emit;
|
|
2763
|
-
const inputDom = useTemplateRef("input-el");
|
|
2764
|
-
const inputModel = useModel(__props, "modelValue");
|
|
2765
|
-
const validateRef = shallowRef();
|
|
2766
|
-
const titleStyleRef = computed(() => css.buildStyle(props.titleStyle));
|
|
2767
|
-
function onValueChange() {
|
|
2768
|
-
const text = inputDom.value.value || "";
|
|
2769
|
-
inputModel.value = text;
|
|
2770
|
-
nextTick(() => emits("change", text));
|
|
2771
|
-
}
|
|
2772
|
-
console.warn("Input:还没实现 验证相关逻辑");
|
|
2773
|
-
return (_ctx, _cache) => {
|
|
2774
|
-
return openBlock(), createElementBlock("div", {
|
|
2775
|
-
class: normalizeClass(["snail-input", {
|
|
2776
|
-
"readonly": _ctx.readonly
|
|
2777
|
-
}])
|
|
2778
|
-
}, [!!_ctx.title ? (openBlock(), createElementBlock("div", {
|
|
2779
|
-
key: 0,
|
|
2780
|
-
class: "input-title",
|
|
2781
|
-
style: normalizeStyle(titleStyleRef.value)
|
|
2782
|
-
}, [createElementVNode("span", {
|
|
2783
|
-
class: "text",
|
|
2784
|
-
textContent: toDisplayString(_ctx.title)
|
|
2785
|
-
}, 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", {
|
|
2786
|
-
ref: "input-el",
|
|
2787
|
-
type: _ctx.type || "text",
|
|
2788
|
-
value: inputModel.value,
|
|
2789
|
-
readonly: _ctx.readonly == true,
|
|
2790
|
-
placeholder: _ctx.placeholder,
|
|
2791
|
-
title: inputModel.value,
|
|
2792
|
-
onChange: onValueChange,
|
|
2793
|
-
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
2794
|
-
}, null, 40, _hoisted_4), !!validateRef.value ? (openBlock(), createElementBlock("span", {
|
|
2795
|
-
key: 0,
|
|
2796
|
-
class: "validate",
|
|
2797
|
-
title: validateRef.value
|
|
2798
|
-
}, [createVNode(_sfc_main$t, {
|
|
2799
|
-
type: "error",
|
|
2800
|
-
size: 16,
|
|
2801
|
-
color: "red"
|
|
2802
|
-
})], 8, _hoisted_5)) : createCommentVNode("", true)])], 2);
|
|
2803
|
-
};
|
|
2804
|
-
}
|
|
2805
|
-
});
|
|
2806
|
-
|
|
2807
2809
|
const _hoisted_1 = ["textContent"];
|
|
2808
2810
|
var _sfc_main = defineComponent({
|
|
2809
2811
|
...{
|
|
@@ -2878,7 +2880,7 @@ var _sfc_main = defineComponent({
|
|
|
2878
2880
|
})
|
|
2879
2881
|
}, null, 4), createElementVNode("div", {
|
|
2880
2882
|
class: "verify-message",
|
|
2881
|
-
textContent: toDisplayString(dragInfoRef.value.status == "success" ? "验证成功" :
|
|
2883
|
+
textContent: toDisplayString(dragInfoRef.value.status == "success" ? "验证成功" : __props.message)
|
|
2882
2884
|
}, null, 8, _hoisted_1), createElementVNode("div", {
|
|
2883
2885
|
class: "drag-handle",
|
|
2884
2886
|
ref: "dragHandle",
|
|
@@ -2912,23 +2914,23 @@ const components = {
|
|
|
2912
2914
|
Footer: _sfc_main$q,
|
|
2913
2915
|
Header: _sfc_main$p,
|
|
2914
2916
|
Icon: _sfc_main$t,
|
|
2915
|
-
Search: _sfc_main$
|
|
2916
|
-
Select: _sfc_main$
|
|
2917
|
-
Switch: _sfc_main$
|
|
2918
|
-
Dynamic: _sfc_main$
|
|
2919
|
-
Fold: _sfc_main$
|
|
2920
|
-
Layout: _sfc_main$
|
|
2921
|
-
Scroll: _sfc_main$
|
|
2922
|
-
Sort: _sfc_main$
|
|
2923
|
-
Table: _sfc_main$
|
|
2924
|
-
TableRow: _sfc_main$
|
|
2925
|
-
TableCol: _sfc_main$
|
|
2926
|
-
Tree: _sfc_main$
|
|
2927
|
-
Wrapper: _sfc_main$
|
|
2928
|
-
Input: _sfc_main$
|
|
2917
|
+
Search: _sfc_main$n,
|
|
2918
|
+
Select: _sfc_main$c,
|
|
2919
|
+
Switch: _sfc_main$b,
|
|
2920
|
+
Dynamic: _sfc_main$k,
|
|
2921
|
+
Fold: _sfc_main$a,
|
|
2922
|
+
Layout: _sfc_main$8,
|
|
2923
|
+
Scroll: _sfc_main$9,
|
|
2924
|
+
Sort: _sfc_main$7,
|
|
2925
|
+
Table: _sfc_main$6,
|
|
2926
|
+
TableRow: _sfc_main$5,
|
|
2927
|
+
TableCol: _sfc_main$4,
|
|
2928
|
+
Tree: _sfc_main$2,
|
|
2929
|
+
Wrapper: _sfc_main$1,
|
|
2930
|
+
Input: _sfc_main$o,
|
|
2929
2931
|
DragVerify: _sfc_main,
|
|
2930
|
-
Empty: _sfc_main$
|
|
2931
|
-
Loading: _sfc_main$
|
|
2932
|
+
Empty: _sfc_main$f,
|
|
2933
|
+
Loading: _sfc_main$l
|
|
2932
2934
|
};
|
|
2933
2935
|
|
|
2934
2936
|
onMountScope(scope => {
|