vft 0.0.514 → 0.0.516

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 (67) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/icon/icon.vue.d.ts +5 -1
  3. package/es/components/icon/icon.vue2.js +23 -21
  4. package/es/components/icon/index.d.ts +6 -2
  5. package/es/components/image/image.vue2.js +25 -24
  6. package/es/components/image/index.d.ts +9 -0
  7. package/es/components/image/types.d.ts +2 -0
  8. package/es/components/image-viewer/image-viewer.vue.d.ts +1 -12
  9. package/es/components/image-viewer/types.d.ts +22 -0
  10. package/es/components/md-comment/md-comment.vue2.js +50 -28
  11. package/es/components/modal/modal.vue2.js +31 -30
  12. package/es/components/select/index.d.ts +6 -2
  13. package/es/components/select/select.vue.d.ts +6 -2
  14. package/es/components/table/index.d.ts +12 -12
  15. package/es/components/table/table.vue2.js +126 -121
  16. package/es/components/table/vxe-runtime.d.ts +16 -0
  17. package/es/components/table/vxe-runtime.js +16 -0
  18. package/es/components/tree/tree-node.vue.d.ts +6 -2
  19. package/es/components/upload/index.d.ts +2 -2
  20. package/es/components/upload/upload.vue.d.ts +2 -2
  21. package/es/hooks/use-z-index/index.js +3 -3
  22. package/es/package.json.d.ts +1 -1
  23. package/es/package.json.js +1 -1
  24. package/lib/components/icon/icon.vue.d.ts +5 -1
  25. package/lib/components/icon/icon.vue2.cjs +1 -1
  26. package/lib/components/icon/index.d.ts +6 -2
  27. package/lib/components/image/image.vue2.cjs +1 -1
  28. package/lib/components/image/index.d.ts +9 -0
  29. package/lib/components/image/types.d.ts +2 -0
  30. package/lib/components/image-viewer/image-viewer.vue.d.ts +1 -12
  31. package/lib/components/image-viewer/types.d.ts +22 -0
  32. package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
  33. package/lib/components/modal/modal.vue2.cjs +1 -1
  34. package/lib/components/select/index.d.ts +6 -2
  35. package/lib/components/select/select.vue.d.ts +6 -2
  36. package/lib/components/table/index.d.ts +12 -12
  37. package/lib/components/table/table.vue2.cjs +1 -1
  38. package/lib/components/table/vxe-runtime.cjs +1 -0
  39. package/lib/components/table/vxe-runtime.d.ts +16 -0
  40. package/lib/components/tree/tree-node.vue.d.ts +6 -2
  41. package/lib/components/upload/index.d.ts +2 -2
  42. package/lib/components/upload/upload.vue.d.ts +2 -2
  43. package/lib/package.json.cjs +1 -1
  44. package/lib/package.json.d.ts +1 -1
  45. package/package.json +3 -3
  46. package/theme-style/index.css +1 -1
  47. package/theme-style/vft-autocomplete.css +1 -1
  48. package/theme-style/vft-button-group.css +1 -1
  49. package/theme-style/vft-button.css +1 -1
  50. package/theme-style/vft-cascader.css +1 -1
  51. package/theme-style/vft-checkbox.css +1 -1
  52. package/theme-style/vft-color-picker.css +1 -1
  53. package/theme-style/vft-date-picker.css +1 -1
  54. package/theme-style/vft-dropdown.css +1 -1
  55. package/theme-style/vft-input.css +1 -1
  56. package/theme-style/vft-link.css +1 -1
  57. package/theme-style/vft-md-container.css +1 -1
  58. package/theme-style/vft-md-vue-playground.css +1 -1
  59. package/theme-style/vft-multiple-tabs.css +1 -1
  60. package/theme-style/vft-popper.css +1 -1
  61. package/theme-style/vft-radio.css +1 -1
  62. package/theme-style/vft-result.css +1 -1
  63. package/theme-style/vft-select.css +1 -1
  64. package/theme-style/vft-tag.css +1 -1
  65. package/theme-style/vft-time-picker.css +1 -1
  66. package/theme-style/vft-time-select.css +1 -1
  67. package/web-types.json +1 -1
@@ -98,7 +98,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
98
98
  type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.ZoomConfig>;
99
99
  };
100
100
  size: {
101
- type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
101
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentSizeType>;
102
102
  };
103
103
  id: {
104
104
  type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.ID<any>>;
@@ -131,13 +131,13 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
131
131
  type: import("vue").PropType<boolean>;
132
132
  };
133
133
  align: {
134
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
134
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
135
135
  };
136
136
  headerAlign: {
137
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
137
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
138
138
  };
139
139
  footerAlign: {
140
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
140
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
141
141
  };
142
142
  showHeader: {
143
143
  type: import("vue").PropType<boolean>;
@@ -1020,7 +1020,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
1020
1020
  type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.ZoomConfig>;
1021
1021
  };
1022
1022
  size: {
1023
- type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
1023
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentSizeType>;
1024
1024
  };
1025
1025
  id: {
1026
1026
  type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.ID<any>>;
@@ -1053,13 +1053,13 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
1053
1053
  type: import("vue").PropType<boolean>;
1054
1054
  };
1055
1055
  align: {
1056
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
1056
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
1057
1057
  };
1058
1058
  headerAlign: {
1059
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
1059
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
1060
1060
  };
1061
1061
  footerAlign: {
1062
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
1062
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
1063
1063
  };
1064
1064
  showHeader: {
1065
1065
  type: import("vue").PropType<boolean>;
@@ -1826,7 +1826,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
1826
1826
  type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.ZoomConfig>;
1827
1827
  };
1828
1828
  size: {
1829
- type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
1829
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentSizeType>;
1830
1830
  };
1831
1831
  id: {
1832
1832
  type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.ID<any>>;
@@ -1859,13 +1859,13 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
1859
1859
  type: import("vue").PropType<boolean>;
1860
1860
  };
1861
1861
  align: {
1862
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
1862
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
1863
1863
  };
1864
1864
  headerAlign: {
1865
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
1865
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
1866
1866
  };
1867
1867
  footerAlign: {
1868
- type: import("vue").PropType<import("vxe-table").VxeComponentAlignType>;
1868
+ type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
1869
1869
  };
1870
1870
  showHeader: {
1871
1871
  type: import("vue").PropType<boolean>;
@@ -1,40 +1,38 @@
1
- import { defineComponent as K, computed as m, createVNode as i, createTextVNode as he, useAttrs as Ce, ref as g, getCurrentInstance as be, unref as a, watch as ye, nextTick as L, toRaw as we, openBlock as S, createElementBlock as ve, normalizeClass as ke, withCtx as n, mergeProps as M, withDirectives as xe, createElementVNode as Se, vShow as Be, renderSlot as s, normalizeProps as p, guardReactiveProps as h, createCommentVNode as B, createBlock as q, createSlots as Re } from "vue";
2
- import { VftClientOnly as ze } from "../client-only/index.js";
3
- import { VftEmpty as Pe } from "../empty/index.js";
4
- import { vLoading as De } from "../loading/directive.js";
5
- import { deepMerge as G, isClient as He, omit as Oe, isFunction as R } from "@vft/utils";
1
+ import { defineComponent as X, computed as m, createVNode as i, createTextVNode as ye, defineAsyncComponent as we, useAttrs as ve, ref as g, getCurrentInstance as xe, unref as a, watch as ke, nextTick as q, toRaw as Se, openBlock as S, createElementBlock as Be, normalizeClass as Re, withCtx as n, mergeProps as G, withDirectives as ze, createElementVNode as Pe, vShow as De, renderSlot as s, normalizeProps as p, guardReactiveProps as h, createCommentVNode as B, createBlock as I, createSlots as He } from "vue";
2
+ import { VftClientOnly as Oe } from "../client-only/index.js";
3
+ import { VftEmpty as Ae } from "../empty/index.js";
4
+ import { vLoading as Fe } from "../loading/directive.js";
5
+ import { deepMerge as K, isClient as Te, omit as Ve, isFunction as R } from "@vft/utils";
6
6
  import { FormCompEnum as C } from "../../utils/form-register.js";
7
7
  import "@vueuse/core";
8
8
  import "../config-provider/hooks/use-global-config.js";
9
9
  import "lodash-es";
10
- import { useForm as Fe } from "../super-form/use/use-form.js";
11
- import { useNamespace as Te } from "../../hooks/use-namespace/index.js";
10
+ import { useForm as Ne } from "../super-form/use/use-form.js";
11
+ import { useNamespace as Ee } 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
15
  import "../icon/index.js";
16
- import { VftPagination as Ae } from "../pagination/index.js";
17
- import { VftSkeleton as Ee } from "../skeleton/index.js";
18
- import { VftSuperForm as Ne } from "../super-form/index.js";
19
- import { VxeGrid as Ve } from "vxe-table";
20
- import $e from "xe-utils";
21
- import { PageSize as I } from "./constants.js";
22
- import { useColumns as _e } from "./use/use-columns.js";
23
- import { useDataSource as Le } from "./use/use-data-source.js";
24
- import { useLoading as Me } from "./use/use-loading.js";
25
- import { usePagination as qe } from "./use/use-pagination.js";
26
- import { EmptyEnum as Ge } from "../empty/constants.js";
27
- const Ie = K({
16
+ import { VftPagination as $e } from "../pagination/index.js";
17
+ import { VftSkeleton as _e } from "../skeleton/index.js";
18
+ import { VftSuperForm as Le } from "../super-form/index.js";
19
+ import { PageSize as j } from "./constants.js";
20
+ import { useColumns as Me } from "./use/use-columns.js";
21
+ import { useDataSource as qe } from "./use/use-data-source.js";
22
+ import { useLoading as Ge } from "./use/use-loading.js";
23
+ import { usePagination as Ie } from "./use/use-pagination.js";
24
+ import { EmptyEnum as Ke } from "../empty/constants.js";
25
+ const je = X({
28
26
  name: "vft-table"
29
- }), Ca = /* @__PURE__ */ K({
30
- ...Ie,
27
+ }), Ca = /* @__PURE__ */ X({
28
+ ...je,
31
29
  props: {
32
30
  sticky: {
33
31
  type: [Boolean, Object]
34
32
  },
35
33
  api: {},
36
34
  pageSize: {
37
- default: I
35
+ default: j
38
36
  },
39
37
  total: {},
40
38
  rowkey: {
@@ -79,7 +77,7 @@ const Ie = K({
79
77
  onChange: {},
80
78
  emptyCfg: {
81
79
  default: () => ({
82
- type: Ge.NoData
80
+ type: Ke.NoData
83
81
  })
84
82
  },
85
83
  loadingCfg: {},
@@ -392,73 +390,80 @@ const Ie = K({
392
390
  "toolbar-tool-click",
393
391
  "zoom"
394
392
  ],
395
- setup(X, {
396
- expose: j,
397
- emit: Y
393
+ setup(Y, {
394
+ expose: W,
395
+ emit: U
398
396
  }) {
399
- const W = m(() => ({
397
+ const J = m(() => ({
400
398
  customClass: "vft-card-loading",
401
- text: i("div", null, [i("span", null, [he("加载中")]), i("span", {
399
+ text: i("div", null, [i("span", null, [ye("加载中")]), i("span", {
402
400
  class: "dot"
403
401
  }, null)])
404
- })), U = m(() => X.loadingCfg || W.value), c = Y, d = Te("table"), J = Ce(), b = g(), z = g(), Q = g([]), y = g(), w = g(), Z = be(), o = m(() => G(Z.props, a(y))), {
405
- getLoading: ee,
406
- setLoading: ae
407
- } = Me(o), {
402
+ })), Q = m(() => Y.loadingCfg || J.value), c = U;
403
+ let z;
404
+ const Z = we(async () => {
405
+ const e = await import("./vxe-runtime.js");
406
+ return e.setupVxe(z), e.VxeGrid;
407
+ }), ee = (e) => e.replace(/-(\w)/g, (t, l) => l.toUpperCase()), d = Ee("table"), ae = ve(), b = g(), P = g(), oe = g([]), y = g(), w = g(), D = xe();
408
+ z = D.appContext.app;
409
+ const o = m(() => K(D.props, a(y))), {
410
+ getLoading: te,
411
+ setLoading: le
412
+ } = Ge(o), {
408
413
  getPaginationInfo: f,
409
414
  setPagination: v,
410
- getCurrentPage: oe
411
- } = qe(o), {
412
- getViewColumns: te,
413
- setColumns: le
414
- } = _e(o);
415
- ye(() => oe(), (e) => {
416
- L(() => {
417
- P({
415
+ getCurrentPage: re
416
+ } = Ie(o), {
417
+ getViewColumns: ne,
418
+ setColumns: ce
419
+ } = Me(o);
420
+ ke(() => re(), (e) => {
421
+ q(() => {
422
+ H({
418
423
  seqConfig: {
419
- startIndex: (e - 1) * (f.value?.pageSize || a(o).pageSize || I)
424
+ startIndex: (e - 1) * (f.value?.pageSize || a(o).pageSize || j)
420
425
  }
421
426
  });
422
427
  });
423
428
  }, {
424
429
  immediate: !0
425
430
  });
426
- function P(e) {
431
+ function H(e) {
427
432
  y.value = {
428
433
  ...a(y),
429
434
  ...e
430
435
  };
431
436
  }
432
437
  const {
433
- getDataSourceRef: D,
434
- handleTableChange: re,
435
- reload: k,
436
- deleteTableDataRecord: ne,
437
- insertTableDataRecord: ce,
438
- updateTableData: ie,
439
- updateTableDataRecord: se,
440
- setTableData: H,
441
- getDataSource: ge,
442
- getRawDataSource: O,
443
- tableSearch: F,
444
- expandTreeLevel: de
445
- } = Le(o, {
446
- tableData: Q,
447
- setLoading: ae,
438
+ getDataSourceRef: O,
439
+ handleTableChange: ie,
440
+ reload: x,
441
+ deleteTableDataRecord: se,
442
+ insertTableDataRecord: ge,
443
+ updateTableData: de,
444
+ updateTableDataRecord: fe,
445
+ setTableData: A,
446
+ getDataSource: ue,
447
+ getRawDataSource: F,
448
+ tableSearch: T,
449
+ expandTreeLevel: me
450
+ } = qe(o, {
451
+ tableData: oe,
452
+ setLoading: le,
448
453
  getPaginationInfo: f,
449
454
  setPagination: v,
450
455
  getGridRef: () => b.value
451
456
  }, c);
452
- function T(e) {
457
+ function V(e) {
453
458
  e?.pageSize && v({
454
459
  currentPage: 1
455
- }), re(e), c("change", e);
460
+ }), ie(e), c("change", e);
456
461
  const {
457
462
  onChange: t
458
463
  } = a(o);
459
464
  t && R(t) && t(e);
460
465
  }
461
- const A = {};
466
+ const N = {};
462
467
  [
463
468
  "update:data",
464
469
  "keydown-start",
@@ -580,20 +585,20 @@ const Ie = K({
580
585
  "toolbar-tool-click",
581
586
  "zoom"
582
587
  ].forEach((e) => {
583
- const t = $e.camelCase(`on-${e}`);
584
- A[t] = (...l) => c(e, ...l);
588
+ const t = ee(`on-${e}`);
589
+ N[t] = (...l) => c(e, ...l);
585
590
  });
586
591
  const r = m(() => {
587
- const e = a(D), t = {
588
- ...J,
592
+ const e = a(O), t = {
593
+ ...ae,
589
594
  ...a(o),
590
- columns: we(a(te)),
591
- loading: a(ee),
595
+ columns: Se(a(ne)),
596
+ loading: a(te),
592
597
  data: e,
593
- loadingCfg: a(U),
594
- ...A
598
+ loadingCfg: a(Q),
599
+ ...N
595
600
  };
596
- if (He) {
601
+ if (Te) {
597
602
  (a(o)?.addMaxHeight || a(o)?.maxHeight) && (t.maxHeight = a(o)?.maxHeight ? a(o)?.maxHeight : `${window.innerHeight - a(o)?.extraSysHeight - (o.value?.showPager ? o.value?.pageHeight || 40 : 0)}px`);
598
603
  const l = a(o)?.minHeight;
599
604
  t.minHeight = l || (l !== 0 && a(o)?.toolbarConfig?.custom ? 300 : void 0);
@@ -605,28 +610,28 @@ const Ie = K({
605
610
  },
606
611
  autoLoad: !1,
607
612
  ajax: {
608
- query: async () => await k()
613
+ query: async () => await x()
609
614
  }
610
615
  }), t;
611
616
  }), E = {
612
617
  setPagination: v,
613
618
  emit: c,
614
- setProps: P,
615
- reload: k,
616
- deleteTableDataRecord: ne,
617
- insertTableDataRecord: ce,
618
- updateTableDataRecord: se,
619
- updateTableData: ie,
620
- setTableData: H,
621
- getDataSource: ge,
622
- getDataSourceRef: D,
623
- setColumns: le,
624
- getRawDataSource: O,
625
- tableSearch: F,
626
- expandTreeLevel: de
619
+ setProps: H,
620
+ reload: x,
621
+ deleteTableDataRecord: se,
622
+ insertTableDataRecord: ge,
623
+ updateTableDataRecord: fe,
624
+ updateTableData: de,
625
+ setTableData: A,
626
+ getDataSource: ue,
627
+ getDataSourceRef: O,
628
+ setColumns: ce,
629
+ getRawDataSource: F,
630
+ tableSearch: T,
631
+ expandTreeLevel: me
627
632
  };
628
633
  c("register", E);
629
- const fe = {
634
+ const pe = {
630
635
  field: "_filterTableData",
631
636
  label: "",
632
637
  type: C.Search,
@@ -635,13 +640,13 @@ const Ie = K({
635
640
  },
636
641
  componentProps: () => ({
637
642
  onChange: (e) => {
638
- $({
643
+ L({
639
644
  _filterTableData: e
640
645
  });
641
646
  }
642
647
  })
643
- }, N = G({
644
- schemas: [r.value?.formOptions?.addSearchAllSchema ? fe : {}],
648
+ }, $ = K({
649
+ schemas: [r.value?.formOptions?.addSearchAllSchema ? pe : {}],
645
650
  rowProps: {
646
651
  justify: "start"
647
652
  },
@@ -655,13 +660,13 @@ const Ie = K({
655
660
  btnText: "搜索"
656
661
  },
657
662
  actionInline: !0
658
- }, Oe(r.value?.formOptions, ["showActionForm", "addSearchAllSchema"]), "replace"), V = (e) => (...t) => {
659
- e && R(e) && e(...t), L(() => {
660
- k();
663
+ }, Ve(r.value?.formOptions, ["showActionForm", "addSearchAllSchema"]), "replace"), _ = (e) => (...t) => {
664
+ e && R(e) && e(...t), q(() => {
665
+ x();
661
666
  });
662
- }, [ue] = Fe({
663
- ...N,
664
- schemas: (a(N)?.schemas || []).map((e) => {
667
+ }, [he] = Ne({
668
+ ...$,
669
+ schemas: (a($)?.schemas || []).map((e) => {
665
670
  if (!a(r)?.formOptions?.autoReloadOnClear)
666
671
  return e;
667
672
  if (!e.type || e.type === C.Input || e.type === C.Search || e.type === C.Textarea) {
@@ -671,55 +676,55 @@ const Ie = K({
671
676
  if (R(u))
672
677
  return {
673
678
  ...e,
674
- componentProps: async (x) => {
675
- const _ = await u(x), pe = _?.onClear;
679
+ componentProps: async (k) => {
680
+ const M = await u(k), be = M?.onClear;
676
681
  return {
677
- ..._,
678
- onClear: V(pe)
682
+ ...M,
683
+ onClear: _(be)
679
684
  };
680
685
  }
681
686
  };
682
687
  {
683
- const x = u?.onClear;
688
+ const k = u?.onClear;
684
689
  return {
685
690
  ...e,
686
691
  componentProps: {
687
692
  ...u,
688
- onClear: V(x)
693
+ onClear: _(k)
689
694
  }
690
695
  };
691
696
  }
692
697
  }
693
698
  return e;
694
699
  })
695
- }), $ = (e) => {
696
- Reflect.has(e, "_filterTableData") && F(e._filterTableData), c("form-submit", e);
697
- }, me = () => {
698
- H(O()), c("form-reset");
700
+ }), L = (e) => {
701
+ Reflect.has(e, "_filterTableData") && T(e._filterTableData), c("form-submit", e);
702
+ }, Ce = () => {
703
+ A(F()), c("form-reset");
699
704
  };
700
- return j({
705
+ return W({
701
706
  table: b,
702
707
  formRef: w,
703
- pageRef: z,
708
+ pageRef: P,
704
709
  ...E
705
- }), (e, t) => (S(), ve("div", {
706
- class: ke([a(d).b(), {
710
+ }), (e, t) => (S(), Be("div", {
711
+ class: Re([a(d).b(), {
707
712
  [a(d).is("form-exceed-one-rows")]: w.value?.willExceedOneRow
708
713
  }])
709
- }, [i(a(ze), null, {
710
- fallback: n(() => [i(a(Ee))]),
711
- default: n(() => [i(a(Ve), M({
714
+ }, [i(a(Oe), null, {
715
+ fallback: n(() => [i(a(_e))]),
716
+ default: n(() => [i(a(Z), G({
712
717
  ref_key: "xGrid",
713
718
  ref: b
714
719
  }, r.value), {
715
- toolbarButtons: n(() => [s(e.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (S(), q(a(Ne), {
720
+ toolbarButtons: n(() => [s(e.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (S(), I(a(Le), {
716
721
  key: 0,
717
722
  ref_key: "formRef",
718
723
  ref: w,
719
- onRegister: a(ue),
720
- onSubmit: $,
721
- onReset: me
722
- }, Re({
724
+ onRegister: a(he),
725
+ onSubmit: L,
726
+ onReset: Ce
727
+ }, He({
723
728
  _: 2
724
729
  }, [e.$slots.resetBefore ? {
725
730
  name: "resetBefore",
@@ -736,19 +741,19 @@ const Ie = K({
736
741
  } : void 0]), 1032, ["onRegister"])) : B("", !0), s(e.$slots, "toolbar-right")]),
737
742
  empty: n(() => [r.value.loading ? B("", !0) : s(e.$slots, "empty", {
738
743
  key: 0
739
- }, () => [i(a(Pe), p(h(r.value.emptyCfg)), null, 16)])]),
740
- loading: n(() => [xe(Se("div", null, null, 512), [[Be, r.value.loading], [a(De), r.value.loadingCfg]])]),
744
+ }, () => [i(a(Ae), p(h(r.value.emptyCfg)), null, 16)])]),
745
+ loading: n(() => [ze(Pe("div", null, null, 512), [[De, r.value.loading], [a(Fe), r.value.loadingCfg]])]),
741
746
  _: 3
742
- }, 16), r.value.showPager ? (S(), q(a(Ae), M({
747
+ }, 16), r.value.showPager ? (S(), I(a($e), G({
743
748
  key: 0,
744
749
  ref_key: "pageRef",
745
- ref: z
750
+ ref: P
746
751
  }, a(f), {
747
752
  class: [a(d).e("pager"), a(d).m(`pager-${a(f)?.pagePlacement}`)],
748
- onCurrentChange: t[0] || (t[0] = (l) => T({
753
+ onCurrentChange: t[0] || (t[0] = (l) => V({
749
754
  currentPage: l
750
755
  })),
751
- onSizeChange: t[1] || (t[1] = (l) => T({
756
+ onSizeChange: t[1] || (t[1] = (l) => V({
752
757
  pageSize: l
753
758
  }))
754
759
  }), null, 16, ["class"])) : B("", !0)]),
@@ -0,0 +1,16 @@
1
+ import type { App } from 'vue';
2
+ import { VxeGrid } from 'vxe-table';
3
+ import 'vxe-table/es/table/style.min.css';
4
+ import 'vxe-table/es/toolbar/style.min.css';
5
+ import 'vxe-table/styles/cssvar.scss';
6
+ import 'vxe-pc-ui/styles/cssvar.scss';
7
+ export { VxeGrid };
8
+ /**
9
+ * vxe 运行时初始化(i18n + 全局注册)。
10
+ *
11
+ * 本模块通过 table.vue 的 defineAsyncComponent **动态 import**,使 vxe(js ~568K +
12
+ * css ~249K)整体成为按需 chunk,不再被 vft 静态依赖拖进首屏;首页/无表格页零下载。
13
+ * 这里用「静态 import 组件 + css」而非组件内动态 import css,保证样式注入方式与原
14
+ * 全局 initTable 完全一致(动态 import css 在组件里不可靠,会丢样式)。
15
+ */
16
+ export declare function setupVxe(app?: App<Element>): void;
@@ -0,0 +1,16 @@
1
+ import { VxeUI as e, VxeIcon as r, VxeButton as u, VxeTooltip as i } from "vxe-pc-ui";
2
+ import { VxeToolbar as p, VxeGrid as m, VxeTable as s } from "vxe-table";
3
+ import { VxeGrid as T } from "vxe-table";
4
+ import x from "vxe-pc-ui/lib/language/zh-CN";
5
+ import "vxe-table/es/table/style.min.css";
6
+ import "vxe-table/es/toolbar/style.min.css";
7
+ import "vxe-table/styles/cssvar.scss";
8
+ import "vxe-pc-ui/styles/cssvar.scss";
9
+ let o = !1;
10
+ function C(t) {
11
+ o || (o = !0, e.setI18n("zh-CN", x), e.setLanguage("zh-CN"), t?.use(p).use(r).use(u).use(i).use(m).use(s));
12
+ }
13
+ export {
14
+ T as VxeGrid,
15
+ C as setupVxe
16
+ };
@@ -647,7 +647,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
647
647
  hoverColor: {
648
648
  type: import("vue").PropType<string>;
649
649
  };
650
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
650
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
651
+ error: (event: Event) => void;
652
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
651
653
  icon: {
652
654
  type: import("vue").PropType<string>;
653
655
  required: true;
@@ -670,6 +672,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
670
672
  hoverColor: {
671
673
  type: import("vue").PropType<string>;
672
674
  };
673
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
675
+ }>> & Readonly<{
676
+ onError?: ((event: Event) => any) | undefined;
677
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
674
678
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
675
679
  export default _default;
@@ -580,8 +580,8 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
580
580
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
581
581
  $slots: {
582
582
  file?(_: {
583
- file: import("./types").UploadFile;
584
- index: number;
583
+ file: any;
584
+ index: any;
585
585
  }): any;
586
586
  trigger?(_: {}): any;
587
587
  default?(_: {}): any;
@@ -1,8 +1,8 @@
1
1
  import type { UploadProps } from './types';
2
2
  declare function __VLS_template(): {
3
3
  file?(_: {
4
- file: import("./types").UploadFile;
5
- index: number;
4
+ file: any;
5
+ index: any;
6
6
  }): any;
7
7
  trigger?(_: {}): any;
8
8
  default?(_: {}): any;
@@ -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 { getCurrentInstance as i, inject as e, computed as c, unref as v, ref as Z } from "vue";
5
+ import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref 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 = Z(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
10
+ }, u = v(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 = v(x);
12
+ const r = Z(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.514",
3
+ "version": "0.0.516",
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.514";
1
+ const o = "0.0.516";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,5 +1,9 @@
1
1
  import type { IconProps } from './types';
2
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ error: (event: Event) => void;
4
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>> & Readonly<{
5
+ onError?: ((event: Event) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
7
  export default _default;
4
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
5
9
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@vft/utils");require("../config-provider/index.cjs");require("@vueuse/core");const u=require("../../utils/helper.cjs"),f=require("../../utils/ns-cover.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 d=require("../config-provider/hooks/use-global-config.cjs"),v=["src"],C=e.defineComponent({name:"vft-icon"}),y=e.defineComponent({...C,props:{icon:{},size:{},color:{},rotate:{type:Boolean},rotateSpeed:{default:2},pointer:{type:Boolean},hoverColor:{}},setup(o){const i=m.useNamespace("icon"),n=d.useGlobalConfig(),t=e.computed(()=>f.generateCssVars({size:u.addUnit(o.size),color:o.color,hoverColor:o.hoverColor,cursor:o.pointer?"pointer":void 0,animation:o.rotate?`${n.value.namespace}-rotate ${o.rotateSpeed}s linear 0s infinite`:void 0},"icon")),l=r=>r?.includes("/"),s=e.computed(()=>l(o.icon)),c=e.computed(()=>n.value?.iconifyPrefixClass&&o.icon&&a.isString(o.icon)?o.icon.startsWith(n.value?.iconifyPrefixClass):!1).value?"":n.value?.iconfontClass||"";return(r,g)=>s.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:e.normalizeClass(e.unref(i).e("image")),src:o.icon,alt:"",style:e.normalizeStyle(t.value)},null,14,v)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass([e.unref(i).b(),o.icon,e.unref(c)]),style:e.normalizeStyle(t.value)},null,6))}});exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@vft/utils");require("../config-provider/index.cjs");require("@vueuse/core");const v=require("../../utils/helper.cjs"),C=require("../../utils/ns-cover.cjs");require("lodash-es");require("../form/index.cjs");const y=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("../config-provider/hooks/use-global-config.cjs"),g=["src"],z=e.defineComponent({name:"vft-icon"}),S=e.defineComponent({...z,props:{icon:{},size:{},color:{},rotate:{type:Boolean},rotateSpeed:{default:2},pointer:{type:Boolean},hoverColor:{}},emits:["error"],setup(o,{emit:l}){const c=l,i=y.useNamespace("icon"),n=q.useGlobalConfig(),t=e.computed(()=>C.generateCssVars({size:v.addUnit(o.size),color:o.color,hoverColor:o.hoverColor,cursor:o.pointer?"pointer":void 0,animation:o.rotate?`${n.value.namespace}-rotate ${o.rotateSpeed}s linear 0s infinite`:void 0},"icon")),a=r=>r?.includes("/"),u=e.computed(()=>a(o.icon)),f=e.computed(()=>n.value?.iconifyPrefixClass&&o.icon&&d.isString(o.icon)?o.icon.startsWith(n.value?.iconifyPrefixClass):!1).value?"":n.value?.iconfontClass||"";return(r,s)=>u.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:e.normalizeClass(e.unref(i).e("image")),src:o.icon,alt:"",style:e.normalizeStyle(t.value),onError:s[0]||(s[0]=m=>c("error",m))},null,46,g)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass([e.unref(i).b(),o.icon,e.unref(f)]),style:e.normalizeStyle(t.value)},null,6))}});exports.default=S;
@@ -21,7 +21,9 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
21
21
  hoverColor: {
22
22
  type: import("vue").PropType<string>;
23
23
  };
24
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ error: (event: Event) => void;
26
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
27
  icon: {
26
28
  type: import("vue").PropType<string>;
27
29
  required: true;
@@ -44,6 +46,8 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
44
46
  hoverColor: {
45
47
  type: import("vue").PropType<string>;
46
48
  };
47
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
49
+ }>> & Readonly<{
50
+ onError?: ((event: Event) => any) | undefined;
51
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
48
52
  export * from './types';
49
53
  export default VftIcon;