snail.vue 2.0.10 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/snail.vue.js CHANGED
@@ -1,9 +1,9 @@
1
1
  //@ sourceURL=/snail.vue.js
2
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, watch, withDirectives, isRef, vModelText, createApp, Transition, withCtx, normalizeProps, guardReactiveProps, ref, onErrorCaptured, resolveDynamicComponent, mergeProps, createSlots, withModifiers, getCurrentInstance, resolveComponent, onBeforeUnmount, TransitionGroup, getCurrentScope, onScopeDispose } from 'vue';
3
3
  import { throwError, isArrayNotEmpty, isStringNotEmpty, useKey, isArray, useTimer, newId, script, isFunction, getFromArray, mountScope, useScopes, throwIfFalse, isPromise, wait, isObject, isNumberNotNaN, hasAny, mustFunction, useScope, removeFromArray, mustObject, delay, defer, useAsyncScope, useHook, throwIfTrue, useTime, parseTime, getTimeNow, onMountScope } from 'snail.core';
4
- import { css, link, useObserver, useAnimation } from 'snail.view';
4
+ import { link, css, useObserver, useAnimation } from 'snail.view';
5
5
 
6
- const _hoisted_1$k = ["title"];
6
+ const _hoisted_1$j = ["title"];
7
7
  var _sfc_main$y = defineComponent({
8
8
  ...{
9
9
  name: "Button",
@@ -20,11 +20,15 @@ var _sfc_main$y = defineComponent({
20
20
  return openBlock(), createElementBlock("div", {
21
21
  class: normalizeClass(["snail-button", [__props.size, __props.type]]),
22
22
  title: __props.title
23
- }, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$k);
23
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮", -1))])], 10, _hoisted_1$j);
24
24
  };
25
25
  }
26
26
  });
27
27
 
28
+ var addLink = href => setTimeout(link.register, 0, href);
29
+
30
+ addLink("/styles/snail.vue.vue.css");
31
+
28
32
  function getSvgDraw(iconType, draw) {
29
33
  switch (iconType) {
30
34
  case "success":
@@ -63,8 +67,8 @@ function getSvgDraw(iconType, draw) {
63
67
  }
64
68
  }
65
69
 
66
- const _hoisted_1$j = ["width", "height"];
67
- const _hoisted_2$c = ["textContent"];
70
+ const _hoisted_1$i = ["width", "height"];
71
+ const _hoisted_2$b = ["textContent"];
68
72
  const _hoisted_3$9 = ["fill", "stroke", "stroke-width", "d"];
69
73
  var _sfc_main$x = defineComponent({
70
74
  ...{
@@ -96,20 +100,20 @@ var _sfc_main$x = defineComponent({
96
100
  onMouseleave: _cache[1] || (_cache[1] = $event => isMouseEnterRef.value = false)
97
101
  }, [createElementVNode("title", {
98
102
  textContent: toDisplayString(__props.title || "")
99
- }, null, 8, _hoisted_2$c), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSvgDraw)(__props.type, __props.draw), d => {
103
+ }, null, 8, _hoisted_2$b), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSvgDraw)(__props.type, __props.draw), d => {
100
104
  return openBlock(), createElementBlock("path", {
101
105
  fill: isMouseEnterRef.value ? __props.hoverColor || __props.color : __props.color,
102
106
  stroke: __props.stroke,
103
107
  "stroke-width": __props.strokeWidth,
104
108
  d
105
109
  }, null, 8, _hoisted_3$9);
106
- }), 256))], 46, _hoisted_1$j);
110
+ }), 256))], 46, _hoisted_1$i);
107
111
  };
108
112
  }
109
113
  });
110
114
 
111
- const _hoisted_1$i = ["title", "onClick"];
112
- const _hoisted_2$b = ["type", "checked"];
115
+ const _hoisted_1$h = ["title", "onClick"];
116
+ const _hoisted_2$a = ["type", "checked"];
113
117
  const _hoisted_3$8 = ["textContent"];
114
118
  const _hoisted_4$6 = ["textContent"];
115
119
  var _sfc_main$w = defineComponent({
@@ -188,7 +192,7 @@ var _sfc_main$w = defineComponent({
188
192
  key: 0,
189
193
  type: unref(type),
190
194
  checked: node.selected
191
- }, null, 8, _hoisted_2$b)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
195
+ }, null, 8, _hoisted_2$a)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
192
196
  key: 1,
193
197
  class: normalizeClass(["status", [node.selected ? "selected" : ""]])
194
198
  }, [node.selected ? (openBlock(), createBlock(_sfc_main$x, {
@@ -204,13 +208,13 @@ var _sfc_main$w = defineComponent({
204
208
  key: 3,
205
209
  class: "item-des",
206
210
  textContent: toDisplayString(node.item.description)
207
- }, null, 8, _hoisted_4$6)) : createCommentVNode("", true)], 14, _hoisted_1$i);
211
+ }, null, 8, _hoisted_4$6)) : createCommentVNode("", true)], 14, _hoisted_1$h);
208
212
  }), 128))], 2);
209
213
  };
210
214
  }
211
215
  });
212
216
 
213
- const _hoisted_1$h = ["id"];
217
+ const _hoisted_1$g = ["id"];
214
218
  var _sfc_main$v = defineComponent({
215
219
  __name: "datepicker",
216
220
  props: {
@@ -362,15 +366,11 @@ var _sfc_main$v = defineComponent({
362
366
  class: "snail-datepicker",
363
367
  id: unref(id),
364
368
  onClick
365
- }, null, 8, _hoisted_1$h);
369
+ }, null, 8, _hoisted_1$g);
366
370
  };
367
371
  }
368
372
  });
369
373
 
370
- var addLink = href => setTimeout(link.register, 0, href);
371
-
372
- addLink("/styles/snail.vue.vue.css");
373
-
374
374
  var _sfc_main$u = defineComponent({
375
375
  ...{
376
376
  name: "Footer",
@@ -419,7 +419,7 @@ var _sfc_main$u = defineComponent({
419
419
  }
420
420
  });
421
421
 
422
- const _hoisted_1$g = ["textContent"];
422
+ const _hoisted_1$f = ["textContent"];
423
423
  var _sfc_main$t = defineComponent({
424
424
  ...{
425
425
  name: "Header",
@@ -459,7 +459,7 @@ var _sfc_main$t = defineComponent({
459
459
  key: 0,
460
460
  textContent: toDisplayString(__props.title),
461
461
  class: normalizeClass(["header-title", __props.titleAlign])
462
- }, null, 10, _hoisted_1$g)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$x, {
462
+ }, null, 10, _hoisted_1$f)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), __props.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$x, {
463
463
  key: 1,
464
464
  type: "close",
465
465
  size: 22,
@@ -471,8 +471,8 @@ var _sfc_main$t = defineComponent({
471
471
  }
472
472
  });
473
473
 
474
- const _hoisted_1$f = ["textContent"];
475
- const _hoisted_2$a = {
474
+ const _hoisted_1$e = ["textContent"];
475
+ const _hoisted_2$9 = {
476
476
  key: 0,
477
477
  class: "required",
478
478
  textContent: "*"
@@ -534,7 +534,7 @@ var _sfc_main$s = defineComponent({
534
534
  }, [createElementVNode("span", {
535
535
  class: "text",
536
536
  textContent: toDisplayString(__props.title)
537
- }, null, 8, _hoisted_1$f), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$a)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$7, [createElementVNode("input", {
537
+ }, null, 8, _hoisted_1$e), __props.readonly != true && __props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$9)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$7, [createElementVNode("input", {
538
538
  ref: "input-el",
539
539
  type: __props.type || "text",
540
540
  value: inputModel.value,
@@ -756,11 +756,11 @@ function useFormatter(options) {
756
756
  return formatter;
757
757
  }
758
758
 
759
- const _hoisted_1$e = {
759
+ const _hoisted_1$d = {
760
760
  key: 0,
761
761
  class: "number-prefix"
762
762
  };
763
- const _hoisted_2$9 = ["textContent"];
763
+ const _hoisted_2$8 = ["textContent"];
764
764
  const _hoisted_3$6 = ["inputmode", "placeholder", "title"];
765
765
  const _hoisted_4$4 = {
766
766
  key: 1,
@@ -768,7 +768,7 @@ const _hoisted_4$4 = {
768
768
  };
769
769
  const _hoisted_5$2 = ["textContent"];
770
770
  const _hoisted_6$1 = ["title", "textContent"];
771
- const _hoisted_7$1 = ["title", "textContent"];
771
+ const _hoisted_7 = ["title", "textContent"];
772
772
  var _sfc_main$r = defineComponent({
773
773
  __name: "number",
774
774
  props: mergeModels({
@@ -916,10 +916,10 @@ var _sfc_main$r = defineComponent({
916
916
  "has-prefix": unref(hasPrefix),
917
917
  "has-suffix": unref(hasSuffix)
918
918
  }])
919
- }, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$e, [createElementVNode("span", {
919
+ }, [unref(hasPrefix) ? (openBlock(), createElementBlock("div", _hoisted_1$d, [createElementVNode("span", {
920
920
  class: "ellipsis",
921
921
  textContent: toDisplayString(unref(prefix))
922
- }, null, 8, _hoisted_2$9)])) : createCommentVNode("", true), createElementVNode("div", {
922
+ }, null, 8, _hoisted_2$8)])) : createCommentVNode("", true), createElementVNode("div", {
923
923
  class: normalizeClass(["input-panel", unref(controls)])
924
924
  }, [withDirectives(createElementVNode("input", {
925
925
  type: "text",
@@ -974,12 +974,12 @@ var _sfc_main$r = defineComponent({
974
974
  class: "number-util ellipsis",
975
975
  title: thousandsTextRef.value,
976
976
  textContent: toDisplayString(`千分位:${thousandsTextRef.value || ""}`)
977
- }, null, 8, _hoisted_7$1)) : createCommentVNode("", true)], 2);
977
+ }, null, 8, _hoisted_7)) : createCommentVNode("", true)], 2);
978
978
  };
979
979
  }
980
980
  });
981
981
 
982
- const _hoisted_1$d = ["placeholder", "readonly"];
982
+ const _hoisted_1$c = ["placeholder", "readonly"];
983
983
  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";
984
984
  var _sfc_main$q = defineComponent({
985
985
  ...{
@@ -1026,7 +1026,7 @@ var _sfc_main$q = defineComponent({
1026
1026
  readonly: __props.readonly,
1027
1027
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => textModel.value = $event),
1028
1028
  onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
1029
- }, null, 40, _hoisted_1$d), [[vModelText, textModel.value, void 0, {
1029
+ }, null, 40, _hoisted_1$c), [[vModelText, textModel.value, void 0, {
1030
1030
  trim: true
1031
1031
  }]]), createElementVNode("div", null, [createVNode(_sfc_main$x, {
1032
1032
  class: "search-button",
@@ -1249,10 +1249,10 @@ function deducePosition(strategy, targetStart, targetEnd, contentSize, clientSiz
1249
1249
  }
1250
1250
  }
1251
1251
 
1252
- const _hoisted_1$c = {
1252
+ const _hoisted_1$b = {
1253
1253
  class: "snail-confirm flex-column"
1254
1254
  };
1255
- const _hoisted_2$8 = ["innerHTML"];
1255
+ const _hoisted_2$7 = ["innerHTML"];
1256
1256
  var _sfc_main$p = defineComponent({
1257
1257
  ...{
1258
1258
  name: "ConfirmContainer",
@@ -1281,14 +1281,14 @@ var _sfc_main$p = defineComponent({
1281
1281
  },
1282
1282
  setup(__props) {
1283
1283
  return (_ctx, _cache) => {
1284
- return openBlock(), createElementBlock("div", _hoisted_1$c, [createVNode(_sfc_main$t, {
1284
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [createVNode(_sfc_main$t, {
1285
1285
  "use-to": "dialog",
1286
1286
  title: __props.title || "提示",
1287
1287
  onClose: _cache[0] || (_cache[0] = $event => __props.closePopup(false))
1288
1288
  }, null, 8, ["title"]), createElementVNode("div", {
1289
1289
  class: "confirm-body",
1290
1290
  innerHTML: __props.message || "请确认?"
1291
- }, null, 8, _hoisted_2$8), createVNode(_sfc_main$u, {
1291
+ }, null, 8, _hoisted_2$7), createVNode(_sfc_main$u, {
1292
1292
  align: "right",
1293
1293
  "cancel-name": __props.cancelName,
1294
1294
  "cancel-disabled": __props.cancelDisabled,
@@ -1667,11 +1667,11 @@ var _sfc_main$k = defineComponent({
1667
1667
  }
1668
1668
  });
1669
1669
 
1670
- const _hoisted_1$b = {
1670
+ const _hoisted_1$a = {
1671
1671
  key: 1,
1672
1672
  class: "icon"
1673
1673
  };
1674
- const _hoisted_2$7 = ["innerHTML"];
1674
+ const _hoisted_2$6 = ["innerHTML"];
1675
1675
  var _sfc_main$j = defineComponent({
1676
1676
  ...{
1677
1677
  name: "ToastContainer",
@@ -1721,14 +1721,14 @@ var _sfc_main$j = defineComponent({
1721
1721
  onClick: _cache[2] || (_cache[2] = $event => {
1722
1722
  unref(closePopup)();
1723
1723
  })
1724
- }, null, 8, ["fill"])) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$b, [createVNode(_sfc_main$x, {
1724
+ }, null, 8, ["fill"])) : createCommentVNode("", true), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$a, [createVNode(_sfc_main$x, {
1725
1725
  type: unref(props).type,
1726
1726
  fill: "#707070",
1727
1727
  size: 20
1728
1728
  }, null, 8, ["type"])])) : createCommentVNode("", true), createElementVNode("div", {
1729
1729
  class: "message",
1730
1730
  innerHTML: unref(props).message
1731
- }, null, 8, _hoisted_2$7)], 38);
1731
+ }, null, 8, _hoisted_2$6)], 38);
1732
1732
  };
1733
1733
  }
1734
1734
  });
@@ -1974,10 +1974,10 @@ function getNoDataBase64Image() {
1974
1974
  return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1w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qUspjjmjgolZlwwF1xigr8VoaYBI4I7ilBwl5Hw8JIwcx3aAha6XCj9t4ub4HzBjgfftLhgLpgL5oK5YC6YC+aCuWDt9luAAQC2EPxjL8cUkwAAAABJRU5ErkJggg==";
1975
1975
  }
1976
1976
 
1977
- const _hoisted_1$a = {
1977
+ const _hoisted_1$9 = {
1978
1978
  class: "snail-empty"
1979
1979
  };
1980
- const _hoisted_2$6 = ["src"];
1980
+ const _hoisted_2$5 = ["src"];
1981
1981
  const _hoisted_3$5 = ["textContent"];
1982
1982
  var _sfc_main$i = defineComponent({
1983
1983
  ...{
@@ -1992,9 +1992,9 @@ var _sfc_main$i = defineComponent({
1992
1992
  setup(__props) {
1993
1993
  const defaultImageBase64 = getNoDataBase64Image();
1994
1994
  return (_ctx, _cache) => {
1995
- return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("img", {
1995
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("img", {
1996
1996
  src: __props.imageUrl || unref(defaultImageBase64)
1997
- }, null, 8, _hoisted_2$6), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
1997
+ }, null, 8, _hoisted_2$5), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
1998
1998
  class: "message",
1999
1999
  textContent: toDisplayString(__props.message || "无数据")
2000
2000
  }, null, 8, _hoisted_3$5)])]);
@@ -2002,8 +2002,8 @@ var _sfc_main$i = defineComponent({
2002
2002
  }
2003
2003
  });
2004
2004
 
2005
- const _hoisted_1$9 = ["title"];
2006
- const _hoisted_2$5 = ["textContent"];
2005
+ const _hoisted_1$8 = ["title"];
2006
+ const _hoisted_2$4 = ["textContent"];
2007
2007
  const _hoisted_3$4 = {
2008
2008
  key: 1,
2009
2009
  class: "select-status"
@@ -2053,7 +2053,7 @@ var _sfc_main$h = defineComponent({
2053
2053
  }, [createElementVNode("div", {
2054
2054
  class: "item-text ellipsis",
2055
2055
  textContent: toDisplayString(__props.item.text)
2056
- }, null, 8, _hoisted_2$5), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$x, {
2056
+ }, null, 8, _hoisted_2$4), __props.item.type == "group" ? (openBlock(), createBlock(_sfc_main$x, {
2057
2057
  key: 0,
2058
2058
  type: "arrow",
2059
2059
  color: "#8a9099"
@@ -2061,7 +2061,7 @@ var _sfc_main$h = defineComponent({
2061
2061
  type: "success",
2062
2062
  color: "white",
2063
2063
  size: 12
2064
- })])) : createCommentVNode("", true)], 42, _hoisted_1$9)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
2064
+ })])) : createCommentVNode("", true)], 42, _hoisted_1$8)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
2065
2065
  key: 1
2066
2066
  }, renderList(unref(showChildrenRef), child => {
2067
2067
  return openBlock(), createBlock(_component_SelectNode, {
@@ -2277,11 +2277,11 @@ var _sfc_main$g = defineComponent({
2277
2277
  }
2278
2278
  });
2279
2279
 
2280
- const _hoisted_1$8 = {
2280
+ const _hoisted_1$7 = {
2281
2281
  key: 0,
2282
2282
  class: "select-result"
2283
2283
  };
2284
- const _hoisted_2$4 = ["title", "textContent"];
2284
+ const _hoisted_2$3 = ["title", "textContent"];
2285
2285
  const _hoisted_3$3 = ["textContent"];
2286
2286
  const _hoisted_4$3 = {
2287
2287
  key: 1,
@@ -2422,11 +2422,11 @@ var _sfc_main$f = defineComponent({
2422
2422
  ref: "select"
2423
2423
  }, [__props.items && __props.items.length ? (openBlock(), createElementBlock(Fragment, {
2424
2424
  key: 0
2425
- }, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$8, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))), () => [createElementVNode("div", {
2425
+ }, [selectedItemsRef.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$7, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))), () => [createElementVNode("div", {
2426
2426
  class: "select-text ellipsis",
2427
2427
  title: selectedTextRef.value,
2428
2428
  textContent: toDisplayString(selectedTextRef.value)
2429
- }, null, 8, _hoisted_2$4)])])) : (openBlock(), createElementBlock("div", {
2429
+ }, null, 8, _hoisted_2$3)])])) : (openBlock(), createElementBlock("div", {
2430
2430
  key: 1,
2431
2431
  class: "placeholder",
2432
2432
  textContent: toDisplayString(__props.readonly ? "" : __props.placeholder || "请选择")
@@ -2492,7 +2492,7 @@ var _sfc_main$e = defineComponent({
2492
2492
  }
2493
2493
  });
2494
2494
 
2495
- const _hoisted_1$7 = ["readonly", "placeholder", "rows"];
2495
+ const _hoisted_1$6 = ["readonly", "placeholder", "rows"];
2496
2496
  var _sfc_main$d = defineComponent({
2497
2497
  ...{
2498
2498
  name: "Textarea"
@@ -2553,15 +2553,15 @@ var _sfc_main$d = defineComponent({
2553
2553
  onInput: _cache[2] || (_cache[2] = $event => emits("input", textareaDom.value.value)),
2554
2554
  onBlur: _cache[3] || (_cache[3] = $event => emits("blur", textareaDom.value.value)),
2555
2555
  onChange: _cache[4] || (_cache[4] = $event => emits("change", textareaDom.value.value))
2556
- }), null, 16, _hoisted_1$7)), [[vModelText, valueModel.value]]);
2556
+ }), null, 16, _hoisted_1$6)), [[vModelText, valueModel.value]]);
2557
2557
  };
2558
2558
  }
2559
2559
  });
2560
2560
 
2561
- const _hoisted_1$6 = {
2561
+ const _hoisted_1$5 = {
2562
2562
  class: "fold-header"
2563
2563
  };
2564
- const _hoisted_2$3 = ["textContent"];
2564
+ const _hoisted_2$2 = ["textContent"];
2565
2565
  const _hoisted_3$2 = ["textContent"];
2566
2566
  const _hoisted_4$2 = {
2567
2567
  key: 1,
@@ -2641,10 +2641,10 @@ var _sfc_main$c = defineComponent({
2641
2641
  return (_ctx, _cache) => {
2642
2642
  return openBlock(), createElementBlock("div", {
2643
2643
  class: normalizeClass(["snail-fold", statusModel.value])
2644
- }, [createElementVNode("div", _hoisted_1$6, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("div", {
2644
+ }, [createElementVNode("div", _hoisted_1$5, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("div", {
2645
2645
  class: "title ellipsis",
2646
2646
  textContent: toDisplayString(__props.title)
2647
- }, null, 8, _hoisted_2$3), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
2647
+ }, null, 8, _hoisted_2$2), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
2648
2648
  key: 0,
2649
2649
  class: "subtitle ellipsis",
2650
2650
  textContent: toDisplayString(__props.subtitle)
@@ -2670,11 +2670,7 @@ var _sfc_main$b = defineComponent({
2670
2670
  scrollY: {
2671
2671
  type: Boolean
2672
2672
  },
2673
- barSize: {},
2674
- barMode: {},
2675
- debounce: {
2676
- type: Boolean
2677
- }
2673
+ barSize: {}
2678
2674
  },
2679
2675
  emits: ["xbar", "left", "right", "ybar", "top", "bottom"],
2680
2676
  setup(__props, _ref) {
@@ -2691,13 +2687,9 @@ var _sfc_main$b = defineComponent({
2691
2687
  const {
2692
2688
  onInterval
2693
2689
  } = useTimer();
2694
- const classRef = computed(() => ({
2695
- "debounce": props.scrollY == true && props.debounce == true,
2696
- "hover-show": props.barMode == "hover"
2697
- }));
2698
2690
  const styleRef = computed(() => {
2699
2691
  const style = Object.create(null);
2700
- (props.scrollX || props.scrollY) && (style["--scroll-overflow"] = `${props.scrollX ? "auto" : "hidden"} ${props.scrollY ? "auto" : "hidden"}`);
2692
+ (props.scrollX || props.scrollY) && (style["--scroll-overflow"] = `${props.scrollX == true ? "auto" : "hidden"} ${props.scrollY == true ? "auto" : "hidden"}`);
2701
2693
  if (props.barSize) {
2702
2694
  switch (props.barSize) {
2703
2695
  case "normal":
@@ -2771,15 +2763,9 @@ var _sfc_main$b = defineComponent({
2771
2763
  events.top && emits("top");
2772
2764
  events.bottom && emits("bottom");
2773
2765
  if (rootDom.value) {
2774
- rootDom.value.classList.remove("x-bar", "y-bar", "left", "right", "top", "bottom");
2775
- const classes = [];
2776
- status.xbar && classes.push("x-bar");
2777
- status.ybar && classes.push("y-bar");
2778
- status.left && classes.push("left");
2779
- status.right && classes.push("right");
2780
- status.top && classes.push("top");
2781
- status.bottom && classes.push("bottom");
2782
- classes.length && rootDom.value.classList.add(...classes);
2766
+ rootDom.value.classList.remove("x-bar", "y-bar");
2767
+ status.xbar && rootDom.value.classList.add("x-bar");
2768
+ status.ybar && rootDom.value.classList.add("y-bar");
2783
2769
  }
2784
2770
  }
2785
2771
  onMounted(() => {
@@ -2792,39 +2778,96 @@ var _sfc_main$b = defineComponent({
2792
2778
  });
2793
2779
  return (_ctx, _cache) => {
2794
2780
  return openBlock(), createElementBlock("div", {
2795
- class: normalizeClass(["snail-scroll", classRef.value]),
2781
+ class: "snail-scroll",
2796
2782
  ref: "scroll-root",
2797
2783
  style: normalizeStyle(styleRef.value),
2798
2784
  onScroll: refreshScrollInfo
2799
- }, [renderSlot(_ctx.$slots, "default")], 38);
2785
+ }, [renderSlot(_ctx.$slots, "default")], 36);
2800
2786
  };
2801
2787
  }
2802
2788
  });
2803
2789
 
2804
- const _hoisted_1$5 = {
2805
- key: 0,
2806
- class: "layout-start"
2807
- };
2808
- const _hoisted_2$2 = {
2809
- key: 1,
2810
- class: "layout-end"
2811
- };
2812
2790
  var _sfc_main$a = defineComponent({
2813
2791
  __name: "layout",
2814
2792
  props: {
2815
2793
  mode: {},
2816
- scroll: {}
2794
+ default: {},
2795
+ left: {},
2796
+ right: {},
2797
+ top: {},
2798
+ bottom: {}
2817
2799
  },
2818
2800
  setup(__props) {
2801
+ const props = __props;
2802
+ const areaMap = computed(() => {
2803
+ const map = Object.create(null);
2804
+ map.default = {
2805
+ scrollable: props.default && props.default.scroll != void 0,
2806
+ class: "main-area",
2807
+ style: void 0
2808
+ };
2809
+ if (props.mode == "vertical") {
2810
+ map.top = {
2811
+ scrollable: props.top && props.top.scroll != void 0,
2812
+ class: "top-area",
2813
+ style: buildHeightStyle(props.top)
2814
+ };
2815
+ map.bottom = {
2816
+ scrollable: props.bottom && props.bottom.scroll != void 0,
2817
+ class: "bottom-area",
2818
+ style: buildHeightStyle(props.bottom)
2819
+ };
2820
+ } else {
2821
+ map.left = {
2822
+ scrollable: props.left && props.left.scroll != void 0,
2823
+ class: "left-area",
2824
+ style: buildWidthStyle(props.left)
2825
+ };
2826
+ map.right = {
2827
+ scrollable: props.right && props.right.scroll != void 0,
2828
+ class: "right-area",
2829
+ style: buildWidthStyle(props.right)
2830
+ };
2831
+ }
2832
+ return map;
2833
+ });
2834
+ function buildWidthStyle(style) {
2835
+ return style ? css.buildStyle({
2836
+ minWidth: style.minWidth,
2837
+ width: style.width,
2838
+ maxWidth: style.maxWidth
2839
+ }) : void 0;
2840
+ }
2841
+ function buildHeightStyle(style) {
2842
+ return style ? css.buildStyle({
2843
+ minHeight: style.minHeight,
2844
+ height: style.height,
2845
+ maxHeight: style.maxHeight
2846
+ }) : void 0;
2847
+ }
2819
2848
  return (_ctx, _cache) => {
2820
2849
  return openBlock(), createElementBlock("div", {
2821
2850
  class: normalizeClass(["snail-layout", __props.mode])
2822
- }, [_ctx.$slots.start ? (openBlock(), createElementBlock("div", _hoisted_1$5, [renderSlot(_ctx.$slots, "start")])) : createCommentVNode("", true), createVNode(_sfc_main$b, mergeProps({
2823
- class: "layout-body"
2824
- }, __props.scroll), {
2825
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
2826
- _: 3
2827
- }, 16), _ctx.$slots.end ? (openBlock(), createElementBlock("div", _hoisted_2$2, [renderSlot(_ctx.$slots, "end")])) : createCommentVNode("", true)], 2);
2851
+ }, [(openBlock(), createElementBlock(Fragment, null, renderList(["top", "left", "default", "right", "bottom"], item => {
2852
+ return openBlock(), createElementBlock(Fragment, {
2853
+ key: item
2854
+ }, [areaMap.value[item] && _ctx.$slots[item] ? (openBlock(), createElementBlock(Fragment, {
2855
+ key: 0
2856
+ }, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$b, mergeProps({
2857
+ key: 0,
2858
+ class: areaMap.value[item].class,
2859
+ style: areaMap.value[item].style
2860
+ }, {
2861
+ ref_for: true
2862
+ }, props[item].scroll), {
2863
+ default: withCtx(() => [renderSlot(_ctx.$slots, item)]),
2864
+ _: 2
2865
+ }, 1040, ["class", "style"])) : (openBlock(), createElementBlock("div", {
2866
+ key: 1,
2867
+ class: normalizeClass(areaMap.value[item].class),
2868
+ style: normalizeStyle(areaMap.value[item].style)
2869
+ }, [renderSlot(_ctx.$slots, item)], 6))], 64)) : createCommentVNode("", true)], 64);
2870
+ }), 64))], 2);
2828
2871
  };
2829
2872
  }
2830
2873
  });
@@ -2947,10 +2990,6 @@ var _sfc_main$8 = defineComponent({
2947
2990
  type: Boolean
2948
2991
  },
2949
2992
  barSize: {},
2950
- barMode: {},
2951
- debounce: {
2952
- type: Boolean
2953
- },
2954
2993
  border: {
2955
2994
  type: Boolean
2956
2995
  },
@@ -3380,27 +3419,21 @@ function mount(target, options, onDestroyed) {
3380
3419
  }
3381
3420
 
3382
3421
  const _hoisted_1$1 = {
3383
- class: "time-zone"
3384
- };
3385
- const _hoisted_2 = {
3386
3422
  class: "tz-item",
3387
3423
  ref: "hour-items"
3388
3424
  };
3389
- const _hoisted_3 = ["textContent", "onClick"];
3390
- const _hoisted_4 = {
3425
+ const _hoisted_2 = ["textContent", "onClick"];
3426
+ const _hoisted_3 = {
3391
3427
  class: "tz-item",
3392
3428
  ref: "minute-items"
3393
3429
  };
3394
- const _hoisted_5 = ["textContent", "onClick"];
3395
- const _hoisted_6 = {
3430
+ const _hoisted_4 = ["textContent", "onClick"];
3431
+ const _hoisted_5 = {
3396
3432
  key: 0,
3397
3433
  class: "tz-item",
3398
3434
  ref: "second-items"
3399
3435
  };
3400
- const _hoisted_7 = ["textContent", "onClick"];
3401
- const _hoisted_8 = {
3402
- class: "time-operation"
3403
- };
3436
+ const _hoisted_6 = ["textContent", "onClick"];
3404
3437
  var _sfc_main$1 = defineComponent({
3405
3438
  __name: "time-pc",
3406
3439
  props: {
@@ -3551,51 +3584,56 @@ var _sfc_main$1 = defineComponent({
3551
3584
  scrollIntoView(sItemsDom.value);
3552
3585
  });
3553
3586
  return (_ctx, _cache) => {
3554
- return openBlock(), createElementBlock("div", {
3587
+ return openBlock(), createBlock(_sfc_main$a, {
3555
3588
  class: normalizeClass(["snail-time-picker pc", {
3556
3589
  "second-disabled": secondDisabled
3557
- }])
3558
- }, [createVNode(_sfc_main$5, {
3559
- group: true,
3560
- effect: ["down-up"]
3590
+ }]),
3591
+ mode: "vertical"
3561
3592
  }, {
3562
- default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(Array(24).fill(void 0), (_, index) => {
3563
- return openBlock(), createElementBlock("div", {
3564
- class: normalizeClass(["tzi-number", getTimeClass("hour", index)]),
3565
- textContent: toDisplayString(String(index).padStart(2, "0")),
3566
- onClick: $event => onTimeClick("hour", index)
3567
- }, null, 10, _hoisted_3);
3568
- }), 256))], 512), createElementVNode("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(Array(60).fill(void 0), (_, index) => {
3569
- return openBlock(), createElementBlock("div", {
3570
- class: normalizeClass(["tzi-number", getTimeClass("minute", index)]),
3571
- textContent: toDisplayString(String(index).padStart(2, "0")),
3572
- onClick: $event => onTimeClick("minute", index)
3573
- }, null, 10, _hoisted_5);
3574
- }), 256))], 512), secondDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(Array(60).fill(void 0), (_, index) => {
3575
- return openBlock(), createElementBlock("div", {
3576
- class: normalizeClass(["tzi-number", getTimeClass("second", index)]),
3577
- textContent: toDisplayString(String(index).padStart(2, "0")),
3578
- onClick: $event => onTimeClick("second", index)
3579
- }, null, 10, _hoisted_7);
3580
- }), 256))], 512)) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_8, [createVNode(_sfc_main$y, {
3581
- type: "link",
3582
- size: "small",
3583
- textContent: "清空",
3584
- onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), unref(inPopup) && unref(closePopup)("")))
3585
- }), unref(tm).validate(unref(getTimeNow)()) ? (openBlock(), createBlock(_sfc_main$y, {
3586
- key: 0,
3587
- type: "link",
3588
- size: "small",
3589
- textContent: "现在",
3590
- onClick: onNow
3591
- })) : createCommentVNode("", true), createVNode(_sfc_main$y, {
3592
- type: "link",
3593
- size: "small",
3594
- textContent: "确定",
3595
- onClick: onConfirm
3596
- })])]),
3593
+ default: withCtx(() => [createVNode(_sfc_main$5, {
3594
+ group: true,
3595
+ effect: "down-up"
3596
+ }, {
3597
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(Array(24).fill(void 0), (_, index) => {
3598
+ return openBlock(), createElementBlock("div", {
3599
+ class: normalizeClass(["tzi-number", getTimeClass("hour", index)]),
3600
+ textContent: toDisplayString(String(index).padStart(2, "0")),
3601
+ onClick: $event => onTimeClick("hour", index)
3602
+ }, null, 10, _hoisted_2);
3603
+ }), 256))], 512), createElementVNode("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(Array(60).fill(void 0), (_, index) => {
3604
+ return openBlock(), createElementBlock("div", {
3605
+ class: normalizeClass(["tzi-number", getTimeClass("minute", index)]),
3606
+ textContent: toDisplayString(String(index).padStart(2, "0")),
3607
+ onClick: $event => onTimeClick("minute", index)
3608
+ }, null, 10, _hoisted_4);
3609
+ }), 256))], 512), secondDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(Array(60).fill(void 0), (_, index) => {
3610
+ return openBlock(), createElementBlock("div", {
3611
+ class: normalizeClass(["tzi-number", getTimeClass("second", index)]),
3612
+ textContent: toDisplayString(String(index).padStart(2, "0")),
3613
+ onClick: $event => onTimeClick("second", index)
3614
+ }, null, 10, _hoisted_6);
3615
+ }), 256))], 512)) : createCommentVNode("", true)]),
3616
+ bottom: withCtx(() => [createVNode(_sfc_main$y, {
3617
+ type: "link",
3618
+ size: "small",
3619
+ textContent: "清空",
3620
+ onClick: _cache[0] || (_cache[0] = $event => (emits("clear"), unref(inPopup) && unref(closePopup)("")))
3621
+ }), unref(tm).validate(unref(getTimeNow)()) ? (openBlock(), createBlock(_sfc_main$y, {
3622
+ key: 0,
3623
+ type: "link",
3624
+ size: "small",
3625
+ textContent: "现在",
3626
+ onClick: onNow
3627
+ })) : createCommentVNode("", true), createVNode(_sfc_main$y, {
3628
+ type: "link",
3629
+ size: "small",
3630
+ textContent: "确定",
3631
+ onClick: onConfirm
3632
+ })]),
3633
+ _: 1
3634
+ })]),
3597
3635
  _: 1
3598
- })], 2);
3636
+ }, 8, ["class"]);
3599
3637
  };
3600
3638
  }
3601
3639
  });