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