vft 0.0.451 → 0.0.454

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.
Files changed (192) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/components/affix/affix.vue2.js +1 -1
  4. package/es/components/alert/alert.vue.d.ts +2 -1
  5. package/es/components/alert/alert.vue2.js +1 -1
  6. package/es/components/autocomplete/autocomplete.vue.d.ts +3 -2
  7. package/es/components/autocomplete/autocomplete.vue2.js +18 -18
  8. package/es/components/avatar/avatar.vue.d.ts +1 -1
  9. package/es/components/button/button-group.vue.d.ts +1 -1
  10. package/es/components/button/button-group.vue2.js +1 -1
  11. package/es/components/carousel/carousel.vue2.js +1 -1
  12. package/es/components/carousel/use-carousel.js +1 -1
  13. package/es/components/cascader/cascader.vue2.js +4 -7
  14. package/es/components/cascader-panel/node.vue2.js +1 -1
  15. package/es/components/check-tag/check-tag.vue2.js +2 -2
  16. package/es/components/checkbox/checkbox-group.vue.d.ts +1 -1
  17. package/es/components/clamp-toggle/clamp-toggle.vue2.js +1 -1
  18. package/es/components/col/col.vue2.js +6 -6
  19. package/es/components/color-picker/color-picker.vue.d.ts +1 -1
  20. package/es/components/color-picker/components/hue-slider.vue.js +4 -4
  21. package/es/components/color-picker/components/sv-panel.vue.js +4 -4
  22. package/es/components/context-menu/context-menu.vue.d.ts +1 -1
  23. package/es/components/context-menu/context-menu.vue2.js +15 -18
  24. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +2 -2
  25. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +1 -1
  26. package/es/components/date-time-select/date-time-select.vue2.js +38 -39
  27. package/es/components/dialog/dialog.vue.d.ts +1 -1
  28. package/es/components/drawer/drawer.vue.d.ts +1 -1
  29. package/es/components/dropdown/dropdown.vue.d.ts +1 -1
  30. package/es/components/dropdown/dropdown.vue2.js +1 -1
  31. package/es/components/full-screen/full-screen.vue.d.ts +1 -1
  32. package/es/components/header-layout/header-layout.vue.d.ts +1 -1
  33. package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
  34. package/es/components/horizontal-menu/horizontal-menu.vue2.js +15 -15
  35. package/es/components/icon/icon.vue.d.ts +1 -1
  36. package/es/components/icon-text/icon-text.vue2.js +12 -12
  37. package/es/components/iframe-layout/iframe-layout.vue.d.ts +1 -1
  38. package/es/components/image/image.vue2.js +1 -1
  39. package/es/components/image-viewer/image-viewer.vue2.js +1 -1
  40. package/es/components/input/input.vue2.js +4 -4
  41. package/es/components/input-number/input-number.vue2.js +1 -1
  42. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  43. package/es/components/link/link.vue2.js +10 -11
  44. package/es/components/list-cell/list-cell.vue.d.ts +1 -1
  45. package/es/components/list-cell/list-cell.vue2.js +1 -1
  46. package/es/components/modal/modal.vue.d.ts +1 -8
  47. package/es/components/modal/types.d.ts +42 -11
  48. package/es/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
  49. package/es/components/multiple-tabs/multiple-tabs.vue2.js +11 -13
  50. package/es/components/multiple-tabs/tab-content.vue.d.ts +1 -1
  51. package/es/components/multiple-tabs/tab-content.vue2.js +7 -8
  52. package/es/components/overlay/overlay.vue2.js +5 -5
  53. package/es/components/pagination/components/jumper.vue.d.ts +1 -1
  54. package/es/components/pagination/components/pager.vue2.js +2 -12
  55. package/es/components/pagination/pagination.vue2.js +1 -1
  56. package/es/components/popconfirm/popconfirm.vue.d.ts +2 -2
  57. package/es/components/popper/trigger.vue2.js +13 -13
  58. package/es/components/progress/index.d.ts +3 -3
  59. package/es/components/qrcode/qrcode.vue.d.ts +1 -1
  60. package/es/components/radio/radio-button.vue2.js +4 -4
  61. package/es/components/radio/radio-group.vue.d.ts +1 -1
  62. package/es/components/radio/radio.vue2.js +1 -1
  63. package/es/components/rate/rate.vue2.js +4 -4
  64. package/es/components/result/result.vue.d.ts +1 -1
  65. package/es/components/router-view-content/index.d.ts +0 -18
  66. package/es/components/router-view-content/router-view-content.vue.d.ts +0 -4
  67. package/es/components/router-view-content/router-view-content.vue2.js +24 -28
  68. package/es/components/scrollbar/scrollbar.vue2.js +16 -16
  69. package/es/components/skeleton/skeleton-item.vue.d.ts +1 -1
  70. package/es/components/slider/button.vue.d.ts +1 -1
  71. package/es/components/slider/button.vue2.js +1 -1
  72. package/es/components/slider/slider.vue.d.ts +1 -1
  73. package/es/components/slider/slider.vue2.js +1 -1
  74. package/es/components/super-form/super-form-item.vue2.js +1 -1
  75. package/es/components/super-form/super-form.vue2.js +1 -1
  76. package/es/components/switch/switch.vue2.js +1 -1
  77. package/es/components/table/index.d.ts +9 -0
  78. package/es/components/table/table.vue2.js +36 -32
  79. package/es/components/table/types.d.ts +1 -0
  80. package/es/components/tabs/tab-bar.vue.d.ts +1 -1
  81. package/es/components/tabs/tab-nav.vue.d.ts +1 -1
  82. package/es/components/tabs/tabs.vue.d.ts +3 -3
  83. package/es/components/tag/tag.vue.d.ts +1 -1
  84. package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +25 -25
  85. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +2 -3
  86. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +2 -3
  87. package/es/components/time-select/time-select.vue2.js +2 -1
  88. package/es/components/timeline/timeline-item.vue.d.ts +1 -1
  89. package/es/components/tooltip/trigger.vue.d.ts +1 -1
  90. package/es/components/tree/tree-node.vue.js +1 -1
  91. package/es/components/upload/upload-content.vue2.js +3 -1
  92. package/es/components/upload/upload.vue2.js +1 -1
  93. package/es/components/watermark/watermark.vue2.js +2 -2
  94. package/es/hooks/use-z-index/index.js +3 -3
  95. package/es/package.json.d.ts +1 -1
  96. package/es/package.json.js +1 -1
  97. package/es/utils/vue/vnode.js +1 -1
  98. package/lib/components/affix/affix.vue2.cjs +1 -1
  99. package/lib/components/alert/alert.vue.d.ts +2 -1
  100. package/lib/components/alert/alert.vue2.cjs +1 -1
  101. package/lib/components/autocomplete/autocomplete.vue.d.ts +3 -2
  102. package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
  103. package/lib/components/avatar/avatar.vue.d.ts +1 -1
  104. package/lib/components/button/button-group.vue.d.ts +1 -1
  105. package/lib/components/button/button-group.vue2.cjs +1 -1
  106. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  107. package/lib/components/cascader/cascader.vue2.cjs +1 -1
  108. package/lib/components/cascader-panel/node.vue2.cjs +1 -1
  109. package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
  110. package/lib/components/checkbox/checkbox-group.vue.d.ts +1 -1
  111. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  112. package/lib/components/col/col.vue2.cjs +1 -1
  113. package/lib/components/color-picker/color-picker.vue.d.ts +1 -1
  114. package/lib/components/color-picker/components/hue-slider.vue.cjs +1 -1
  115. package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
  116. package/lib/components/context-menu/context-menu.vue.d.ts +1 -1
  117. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  118. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  119. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  120. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  121. package/lib/components/dialog/dialog.vue.d.ts +1 -1
  122. package/lib/components/drawer/drawer.vue.d.ts +1 -1
  123. package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
  124. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  125. package/lib/components/full-screen/full-screen.vue.d.ts +1 -1
  126. package/lib/components/header-layout/header-layout.vue.d.ts +1 -1
  127. package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
  128. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  129. package/lib/components/icon/icon.vue.d.ts +1 -1
  130. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  131. package/lib/components/iframe-layout/iframe-layout.vue.d.ts +1 -1
  132. package/lib/components/image/image.vue2.cjs +1 -1
  133. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  134. package/lib/components/input/input.vue2.cjs +1 -1
  135. package/lib/components/input-number/input-number.vue2.cjs +1 -1
  136. package/lib/components/link/link.vue2.cjs +1 -1
  137. package/lib/components/list-cell/list-cell.vue.d.ts +1 -1
  138. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  139. package/lib/components/modal/modal.vue.d.ts +1 -8
  140. package/lib/components/modal/types.d.ts +42 -11
  141. package/lib/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
  142. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  143. package/lib/components/multiple-tabs/tab-content.vue.d.ts +1 -1
  144. package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
  145. package/lib/components/overlay/overlay.vue2.cjs +1 -1
  146. package/lib/components/pagination/components/jumper.vue.d.ts +1 -1
  147. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  148. package/lib/components/pagination/pagination.vue2.cjs +1 -1
  149. package/lib/components/popconfirm/popconfirm.vue.d.ts +2 -2
  150. package/lib/components/progress/index.d.ts +3 -3
  151. package/lib/components/qrcode/qrcode.vue.d.ts +1 -1
  152. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  153. package/lib/components/radio/radio-group.vue.d.ts +1 -1
  154. package/lib/components/radio/radio.vue2.cjs +1 -1
  155. package/lib/components/rate/rate.vue2.cjs +1 -1
  156. package/lib/components/result/result.vue.d.ts +1 -1
  157. package/lib/components/router-view-content/index.d.ts +0 -18
  158. package/lib/components/router-view-content/router-view-content.vue.d.ts +0 -4
  159. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  160. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  161. package/lib/components/skeleton/skeleton-item.vue.d.ts +1 -1
  162. package/lib/components/slider/button.vue.d.ts +1 -1
  163. package/lib/components/slider/button.vue2.cjs +1 -1
  164. package/lib/components/slider/slider.vue.d.ts +1 -1
  165. package/lib/components/slider/slider.vue2.cjs +1 -1
  166. package/lib/components/super-form/super-form.vue2.cjs +1 -1
  167. package/lib/components/switch/switch.vue2.cjs +1 -1
  168. package/lib/components/table/index.d.ts +9 -0
  169. package/lib/components/table/table.vue2.cjs +1 -1
  170. package/lib/components/table/types.d.ts +1 -0
  171. package/lib/components/tabs/tab-bar.vue.d.ts +1 -1
  172. package/lib/components/tabs/tab-nav.vue.d.ts +1 -1
  173. package/lib/components/tabs/tabs.vue.d.ts +3 -3
  174. package/lib/components/tag/tag.vue.d.ts +1 -1
  175. package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
  176. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  177. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  178. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  179. package/lib/components/timeline/timeline-item.vue.d.ts +1 -1
  180. package/lib/components/tooltip/trigger.vue.d.ts +1 -1
  181. package/lib/components/tree/tree-node.vue.cjs +1 -1
  182. package/lib/components/upload/upload.vue2.cjs +1 -1
  183. package/lib/components/watermark/watermark.vue2.cjs +1 -1
  184. package/lib/package.json.cjs +1 -1
  185. package/lib/package.json.d.ts +1 -1
  186. package/package.json +4 -4
  187. package/tags.json +1 -1
  188. package/theme-style/index.css +1 -1
  189. package/theme-style/src/common/var.scss +2 -2
  190. package/theme-style/src/dialog.scss +3 -3
  191. package/theme-style/vft-dialog.css +1 -1
  192. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as N, useAttrs as ae, ref as s, getCurrentInstance as te, computed as P, unref as e, watch as oe, nextTick as le, toRaw as re, createBlock as f, openBlock as m, withCtx as c, createElementVNode as D, normalizeClass as ne, createVNode as p, createCommentVNode as H, mergeProps as _, withDirectives as ce, renderSlot as h, normalizeProps as ie, guardReactiveProps as se } from "vue";
1
+ import { defineComponent as N, useAttrs as ae, ref as s, getCurrentInstance as te, computed as P, unref as e, watch as oe, nextTick as le, toRaw as re, createBlock as f, openBlock as m, withCtx as c, createElementVNode as H, normalizeClass as ne, createVNode as p, createCommentVNode as D, mergeProps as _, withDirectives as ce, renderSlot as h, normalizeProps as ie, guardReactiveProps as se } from "vue";
2
2
  import { VftEmpty as ge } from "../empty/index.js";
3
3
  import { vLoading as de } from "../loading/directive.js";
4
4
  import { deepMerge as F, isClient as ue, omit as fe, isFunction as me } from "@vft/utils";
@@ -16,20 +16,20 @@ import { VftClientOnly as Ce } from "../client-only/index.js";
16
16
  import { VftPagination as ye } from "../pagination/index.js";
17
17
  import { VftSkeleton as we } from "../skeleton/index.js";
18
18
  import { VftSuperForm as ve } from "../super-form/index.js";
19
- import { VxeGrid as ke } from "vxe-table";
20
- import xe from "xe-utils";
19
+ import { VxeGrid as xe } from "vxe-table";
20
+ import ke from "xe-utils";
21
21
  import { PageSize as T } from "./constants.js";
22
22
  import { useColumns as Se } from "./use/use-columns.js";
23
23
  import { useDataSource as Be } from "./use/use-data-source.js";
24
24
  import { useLoading as ze } from "./use/use-loading.js";
25
25
  import { usePagination as Re } from "./use/use-pagination.js";
26
26
  import { EmptyEnum as Pe } from "../empty/constants.js";
27
- const De = {
27
+ const He = {
28
28
  "vft-loading-text": "加载中..."
29
- }, He = N({
29
+ }, De = N({
30
30
  name: "vft-table"
31
31
  }), la = /* @__PURE__ */ N({
32
- ...He,
32
+ ...De,
33
33
  props: {
34
34
  sticky: {
35
35
  type: [Boolean, Object]
@@ -72,6 +72,10 @@ const De = {
72
72
  type: Boolean,
73
73
  default: !0
74
74
  },
75
+ addMaxHeight: {
76
+ type: Boolean,
77
+ default: !0
78
+ },
75
79
  pagination: {},
76
80
  formOptions: {},
77
81
  onChange: {},
@@ -393,18 +397,18 @@ const De = {
393
397
  expose: O,
394
398
  emit: V
395
399
  }) {
396
- const r = V, g = be("table"), A = ae(), b = s(), C = s(), E = s([]), d = s(), $ = te(), t = P(() => F($.props, e(d))), {
397
- getLoading: q,
398
- setLoading: G
400
+ const r = V, g = be("table"), A = ae(), b = s(), C = s(), E = s([]), d = s(), M = te(), t = P(() => F(M.props, e(d))), {
401
+ getLoading: $,
402
+ setLoading: q
399
403
  } = ze(t), {
400
404
  getPaginationInfo: i,
401
405
  setPagination: u,
402
- getCurrentPage: I
406
+ getCurrentPage: G
403
407
  } = Re(t), {
404
- getViewColumns: K,
405
- setColumns: L
408
+ getViewColumns: I,
409
+ setColumns: K
406
410
  } = Se(t);
407
- oe(() => I(), (a) => {
411
+ oe(() => G(), (a) => {
408
412
  le(() => {
409
413
  y({
410
414
  seqConfig: {
@@ -423,7 +427,7 @@ const De = {
423
427
  }
424
428
  const {
425
429
  getDataSourceRef: w,
426
- handleTableChange: M,
430
+ handleTableChange: L,
427
431
  reload: X,
428
432
  deleteTableDataRecord: Y,
429
433
  insertTableDataRecord: j,
@@ -431,18 +435,18 @@ const De = {
431
435
  updateTableDataRecord: U,
432
436
  setTableData: v,
433
437
  getDataSource: J,
434
- getRawDataSource: k,
435
- tableSearch: x
438
+ getRawDataSource: x,
439
+ tableSearch: k
436
440
  } = Be(t, {
437
441
  tableData: E,
438
- setLoading: G,
442
+ setLoading: q,
439
443
  getPaginationInfo: i,
440
444
  setPagination: u
441
445
  }, r);
442
446
  function S(a) {
443
447
  a?.pageSize && u({
444
448
  currentPage: 1
445
- }), M(a), r("change", a);
449
+ }), L(a), r("change", a);
446
450
  const {
447
451
  onChange: o
448
452
  } = e(t);
@@ -570,20 +574,20 @@ const De = {
570
574
  "toolbar-tool-click",
571
575
  "zoom"
572
576
  ].forEach((a) => {
573
- const o = xe.camelCase(`on-${a}`);
577
+ const o = ke.camelCase(`on-${a}`);
574
578
  B[o] = (...l) => r(a, ...l);
575
579
  });
576
580
  const n = P(() => {
577
581
  const a = e(w), o = {
578
582
  ...A,
579
583
  ...e(t),
580
- columns: re(e(K)),
581
- loading: e(q),
584
+ columns: re(e(I)),
585
+ loading: e($),
582
586
  data: a,
583
587
  ...B
584
588
  };
585
589
  if (ue) {
586
- o.maxHeight = e(t)?.maxHeight ? e(t)?.maxHeight : `${window.innerHeight - e(t)?.extraSysHeight - (t.value?.showPager ? t.value?.pageHeight || 40 : 0)}px`;
590
+ (e(t)?.addMaxHeight || e(t)?.maxHeight) && (o.maxHeight = e(t)?.maxHeight ? e(t)?.maxHeight : `${window.innerHeight - e(t)?.extraSysHeight - (t.value?.showPager ? t.value?.pageHeight || 40 : 0)}px`);
587
591
  const l = e(t)?.minHeight;
588
592
  o.minHeight = l || (l !== 0 && e(t)?.toolbarConfig?.custom ? 300 : void 0);
589
593
  }
@@ -600,9 +604,9 @@ const De = {
600
604
  setTableData: v,
601
605
  getDataSource: J,
602
606
  getDataSourceRef: w,
603
- setColumns: L,
604
- getRawDataSource: k,
605
- tableSearch: x
607
+ setColumns: K,
608
+ getRawDataSource: x,
609
+ tableSearch: k
606
610
  };
607
611
  r("register", z);
608
612
  const Q = {
@@ -639,9 +643,9 @@ const De = {
639
643
  ["showActionForm", "addSearchAllSchema"]
640
644
  // 'union' | 'intersection' | 'concat' | 'replace' = 'union'
641
645
  ), "replace")), R = (a) => {
642
- Reflect.has(a, "_filterTableData") && x(a._filterTableData), r("form-submit", a);
646
+ Reflect.has(a, "_filterTableData") && k(a._filterTableData), r("form-submit", a);
643
647
  }, ee = () => {
644
- v(k()), r("form-reset");
648
+ v(x()), r("form-reset");
645
649
  };
646
650
  return O({
647
651
  table: b,
@@ -649,9 +653,9 @@ const De = {
649
653
  ...z
650
654
  }), (a, o) => (m(), f(e(Ce), null, {
651
655
  fallback: c(() => [p(e(we))]),
652
- default: c(() => [D("div", {
656
+ default: c(() => [H("div", {
653
657
  class: ne([e(g).b()])
654
- }, [p(e(ke), _({
658
+ }, [p(e(xe), _({
655
659
  ref_key: "xGrid",
656
660
  ref: b
657
661
  }, n.value), {
@@ -660,9 +664,9 @@ const De = {
660
664
  onRegister: e(Z),
661
665
  onSubmit: R,
662
666
  onReset: ee
663
- }, null, 8, ["onRegister"])) : H("", !0), h(a.$slots, "toolbar-right")]),
667
+ }, null, 8, ["onRegister"])) : D("", !0), h(a.$slots, "toolbar-right")]),
664
668
  empty: c(() => [h(a.$slots, "empty", {}, () => [p(e(ge), ie(se(n.value.emptyCfg)), null, 16)])]),
665
- loading: c(() => [ce(D("div", De, null, 512), [[e(de), !!n.value.loading]])]),
669
+ loading: c(() => [ce(H("div", He, null, 512), [[e(de), !!n.value.loading]])]),
666
670
  _: 3
667
671
  }, 16), n.value.showPager ? (m(), f(e(ye), _({
668
672
  key: 0,
@@ -676,7 +680,7 @@ const De = {
676
680
  onSizeChange: o[1] || (o[1] = (l) => S({
677
681
  pageSize: l
678
682
  }))
679
- }), null, 16, ["class"])) : H("", !0)], 2)]),
683
+ }), null, 16, ["class"])) : D("", !0)], 2)]),
680
684
  _: 3
681
685
  }));
682
686
  }
@@ -57,6 +57,7 @@ export interface TableProps extends VxeGridProps {
57
57
  pageHeight?: number;
58
58
  /** 是否显示分页器,默认为 true */
59
59
  showPager?: boolean;
60
+ addMaxHeight?: boolean;
60
61
  /** 分页器配置选项 */
61
62
  pagination?: Partial<PaginationProps> & {
62
63
  /** 分页器位置,可选值:'bottom-left'、'bottom-right'、'top-left'、'top-right' */
@@ -1,5 +1,5 @@
1
1
  import type { CSSProperties } from 'vue';
2
- import { type TabsPaneContext } from './types';
2
+ import type { TabsPaneContext } from './types';
3
3
  interface Props {
4
4
  /** tabs 集合 */
5
5
  tabs: TabsPaneContext[];
@@ -1,4 +1,4 @@
1
- import { type IconProps } from 'vft/es/components/icon';
1
+ import type { IconProps } from 'vft/es/components/icon';
2
2
  import type { TabsPaneContext, TabPaneName } from './types';
3
3
  interface TabNavProps {
4
4
  panes: TabsPaneContext[];
@@ -1,6 +1,6 @@
1
- import { type IconProps } from 'vft/es/components/icon';
2
- import { type TabPaneName } from 'vft/es/components/tabs';
3
- import { type VNode } from 'vue';
1
+ import type { IconProps } from 'vft/es/components/icon';
2
+ import type { TabPaneName } from 'vft/es/components/tabs';
3
+ import type { VNode } from 'vue';
4
4
  export interface TabsProps {
5
5
  /** 标签是否可关闭 */
6
6
  closable?: boolean;
@@ -1,4 +1,4 @@
1
- import { type ComponentSize } from '../types';
1
+ import type { ComponentSize } from '../types';
2
2
  import type { TagType } from './types';
3
3
  export interface TagProps {
4
4
  closable?: boolean;
@@ -1,4 +1,4 @@
1
- import { defineComponent as de, inject as pe, ref as C, computed as k, unref as r, onMounted as he, nextTick as x, watch as fe, createElementBlock as a, openBlock as l, normalizeClass as m, createCommentVNode as I, Fragment as u, renderList as _, createBlock as be, withCtx as we, createTextVNode as D, toDisplayString as f, withDirectives as j, createElementVNode as ve, createVNode as U } from "vue";
1
+ import { defineComponent as de, inject as pe, ref as C, computed as k, unref as r, onMounted as he, nextTick as x, watch as fe, createElementBlock as a, openBlock as l, normalizeClass as m, createCommentVNode as I, Fragment as u, renderList as $, createBlock as be, withCtx as we, createTextVNode as _, toDisplayString as f, withDirectives as j, createElementVNode as ve, createVNode as U } from "vue";
2
2
  import { debounce as Se } from "lodash-es";
3
3
  import { vRepeatClick as q } from "@vft/directives";
4
4
  import { VftScrollbar as ge } from "../../scrollbar/index.js";
@@ -12,21 +12,21 @@ import { useNamespace as ke } from "../../../hooks/use-namespace/index.js";
12
12
  import "../../../hooks/use-model-toggle/index.js";
13
13
  import "@popperjs/core";
14
14
  import "../../../hooks/use-z-index/index.js";
15
- import { PICKER_BASE_INJECTION_KEY as _e, timeUnits as O, DEFAULT_FORMATS_TIME as De } from "../constants.js";
15
+ import { PICKER_BASE_INJECTION_KEY as $e, timeUnits as O, DEFAULT_FORMATS_TIME as _e } from "../constants.js";
16
16
  import { buildTimeList as L } from "../utils.js";
17
- import { basicTimeSpinnerProps as Te } from "../props/basic-time-spinner.js";
18
- import { getTimeLists as $e } from "../composables/use-time-picker.js";
17
+ import { basicTimeSpinnerProps as De } from "../props/basic-time-spinner.js";
18
+ import { getTimeLists as Te } from "../composables/use-time-picker.js";
19
19
  const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
20
20
  __name: "basic-time-spinner",
21
- props: Te,
21
+ props: De,
22
22
  emits: [K, "select-range", "set-option"],
23
23
  setup(G, { emit: J }) {
24
- const c = G, Y = pe(_e), { isRange: Q, format: A } = Y.props, v = J, i = ke("time"), { getHoursList: W, getMinutesList: X, getSecondsList: Z } = $e(
24
+ const c = G, v = J, Y = pe($e), { isRange: Q, format: A } = Y.props, i = ke("time"), { getHoursList: W, getMinutesList: X, getSecondsList: Z } = Te(
25
25
  c.disabledHours,
26
26
  c.disabledMinutes,
27
27
  c.disabledSeconds
28
28
  );
29
- let T = !1;
29
+ let D = !1;
30
30
  const S = C(), y = C(), ee = C(), se = C(), h = {
31
31
  hours: y,
32
32
  minutes: ee,
@@ -49,7 +49,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
49
49
  seconds: L(s, 59)
50
50
  };
51
51
  }), ne = Se((e) => {
52
- T = !1, b(e);
52
+ D = !1, b(e);
53
53
  }, 200), H = (e) => {
54
54
  if (!!!c.amPmMode) return "";
55
55
  const s = c.amPmMode === "A";
@@ -57,7 +57,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
57
57
  return s && (n = n.toUpperCase()), n;
58
58
  }, p = (e) => {
59
59
  let o = [0, 0];
60
- if (!A || A === De)
60
+ if (!A || A === _e)
61
61
  switch (e) {
62
62
  case "hours":
63
63
  o = [0, 2];
@@ -75,10 +75,10 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
75
75
  E(e, r(d)[e]);
76
76
  }, V = () => {
77
77
  b("hours"), b("minutes"), b("seconds");
78
- }, $ = (e) => e.querySelector(`.${i.namespace.value}-scrollbar__wrap`), E = (e, o) => {
78
+ }, T = (e) => e.querySelector(`.${i.namespace.value}-scrollbar__wrap`), E = (e, o) => {
79
79
  if (c.arrowControl) return;
80
80
  const s = r(h[e]);
81
- s && s.$el && ($(s.$el).scrollTop = Math.max(
81
+ s && s.$el && (T(s.$el).scrollTop = Math.max(
82
82
  0,
83
83
  o * N(e)
84
84
  ));
@@ -120,10 +120,10 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
120
120
  }, le = (e) => {
121
121
  const o = r(h[e]);
122
122
  if (!o) return;
123
- T = !0, ne(e);
123
+ D = !0, ne(e);
124
124
  const s = Math.min(
125
125
  Math.round(
126
- ($(o.$el).scrollTop - (ae(e) * 0.5 - 10) / N(e) + 3) / N(e)
126
+ (T(o.$el).scrollTop - (ae(e) * 0.5 - 10) / N(e) + 3) / N(e)
127
127
  ),
128
128
  e === "hours" ? 23 : 59
129
129
  );
@@ -131,7 +131,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
131
131
  }, ae = (e) => r(h[e]).$el.offsetHeight, ue = () => {
132
132
  const e = (o) => {
133
133
  const s = r(h[o]);
134
- s && s.$el && ($(s.$el).onscroll = () => {
134
+ s && s.$el && (T(s.$el).onscroll = () => {
135
135
  le(o);
136
136
  });
137
137
  };
@@ -148,12 +148,12 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
148
148
  return v("set-option", [`${c.role}_scrollDown`, R]), v("set-option", [`${c.role}_emitSelectRange`, p]), fe(
149
149
  () => c.spinnerDate,
150
150
  () => {
151
- T || V();
151
+ D || V();
152
152
  }
153
153
  ), (e, o) => (l(), a("div", {
154
154
  class: m([r(i).b("spinner"), { "has-seconds": e.showSeconds }])
155
155
  }, [
156
- e.arrowControl ? I("", !0) : (l(!0), a(u, { key: 0 }, _(F.value, (s) => (l(), be(r(ge), {
156
+ e.arrowControl ? I("", !0) : (l(!0), a(u, { key: 0 }, $(F.value, (s) => (l(), be(r(ge), {
157
157
  key: s,
158
158
  ref_for: !0,
159
159
  ref: (n) => me(n, s),
@@ -166,7 +166,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
166
166
  onMousemove: (n) => b(s)
167
167
  }, {
168
168
  default: we(() => [
169
- (l(!0), a(u, null, _(g.value[s], (n, t) => (l(), a("li", {
169
+ (l(!0), a(u, null, $(g.value[s], (n, t) => (l(), a("li", {
170
170
  key: t,
171
171
  class: m([
172
172
  r(i).be("spinner", "item"),
@@ -176,35 +176,35 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
176
176
  onClick: (w) => ie(s, { value: t, disabled: n })
177
177
  }, [
178
178
  s === "hours" ? (l(), a(u, { key: 0 }, [
179
- D(f(("0" + (e.amPmMode ? t % 12 || 12 : t)).slice(-2)) + f(H(t)), 1)
179
+ _(f(`0${e.amPmMode ? t % 12 || 12 : t}`.slice(-2)) + f(H(t)), 1)
180
180
  ], 64)) : (l(), a(u, { key: 1 }, [
181
- D(f(("0" + t).slice(-2)), 1)
181
+ _(f(`0${t}`.slice(-2)), 1)
182
182
  ], 64))
183
183
  ], 10, Ee))), 128))
184
184
  ]),
185
185
  _: 2
186
186
  }, 1032, ["class", "view-class", "onMouseenter", "onMousemove"]))), 128)),
187
- e.arrowControl ? (l(!0), a(u, { key: 1 }, _(F.value, (s) => (l(), a("div", {
187
+ e.arrowControl ? (l(!0), a(u, { key: 1 }, $(F.value, (s) => (l(), a("div", {
188
188
  key: s,
189
189
  class: m([r(i).be("spinner", "wrapper"), r(i).is("arrow")]),
190
190
  onMouseenter: (n) => p(s)
191
191
  }, [
192
192
  j(U(r(z), {
193
193
  icon: "icon-arrow-up",
194
- class: m(["arrow-up", r(i).be("spinner", "arrow")])
194
+ class: m(["arrow-up", [r(i).be("spinner", "arrow")]])
195
195
  }, null, 8, ["class"]), [
196
196
  [r(q), te]
197
197
  ]),
198
198
  j(U(r(z), {
199
199
  icon: "icon-arrow-down",
200
- class: m(["arrow-down", r(i).be("spinner", "arrow")])
200
+ class: m(["arrow-down", [r(i).be("spinner", "arrow")]])
201
201
  }, null, 8, ["class"]), [
202
202
  [r(q), re]
203
203
  ]),
204
204
  ve("ul", {
205
205
  class: m(r(i).be("spinner", "list"))
206
206
  }, [
207
- (l(!0), a(u, null, _(oe.value[s], (n, t) => (l(), a("li", {
207
+ (l(!0), a(u, null, $(oe.value[s], (n, t) => (l(), a("li", {
208
208
  key: t,
209
209
  class: m([
210
210
  r(i).be("spinner", "item"),
@@ -214,9 +214,9 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
214
214
  }, [
215
215
  r(Ce)(n) ? (l(), a(u, { key: 0 }, [
216
216
  s === "hours" ? (l(), a(u, { key: 0 }, [
217
- D(f(("0" + (e.amPmMode ? n % 12 || 12 : n)).slice(-2)) + f(H(n)), 1)
217
+ _(f(`0${e.amPmMode ? n % 12 || 12 : n}`.slice(-2)) + f(H(n)), 1)
218
218
  ], 64)) : (l(), a(u, { key: 1 }, [
219
- D(f(("0" + n).slice(-2)), 1)
219
+ _(f(`0${n}`.slice(-2)), 1)
220
220
  ], 64))
221
221
  ], 64)) : I("", !0)
222
222
  ], 2))), 128))
@@ -54,7 +54,6 @@ const _e = /* @__PURE__ */ F({
54
54
  if ([c, q].includes(t)) {
55
55
  const S = t === c ? -1 : 1;
56
56
  h.start_scrollDown(S), e.preventDefault();
57
- return;
58
57
  }
59
58
  }, { timePickerOptions: h, onSetOption: j, getAvailableTime: H } = re({
60
59
  getAvailableHours: N,
@@ -90,12 +89,12 @@ const _e = /* @__PURE__ */ F({
90
89
  }, [
91
90
  p("button", {
92
91
  type: "button",
93
- class: r([s(i).be("panel", "btn"), "cancel"]),
92
+ class: r(["cancel", [s(i).be("panel", "btn")]]),
94
93
  onClick: K
95
94
  }, " 取消 ", 2),
96
95
  p("button", {
97
96
  type: "button",
98
- class: r([s(i).be("panel", "btn"), "confirm"]),
97
+ class: r(["confirm", [s(i).be("panel", "btn")]]),
99
98
  onClick: t[0] || (t[0] = (a) => x())
100
99
  }, " 确认 ", 2)
101
100
  ], 2)
@@ -74,7 +74,6 @@ const Re = ["disabled"], Ge = /* @__PURE__ */ ve({
74
74
  if ([r, l].includes(t)) {
75
75
  const p = t === r ? -1 : 1, h = D.value[0] < K.value ? "start" : "end";
76
76
  T[`${h}_scrollDown`](p), e.preventDefault();
77
- return;
78
77
  }
79
78
  }, V = (e, t) => {
80
79
  const n = O ? O(e) : [], o = e === "start", l = (t || (o ? v.value : f.value)).hour(), p = o ? g(l + 1, 23) : g(0, l - 1);
@@ -175,12 +174,12 @@ const Re = ["disabled"], Ge = /* @__PURE__ */ ve({
175
174
  }, [
176
175
  m("button", {
177
176
  type: "button",
178
- class: u([s(a).be("panel", "btn"), "cancel"]),
177
+ class: u(["cancel", [s(a).be("panel", "btn")]]),
179
178
  onClick: t[0] || (t[0] = (n) => X())
180
179
  }, " 取消 ", 2),
181
180
  m("button", {
182
181
  type: "button",
183
- class: u([s(a).be("panel", "btn"), "confirm"]),
182
+ class: u(["confirm", [s(a).be("panel", "btn")]]),
184
183
  disabled: oe.value,
185
184
  onClick: t[1] || (t[1] = (n) => Z())
186
185
  }, " 确认 ", 10, Re)
@@ -22,8 +22,9 @@ const q = v({
22
22
  props: D,
23
23
  emits: ["change", "blur", "focus", "update:modelValue"],
24
24
  setup(T, { expose: V }) {
25
+ const o = T;
25
26
  d.extend(O);
26
- const { Option: k } = b, o = T, C = j("input"), i = S(), I = U(), g = r(() => o.modelValue), y = r(() => {
27
+ const { Option: k } = b, C = j("input"), i = S(), I = U(), g = r(() => o.modelValue), y = r(() => {
27
28
  const e = a(o.start);
28
29
  return e ? m(e) : null;
29
30
  }), c = r(() => {
@@ -1,4 +1,4 @@
1
- import { type IconProps } from 'vft/es/components/icon';
1
+ import type { IconProps } from 'vft/es/components/icon';
2
2
  export interface Props {
3
3
  timestamp?: string;
4
4
  hideTimestamp?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { Measurable } from '../popper';
2
- import { type TooltipTriggerType } from './types';
2
+ import type { TooltipTriggerType } from './types';
3
3
  import type { OnlyChildExpose } from 'vft/es/components/slot';
4
4
  interface Props {
5
5
  disabled?: boolean;
@@ -31,7 +31,7 @@ function S(e, n, c, B, M, V) {
31
31
  }, [
32
32
  v("div", {
33
33
  class: s(e.ns.be("node", "content")),
34
- style: D({ paddingLeft: (e.node.level - 1) * e.tree.props.indent + "px" })
34
+ style: D({ paddingLeft: `${(e.node.level - 1) * e.tree.props.indent}px` })
35
35
  }, [
36
36
  l(h, {
37
37
  icon: e.tree.props.icon || "icon-caret-right",
@@ -76,7 +76,9 @@ const se = ["onKeydown"], re = ["name", "multiple", "accept"], de = D({
76
76
  onTypeInvalid: c
77
77
  } = l;
78
78
  if (s) {
79
- const n = e.filter((t) => !P(t, s));
79
+ const n = e.filter(
80
+ (t) => !P(t, s)
81
+ );
80
82
  if (n.length > 0 && (n.forEach((t) => {
81
83
  c && c(t, s);
82
84
  }), e = e.filter((t) => P(t, s)), e.length === 0))
@@ -115,7 +115,7 @@ const Q = I({
115
115
  handleRemove: m,
116
116
  fileList: d
117
117
  }), (e, l) => (v(), D("div", {
118
- class: H(["vft-upload-wrapper", { disabled: o(y) }])
118
+ class: H(["vft-upload-wrapper", [{ disabled: o(y) }]])
119
119
  }, [
120
120
  c.value && s.showFileList ? (v(), g(L, {
121
121
  key: 0,
@@ -10,9 +10,9 @@ const ft = _({
10
10
  ...ft,
11
11
  props: rt,
12
12
  setup(A) {
13
- const R = {
13
+ const t = A, R = {
14
14
  position: "relative"
15
- }, t = A, E = n(() => t.font?.color ?? "rgba(0,0,0,.15)"), k = n(() => t.font?.fontSize ?? 16), I = n(() => t.font?.fontWeight ?? "normal"), P = n(() => t.font?.fontStyle ?? "normal"), y = n(() => t.font?.fontFamily ?? "sans-serif"), T = n(() => t.font?.textAlign ?? "center"), F = n(() => t.font?.textBaseline ?? "hanging"), b = n(() => t.gap[0]), B = n(() => t.gap[1]), S = n(() => b.value / 2), M = n(() => B.value / 2), H = n(() => t.offset?.[0] ?? S.value), L = n(() => t.offset?.[1] ?? M.value), O = () => {
15
+ }, E = n(() => t.font?.color ?? "rgba(0,0,0,.15)"), k = n(() => t.font?.fontSize ?? 16), I = n(() => t.font?.fontWeight ?? "normal"), P = n(() => t.font?.fontStyle ?? "normal"), y = n(() => t.font?.fontFamily ?? "sans-serif"), T = n(() => t.font?.textAlign ?? "center"), F = n(() => t.font?.textBaseline ?? "hanging"), b = n(() => t.gap[0]), B = n(() => t.gap[1]), S = n(() => b.value / 2), M = n(() => B.value / 2), H = n(() => t.offset?.[0] ?? S.value), L = n(() => t.offset?.[1] ?? M.value), O = () => {
16
16
  const e = {
17
17
  zIndex: t.zIndex,
18
18
  position: "absolute",
@@ -2,14 +2,14 @@ import "@vueuse/core";
2
2
  import { isNumber as m, isClient as p } from "@vft/utils";
3
3
  import { debugWarn as l } from "../../utils/error.js";
4
4
  import "../../components/config-provider/hooks/use-global-config.js";
5
- import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref as Z } from "vue";
5
+ import { getCurrentInstance as i, inject as e, computed as c, unref as v, ref as Z } from "vue";
6
6
  import "lodash-es";
7
7
  import "../../components/form/index.js";
8
8
  const s = {
9
9
  current: 0
10
- }, u = v(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
10
+ }, u = Z(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
11
11
  const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
12
- const r = Z(x);
12
+ const r = v(x);
13
13
  return m(r) ? r : f;
14
14
  }), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
15
15
  return !p && !e(d) && l(
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.451",
3
+ "version": "0.0.454",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -1,4 +1,4 @@
1
- const o = "0.0.451";
1
+ const o = "0.0.454";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,4 +1,4 @@
1
- import { isArray as E, hasOwn as m, camelize as N } from "@vft/utils";
1
+ import { hasOwn as m, camelize as N, isArray as E } from "@vft/utils";
2
2
  import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
3
3
  import { debugWarn as O } from "../error.js";
4
4
  const R = "utils/vue/vnode";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@vueuse/core"),T=require("../../utils/dom/scroll.cjs"),$=require("../../utils/error.cjs"),C=require("../../utils/helper.cjs");require("@vft/utils");require("lodash-es");require("../form/index.cjs");const B=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("./affix.cjs"),R=e.defineComponent({name:"vft-affix"}),k=e.defineComponent({...R,props:q.affixProps,emits:q.affixEmits,setup(S,{expose:E,emit:_}){const c=B.useNamespace("affix"),t=S,p=_,a=e.shallowRef(),v=e.shallowRef(),r=e.shallowRef(),{height:n}=f.useWindowSize(),{height:s,width:m,top:h,bottom:g,update:d}=f.useElementBounding(v,{windowScroll:!1}),u=f.useElementBounding(a),l=e.ref(!1),x=e.ref(0),i=e.ref(0),b=e.computed(()=>({height:l.value?`${s.value}px`:"",width:l.value?`${m.value}px`:""})),y=e.computed(()=>{if(!l.value)return{};const o=t.offset?C.addUnit(t.offset):0;return{height:`${s.value}px`,width:`${m.value}px`,top:t.position==="top"?o:"",bottom:t.position==="bottom"?o:"",transform:i.value?`translateY(${i.value}px)`:"",zIndex:t.zIndex}}),w=()=>{if(r.value)if(x.value=r.value instanceof Window?document.documentElement.scrollTop:r.value.scrollTop||0,t.position==="top")if(t.target){const o=u.bottom.value-t.offset-s.value;l.value=t.offset>h.value&&u.bottom.value>0,i.value=o<0?o:0}else l.value=t.offset>h.value;else if(t.target){const o=n.value-u.top.value-t.offset-s.value;l.value=n.value-t.offset<g.value&&n.value>u.top.value,i.value=o<0?-o:0}else l.value=n.value-t.offset<g.value},z=()=>{d(),p("scroll",{scrollTop:x.value,fixed:l.value})};return e.watch(l,o=>p("change",o)),e.onMounted(()=>{t.target?(a.value=document.querySelector(t.target)??void 0,a.value||$.throwError(c.b(),`Target is not existed: ${t.target}`)):a.value=document.documentElement,r.value=T.getScrollContainer(v.value,!0),d()}),f.useEventListener(r,"scroll",z),e.watchEffect(w),E({update:w,updateRoot:d}),(o,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:v,class:e.normalizeClass(e.unref(c).b()),style:e.normalizeStyle(b.value)},[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(c).m("fixed")]:l.value}),style:e.normalizeStyle(y.value)},[e.renderSlot(o.$slots,"default")],6)],6))}});exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@vueuse/core"),T=require("../../utils/dom/scroll.cjs"),$=require("../../utils/error.cjs"),C=require("../../utils/helper.cjs");require("@vft/utils");require("lodash-es");require("../form/index.cjs");const B=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("./affix.cjs"),R=e.defineComponent({name:"vft-affix"}),k=e.defineComponent({...R,props:q.affixProps,emits:q.affixEmits,setup(S,{expose:E,emit:_}){const t=S,p=_,c=B.useNamespace("affix"),a=e.shallowRef(),v=e.shallowRef(),r=e.shallowRef(),{height:n}=f.useWindowSize(),{height:s,width:m,top:h,bottom:g,update:d}=f.useElementBounding(v,{windowScroll:!1}),u=f.useElementBounding(a),l=e.ref(!1),x=e.ref(0),i=e.ref(0),b=e.computed(()=>({height:l.value?`${s.value}px`:"",width:l.value?`${m.value}px`:""})),y=e.computed(()=>{if(!l.value)return{};const o=t.offset?C.addUnit(t.offset):0;return{height:`${s.value}px`,width:`${m.value}px`,top:t.position==="top"?o:"",bottom:t.position==="bottom"?o:"",transform:i.value?`translateY(${i.value}px)`:"",zIndex:t.zIndex}}),w=()=>{if(r.value)if(x.value=r.value instanceof Window?document.documentElement.scrollTop:r.value.scrollTop||0,t.position==="top")if(t.target){const o=u.bottom.value-t.offset-s.value;l.value=t.offset>h.value&&u.bottom.value>0,i.value=o<0?o:0}else l.value=t.offset>h.value;else if(t.target){const o=n.value-u.top.value-t.offset-s.value;l.value=n.value-t.offset<g.value&&n.value>u.top.value,i.value=o<0?-o:0}else l.value=n.value-t.offset<g.value},z=()=>{d(),p("scroll",{scrollTop:x.value,fixed:l.value})};return e.watch(l,o=>p("change",o)),e.onMounted(()=>{t.target?(a.value=document.querySelector(t.target)??void 0,a.value||$.throwError(c.b(),`Target is not existed: ${t.target}`)):a.value=document.documentElement,r.value=T.getScrollContainer(v.value,!0),d()}),f.useEventListener(r,"scroll",z),e.watchEffect(w),E({update:w,updateRoot:d}),(o,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:v,class:e.normalizeClass(e.unref(c).b()),style:e.normalizeStyle(b.value)},[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(c).m("fixed")]:l.value}),style:e.normalizeStyle(y.value)},[e.renderSlot(o.$slots,"default")],6)],6))}});exports.default=k;
@@ -1,4 +1,5 @@
1
- import { alertEffects, type TypeComponents } from './types';
1
+ import { alertEffects } from './types';
2
+ import type { TypeComponents } from './types';
2
3
  export interface AlertProps {
3
4
  /**
4
5
  * @description alert title.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../icon/index.cjs");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const m=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const k=e.defineComponent({name:"vft-alert"}),B=e.defineComponent({...k,props:{title:{default:""},description:{default:""},type:{default:"info"},closable:{type:Boolean,default:!0},closeText:{default:""},showIcon:{type:Boolean},center:{type:Boolean},effect:{default:"light"}},emits:{close:t=>t instanceof MouseEvent},setup(t,{emit:i}){const l=m.useNamespace("alert"),u=i,o=e.useSlots(),c=e.ref(!0),s=e.computed(()=>t.type),d=e.computed(()=>[l.e("icon"),{[l.is("big")]:!!t.description||!!o.default}]),f=e.computed(()=>({[l.is("bold")]:t.description||o.default})),r=n=>{c.value=!1,u("close",n)};return(n,C)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(l).b("fade")},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).m(t.type),e.unref(l).is("center",t.center),e.unref(l).is(t.effect)]),role:"alert"},[t.showIcon&&s.value?(e.openBlock(),e.createBlock(e.unref(a.VftIcon),{key:0,class:e.normalizeClass(d.value),icon:s.value},null,8,["class","icon"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[t.title||n.$slots.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(l).e("title"),f.value])},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),n.$slots.default||t.description?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(l).e("description"))},[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.closable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.closeText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("close-btn"),e.unref(l).is("customed")]),onClick:r},e.toDisplayString(t.closeText),3)):(e.openBlock(),e.createBlock(e.unref(a.VftIcon),{key:1,class:e.normalizeClass(e.unref(l).e("close-btn")),onClick:r,icon:"icon-close"},null,8,["class"]))],64)):e.createCommentVNode("",!0)],2)],2),[[e.vShow,c.value]])]),_:3},8,["name"]))}});exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../icon/index.cjs");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const m=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const k=e.defineComponent({name:"vft-alert"}),B=e.defineComponent({...k,props:{title:{default:""},description:{default:""},type:{default:"info"},closable:{type:Boolean,default:!0},closeText:{default:""},showIcon:{type:Boolean},center:{type:Boolean},effect:{default:"light"}},emits:{close:t=>t instanceof MouseEvent},setup(t,{emit:i}){const u=i,l=m.useNamespace("alert"),o=e.useSlots(),c=e.ref(!0),s=e.computed(()=>t.type),d=e.computed(()=>[l.e("icon"),{[l.is("big")]:!!t.description||!!o.default}]),f=e.computed(()=>({[l.is("bold")]:t.description||o.default})),r=n=>{c.value=!1,u("close",n)};return(n,C)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(l).b("fade")},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).m(t.type),e.unref(l).is("center",t.center),e.unref(l).is(t.effect)]),role:"alert"},[t.showIcon&&s.value?(e.openBlock(),e.createBlock(e.unref(a.VftIcon),{key:0,class:e.normalizeClass(d.value),icon:s.value},null,8,["class","icon"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[t.title||n.$slots.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(l).e("title"),f.value])},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),n.$slots.default||t.description?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(l).e("description"))},[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.closable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.closeText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("close-btn"),e.unref(l).is("customed")]),onClick:r},e.toDisplayString(t.closeText),3)):(e.openBlock(),e.createBlock(e.unref(a.VftIcon),{key:1,class:e.normalizeClass(e.unref(l).e("close-btn")),onClick:r,icon:"icon-close"},null,8,["class"]))],64)):e.createCommentVNode("",!0)],2)],2),[[e.vShow,c.value]])]),_:3},8,["name"]))}});exports.default=B;
@@ -1,5 +1,6 @@
1
- import { nextTick, type StyleValue } from 'vue';
2
- import { type AutocompleteData, type AutocompleteFetchSuggestions, type Placement } from './types';
1
+ import { nextTick } from 'vue';
2
+ import type { StyleValue } from 'vue';
3
+ import type { AutocompleteData, AutocompleteFetchSuggestions, Placement } from './types';
3
4
  export interface AutocompleteProps {
4
5
  valueKey?: string;
5
6
  modelValue?: string | number;