snail.vue 1.0.41 → 1.0.42

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.
@@ -444,23 +444,70 @@ type ScrollOptions = {
444
444
  */
445
445
  type ScrollEvents = {
446
446
  /**
447
- * 滚动条显示、隐藏事件
448
- * - x轴是否展示,y轴是否显示
447
+ * 【x轴方向】滚动条变化时
448
+ * @param show 是否显示。true 滚动条显示;false 滚动条隐藏
449
449
  */
450
- bar: [x: boolean, y: boolean];
450
+ xbar: [show: boolean];
451
451
  /**
452
- * 滚动条触碰事件,到顶了、到底了
452
+ * 【x轴方向】滚到【最左侧】了
453
453
  */
454
- touch: [type: ScrollTouchType];
454
+ left: [];
455
+ /**
456
+ * 【x轴方向】滚到【最右侧】了
457
+ */
458
+ right: [];
459
+ /**
460
+ * 【y轴方向】滚动条变化时
461
+ * @param show 是否显示。true 滚动条显示;false 滚动条隐藏
462
+ */
463
+ ybar: [show: boolean];
464
+ /**
465
+ * 【y轴方向】滚到【最顶部】了
466
+ */
467
+ top: [];
468
+ /**
469
+ * 【y轴方向】滚到【最底部】了
470
+ */
471
+ bottom: [];
455
472
  };
456
473
  /**
457
- * 滚动触碰类型
458
- * - left 最左侧
459
- * - right 最右侧
460
- * - top 最顶部
461
- * - bottom 最底部
474
+ * 滚动视图状态
475
+ * - 缓存起来 和下次滚动做比对,触发对应事件
462
476
  */
463
- type ScrollTouchType = "left" | "right" | "top" | "bottom";
477
+ type ScrollStatus = {
478
+ /**
479
+ * 水平滚动条是否显示
480
+ */
481
+ xbar: boolean;
482
+ /**
483
+ * 垂直滚动条是否显示
484
+ */
485
+ ybar: boolean;
486
+ /**
487
+ * 滚动到【左侧】了
488
+ */
489
+ left: boolean;
490
+ /**
491
+ * 滚动到【右侧】了
492
+ */
493
+ right: boolean;
494
+ /**
495
+ * 滚动到【顶部】了
496
+ */
497
+ top: boolean;
498
+ /**
499
+ * 滚动到【底部】了
500
+ */
501
+ bottom: boolean;
502
+ /**
503
+ * 滚动视图宽度
504
+ */
505
+ scrollwidth: number;
506
+ /**
507
+ * 滚动视图高度
508
+ */
509
+ scrollheight: number;
510
+ };
464
511
 
465
512
  /**
466
513
  * Table配置选项
@@ -544,6 +591,40 @@ type ComponentOptions = {
544
591
  */
545
592
  url?: string;
546
593
  };
594
+ /**
595
+ * 提取【组件事件】类型
596
+ * - 将【组件事件】中的key首字母小写,追加上on前缀;key对应的value为监听函数参数
597
+ * - T的类型约束:Record<string, unknown[]>
598
+ */
599
+ type ExtractComponentEvents<Events> = Events extends Record<string, unknown[]> ? ({
600
+ [key in keyof Events as `on${Capitalize<string & key>}`]?: (...args: Events[key]) => void;
601
+ }) : never;
602
+ /**
603
+ * 提取组件的props类型
604
+ * - 有效的 Props 类型:extends Record<string, any>
605
+ * - 有效类型则返回 Props 自身;否则无效,为undefined
606
+ */
607
+ type ExtractComponentProps<Props> = Props extends Record<string, any> ? Props : undefined;
608
+ /**
609
+ * 组件绑定 配置选项
610
+ * - Props、Events、Model 为可选泛型,分别约束 props、events、model 属性
611
+ * - 若泛型类型无效,则对应属性类型强制为undefined;详细参照对应属性说明
612
+ */
613
+ type ComponentBindOptions<Props = void, Model = void> = {
614
+ /**
615
+ * 传递给组件的属性值,执行 v-bind 绑定
616
+ * - key为属性名称,遵循vue解析规则;若绑定事件,则key为 on事件名称 ,事件名称首字母大写
617
+ * - 通过泛型类型 Props 约束,有效类型:Props extends Record<string, any>
618
+ * @see ExtractComponentEvents<Events> 获取组件事件类型
619
+ */
620
+ props?: ExtractComponentProps<Props>;
621
+ /**
622
+ * 传递给组件的双向绑定数据,执行 v-model 绑定
623
+ * - 使用 ShallowRef/Ref 包裹;推荐 ShallowRef,仅和组件进行.value值交互,避免深层双向影响性能
624
+ * - 通过泛型类型 Model 约束,有效类型: 非void、never、null、undefined等无效类型
625
+ */
626
+ model?: Model extends (void | never | null | undefined) ? undefined : (ShallowRef<Model> | Ref<Model>);
627
+ };
547
628
  /**
548
629
  *
549
630
  */
@@ -1145,14 +1226,9 @@ type InputEvents = {
1145
1226
  * 弹窗配置选项
1146
1227
  * - 约束弹出组件信息
1147
1228
  * - 弹出组件时传递的参数信息
1229
+ * @see ComponentBindOptions 了解 Props、Model 泛型参数的含义
1148
1230
  */
1149
- type PopupOptions = ComponentOptions & {
1150
- /**
1151
- * 传递给组件的属性值,执行v-bind绑定到要显示的组件
1152
- * - key为属性名称,遵循vue解析规则
1153
- * - 若为事件监听,则使用onXXX
1154
- */
1155
- props?: Record<string, any>;
1231
+ type PopupOptions<Props = void, Model = void> = ComponentOptions & ComponentBindOptions<Props, Model> & {
1156
1232
  /**
1157
1233
  * 弹窗动画名
1158
1234
  * - 不传则默认“snail-fade”
@@ -1259,8 +1335,9 @@ type PopupDescriptor<Options extends PopupOptions, ExtOptions> = PopupStatusOpti
1259
1335
  /**
1260
1336
  * 模态弹窗 配置选项
1261
1337
  * - 继承 ComponentOptions ,动态加载组件
1338
+ * @see ComponentBindOptions 了解 Props、Model 泛型参数的含义
1262
1339
  */
1263
- type DialogOptions = PopupOptions & {
1340
+ type DialogOptions<Props = void, Model = void> = PopupOptions<Props, Model> & {
1264
1341
  /**
1265
1342
  * 禁用【遮罩层】
1266
1343
  * - 目前没实现,先忽略
@@ -1322,8 +1399,9 @@ type ToastOptions = {
1322
1399
  /**
1323
1400
  * 跟随弹窗 配置选项
1324
1401
  * - 传入的组件,根据配置跟随 target 位置和大小;
1402
+ * @see ComponentBindOptions 了解 Props、Model 泛型参数的含义
1325
1403
  */
1326
- type FollowOptions = PopupOptions & {
1404
+ type FollowOptions<Props = void, Model = void> = PopupOptions<Props, Model> & {
1327
1405
  /**
1328
1406
  * 启用【宽度】跟随
1329
1407
  * - 为true则和 target 宽度保持一致
@@ -1477,26 +1555,29 @@ interface IPopupManager {
1477
1555
  /**
1478
1556
  * 弹出
1479
1557
  * - 弹窗位置位置、大小、动画效果等由组件自己完成
1558
+ * @see ComponentBindOptions 了解 Props、Model 泛型参数的含义
1480
1559
  * @param options 弹窗配置选项
1481
1560
  * @returns 弹窗打开结果,外部可手动关闭弹窗
1482
1561
  */
1483
- popup<T>(options: PopupOptions): IAsyncScope<T>;
1562
+ popup<T, Props = void, Model = void>(options: PopupOptions<Props, Model>): IAsyncScope<T>;
1484
1563
  /**
1485
1564
  * 对话框
1486
1565
  * - 支持指定模态和非模态对话框
1487
1566
  * - 默认垂直水平居中展示
1567
+ * @see ComponentBindOptions 了解 Props、Model 泛型参数的含义
1488
1568
  * @param options 弹窗配置选项
1489
1569
  * @returns 弹窗打开结果,外部可手动关闭弹窗
1490
1570
  */
1491
- dialog<T>(options: DialogOptions): IAsyncScope<T>;
1571
+ dialog<T, Props = void, Model = void>(options: DialogOptions<Props, Model>): IAsyncScope<T>;
1492
1572
  /**
1493
1573
  * 跟随弹窗
1494
1574
  * - 跟随指定的target对象,可跟随位置、大小
1575
+ * @see ComponentBindOptions 了解 Props、Model 泛型参数的含义
1495
1576
  * @param target 跟随的目标元素
1496
1577
  * @param options 跟随配置选项
1497
1578
  * @returns 弹窗异步作用域,外部可手动关闭弹窗
1498
1579
  */
1499
- follow<T>(target: HTMLElement, options: FollowOptions): IAsyncScope<T>;
1580
+ follow<T, Props = void, Model = void>(target: HTMLElement, options: FollowOptions<Props, Model>): IAsyncScope<T>;
1500
1581
  /**
1501
1582
  * 打开【确认】弹窗
1502
1583
  * @param title 弹窗标题
@@ -1686,18 +1767,18 @@ declare const components: {
1686
1767
  "onUpdate:modelValue"?: (value: boolean) => any;
1687
1768
  }>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1688
1769
  Dynamic: {
1689
- new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ComponentOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
1770
+ new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ComponentOptions & Pick<ComponentBindOptions<Record<string, any>>, "props">> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
1690
1771
  P: {};
1691
1772
  B: {};
1692
1773
  D: {};
1693
1774
  C: {};
1694
1775
  M: {};
1695
1776
  Defaults: {};
1696
- }, Readonly<ComponentOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
1777
+ }, Readonly<ComponentOptions & Pick<ComponentBindOptions<Record<string, any>>, "props">> & Readonly<{}>, {}, {}, {}, {}, {}>;
1697
1778
  __isFragment?: never;
1698
1779
  __isTeleport?: never;
1699
1780
  __isSuspense?: never;
1700
- } & vue.ComponentOptionsBase<Readonly<ComponentOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
1781
+ } & vue.ComponentOptionsBase<Readonly<ComponentOptions & Pick<ComponentBindOptions<Record<string, any>>, "props">> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
1701
1782
  $slots: {
1702
1783
  [x: string]: (props: any) => any;
1703
1784
  [x: number]: (props: any) => any;
@@ -1750,18 +1831,53 @@ declare const components: {
1750
1831
  };
1751
1832
  });
1752
1833
  Scroll: {
1753
- new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ScrollOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
1834
+ new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ScrollOptions> & Readonly<{
1835
+ onLeft?: () => any;
1836
+ onRight?: () => any;
1837
+ onBottom?: () => any;
1838
+ onTop?: () => any;
1839
+ onXbar?: (show: boolean) => any;
1840
+ onYbar?: (show: boolean) => any;
1841
+ }>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1842
+ left: () => any;
1843
+ right: () => any;
1844
+ bottom: () => any;
1845
+ top: () => any;
1846
+ xbar: (show: boolean) => any;
1847
+ ybar: (show: boolean) => any;
1848
+ }, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
1754
1849
  P: {};
1755
1850
  B: {};
1756
1851
  D: {};
1757
1852
  C: {};
1758
1853
  M: {};
1759
1854
  Defaults: {};
1760
- }, Readonly<ScrollOptions> & Readonly<{}>, {}, {}, {}, {}, {}>;
1855
+ }, Readonly<ScrollOptions> & Readonly<{
1856
+ onLeft?: () => any;
1857
+ onRight?: () => any;
1858
+ onBottom?: () => any;
1859
+ onTop?: () => any;
1860
+ onXbar?: (show: boolean) => any;
1861
+ onYbar?: (show: boolean) => any;
1862
+ }>, {}, {}, {}, {}, {}>;
1761
1863
  __isFragment?: never;
1762
1864
  __isTeleport?: never;
1763
1865
  __isSuspense?: never;
1764
- } & vue.ComponentOptionsBase<Readonly<ScrollOptions> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
1866
+ } & vue.ComponentOptionsBase<Readonly<ScrollOptions> & Readonly<{
1867
+ onLeft?: () => any;
1868
+ onRight?: () => any;
1869
+ onBottom?: () => any;
1870
+ onTop?: () => any;
1871
+ onXbar?: (show: boolean) => any;
1872
+ onYbar?: (show: boolean) => any;
1873
+ }>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1874
+ left: () => any;
1875
+ right: () => any;
1876
+ bottom: () => any;
1877
+ top: () => any;
1878
+ xbar: (show: boolean) => any;
1879
+ ybar: (show: boolean) => any;
1880
+ }, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
1765
1881
  $slots: {
1766
1882
  default?: (props: {}) => any;
1767
1883
  };
@@ -1991,4 +2107,4 @@ declare const components: {
1991
2107
  };
1992
2108
 
1993
2109
  export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
1994
- export type { ButtonOptions, ChooseEvents, ChooseItem, ChooseOptions, ComponentMountOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LoadingOptions, MessageOptions, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollTouchType, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult };
2110
+ export type { ButtonOptions, ChooseEvents, ChooseItem, ChooseOptions, ComponentBindOptions, ComponentMountOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, ExtractComponentEvents, ExtractComponentProps, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LoadingOptions, MessageOptions, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollStatus, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult };
package/dist/snail.vue.js CHANGED
@@ -1,7 +1,7 @@
1
1
  //@ sourceURL=/snail.vue.js
2
- import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, mergeModels, useModel, computed, Fragment, renderList, normalizeStyle, unref, createElementVNode, createCommentVNode, toDisplayString, createBlock, shallowRef, withDirectives, vModelText, createVNode, createApp, Transition, withCtx, normalizeProps, guardReactiveProps, watch, ref, onErrorCaptured, resolveDynamicComponent, mergeProps, createSlots, onMounted, withModifiers, getCurrentInstance, nextTick, useTemplateRef, resolveComponent, onActivated, onDeactivated, onBeforeUnmount, getCurrentScope, onScopeDispose } from 'vue';
2
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, mergeModels, useModel, computed, Fragment, renderList, normalizeStyle, unref, createElementVNode, createCommentVNode, toDisplayString, createBlock, shallowRef, withDirectives, vModelText, createVNode, createApp, Transition, withCtx, normalizeProps, guardReactiveProps, watch, ref, onErrorCaptured, resolveDynamicComponent, mergeProps, createSlots, onMounted, withModifiers, isRef, getCurrentInstance, nextTick, useTemplateRef, resolveComponent, onBeforeUnmount, getCurrentScope, onScopeDispose } from 'vue';
3
3
  import { isArray, newId, throwError, isArrayNotEmpty, isStringNotEmpty, mustFunction, useScope, removeFromArray, mustObject, throwIfFalse, isObject, isNumberNotNaN, mountScope, useScopes, isPromise, wait, script, delay, useTimer, defer, useAsyncScope, useHook, hasAny, throwIfTrue, isFunction, 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
6
  var _sfc_main$r = defineComponent({
7
7
  ...{
@@ -23,6 +23,10 @@ var _sfc_main$r = 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
  const _hoisted_1$e = ["onClick"];
27
31
  const _hoisted_2$9 = ["type", "checked"];
28
32
  const _hoisted_3$6 = ["textContent"];
@@ -96,10 +100,6 @@ var _sfc_main$q = defineComponent({
96
100
  }
97
101
  });
98
102
 
99
- var addLink = href => setTimeout(link.register, 0, href);
100
-
101
- addLink("/styles/snail.vue.vue.css");
102
-
103
103
  var _sfc_main$p = defineComponent({
104
104
  ...{
105
105
  name: "Footer",
@@ -688,7 +688,10 @@ var _sfc_main$j = defineComponent({
688
688
  props: {
689
689
  name: {},
690
690
  component: {},
691
- url: {}
691
+ url: {},
692
+ props: {
693
+ default: () => ({})
694
+ }
692
695
  },
693
696
  setup(__props) {
694
697
  const {
@@ -735,10 +738,10 @@ var _sfc_main$j = defineComponent({
735
738
  }
736
739
  });
737
740
  return (_ctx, _cache) => {
738
- return openBlock(), createElementBlock(Fragment, null, [(openBlock(), createBlock(resolveDynamicComponent(dynamicComponentRef.value), mergeProps(_ctx.$attrs, {
741
+ return openBlock(), createElementBlock(Fragment, null, [(openBlock(), createBlock(resolveDynamicComponent(dynamicComponentRef.value), mergeProps({
739
742
  ref_key: "componentRef",
740
743
  ref: componentRef
741
- }), createSlots({
744
+ }, _ctx.props, _ctx.$attrs), createSlots({
742
745
  _: 2
743
746
  }, [renderList(_ctx.$slots, (_, name) => {
744
747
  return {
@@ -772,6 +775,10 @@ var _sfc_main$i = defineComponent({
772
775
  popupTransition: {}
773
776
  },
774
777
  setup(__props) {
778
+ const {
779
+ props,
780
+ model = shallowRef(void 0)
781
+ } = __props.options;
775
782
  const {
776
783
  closePopup,
777
784
  onBeforeClose
@@ -795,15 +802,19 @@ var _sfc_main$i = defineComponent({
795
802
  style: normalizeStyle({
796
803
  "z-index": _ctx.zIndex
797
804
  }),
798
- onClick: _cache[0] || (_cache[0] = withModifiers($event => {
805
+ onClick: _cache[1] || (_cache[1] = withModifiers($event => {
799
806
  _ctx.options.closeOnMask && unref(closePopup)();
800
807
  }, ["self"]))
801
808
  }, [createVNode(_sfc_main$j, mergeProps({
802
809
  class: "dialog-body",
803
810
  name: _ctx.options.name,
804
811
  component: _ctx.options.component,
805
- url: _ctx.options.url
806
- }, _ctx.options.props, unref(dialogExtend)), null, 16, ["name", "component", "url"])], 6);
812
+ url: _ctx.options.url,
813
+ props: unref(props)
814
+ }, unref(dialogExtend), {
815
+ modelValue: unref(model),
816
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => isRef(model) ? model.value = $event : null)
817
+ }), null, 16, ["name", "component", "url", "props", "modelValue"])], 6);
807
818
  };
808
819
  }
809
820
  });
@@ -823,6 +834,10 @@ var _sfc_main$h = defineComponent({
823
834
  popupTransition: {}
824
835
  },
825
836
  setup(__props) {
837
+ const {
838
+ props,
839
+ model = shallowRef(void 0)
840
+ } = __props.options;
826
841
  const {
827
842
  closePopup
828
843
  } = __props.extOptions;
@@ -921,8 +936,12 @@ var _sfc_main$h = defineComponent({
921
936
  },
922
937
  name: _ctx.options.name,
923
938
  component: _ctx.options.component,
924
- url: _ctx.options.url
925
- }, _ctx.options.props, unref(followExt)), null, 16, ["class", "style", "name", "component", "url"]);
939
+ url: _ctx.options.url,
940
+ props: unref(props)
941
+ }, unref(followExt), {
942
+ modelValue: unref(model),
943
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => isRef(model) ? model.value = $event : null)
944
+ }), null, 16, ["class", "style", "name", "component", "url", "props", "modelValue"]);
926
945
  };
927
946
  }
928
947
  });
@@ -942,8 +961,10 @@ var _sfc_main$g = defineComponent({
942
961
  popupTransition: {}
943
962
  },
944
963
  setup(__props) {
945
- const loadingRef = shallowRef(false);
946
- onMounted(() => loadingRef.value = true);
964
+ const {
965
+ props,
966
+ model = shallowRef(void 0)
967
+ } = __props.options;
947
968
  return (_ctx, _cache) => {
948
969
  return openBlock(), createBlock(_sfc_main$j, mergeProps({
949
970
  class: ["snail-popup", [_ctx.popupStatus.value, _ctx.popupTransition.value]],
@@ -952,11 +973,12 @@ var _sfc_main$g = defineComponent({
952
973
  },
953
974
  name: _ctx.options.name,
954
975
  component: _ctx.options.component,
955
- url: _ctx.options.url
956
- }, _ctx.options.props, {
957
- "in-popup": true,
958
- "close-popup": _ctx.extOptions.closePopup
959
- }), null, 16, ["class", "style", "name", "component", "url", "close-popup"]);
976
+ url: _ctx.options.url,
977
+ props: unref(props)
978
+ }, _ctx.extOptions, {
979
+ modelValue: unref(model),
980
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => isRef(model) ? model.value = $event : null)
981
+ }), null, 16, ["class", "style", "name", "component", "url", "props", "modelValue"]);
960
982
  };
961
983
  }
962
984
  });
@@ -1279,7 +1301,7 @@ var _sfc_main$c = defineComponent({
1279
1301
  followY: {},
1280
1302
  pinned: {}
1281
1303
  },
1282
- emits: ["change", "search"],
1304
+ emits: ["change"],
1283
1305
  setup(__props, _ref) {
1284
1306
  let {
1285
1307
  emit: __emit
@@ -1615,16 +1637,15 @@ var _sfc_main$b = defineComponent({
1615
1637
  closeOnMask: true,
1616
1638
  closeOnResize: true,
1617
1639
  closeOnTarget: true,
1618
- props: Object.freeze(Object.assign({
1640
+ props: {
1619
1641
  items: props.items,
1620
1642
  context,
1621
1643
  level: 1,
1622
1644
  search: props.search,
1623
1645
  multiple: props.multiple,
1624
- popupStyle: props.popupStyle
1625
- }, {
1646
+ popupStyle: props.popupStyle,
1626
1647
  onChange: onSelectItemChange
1627
- }))
1648
+ }
1628
1649
  });
1629
1650
  await followScope;
1630
1651
  followScope = void 0;
@@ -1825,18 +1846,81 @@ var _sfc_main$8 = defineComponent({
1825
1846
  type: Boolean
1826
1847
  }
1827
1848
  },
1828
- setup(__props) {
1849
+ emits: ["xbar", "left", "right", "ybar", "top", "bottom"],
1850
+ setup(__props, _ref) {
1851
+ let {
1852
+ emit: __emit
1853
+ } = _ref;
1829
1854
  const props = __props;
1830
- console.warn("scroll 的事件还没实现");
1831
- onActivated(() => console.log("onActivated"));
1832
- onDeactivated(() => console.log("onDeactivated"));
1855
+ const emits = __emit;
1856
+ const rootDom = useTemplateRef("scroll-root");
1857
+ const {
1858
+ onSize
1859
+ } = useObserver();
1860
+ const {
1861
+ onInterval
1862
+ } = useTimer();
1863
+ const classRef = computed(() => ({
1864
+ "scroll-x": props.scrollX == true,
1865
+ "scroll-y": props.scrollY == true
1866
+ }));
1867
+ var preStatus = void 0;
1868
+ function refreshScrollInfo() {
1869
+ const status = {
1870
+ xbar: rootDom.value.scrollWidth > rootDom.value.clientWidth,
1871
+ ybar: rootDom.value.scrollHeight > rootDom.value.clientHeight,
1872
+ left: false,
1873
+ right: false,
1874
+ top: false,
1875
+ bottom: false,
1876
+ scrollwidth: rootDom.value.scrollWidth,
1877
+ scrollheight: rootDom.value.scrollHeight
1878
+ };
1879
+ if (status.xbar == true) {
1880
+ status.left = rootDom.value.scrollLeft == 0;
1881
+ status.right = rootDom.value.scrollLeft + rootDom.value.clientWidth == rootDom.value.scrollWidth;
1882
+ }
1883
+ if (status.ybar == true) {
1884
+ status.top = rootDom.value.scrollTop == 0;
1885
+ status.bottom = rootDom.value.scrollTop + rootDom.value.clientHeight == rootDom.value.scrollHeight;
1886
+ }
1887
+ Object.freeze(status);
1888
+ const events = Object.create(null);
1889
+ if (preStatus != void 0) {
1890
+ preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
1891
+ preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
1892
+ if (preStatus.xbar == true && status.xbar == true) {
1893
+ status.left && preStatus.left !== status.left && (events.left = []);
1894
+ status.right && preStatus.right !== status.right && (events.right = []);
1895
+ }
1896
+ if (preStatus.ybar == true && status.ybar == true) {
1897
+ status.top && preStatus.top !== status.top && (events.top = []);
1898
+ status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
1899
+ }
1900
+ }
1901
+ preStatus = status;
1902
+ preStatus = Object.freeze(status);
1903
+ events.xbar && emits("xbar", ...events.xbar);
1904
+ events.left && emits("left");
1905
+ events.right && emits("right");
1906
+ events.ybar && emits("ybar", ...events.ybar);
1907
+ events.top && emits("top");
1908
+ events.bottom && emits("bottom");
1909
+ }
1910
+ onMounted(() => {
1911
+ refreshScrollInfo();
1912
+ onSize(rootDom.value, refreshScrollInfo);
1913
+ onInterval(() => {
1914
+ const isChange = preStatus.scrollwidth != rootDom.value.scrollWidth || preStatus.scrollheight != rootDom.value.scrollHeight;
1915
+ isChange && refreshScrollInfo();
1916
+ }, 100);
1917
+ });
1833
1918
  return (_ctx, _cache) => {
1834
1919
  return openBlock(), createElementBlock("div", {
1835
- class: normalizeClass(["snail-scroll", {
1836
- "scroll-x": props.scrollX == true,
1837
- "scroll-y": props.scrollY == true
1838
- }])
1839
- }, [renderSlot(_ctx.$slots, "default")], 2);
1920
+ class: normalizeClass(["snail-scroll", classRef.value]),
1921
+ ref: "scroll-root",
1922
+ onScroll: refreshScrollInfo
1923
+ }, [renderSlot(_ctx.$slots, "default")], 34);
1840
1924
  };
1841
1925
  }
1842
1926
  });
@@ -25,6 +25,10 @@
25
25
  }
26
26
  });
27
27
 
28
+ var addLink = href => setTimeout(snail_view.link.register, 0, href);
29
+
30
+ addLink("/styles/snail.vue.vue.css");
31
+
28
32
  const _hoisted_1$e = ["onClick"];
29
33
  const _hoisted_2$9 = ["type", "checked"];
30
34
  const _hoisted_3$6 = ["textContent"];
@@ -98,10 +102,6 @@
98
102
  }
99
103
  });
100
104
 
101
- var addLink = href => setTimeout(snail_view.link.register, 0, href);
102
-
103
- addLink("/styles/snail.vue.vue.css");
104
-
105
105
  var _sfc_main$p = vue.defineComponent({
106
106
  ...{
107
107
  name: "Footer",
@@ -690,7 +690,10 @@
690
690
  props: {
691
691
  name: {},
692
692
  component: {},
693
- url: {}
693
+ url: {},
694
+ props: {
695
+ default: () => ({})
696
+ }
694
697
  },
695
698
  setup(__props) {
696
699
  const {
@@ -737,10 +740,10 @@
737
740
  }
738
741
  });
739
742
  return (_ctx, _cache) => {
740
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(dynamicComponentRef.value), vue.mergeProps(_ctx.$attrs, {
743
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(dynamicComponentRef.value), vue.mergeProps({
741
744
  ref_key: "componentRef",
742
745
  ref: componentRef
743
- }), vue.createSlots({
746
+ }, _ctx.props, _ctx.$attrs), vue.createSlots({
744
747
  _: 2
745
748
  }, [vue.renderList(_ctx.$slots, (_, name) => {
746
749
  return {
@@ -774,6 +777,10 @@
774
777
  popupTransition: {}
775
778
  },
776
779
  setup(__props) {
780
+ const {
781
+ props,
782
+ model = vue.shallowRef(void 0)
783
+ } = __props.options;
777
784
  const {
778
785
  closePopup,
779
786
  onBeforeClose
@@ -797,15 +804,19 @@
797
804
  style: vue.normalizeStyle({
798
805
  "z-index": _ctx.zIndex
799
806
  }),
800
- onClick: _cache[0] || (_cache[0] = vue.withModifiers($event => {
807
+ onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => {
801
808
  _ctx.options.closeOnMask && vue.unref(closePopup)();
802
809
  }, ["self"]))
803
810
  }, [vue.createVNode(_sfc_main$j, vue.mergeProps({
804
811
  class: "dialog-body",
805
812
  name: _ctx.options.name,
806
813
  component: _ctx.options.component,
807
- url: _ctx.options.url
808
- }, _ctx.options.props, vue.unref(dialogExtend)), null, 16, ["name", "component", "url"])], 6);
814
+ url: _ctx.options.url,
815
+ props: vue.unref(props)
816
+ }, vue.unref(dialogExtend), {
817
+ modelValue: vue.unref(model),
818
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => vue.isRef(model) ? model.value = $event : null)
819
+ }), null, 16, ["name", "component", "url", "props", "modelValue"])], 6);
809
820
  };
810
821
  }
811
822
  });
@@ -825,6 +836,10 @@
825
836
  popupTransition: {}
826
837
  },
827
838
  setup(__props) {
839
+ const {
840
+ props,
841
+ model = vue.shallowRef(void 0)
842
+ } = __props.options;
828
843
  const {
829
844
  closePopup
830
845
  } = __props.extOptions;
@@ -923,8 +938,12 @@
923
938
  },
924
939
  name: _ctx.options.name,
925
940
  component: _ctx.options.component,
926
- url: _ctx.options.url
927
- }, _ctx.options.props, vue.unref(followExt)), null, 16, ["class", "style", "name", "component", "url"]);
941
+ url: _ctx.options.url,
942
+ props: vue.unref(props)
943
+ }, vue.unref(followExt), {
944
+ modelValue: vue.unref(model),
945
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => vue.isRef(model) ? model.value = $event : null)
946
+ }), null, 16, ["class", "style", "name", "component", "url", "props", "modelValue"]);
928
947
  };
929
948
  }
930
949
  });
@@ -944,8 +963,10 @@
944
963
  popupTransition: {}
945
964
  },
946
965
  setup(__props) {
947
- const loadingRef = vue.shallowRef(false);
948
- vue.onMounted(() => loadingRef.value = true);
966
+ const {
967
+ props,
968
+ model = vue.shallowRef(void 0)
969
+ } = __props.options;
949
970
  return (_ctx, _cache) => {
950
971
  return vue.openBlock(), vue.createBlock(_sfc_main$j, vue.mergeProps({
951
972
  class: ["snail-popup", [_ctx.popupStatus.value, _ctx.popupTransition.value]],
@@ -954,11 +975,12 @@
954
975
  },
955
976
  name: _ctx.options.name,
956
977
  component: _ctx.options.component,
957
- url: _ctx.options.url
958
- }, _ctx.options.props, {
959
- "in-popup": true,
960
- "close-popup": _ctx.extOptions.closePopup
961
- }), null, 16, ["class", "style", "name", "component", "url", "close-popup"]);
978
+ url: _ctx.options.url,
979
+ props: vue.unref(props)
980
+ }, _ctx.extOptions, {
981
+ modelValue: vue.unref(model),
982
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => vue.isRef(model) ? model.value = $event : null)
983
+ }), null, 16, ["class", "style", "name", "component", "url", "props", "modelValue"]);
962
984
  };
963
985
  }
964
986
  });
@@ -1281,7 +1303,7 @@
1281
1303
  followY: {},
1282
1304
  pinned: {}
1283
1305
  },
1284
- emits: ["change", "search"],
1306
+ emits: ["change"],
1285
1307
  setup(__props, _ref) {
1286
1308
  let {
1287
1309
  emit: __emit
@@ -1617,16 +1639,15 @@
1617
1639
  closeOnMask: true,
1618
1640
  closeOnResize: true,
1619
1641
  closeOnTarget: true,
1620
- props: Object.freeze(Object.assign({
1642
+ props: {
1621
1643
  items: props.items,
1622
1644
  context,
1623
1645
  level: 1,
1624
1646
  search: props.search,
1625
1647
  multiple: props.multiple,
1626
- popupStyle: props.popupStyle
1627
- }, {
1648
+ popupStyle: props.popupStyle,
1628
1649
  onChange: onSelectItemChange
1629
- }))
1650
+ }
1630
1651
  });
1631
1652
  await followScope;
1632
1653
  followScope = void 0;
@@ -1827,18 +1848,81 @@
1827
1848
  type: Boolean
1828
1849
  }
1829
1850
  },
1830
- setup(__props) {
1851
+ emits: ["xbar", "left", "right", "ybar", "top", "bottom"],
1852
+ setup(__props, _ref) {
1853
+ let {
1854
+ emit: __emit
1855
+ } = _ref;
1831
1856
  const props = __props;
1832
- console.warn("scroll 的事件还没实现");
1833
- vue.onActivated(() => console.log("onActivated"));
1834
- vue.onDeactivated(() => console.log("onDeactivated"));
1857
+ const emits = __emit;
1858
+ const rootDom = vue.useTemplateRef("scroll-root");
1859
+ const {
1860
+ onSize
1861
+ } = snail_view.useObserver();
1862
+ const {
1863
+ onInterval
1864
+ } = snail_core.useTimer();
1865
+ const classRef = vue.computed(() => ({
1866
+ "scroll-x": props.scrollX == true,
1867
+ "scroll-y": props.scrollY == true
1868
+ }));
1869
+ var preStatus = void 0;
1870
+ function refreshScrollInfo() {
1871
+ const status = {
1872
+ xbar: rootDom.value.scrollWidth > rootDom.value.clientWidth,
1873
+ ybar: rootDom.value.scrollHeight > rootDom.value.clientHeight,
1874
+ left: false,
1875
+ right: false,
1876
+ top: false,
1877
+ bottom: false,
1878
+ scrollwidth: rootDom.value.scrollWidth,
1879
+ scrollheight: rootDom.value.scrollHeight
1880
+ };
1881
+ if (status.xbar == true) {
1882
+ status.left = rootDom.value.scrollLeft == 0;
1883
+ status.right = rootDom.value.scrollLeft + rootDom.value.clientWidth == rootDom.value.scrollWidth;
1884
+ }
1885
+ if (status.ybar == true) {
1886
+ status.top = rootDom.value.scrollTop == 0;
1887
+ status.bottom = rootDom.value.scrollTop + rootDom.value.clientHeight == rootDom.value.scrollHeight;
1888
+ }
1889
+ Object.freeze(status);
1890
+ const events = Object.create(null);
1891
+ if (preStatus != void 0) {
1892
+ preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
1893
+ preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
1894
+ if (preStatus.xbar == true && status.xbar == true) {
1895
+ status.left && preStatus.left !== status.left && (events.left = []);
1896
+ status.right && preStatus.right !== status.right && (events.right = []);
1897
+ }
1898
+ if (preStatus.ybar == true && status.ybar == true) {
1899
+ status.top && preStatus.top !== status.top && (events.top = []);
1900
+ status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
1901
+ }
1902
+ }
1903
+ preStatus = status;
1904
+ preStatus = Object.freeze(status);
1905
+ events.xbar && emits("xbar", ...events.xbar);
1906
+ events.left && emits("left");
1907
+ events.right && emits("right");
1908
+ events.ybar && emits("ybar", ...events.ybar);
1909
+ events.top && emits("top");
1910
+ events.bottom && emits("bottom");
1911
+ }
1912
+ vue.onMounted(() => {
1913
+ refreshScrollInfo();
1914
+ onSize(rootDom.value, refreshScrollInfo);
1915
+ onInterval(() => {
1916
+ const isChange = preStatus.scrollwidth != rootDom.value.scrollWidth || preStatus.scrollheight != rootDom.value.scrollHeight;
1917
+ isChange && refreshScrollInfo();
1918
+ }, 100);
1919
+ });
1835
1920
  return (_ctx, _cache) => {
1836
1921
  return vue.openBlock(), vue.createElementBlock("div", {
1837
- class: vue.normalizeClass(["snail-scroll", {
1838
- "scroll-x": props.scrollX == true,
1839
- "scroll-y": props.scrollY == true
1840
- }])
1841
- }, [vue.renderSlot(_ctx.$slots, "default")], 2);
1922
+ class: vue.normalizeClass(["snail-scroll", classRef.value]),
1923
+ ref: "scroll-root",
1924
+ onScroll: refreshScrollInfo
1925
+ }, [vue.renderSlot(_ctx.$slots, "default")], 34);
1842
1926
  };
1843
1927
  }
1844
1928
  });
@@ -1,15 +1,15 @@
1
- /* src:base\choose.vue index:0 */
2
- .snail-choose{align-items:center;display:flex;flex-wrap:wrap;overflow-x:hidden}.snail-choose>div.choose-item{align-items:center;cursor:pointer;display:flex;flex-shrink:0;margin:0 8px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-choose>div.choose-item:after{content:"";height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.snail-choose>div.choose-item>input::checkmark{background-color:#2196f3;border-color:#2196f3}.snail-choose>div.choose-item>span{margin-left:4px}.snail-choose.readonly>div.choose-item{cursor:not-allowed}
3
1
  /* src:base\button.vue index:0 */
4
2
  .snail-button{align-items:center;border-radius:2px;cursor:pointer;display:flex;display:inline-flex;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;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}
5
3
  /* src:base\footer.vue index:0 */
6
4
  .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\choose.vue index:0 */
6
+ .snail-choose{align-items:center;display:flex;flex-wrap:wrap;overflow-x:hidden}.snail-choose>div.choose-item{align-items:center;cursor:pointer;display:flex;flex-shrink:0;margin:0 8px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-choose>div.choose-item:after{content:"";height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.snail-choose>div.choose-item>input::checkmark{background-color:#2196f3;border-color:#2196f3}.snail-choose>div.choose-item>span{margin-left:4px}.snail-choose.readonly>div.choose-item{cursor:not-allowed}
7
+ /* src:base\icon.vue index:0 */
8
+ .snail-icon{cursor:pointer;opacity:1}
7
9
  /* src:base\header.vue index:0 */
8
10
  .snail-header{align-items:center;background-color:#fff;display:flex;flex-shrink:0;position:relative;width:100%}.snail-header>.header-title{color:#2e3033;flex:1;line-height:48px;overflow:hidden;padding:0 30px;text-overflow:ellipsis;white-space:nowrap;width:100%}.snail-header>.header-title.left{text-align:left}.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:bold}.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}
9
11
  /* src:base\search.vue index:0 */
10
12
  .snail-search{align-items:center;background:#fff;display:flex;flex-shrink:0;height:34px}.snail-search>input{border-radius:0!important;flex:1;height:100%}.snail-search>div{align-items:center;border:1px solid #dddfed;border-left:none;display:flex;flex-shrink:0;height:100%;justify-content:center;width:34px}
11
- /* src:base\icon.vue index:0 */
12
- .snail-icon{cursor:pointer;opacity:1}
13
13
  /* src:base\select.vue index:0 */
14
14
  .snail-select{align-items:center;background-color:#fff;border:1px solid #dddfed;border-radius:4px;color:#2e3033;cursor:pointer;display:flex;height:32px;width:100%}.snail-select>div.select-result{align-items:center;display:flex;flex:1;flex-wrap:nowrap;height:30px;overflow:hidden;padding:0 10px 0 6px}.snail-select>div.select-result>div.select-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.snail-select>svg.snail-icon{flex-shrink:0;margin-right:4px}.snail-select>div.no-items{cursor:text;padding:0 8px}.snail-select.readonly{cursor:auto}.snail-select.readonly>svg.snail-icon{display:none}
15
15
  /* src:base\switch.vue index:0 */
@@ -24,10 +24,10 @@
24
24
  .snail-sort-drag{background:#fff;border:1px solid #4c9aff;border-radius:4px;cursor:move}.snail-sort-ghost{border:1px dashed #4c9aff;border-radius:4px}
25
25
  /* src:container\table.vue index:0 */
26
26
  .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{background-color:#fff;position:sticky!important;top:0;z-index:1}.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}
27
- /* src:container\components\table-col.vue index:0 */
28
- .table-col{align-items:center;display:flex;height:100%;white-space:nowrap}.table-col.left{justify-content:left}.table-col.center{justify-content:center}.table-col.right{justify-content:right}
29
27
  /* src:container\components\table-row.vue index:0 */
30
28
  .table-row{align-items:center;display:flex}
29
+ /* src:container\components\table-col.vue index:0 */
30
+ .table-col{align-items:center;display:flex;height:100%;white-space:nowrap}.table-col.left{justify-content:left}.table-col.center{justify-content:center}.table-col.right{justify-content:right}
31
31
  /* src:container\tree.vue index:0 */
32
32
  .snail-tree{background-color:#fff;display:flex;flex-direction:column}.snail-tree .snail-search{flex-shrink:0;margin:12px}.snail-tree .snail-scroll{flex:1}
33
33
  /* src:form\input.vue index:0 */
@@ -42,10 +42,10 @@
42
42
  .snail-confirm{background-color:#fff;border-radius:4px;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>div.confirm-body{flex:1;margin:20px 40px;overflow:auto;word-wrap:break-word}
43
43
  /* src:popup\components\dialog-container.vue index:0 */
44
44
  .snail-dialog{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%}.snail-dialog:before{background-color:rgba(24,27,33,.45);content:"";height:100%;opacity:1;position:absolute;transition:opacity .4s ease-in-out;width:100%}.snail-dialog>.dialog-body{background-color:#fff;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.3);position:relative}.snail-dialog.unactive:before{opacity:0}.snail-dialog.unactive>.dialog-body{box-shadow:0 0 4px rgba(0,0,0,.3)}
45
- /* src:popup\components\popup-container.vue index:0 */
46
- .snail-popup{left:0;position:fixed;top:0}
47
45
  /* src:popup\components\follow-container.vue index:0 */
48
46
  .snail-follow{background-color:#fff;display:inline-block;max-height:100%;max-width:100%;position:fixed;transition-duration:.5s;transition-property:left,top;transition-timing-function:ease}
47
+ /* src:popup\components\popup-container.vue index:0 */
48
+ .snail-popup{left:0;position:fixed;top:0}
49
49
  /* src:popup\components\toast-container.vue index:0 */
50
50
  .snail-toast{background:rgba(0,0,0,.7);border-radius:10px;color:#fff;display:flex;left:50%;max-height:200px;max-width:400px;min-width:200px;overflow:hidden;padding:20px 35px 20px 15px;position:fixed;top:50%;transform:translate(-50%,-50%)}.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}
51
51
  /* src:container\components\tree-node.vue index:0 */
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.41",
6
+ "version": "1.0.42",
7
7
  "type": "module",
8
8
  "main": "dist/snail.vue.js",
9
9
  "module": "dist/snail.vue.js",