snail.vue 1.0.23 → 1.0.26

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.
@@ -1,4 +1,5 @@
1
- import { AlignStyle, SizeOptions } from 'snail.view';
1
+ import * as snail_view from 'snail.view';
2
+ import { AlignStyle, WidthStyle, FlexStyle, BorderStyle, PaddingStyle, HeightStyle } from 'snail.view';
2
3
  import * as vue from 'vue';
3
4
  import { Component, App, Ref, ShallowRef } from 'vue';
4
5
  import { IScope } from 'snail.core';
@@ -13,10 +14,11 @@ type LoadingOptions = {
13
14
  */
14
15
  show: boolean;
15
16
  /**
16
- * 展示遮罩层
17
- * - 默认值:false,显示遮罩层
17
+ * 禁用【遮罩层】
18
+ * - false 显示遮罩层
19
+ * - true 不显示遮罩层
18
20
  */
19
- disabledMask?: boolean;
21
+ maskDisabled?: boolean;
20
22
  /**
21
23
  * loading的根样式
22
24
  * - 外部传入后,可进行自由定制loading样式
@@ -116,7 +118,7 @@ type InputOptions = {
116
118
  * - 对齐方式
117
119
  * - 标题区域宽度
118
120
  */
119
- titleStyle?: AlignStyle & SizeOptions;
121
+ titleStyle?: AlignStyle & WidthStyle & FlexStyle;
120
122
  };
121
123
  /**
122
124
  * 输入框事件
@@ -202,73 +204,17 @@ type TableStyleOptions = {
202
204
  /**
203
205
  * 高度
204
206
  */
205
- height?: number;
206
- /**
207
- * 高度单位
208
- * - 默认 px
209
- */
210
- heightUnit?: "px" | "rem" | "vw" | "vh";
207
+ height?: string;
211
208
  };
212
209
  /**
213
210
  * Table 行配置选项
214
211
  */
215
- type TableRowOptions = {
216
- /**
217
- * 行高
218
- */
219
- height: number;
220
- /**
221
- * 行高单位
222
- * - 默认px
223
- */
224
- unit?: "px" | "rem" | "vw" | "vh";
225
- };
212
+ type TableRowOptions = HeightStyle & {};
226
213
  /**
227
214
  * Table 列配置选项
215
+ * - border 样式需要配合TableOptions.border使用,否则会导致边框线重叠
228
216
  */
229
- type TableColOptions = {
230
- /**
231
- * 列占比
232
- * - 存在时,width属性无效
233
- */
234
- flex?: number;
235
- /**
236
- * 列宽
237
- */
238
- width?: number;
239
- /**
240
- * 列最小宽度
241
- * - width属性未指定、或者无效时生效;
242
- * - 推荐和flex搭配使用
243
- */
244
- minWidth?: number;
245
- /**
246
- * 列最大宽度
247
- * - width属性未指定、或者无效时生效;
248
- * - 推荐和flex搭配使用
249
- */
250
- maxWidth?: number;
251
- /**
252
- * 列宽单位
253
- * - 默认px
254
- */
255
- unit?: "px" | "rem" | "vw" | "vh";
256
- /**
257
- * 列对齐方式
258
- * - 默认left
259
- */
260
- align?: "left" | "center" | "right";
261
- /**
262
- * border样式
263
- * - 完整的border样式;如 1px soloid #000000
264
- * - 需要配合TableOptions.border使用,否则会导致边框线重叠
265
- */
266
- borderStyle?: string;
267
- /**
268
- * padding样式
269
- */
270
- paddingStyle?: string;
271
- };
217
+ type TableColOptions = FlexStyle & WidthStyle & Pick<AlignStyle, "align"> & Pick<BorderStyle, "border"> & Pick<PaddingStyle, "padding">;
272
218
 
273
219
  /**
274
220
  * 折叠面板配置选项
@@ -284,10 +230,10 @@ type FoldOptions = {
284
230
  */
285
231
  subtitle?: string;
286
232
  /**
287
- * 使用禁用【折叠】功能
233
+ * 禁用【折叠】功能
288
234
  * - true 则禁用折叠,始终展开内容区域
289
235
  */
290
- disable?: boolean;
236
+ disabled?: boolean;
291
237
  };
292
238
  /**
293
239
  * 折叠状态
@@ -438,7 +384,7 @@ type HeaderOptions = {
438
384
  /** 禁用【关闭】按钮
439
385
  * - 默认值false
440
386
  */
441
- closeDisable?: boolean;
387
+ closeDisabled?: boolean;
442
388
  };
443
389
  /**
444
390
  * 头部事件
@@ -473,7 +419,7 @@ type FooterOptions = {
473
419
  * 禁用【取消】按钮
474
420
  * - 为true时,不显示【取消】按钮
475
421
  */
476
- cancelDisable?: boolean;
422
+ cancelDisabled?: boolean;
477
423
  /**
478
424
  * 【确定】按钮名称
479
425
  * - 默认【确定】
@@ -483,7 +429,7 @@ type FooterOptions = {
483
429
  * 禁用【确定】按钮
484
430
  * - 为true时,不显示【确定】按钮
485
431
  */
486
- confirmDisable?: boolean;
432
+ confirmDisabled?: boolean;
487
433
  };
488
434
  /**
489
435
  * 底部组件事件
@@ -699,7 +645,7 @@ type ConfirmOptions = {
699
645
  * 禁用【取消】按钮
700
646
  * - 为true时,不显示【取消】按钮
701
647
  */
702
- cancelDisable?: boolean;
648
+ cancelDisabled?: boolean;
703
649
  /**
704
650
  * 【确定】按钮名称
705
651
  * - 默认【确定】
@@ -709,7 +655,7 @@ type ConfirmOptions = {
709
655
  * 禁用【确定】按钮
710
656
  * - 为true时,不显示【确定】按钮
711
657
  */
712
- confirmDisable?: boolean;
658
+ confirmDisabled?: boolean;
713
659
  };
714
660
  /**
715
661
  * 确认弹窗句柄
@@ -945,18 +891,18 @@ declare const components: {
945
891
  };
946
892
  });
947
893
  TableRow: {
948
- new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<TableRowOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
894
+ new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<snail_view.HeightStyle> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
949
895
  P: {};
950
896
  B: {};
951
897
  D: {};
952
898
  C: {};
953
899
  M: {};
954
900
  Defaults: {};
955
- }, Readonly<TableRowOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
901
+ }, Readonly<snail_view.HeightStyle> & Readonly<{}>, {}, {}, {}, {}, {}>;
956
902
  __isFragment?: never;
957
903
  __isTeleport?: never;
958
904
  __isSuspense?: never;
959
- } & vue.ComponentOptionsBase<Readonly<TableRowOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
905
+ } & vue.ComponentOptionsBase<Readonly<snail_view.HeightStyle> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
960
906
  $slots: {
961
907
  default?: (props: {}) => any;
962
908
  };
package/dist/snail.vue.js CHANGED
@@ -1,7 +1,7 @@
1
1
  //@ sourceURL=/snail.vue.js
2
2
  import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, createBlock, createCommentVNode, toDisplayString, createElementVNode, normalizeProps, guardReactiveProps, unref, computed, mergeProps, mergeModels, useModel, Transition, withCtx, ref, shallowRef, watch, onErrorCaptured, onActivated, onDeactivated, Fragment, resolveDynamicComponent, createSlots, renderList, useTemplateRef, onUnmounted, createVNode, normalizeStyle, TransitionGroup, withModifiers, createApp, onMounted } from 'vue';
3
- import { tidyString, throwError, mustString, style, mustFunction, useScope, isStringNotEmpty, isObject, script, delay, getMessage, useHook, mustObject, defer, newId, isFunction } from 'snail.core';
4
- import { useAnimation, style as style$1, useObserver } from 'snail.view';
3
+ import { tidyString, throwError, mustString, mustFunction, useScope, isStringNotEmpty, isObject, script, delay, getMessage, useHook, mustObject, defer, newId, isFunction } from 'snail.core';
4
+ import { link, useAnimation, css, useObserver } from 'snail.view';
5
5
 
6
6
  var _sfc_main$h = defineComponent({
7
7
  ...{
@@ -23,6 +23,10 @@ var _sfc_main$h = defineComponent({
23
23
  }
24
24
  });
25
25
 
26
+ var addLink = href => setTimeout(link.register, 0, href);
27
+
28
+ addLink("/styles/snail.vue.vue.css");
29
+
26
30
  var _sfc_main$g = defineComponent({
27
31
  ...{
28
32
  name: "Footer",
@@ -35,11 +39,11 @@ var _sfc_main$g = defineComponent({
35
39
  type: Boolean
36
40
  },
37
41
  cancelName: {},
38
- cancelDisable: {
42
+ cancelDisabled: {
39
43
  type: Boolean
40
44
  },
41
45
  confirmName: {},
42
- confirmDisable: {
46
+ confirmDisabled: {
43
47
  type: Boolean
44
48
  }
45
49
  },
@@ -55,13 +59,13 @@ var _sfc_main$g = defineComponent({
55
59
  class: normalizeClass(["snail-footer", {
56
60
  "start-divider": props.divider
57
61
  }, props.align || "right"])
58
- }, [renderSlot(_ctx.$slots, "default", {}, () => [props.cancelDisable != true ? (openBlock(), createBlock(_sfc_main$h, {
62
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$h, {
59
63
  key: 0,
60
64
  size: "max",
61
65
  type: "default",
62
66
  onClick: _cache[0] || (_cache[0] = $event => emit("cancel")),
63
67
  textContent: toDisplayString(props.cancelName || "取消")
64
- }, null, 8, ["textContent"])) : createCommentVNode("", true), props.confirmDisable != true ? (openBlock(), createBlock(_sfc_main$h, {
68
+ }, null, 8, ["textContent"])) : createCommentVNode("", true), props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$h, {
65
69
  key: 1,
66
70
  size: "max",
67
71
  type: "primary",
@@ -155,7 +159,7 @@ var _sfc_main$e = defineComponent({
155
159
  titleAlign: {
156
160
  default: "center"
157
161
  },
158
- closeDisable: {
162
+ closeDisabled: {
159
163
  type: Boolean,
160
164
  default: false
161
165
  }
@@ -180,7 +184,7 @@ var _sfc_main$e = defineComponent({
180
184
  key: 0,
181
185
  textContent: toDisplayString(_ctx.title),
182
186
  class: normalizeClass(["header-title", _ctx.titleAlign])
183
- }, null, 10, _hoisted_1$8)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.closeDisable != true ? (openBlock(), createBlock(_sfc_main$f, mergeProps({
187
+ }, null, 10, _hoisted_1$8)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$f, mergeProps({
184
188
  key: 1,
185
189
  class: "close-icon"
186
190
  }, closeIconOptions.value, {
@@ -190,10 +194,6 @@ var _sfc_main$e = defineComponent({
190
194
  }
191
195
  });
192
196
 
193
- var addLink = href => setTimeout(style.register, 0, href);
194
-
195
- addLink("/styles/snail.vue.vue.css");
196
-
197
197
  var _sfc_main$d = defineComponent({
198
198
  ...{
199
199
  name: "Switch",
@@ -274,7 +274,7 @@ var _sfc_main$c = defineComponent({
274
274
  type: Boolean,
275
275
  default: false
276
276
  },
277
- disabledMask: {
277
+ maskDisabled: {
278
278
  type: Boolean,
279
279
  default: false
280
280
  },
@@ -293,7 +293,7 @@ var _sfc_main$c = defineComponent({
293
293
  default: withCtx(() => [_ctx.show ? (openBlock(), createElementBlock("div", {
294
294
  key: 0,
295
295
  class: normalizeClass(["snail-loading", {
296
- "show-mask": _ctx.disabledMask != true
296
+ "show-mask": _ctx.maskDisabled != true
297
297
  }, _ctx.rootClass])
298
298
  }, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.$attrs)))], 2)) : createCommentVNode("", true)]),
299
299
  _: 3
@@ -393,6 +393,10 @@ const _hoisted_4$1 = {
393
393
  class: "status"
394
394
  };
395
395
  const _hoisted_5$1 = ["title"];
396
+ const _hoisted_6 = {
397
+ class: "fold-body",
398
+ ref: "foldBody"
399
+ };
396
400
  var _sfc_main$a = defineComponent({
397
401
  ...{
398
402
  name: "Fold",
@@ -402,7 +406,7 @@ var _sfc_main$a = defineComponent({
402
406
  props: mergeModels({
403
407
  title: {},
404
408
  subtitle: {},
405
- disable: {
409
+ disabled: {
406
410
  type: Boolean
407
411
  }
408
412
  }, {
@@ -420,18 +424,42 @@ var _sfc_main$a = defineComponent({
420
424
  const emit = __emit;
421
425
  const animationScope = useAnimation();
422
426
  const status = useModel(__props, "status");
423
- const statusWatch = watch(status, calcFoldStyle);
427
+ const statusWatch = watch(status, updateFoldStyle);
424
428
  const statusIcon = getFoldStatusDraw();
425
- const foldBodyRef = useTemplateRef("foldBodyRef");
426
- function calcFoldStyle() {
429
+ const foldStatusSpanRef = useTemplateRef("foldStatusSpan");
430
+ const foldBodyRef = useTemplateRef("foldBody");
431
+ function updateFoldStyle() {
432
+ const isExpand = status.value == "expand";
433
+ if (foldStatusSpanRef.value) {
434
+ animationScope.transition(foldStatusSpanRef.value, {
435
+ from: {
436
+ transition: "transform 0.2s ease",
437
+ transform: isExpand ? "rotateZ(180deg)" : "rotate(0)"
438
+ },
439
+ to: {
440
+ transform: isExpand ? "rotate(0)" : "rotateZ(180deg)"
441
+ },
442
+ end: {
443
+ transform: isExpand ? "" : "rotateZ(180deg)"
444
+ }
445
+ });
446
+ }
427
447
  if (foldBodyRef.value) {
428
448
  const minHeight = 32;
429
449
  const maxHeight = minHeight + foldBodyRef.value.getBoundingClientRect().height;
430
- animationScope.roll(foldBodyRef.value, "vertical", {
431
- start: `${status.value == "expand" ? minHeight : maxHeight}px`,
432
- target: `${status.value == "expand" ? maxHeight : minHeight}px`,
433
- time: 200,
434
- clear: true
450
+ animationScope.transition(foldBodyRef.value.parentElement, {
451
+ from: {
452
+ transition: "height 0.2s ease",
453
+ overflow: "hidden",
454
+ height: `${isExpand ? minHeight : maxHeight}px`
455
+ },
456
+ to: {
457
+ height: `${isExpand ? maxHeight : minHeight}px`
458
+ },
459
+ end: {
460
+ overflow: isExpand ? "" : "hidden",
461
+ height: isExpand ? "" : `${minHeight}px`
462
+ }
435
463
  });
436
464
  }
437
465
  }
@@ -462,17 +490,14 @@ var _sfc_main$a = defineComponent({
462
490
  key: 0,
463
491
  class: "subtitle",
464
492
  textContent: toDisplayString(props.subtitle)
465
- }, null, 8, _hoisted_3$2)) : createCommentVNode("", true), props.disable != true ? (openBlock(), createElementBlock("div", _hoisted_4$1, [createElementVNode("span", {
466
- title: status.value == "expand" ? "收起" : "展开"
493
+ }, null, 8, _hoisted_3$2)) : createCommentVNode("", true), props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$1, [createElementVNode("span", {
494
+ title: status.value == "expand" ? "收起" : "展开",
495
+ ref: "foldStatusSpan"
467
496
  }, [createVNode(_sfc_main$f, {
468
497
  type: "custom",
469
498
  draw: unref(statusIcon),
470
499
  onClick: onStatusClick
471
- }, null, 8, ["draw"])], 8, _hoisted_5$1)])) : createCommentVNode("", true)])]), createElementVNode("div", {
472
- class: "fold-body",
473
- ref_key: "foldBodyRef",
474
- ref: foldBodyRef
475
- }, [renderSlot(_ctx.$slots, "default")], 512)], 2);
500
+ }, null, 8, ["draw"])], 8, _hoisted_5$1)])) : createCommentVNode("", true)])]), createElementVNode("div", _hoisted_6, [renderSlot(_ctx.$slots, "default")], 512)], 2);
476
501
  };
477
502
  }
478
503
  });
@@ -535,7 +560,7 @@ var _sfc_main$8 = defineComponent({
535
560
  styleOptions = styleOptions || {};
536
561
  const style = Object.create(null);
537
562
  styleOptions.background && (style.background = styleOptions.background);
538
- styleOptions.height && (style.height = styleOptions.height + (styleOptions.heightUnit || "px"));
563
+ styleOptions.height && (style.height = styleOptions.height);
539
564
  return style;
540
565
  }
541
566
  return (_ctx, _cache) => {
@@ -546,10 +571,10 @@ var _sfc_main$8 = defineComponent({
546
571
  "scroll-x": props.scrollX,
547
572
  "scroll-y": props.scrollY
548
573
  }, {
549
- default: withCtx(() => [createElementVNode("header", {
574
+ default: withCtx(() => [createElementVNode("div", {
550
575
  class: "table-header",
551
576
  style: normalizeStyle(getStyle(props.headerStyle))
552
- }, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("main", _hoisted_1$6, [renderSlot(_ctx.$slots, "default")]), createElementVNode("footer", {
577
+ }, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$6, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
553
578
  class: "table-footer",
554
579
  style: normalizeStyle(getStyle(props.footerStyle))
555
580
  }, [renderSlot(_ctx.$slots, "footer")], 4)]),
@@ -567,15 +592,12 @@ var _sfc_main$7 = defineComponent({
567
592
  __name: "table-row",
568
593
  props: {
569
594
  height: {},
570
- unit: {}
595
+ minHeight: {},
596
+ maxHeight: {}
571
597
  },
572
598
  setup(__props) {
573
599
  const props = __props;
574
- const rowStyle = computed(() => {
575
- const style = Object.create(null);
576
- props.height > 0 && (style.height = props.height + (props.unit || "px"));
577
- return style;
578
- });
600
+ const rowStyle = computed(() => css.buildStyle(props));
579
601
  return (_ctx, _cache) => {
580
602
  return openBlock(), createElementBlock("div", {
581
603
  class: "table-row",
@@ -593,27 +615,19 @@ var _sfc_main$6 = defineComponent({
593
615
  __name: "table-col",
594
616
  props: {
595
617
  flex: {},
618
+ flexBasis: {},
619
+ flexGrow: {},
620
+ flexShrink: {},
596
621
  width: {},
597
622
  minWidth: {},
598
623
  maxWidth: {},
599
- unit: {},
600
624
  align: {},
601
- borderStyle: {},
602
- paddingStyle: {}
625
+ border: {},
626
+ padding: {}
603
627
  },
604
628
  setup(__props) {
605
629
  const props = __props;
606
- const colStyle = computed(() => {
607
- const style = Object.create(null);
608
- props.flex != void 0 ? style.flex = String(props.flex) : props.width && (style.width = props.width + (props.unit || "px"));
609
- if (props.flex != void 0 || props.width == void 0) {
610
- props.minWidth && (style.minWidth = props.minWidth + (props.unit || "px"));
611
- props.maxWidth && (style.maxWidth = props.maxWidth + (props.unit || "px"));
612
- }
613
- props.borderStyle && (style.border = props.borderStyle);
614
- props.paddingStyle && (style.padding = props.paddingStyle);
615
- return style;
616
- });
630
+ const colStyle = computed(() => css.buildStyle(props));
617
631
  return (_ctx, _cache) => {
618
632
  return openBlock(), createElementBlock("div", {
619
633
  class: normalizeClass(["table-col", props.align]),
@@ -757,10 +771,7 @@ const initVueApp = (() => {
757
771
  })();
758
772
 
759
773
  function getTitleStyle(options, isFlex) {
760
- return options && options.titleStyle ? style$1.build({
761
- ...options.titleStyle,
762
- width: options.titleStyle
763
- }, isFlex) : Object.create(null);
774
+ return options && options.titleStyle ? css.buildStyle(options.titleStyle, isFlex) : Object.create(null);
764
775
  }
765
776
 
766
777
  const _hoisted_1$4 = ["textContent"];
@@ -943,11 +954,11 @@ var _sfc_main$2 = defineComponent({
943
954
  title: {},
944
955
  message: {},
945
956
  cancelName: {},
946
- cancelDisable: {
957
+ cancelDisabled: {
947
958
  type: Boolean
948
959
  },
949
960
  confirmName: {},
950
- confirmDisable: {
961
+ confirmDisabled: {
951
962
  type: Boolean
952
963
  },
953
964
  inDialog: {
@@ -972,9 +983,9 @@ var _sfc_main$2 = defineComponent({
972
983
  }, null, 8, _hoisted_2$1), createVNode(_sfc_main$g, {
973
984
  align: "right",
974
985
  "cancel-name": props.cancelName,
975
- "cancel-disable": props.cancelDisable,
986
+ "cancel-disable": props.cancelDisabled,
976
987
  "confirm-name": props.confirmName,
977
- "confirm-disable": props.confirmDisable,
988
+ "confirm-disable": props.confirmDisabled,
978
989
  onCancel: _cache[1] || (_cache[1] = $event => props.closeDialog(false)),
979
990
  onConfirm: _cache[2] || (_cache[2] = $event => props.closeDialog(true))
980
991
  }, null, 8, ["cancel-name", "cancel-disable", "confirm-name", "confirm-disable"])]);
@@ -1044,6 +1055,7 @@ var _sfc_main$1 = defineComponent({
1044
1055
  emit: __emit
1045
1056
  } = _ref;
1046
1057
  const emit = __emit;
1058
+ const observer = useObserver();
1047
1059
  const isTouch = "ontouchstart" in window;
1048
1060
  const dragHandle = useTemplateRef("dragHandle");
1049
1061
  const dragInfo = ref({
@@ -1081,10 +1093,11 @@ var _sfc_main$1 = defineComponent({
1081
1093
  }
1082
1094
  }
1083
1095
  }
1084
- isTouch || onMounted(() => {
1085
- addEventListener("mousemove", onDragMove);
1086
- addEventListener("mouseup", onDragEnd);
1096
+ isTouch || onMounted(function () {
1097
+ observer.onEvent(window, "mousemove", onDragMove);
1098
+ observer.onEvent(window, "mouseup", onDragEnd);
1087
1099
  });
1100
+ onUnmounted(observer.destroy);
1088
1101
  return (_ctx, _cache) => {
1089
1102
  return openBlock(), createElementBlock("div", {
1090
1103
  class: normalizeClass(["snail-drag-verify", {
@@ -37,11 +37,11 @@
37
37
  type: Boolean
38
38
  },
39
39
  cancelName: {},
40
- cancelDisable: {
40
+ cancelDisabled: {
41
41
  type: Boolean
42
42
  },
43
43
  confirmName: {},
44
- confirmDisable: {
44
+ confirmDisabled: {
45
45
  type: Boolean
46
46
  }
47
47
  },
@@ -57,13 +57,13 @@
57
57
  class: vue.normalizeClass(["snail-footer", {
58
58
  "start-divider": props.divider
59
59
  }, props.align || "right"])
60
- }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [props.cancelDisable != true ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
60
+ }, [vue.renderSlot(_ctx.$slots, "default", {}, () => [props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
61
61
  key: 0,
62
62
  size: "max",
63
63
  type: "default",
64
64
  onClick: _cache[0] || (_cache[0] = $event => emit("cancel")),
65
65
  textContent: vue.toDisplayString(props.cancelName || "取消")
66
- }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), props.confirmDisable != true ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
66
+ }, null, 8, ["textContent"])) : vue.createCommentVNode("", true), props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
67
67
  key: 1,
68
68
  size: "max",
69
69
  type: "primary",
@@ -157,7 +157,7 @@
157
157
  titleAlign: {
158
158
  default: "center"
159
159
  },
160
- closeDisable: {
160
+ closeDisabled: {
161
161
  type: Boolean,
162
162
  default: false
163
163
  }
@@ -182,7 +182,7 @@
182
182
  key: 0,
183
183
  textContent: vue.toDisplayString(_ctx.title),
184
184
  class: vue.normalizeClass(["header-title", _ctx.titleAlign])
185
- }, null, 10, _hoisted_1$8)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), _ctx.closeDisable != true ? (vue.openBlock(), vue.createBlock(_sfc_main$f, vue.mergeProps({
185
+ }, null, 10, _hoisted_1$8)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$f, vue.mergeProps({
186
186
  key: 1,
187
187
  class: "close-icon"
188
188
  }, closeIconOptions.value, {
@@ -272,7 +272,7 @@
272
272
  type: Boolean,
273
273
  default: false
274
274
  },
275
- disabledMask: {
275
+ maskDisabled: {
276
276
  type: Boolean,
277
277
  default: false
278
278
  },
@@ -291,7 +291,7 @@
291
291
  default: vue.withCtx(() => [_ctx.show ? (vue.openBlock(), vue.createElementBlock("div", {
292
292
  key: 0,
293
293
  class: vue.normalizeClass(["snail-loading", {
294
- "show-mask": _ctx.disabledMask != true
294
+ "show-mask": _ctx.maskDisabled != true
295
295
  }, _ctx.rootClass])
296
296
  }, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)))], 2)) : vue.createCommentVNode("", true)]),
297
297
  _: 3
@@ -391,6 +391,10 @@
391
391
  class: "status"
392
392
  };
393
393
  const _hoisted_5$1 = ["title"];
394
+ const _hoisted_6 = {
395
+ class: "fold-body",
396
+ ref: "foldBody"
397
+ };
394
398
  var _sfc_main$a = vue.defineComponent({
395
399
  ...{
396
400
  name: "Fold",
@@ -400,7 +404,7 @@
400
404
  props: vue.mergeModels({
401
405
  title: {},
402
406
  subtitle: {},
403
- disable: {
407
+ disabled: {
404
408
  type: Boolean
405
409
  }
406
410
  }, {
@@ -418,18 +422,42 @@
418
422
  const emit = __emit;
419
423
  const animationScope = snail_view.useAnimation();
420
424
  const status = vue.useModel(__props, "status");
421
- const statusWatch = vue.watch(status, calcFoldStyle);
425
+ const statusWatch = vue.watch(status, updateFoldStyle);
422
426
  const statusIcon = getFoldStatusDraw();
423
- const foldBodyRef = vue.useTemplateRef("foldBodyRef");
424
- function calcFoldStyle() {
427
+ const foldStatusSpanRef = vue.useTemplateRef("foldStatusSpan");
428
+ const foldBodyRef = vue.useTemplateRef("foldBody");
429
+ function updateFoldStyle() {
430
+ const isExpand = status.value == "expand";
431
+ if (foldStatusSpanRef.value) {
432
+ animationScope.transition(foldStatusSpanRef.value, {
433
+ from: {
434
+ transition: "transform 0.2s ease",
435
+ transform: isExpand ? "rotateZ(180deg)" : "rotate(0)"
436
+ },
437
+ to: {
438
+ transform: isExpand ? "rotate(0)" : "rotateZ(180deg)"
439
+ },
440
+ end: {
441
+ transform: isExpand ? "" : "rotateZ(180deg)"
442
+ }
443
+ });
444
+ }
425
445
  if (foldBodyRef.value) {
426
446
  const minHeight = 32;
427
447
  const maxHeight = minHeight + foldBodyRef.value.getBoundingClientRect().height;
428
- animationScope.roll(foldBodyRef.value, "vertical", {
429
- start: `${status.value == "expand" ? minHeight : maxHeight}px`,
430
- target: `${status.value == "expand" ? maxHeight : minHeight}px`,
431
- time: 200,
432
- clear: true
448
+ animationScope.transition(foldBodyRef.value.parentElement, {
449
+ from: {
450
+ transition: "height 0.2s ease",
451
+ overflow: "hidden",
452
+ height: `${isExpand ? minHeight : maxHeight}px`
453
+ },
454
+ to: {
455
+ height: `${isExpand ? maxHeight : minHeight}px`
456
+ },
457
+ end: {
458
+ overflow: isExpand ? "" : "hidden",
459
+ height: isExpand ? "" : `${minHeight}px`
460
+ }
433
461
  });
434
462
  }
435
463
  }
@@ -460,17 +488,14 @@
460
488
  key: 0,
461
489
  class: "subtitle",
462
490
  textContent: vue.toDisplayString(props.subtitle)
463
- }, null, 8, _hoisted_3$2)) : vue.createCommentVNode("", true), props.disable != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [vue.createElementVNode("span", {
464
- title: status.value == "expand" ? "收起" : "展开"
491
+ }, null, 8, _hoisted_3$2)) : vue.createCommentVNode("", true), props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [vue.createElementVNode("span", {
492
+ title: status.value == "expand" ? "收起" : "展开",
493
+ ref: "foldStatusSpan"
465
494
  }, [vue.createVNode(_sfc_main$f, {
466
495
  type: "custom",
467
496
  draw: vue.unref(statusIcon),
468
497
  onClick: onStatusClick
469
- }, null, 8, ["draw"])], 8, _hoisted_5$1)])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", {
470
- class: "fold-body",
471
- ref_key: "foldBodyRef",
472
- ref: foldBodyRef
473
- }, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
498
+ }, null, 8, ["draw"])], 8, _hoisted_5$1)])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div", _hoisted_6, [vue.renderSlot(_ctx.$slots, "default")], 512)], 2);
474
499
  };
475
500
  }
476
501
  });
@@ -533,7 +558,7 @@
533
558
  styleOptions = styleOptions || {};
534
559
  const style = Object.create(null);
535
560
  styleOptions.background && (style.background = styleOptions.background);
536
- styleOptions.height && (style.height = styleOptions.height + (styleOptions.heightUnit || "px"));
561
+ styleOptions.height && (style.height = styleOptions.height);
537
562
  return style;
538
563
  }
539
564
  return (_ctx, _cache) => {
@@ -544,10 +569,10 @@
544
569
  "scroll-x": props.scrollX,
545
570
  "scroll-y": props.scrollY
546
571
  }, {
547
- default: vue.withCtx(() => [vue.createElementVNode("header", {
572
+ default: vue.withCtx(() => [vue.createElementVNode("div", {
548
573
  class: "table-header",
549
574
  style: vue.normalizeStyle(getStyle(props.headerStyle))
550
- }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("main", _hoisted_1$6, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("footer", {
575
+ }, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$6, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
551
576
  class: "table-footer",
552
577
  style: vue.normalizeStyle(getStyle(props.footerStyle))
553
578
  }, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
@@ -565,15 +590,12 @@
565
590
  __name: "table-row",
566
591
  props: {
567
592
  height: {},
568
- unit: {}
593
+ minHeight: {},
594
+ maxHeight: {}
569
595
  },
570
596
  setup(__props) {
571
597
  const props = __props;
572
- const rowStyle = vue.computed(() => {
573
- const style = Object.create(null);
574
- props.height > 0 && (style.height = props.height + (props.unit || "px"));
575
- return style;
576
- });
598
+ const rowStyle = vue.computed(() => snail_view.css.buildStyle(props));
577
599
  return (_ctx, _cache) => {
578
600
  return vue.openBlock(), vue.createElementBlock("div", {
579
601
  class: "table-row",
@@ -591,27 +613,19 @@
591
613
  __name: "table-col",
592
614
  props: {
593
615
  flex: {},
616
+ flexBasis: {},
617
+ flexGrow: {},
618
+ flexShrink: {},
594
619
  width: {},
595
620
  minWidth: {},
596
621
  maxWidth: {},
597
- unit: {},
598
622
  align: {},
599
- borderStyle: {},
600
- paddingStyle: {}
623
+ border: {},
624
+ padding: {}
601
625
  },
602
626
  setup(__props) {
603
627
  const props = __props;
604
- const colStyle = vue.computed(() => {
605
- const style = Object.create(null);
606
- props.flex != void 0 ? style.flex = String(props.flex) : props.width && (style.width = props.width + (props.unit || "px"));
607
- if (props.flex != void 0 || props.width == void 0) {
608
- props.minWidth && (style.minWidth = props.minWidth + (props.unit || "px"));
609
- props.maxWidth && (style.maxWidth = props.maxWidth + (props.unit || "px"));
610
- }
611
- props.borderStyle && (style.border = props.borderStyle);
612
- props.paddingStyle && (style.padding = props.paddingStyle);
613
- return style;
614
- });
628
+ const colStyle = vue.computed(() => snail_view.css.buildStyle(props));
615
629
  return (_ctx, _cache) => {
616
630
  return vue.openBlock(), vue.createElementBlock("div", {
617
631
  class: vue.normalizeClass(["table-col", props.align]),
@@ -755,10 +769,7 @@
755
769
  })();
756
770
 
757
771
  function getTitleStyle(options, isFlex) {
758
- return options && options.titleStyle ? snail_view.style.build({
759
- ...options.titleStyle,
760
- width: options.titleStyle
761
- }, isFlex) : Object.create(null);
772
+ return options && options.titleStyle ? snail_view.css.buildStyle(options.titleStyle, isFlex) : Object.create(null);
762
773
  }
763
774
 
764
775
  const _hoisted_1$4 = ["textContent"];
@@ -941,11 +952,11 @@
941
952
  title: {},
942
953
  message: {},
943
954
  cancelName: {},
944
- cancelDisable: {
955
+ cancelDisabled: {
945
956
  type: Boolean
946
957
  },
947
958
  confirmName: {},
948
- confirmDisable: {
959
+ confirmDisabled: {
949
960
  type: Boolean
950
961
  },
951
962
  inDialog: {
@@ -970,9 +981,9 @@
970
981
  }, null, 8, _hoisted_2$1), vue.createVNode(_sfc_main$g, {
971
982
  align: "right",
972
983
  "cancel-name": props.cancelName,
973
- "cancel-disable": props.cancelDisable,
984
+ "cancel-disable": props.cancelDisabled,
974
985
  "confirm-name": props.confirmName,
975
- "confirm-disable": props.confirmDisable,
986
+ "confirm-disable": props.confirmDisabled,
976
987
  onCancel: _cache[1] || (_cache[1] = $event => props.closeDialog(false)),
977
988
  onConfirm: _cache[2] || (_cache[2] = $event => props.closeDialog(true))
978
989
  }, null, 8, ["cancel-name", "cancel-disable", "confirm-name", "confirm-disable"])]);
@@ -1042,6 +1053,7 @@
1042
1053
  emit: __emit
1043
1054
  } = _ref;
1044
1055
  const emit = __emit;
1056
+ const observer = snail_view.useObserver();
1045
1057
  const isTouch = "ontouchstart" in window;
1046
1058
  const dragHandle = vue.useTemplateRef("dragHandle");
1047
1059
  const dragInfo = vue.ref({
@@ -1079,10 +1091,11 @@
1079
1091
  }
1080
1092
  }
1081
1093
  }
1082
- isTouch || vue.onMounted(() => {
1083
- addEventListener("mousemove", onDragMove);
1084
- addEventListener("mouseup", onDragEnd);
1094
+ isTouch || vue.onMounted(function () {
1095
+ observer.onEvent(window, "mousemove", onDragMove);
1096
+ observer.onEvent(window, "mouseup", onDragEnd);
1085
1097
  });
1098
+ vue.onUnmounted(observer.destroy);
1086
1099
  return (_ctx, _cache) => {
1087
1100
  return vue.openBlock(), vue.createElementBlock("div", {
1088
1101
  class: vue.normalizeClass(["snail-drag-verify", {
@@ -1,23 +1,25 @@
1
+ /* src:base\icon.vue index:0 */
2
+ .snail-icon{cursor:pointer;opacity:1}
3
+ /* src:base\header.vue index:0 */
4
+ .snail-header{align-items:center;background-color:#fff;display:flex;flex-direction:row;flex-shrink:0;position:relative;width:100%}.snail-header>.header-title{color:#2e3033;flex:1;line-height:48px;overflow:hidden;padding-left:24px;text-overflow:ellipsis;white-space:nowrap}.snail-header>.header-title.center{text-align:center}.snail-header>.header-title.right{text-align:right}.snail-header.start-divider{border-bottom:1px solid #dddfed}.snail-header.page{height:48px}.snail-header.page>.header-title{font-size:16px;font-weight:700}.snail-header.page>.close-icon{margin-right:18px}.snail-header.dialog{height:64px;padding-top:16px}.snail-header.dialog>.header-title{font-size:20px}.snail-header.dialog>.close-icon{position:absolute;right:8px;top:8px}
1
5
  /* src:base\button.vue index:0 */
2
6
  .snail-button{align-items:center;border-radius:2px;cursor:pointer;display:inline-flex;font-size:14px;justify-content:center;white-space:nowrap}.snail-button.max{height:40px;width:120px}.snail-button.middle{height:32px;width:90px}.snail-button.normal{height:28px;width:54px}.snail-button.small{height:20px;width:30px}.snail-button.primary{background-color:#5ca3ff;color:#fff}.snail-button.default{background-color:#fff;border:1px solid #dddfed;color:#2e2f33}.snail-button.link{color:#4c9aff}
3
7
  /* src:base\footer.vue index:0 */
4
8
  .snail-footer{align-items:center;background-color:#fff;display:flex;flex-shrink:0;height:72px;padding:0 40px;width:100%}.snail-footer>.snail-button:nth-child(n+2){margin-left:20px}.snail-footer.start-divider{border-top:1px solid #dddfed}.snail-footer.left{justify-content:left}.snail-footer.center{justify-content:center}.snail-footer.right{justify-content:right}
5
- /* src:base\header.vue index:0 */
6
- .snail-header{align-items:center;background-color:#fff;display:flex;flex-direction:row;flex-shrink:0;position:relative;width:100%}.snail-header>.header-title{color:#2e3033;flex:1;line-height:48px;overflow:hidden;padding-left:24px;text-overflow:ellipsis;white-space:nowrap}.snail-header>.header-title.center{text-align:center}.snail-header>.header-title.right{text-align:right}.snail-header.start-divider{border-bottom:1px solid #dddfed}.snail-header.page{height:48px}.snail-header.page>.header-title{font-size:16px;font-weight:700}.snail-header.page>.close-icon{margin-right:18px}.snail-header.dialog{height:64px;padding-top:16px}.snail-header.dialog>.header-title{font-size:20px}.snail-header.dialog>.close-icon{position:absolute;right:8px;top:8px}
7
- /* src:base\icon.vue index:0 */
8
- .snail-icon{cursor:pointer;opacity:1}
9
9
  /* src:container\dynamic.vue index:0 */
10
10
  .snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
11
11
  /* src:base\switch.vue index:0 */
12
12
  .snail-switch{border-radius:10px 10px 10px 10px;cursor:pointer;height:20px!important;overflow:hidden;position:relative;width:36px!important}.snail-switch>div{height:100%;width:100%}.snail-switch>div.on{background-color:#5ca3ff}.snail-switch>div.off{background-color:#c4c8cc;position:absolute;transition:left .2s ease}.snail-switch>div.status{background:#fff;border-radius:10px 10px 10px 10px;height:16px;position:absolute;top:2px;transition:left .2s ease;width:16px}.snail-switch.on>div.off{left:100%;top:0}.snail-switch.on>div.status{left:calc(100% - 18px)}.snail-switch.off>div.off{left:0;top:0}.snail-switch.off>div.status{left:2px}.snail-switch.readonly{cursor:default}
13
13
  /* src:container\fold.vue index:0 */
14
- .snail-fold{flex-shrink:0;transition:height .2s ease}.snail-fold>div.fold-header{align-items:center;display:flex;height:32px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-fold>div.fold-header:before{background-color:#2c97fb;content:"";height:18px;left:0;position:absolute;top:7px;width:4px}.snail-fold>div.fold-header>.subtitle,.snail-fold>div.fold-header>.title{overflow:hidden;white-space:nowrap}.snail-fold>div.fold-header>.title{color:#2e3033;font-size:14px;font-weight:700;padding-left:20px}.snail-fold>div.fold-header>.subtitle{color:#8a9099;font-size:13px}.snail-fold>div.fold-header>div.status{display:flex;flex:1;justify-content:right;justify-self:right}.snail-fold>div.fold-header>div.status>span{transition:transform .2s ease}.snail-fold>div.fold-body{padding-left:20px}.snail-fold.expand>div.fold-header>div.status>span{transform:rotate(0deg)}.snail-fold.fold{height:32px;overflow:hidden}.snail-fold.fold>div.fold-header>div.status>span{transform:rotate(180deg)}
15
- /* src:container\components\table-col.vue index:0 */
16
- .table-col{align-items:center;display:inline-flex;height:100%;white-space:nowrap}.table-col.left{justify-content:left}.table-col.center{justify-content:center}.table-col.right{justify-content:right}
14
+ .snail-fold{flex-shrink:0}.snail-fold>div.fold-header{align-items:center;display:flex;height:32px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-fold>div.fold-header:before{background-color:#2c97fb;content:"";height:18px;left:0;position:absolute;top:7px;width:4px}.snail-fold>div.fold-header>.subtitle,.snail-fold>div.fold-header>.title{overflow:hidden;white-space:nowrap}.snail-fold>div.fold-header>.title{color:#2e3033;font-size:14px;font-weight:700;padding-left:20px}.snail-fold>div.fold-header>.subtitle{color:#8a9099;font-size:13px}.snail-fold>div.fold-header>div.status{display:flex;flex:1;justify-content:right;justify-self:right}.snail-fold>div.fold-body{padding-left:20px}
15
+ /* src:container\scroll.vue index:0 */
16
+ .snail-scroll{overflow:hidden}.snail-scroll.scroll-x{overflow-x:auto}.snail-scroll.scroll-y{overflow-y:auto}
17
17
  /* src:container\table.vue index:0 */
18
- .snail-table{display:flex;flex-direction:column}.snail-table>footer.table-footer,.snail-table>header.table-header{align-items:center;display:flex;flex-shrink:0;width:100%}.snail-table>header.table-header{position:sticky!important;top:0}.snail-table>main.table-body{flex:1;width:100%}.snail-table.start-border>footer.table-footer>.table-col:nth-child(n+2),.snail-table.start-border>header.table-header>.table-col:nth-child(n+2),.snail-table.start-border>main.table-body>.table-row>.table-col:nth-child(n+2){border-left:none!important}.snail-table.start-border>footer.table-footer>.table-col,.snail-table.start-border>main.table-body>.table-row>.table-col{border-top:none!important}
18
+ .snail-table{display:flex;flex-direction:column}.snail-table>div.table-footer,.snail-table>div.table-header{align-items:center;display:flex;flex-shrink:0;width:100%}.snail-table>div.table-header{position:sticky!important;top:0}.snail-table>div.table-body{flex:1;width:100%}.snail-table.start-border>div.table-body>.table-row>.table-col:nth-child(n+2),.snail-table.start-border>div.table-footer>.table-col:nth-child(n+2),.snail-table.start-border>div.table-header>.table-col:nth-child(n+2){border-left:none!important}.snail-table.start-border>div.table-body>.table-row>.table-col,.snail-table.start-border>div.table-footer>.table-col{border-top:none!important}
19
19
  /* src:container\components\table-row.vue index:0 */
20
20
  .table-row{align-items:center;display:flex;min-width:100%}
21
+ /* src:container\components\table-col.vue index:0 */
22
+ .table-col{align-items:center;display:inline-flex;height:100%;white-space:nowrap}.table-col.left{justify-content:left}.table-col.center{justify-content:center}.table-col.right{justify-content:right}
21
23
  /* src:form\input.vue index:0 */
22
24
  .snail-input{display:inline-flex;min-height:34px}.snail-input>.input-title{flex-shrink:0;font-size:14px;padding-top:6px}.snail-input>.input-title>span.text{color:#2e3033}.snail-input>.input-title>span.required{color:#f74b4b;margin-left:2px}.snail-input>.input-body{align-self:start;display:flex;flex:1;height:32px}.snail-input>.input-body>input{border:1px solid #dddfed;color:#2e3033;flex:1;font-size:14px;font-weight:400;padding:0 10px;text-overflow:ellipsis}.snail-input>.input-body>input:focus{border:1px solid #3292ea}.snail-input>.input-body>span{background-color:red;flex-shrink:0}.snail-input.readonly>div.input-body>input:focus{border:1px solid #dddfed}
23
25
  /* src:prompt\drag-verify.vue index:0 */
@@ -26,11 +28,9 @@
26
28
  .snail-empty{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.snail-empty>img{height:60px;width:60px}.snail-empty>div.message{color:#babdc2;font-size:14px;font-weight:400;padding:0 10px 10px}
27
29
  /* src:prompt\loading.vue index:0 */
28
30
  .snail-loading{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10000}.snail-loading.show-mask{background-color:rgba(0,0,0,.15)}.snail-loading:after,.snail-loading:before{animation:snail-loading-stretch 1s ease-in-out infinite;border-radius:50%;content:"";display:block;display:inline-block;height:10px;left:50%;margin-left:-18px;margin-top:-6px;position:absolute;top:50%;width:10px}.snail-loading:before{background-color:#279bf1}.snail-loading:after{animation-delay:-.5s;background:#64d214;margin-left:0;margin-right:-18px}@keyframes snail-loading-stretch{0%,to{transform:scale(1)}50%{transform:scale(2)}}.snail-loading-enter-active,.snail-loading-leave-active{transition:opacity .5s ease-in-out}.snail-loading-enter-from,.snail-loading-leave-to{opacity:0}
29
- /* src:container\scroll.vue index:0 */
30
- .snail-scroll{overflow:hidden}.snail-scroll.scroll-x{overflow-x:auto}.snail-scroll.scroll-y{overflow-y:auto}
31
+ /* src:prompt\components\toast.vue index:0 */
32
+ .snail-toast{background:rgba(0,0,0,.7);border-radius:5px;color:#fff;display:flex;max-height:200px;max-width:500px;min-width:200px;opacity:.2;overflow:hidden;padding:20px 30px 20px 20px;position:fixed;transition:opacity .2s ease;z-index:99999}.snail-toast.show-toast{opacity:1}.snail-toast>svg.close-icon{position:absolute;right:10px;top:12px}.snail-toast>div.icon{align-items:center;align-self:center;background:hsla(0,0%,100%,.15);border-radius:50%;display:flex;height:26px;justify-content:center;margin-right:6px;width:26px}.snail-toast>div.icon>svg{background:#fff;border-radius:50%;cursor:none!important}.snail-toast>div.message{flex:1;line-height:24px;overflow:hidden;word-break:break-all}
31
33
  /* src:container\components\dialog-wrapper.vue index:0 */
32
34
  .snail-dialog{align-items:center;bottom:0;display:flex;justify-content:center;left:0;overflow:hidden;position:fixed;right:0;top:0}.snail-dialog:before{background-color:rgba(24,27,33,.45);content:"";height:100%;position:absolute;width:100%}.snail-dialog>.dialog-body{background-color:#fff;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.3);box-sizing:border-box;position:relative}.snail-dialog.unactive:before{display:none!important}.snail-dialog.unactive>.dialog-body{box-shadow:0 0 4px rgba(0,0,0,.3)}.snail-dialog-enter-active,.snail-dialog-leave-active{transition:scale .1s ease-in-out,opacity .1s ease}.snail-dialog-enter-from{opacity:0;scale:.4}.snail-dialog-leave-to{opacity:0;scale:0}
33
35
  /* src:prompt\components\confirm.vue index:0 */
34
- .snail-confirm{background-color:#fff;border-radius:4px;box-sizing:border-box;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>main{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word;box-sizing:border-box}
35
- /* src:prompt\components\toast.vue index:0 */
36
- .snail-toast{background:rgba(0,0,0,.7);border-radius:5px;color:#fff;display:flex;max-height:200px;max-width:500px;min-width:200px;opacity:.2;overflow:hidden;padding:20px 30px 20px 20px;position:fixed;transition:opacity .2s ease;z-index:99999}.snail-toast.show-toast{opacity:1}.snail-toast>svg.close-icon{position:absolute;right:10px;top:12px}.snail-toast>div.icon{align-items:center;align-self:center;background:hsla(0,0%,100%,.15);border-radius:50%;display:flex;height:26px;justify-content:center;margin-right:6px;width:26px}.snail-toast>div.icon>svg{background:#fff;border-radius:50%;cursor:none!important}.snail-toast>div.message{flex:1;line-height:24px;overflow:hidden;word-break:break-all}
36
+ .snail-confirm{background-color:#fff;border-radius:4px;box-sizing:border-box;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>main{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word;box-sizing:border-box}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "依赖【snail】,基于vue封装常用UI组件",
4
4
  "author": "snail_dev@163.com",
5
5
  "license": "MIT",
6
- "version": "1.0.23",
6
+ "version": "1.0.26",
7
7
  "type": "module",
8
8
  "main": "dist/snail.vue.js",
9
9
  "module": "dist/snail.vue.js",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "vue": "^3.5.14",
18
- "snail.core": ">=2.0.3",
19
- "snail.view": ">=1.0.2"
18
+ "snail.core": ">=2.0.6",
19
+ "snail.view": ">=1.0.10"
20
20
  },
21
21
  "devDependencies": {
22
22
  "vue-tsc": "^2.2.10",