vft 0.0.507 → 0.0.509

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 (160) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/carousel/use-carousel.js +1 -1
  3. package/es/components/cascader/cascader.vue2.js +203 -202
  4. package/es/components/cascader-panel/menu.vue2.js +50 -49
  5. package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
  6. package/es/components/color-picker/color-picker.vue2.js +134 -133
  7. package/es/components/config-provider/config-provider.vue.d.ts +2 -0
  8. package/es/components/config-provider/config-provider.vue2.js +5 -4
  9. package/es/components/config-provider/constants.d.ts +1 -0
  10. package/es/components/config-provider/constants.js +3 -2
  11. package/es/components/config-provider/hooks/use-global-config.js +33 -30
  12. package/es/components/config-provider/index.d.ts +9 -0
  13. package/es/components/config-provider/index.js +6 -5
  14. package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  15. package/es/components/date-picker/composables/use-basic-date-table.js +124 -123
  16. package/es/components/date-picker/composables/use-month-range-header.js +15 -14
  17. package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
  18. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +39 -38
  19. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +39 -38
  20. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +179 -178
  21. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
  22. package/es/components/date-time-select/date-time-select.vue2.js +39 -36
  23. package/es/components/dropdown/dropdown.vue2.js +68 -67
  24. package/es/components/empty/empty.vue2.js +39 -38
  25. package/es/components/full-screen/full-screen.vue2.js +18 -17
  26. package/es/components/image/image.vue2.js +60 -59
  27. package/es/components/image-viewer/image-viewer.vue2.js +45 -44
  28. package/es/components/index.js +161 -160
  29. package/es/components/input/input.vue2.js +4 -4
  30. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  31. package/es/components/md-container/md-container.vue2.js +75 -74
  32. package/es/components/md-container/toc.js +37 -36
  33. package/es/components/modal/modal-footer-action.vue2.js +25 -24
  34. package/es/components/multiple-tabs/multiple-tabs.vue2.js +16 -15
  35. package/es/components/multiple-tabs/use/use-tab-dropdown.js +54 -53
  36. package/es/components/pagination/components/jumper.vue2.js +29 -28
  37. package/es/components/pagination/components/sizes.vue2.js +21 -20
  38. package/es/components/pagination/components/total.vue2.js +11 -10
  39. package/es/components/popconfirm/popconfirm.vue2.js +40 -39
  40. package/es/components/search/search.vue2.js +79 -77
  41. package/es/components/select/useSelect.js +232 -231
  42. package/es/components/super-form/super-form-action.vue2.js +41 -40
  43. package/es/components/super-form/super-form-item.vue2.js +206 -203
  44. package/es/components/super-form/use/helper.d.ts +1 -1
  45. package/es/components/super-form/use/helper.js +62 -62
  46. package/es/components/table/field.js +130 -110
  47. package/es/components/table/table.vue2.js +152 -150
  48. package/es/components/table/use/use-columns.js +29 -26
  49. package/es/components/table/use/use-data-source.js +87 -86
  50. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +66 -65
  51. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +134 -133
  52. package/es/components/transfer/transfer-panel.vue2.js +57 -56
  53. package/es/components/transfer/transfer.vue2.js +70 -69
  54. package/es/components/tree/tree.vue2.js +60 -59
  55. package/es/components/upload/index.d.ts +3 -3
  56. package/es/components/upload/upload-content.vue.d.ts +2 -2
  57. package/es/components/upload/upload-content.vue2.js +78 -75
  58. package/es/components/upload/upload-list.vue2.js +46 -45
  59. package/es/components/upload/upload.vue.d.ts +2 -2
  60. package/es/components/upload/upload.vue2.js +87 -85
  61. package/es/components/upload/utils.js +29 -29
  62. package/es/constants/date.d.ts +1 -1
  63. package/es/constants/date.js +9 -1
  64. package/es/hooks/use-z-index/index.js +3 -3
  65. package/es/index.d.ts +1 -0
  66. package/es/index.js +5 -1
  67. package/es/locale/index.d.js +1 -0
  68. package/es/locale/index.d.ts +26 -0
  69. package/es/locale/index.js +10 -0
  70. package/es/locale/lang/en.d.ts +183 -0
  71. package/es/locale/lang/en.js +241 -0
  72. package/es/locale/lang/zh-cn.d.ts +183 -0
  73. package/es/locale/lang/zh-cn.js +241 -0
  74. package/es/locale/lang/zh-tw.d.ts +183 -0
  75. package/es/locale/lang/zh-tw.js +241 -0
  76. package/es/locale/use-locale.d.ts +17 -0
  77. package/es/locale/use-locale.js +56 -0
  78. package/es/package.json.d.ts +1 -1
  79. package/es/package.json.js +1 -1
  80. package/es/utils/vue/vnode.js +1 -1
  81. package/lib/components/cascader/cascader.vue2.cjs +1 -1
  82. package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
  83. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  84. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  85. package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
  86. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  87. package/lib/components/config-provider/constants.cjs +1 -1
  88. package/lib/components/config-provider/constants.d.ts +1 -0
  89. package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
  90. package/lib/components/config-provider/index.cjs +1 -1
  91. package/lib/components/config-provider/index.d.ts +9 -0
  92. package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
  93. package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
  94. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  95. package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
  96. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  97. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  98. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  99. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  100. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  101. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  102. package/lib/components/empty/empty.vue2.cjs +1 -1
  103. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  104. package/lib/components/image/image.vue2.cjs +1 -1
  105. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  106. package/lib/components/index.cjs +1 -1
  107. package/lib/components/input/input.vue2.cjs +1 -1
  108. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  109. package/lib/components/md-container/toc.cjs +1 -1
  110. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  111. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  112. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  113. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  114. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  115. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  116. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  117. package/lib/components/search/search.vue2.cjs +1 -1
  118. package/lib/components/select/useSelect.cjs +1 -1
  119. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  120. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  121. package/lib/components/super-form/use/helper.cjs +1 -1
  122. package/lib/components/super-form/use/helper.d.ts +1 -1
  123. package/lib/components/table/field.cjs +1 -1
  124. package/lib/components/table/table.vue2.cjs +1 -1
  125. package/lib/components/table/use/use-columns.cjs +1 -1
  126. package/lib/components/table/use/use-data-source.cjs +1 -1
  127. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  128. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  129. package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
  130. package/lib/components/transfer/transfer.vue2.cjs +1 -1
  131. package/lib/components/tree/tree.vue2.cjs +1 -1
  132. package/lib/components/upload/index.d.ts +3 -3
  133. package/lib/components/upload/upload-content.vue.d.ts +2 -2
  134. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  135. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  136. package/lib/components/upload/upload.vue.d.ts +2 -2
  137. package/lib/components/upload/upload.vue2.cjs +1 -1
  138. package/lib/components/upload/utils.cjs +1 -1
  139. package/lib/constants/date.cjs +1 -1
  140. package/lib/constants/date.d.ts +1 -1
  141. package/lib/index.cjs +1 -1
  142. package/lib/index.d.ts +1 -0
  143. package/lib/locale/index.cjs +1 -0
  144. package/lib/locale/index.d.cjs +1 -0
  145. package/lib/locale/index.d.ts +26 -0
  146. package/lib/locale/lang/en.cjs +1 -0
  147. package/lib/locale/lang/en.d.ts +183 -0
  148. package/lib/locale/lang/zh-cn.cjs +1 -0
  149. package/lib/locale/lang/zh-cn.d.ts +183 -0
  150. package/lib/locale/lang/zh-tw.cjs +1 -0
  151. package/lib/locale/lang/zh-tw.d.ts +183 -0
  152. package/lib/locale/use-locale.cjs +1 -0
  153. package/lib/locale/use-locale.d.ts +17 -0
  154. package/lib/package.json.cjs +1 -1
  155. package/lib/package.json.d.ts +1 -1
  156. package/package.json +3 -3
  157. package/theme-style/index.css +1 -1
  158. package/theme-style/src/super-form.scss +0 -1
  159. package/theme-style/vft-super-form.css +1 -1
  160. package/web-types.json +1 -1
@@ -1,40 +1,41 @@
1
- import { defineComponent as K, createVNode as i, useAttrs as ue, ref as d, getCurrentInstance as me, computed as _, unref as o, watch as pe, nextTick as G, toRaw as he, createElementBlock as Ce, openBlock as k, normalizeClass as be, withCtx as n, createBlock as M, createCommentVNode as S, mergeProps as q, withDirectives as ye, createElementVNode as we, vShow as ve, renderSlot as s, normalizeProps as p, guardReactiveProps as h, createSlots as xe, createTextVNode as ke } from "vue";
2
- import { VftClientOnly as Se } from "../client-only/index.js";
3
- import { VftEmpty as Be } from "../empty/index.js";
4
- import { vLoading as Re } from "../loading/directive.js";
5
- import { deepMerge as L, isClient as ze, omit as Pe, isFunction as B } from "@vft/utils";
6
- import { FormCompEnum as C } from "../../utils/form-register.js";
1
+ import { defineComponent as X, computed as p, createVNode as i, useAttrs as Ce, ref as g, getCurrentInstance as be, unref as o, watch as ye, nextTick as G, toRaw as we, createElementBlock as ve, openBlock as S, normalizeClass as ke, withCtx as n, createBlock as M, createCommentVNode as B, mergeProps as q, withDirectives as xe, createElementVNode as Se, vShow as Be, renderSlot as s, normalizeProps as h, guardReactiveProps as C, 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 He } from "../loading/directive.js";
5
+ import { deepMerge as I, isClient as De, omit as Oe, isFunction as R } from "@vft/utils";
6
+ import { FormCompEnum as b } 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 De } from "../super-form/use/use-form.js";
11
- import { useNamespace as He } from "../../hooks/use-namespace/index.js";
10
+ import { useForm as Te } from "../super-form/use/use-form.js";
11
+ import { useNamespace as Fe } 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 Oe } from "../pagination/index.js";
17
- import { VftSkeleton as Te } from "../skeleton/index.js";
18
- import { VftSuperForm as Fe } from "../super-form/index.js";
19
- import { VxeGrid as Ae } from "vxe-table";
20
- import Ee from "xe-utils";
21
- import { PageSize as I } from "./constants.js";
22
- import { useColumns as Ne } from "./use/use-columns.js";
23
- import { useDataSource as Ve } from "./use/use-data-source.js";
24
- import { useLoading as $e } from "./use/use-loading.js";
25
- import { usePagination as _e } from "./use/use-pagination.js";
26
- import { EmptyEnum as Ge } from "../empty/constants.js";
27
- const Me = K({
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 { useLocale as $e } from "../../locale/use-locale.js";
20
+ import { VxeGrid as Ve } from "vxe-table";
21
+ import Le from "xe-utils";
22
+ import { PageSize as K } from "./constants.js";
23
+ import { useColumns as _e } from "./use/use-columns.js";
24
+ import { useDataSource as Ge } from "./use/use-data-source.js";
25
+ import { useLoading as Me } from "./use/use-loading.js";
26
+ import { usePagination as qe } from "./use/use-pagination.js";
27
+ import { EmptyEnum as Ie } from "../empty/constants.js";
28
+ const Ke = X({
28
29
  name: "vft-table"
29
- }), ho = /* @__PURE__ */ K({
30
- ...Me,
30
+ }), wo = /* @__PURE__ */ X({
31
+ ...Ke,
31
32
  props: {
32
33
  sticky: {
33
34
  type: [Boolean, Object]
34
35
  },
35
36
  api: {},
36
37
  pageSize: {
37
- default: I
38
+ default: K
38
39
  },
39
40
  total: {},
40
41
  rowkey: {
@@ -79,17 +80,10 @@ const Me = K({
79
80
  onChange: {},
80
81
  emptyCfg: {
81
82
  default: () => ({
82
- type: Ge.NoData
83
- })
84
- },
85
- loadingCfg: {
86
- default: () => ({
87
- customClass: "vft-card-loading",
88
- text: i("div", null, [i("span", null, [ke("加载中")]), i("span", {
89
- class: "dot"
90
- }, null)])
83
+ type: Ie.NoData
91
84
  })
92
85
  },
86
+ loadingCfg: {},
93
87
  layouts: {},
94
88
  columns: {},
95
89
  pagerConfig: {},
@@ -399,68 +393,75 @@ const Me = K({
399
393
  "toolbar-tool-click",
400
394
  "zoom"
401
395
  ],
402
- setup(qe, {
403
- expose: X,
404
- emit: j
396
+ setup(j, {
397
+ expose: Y,
398
+ emit: W
405
399
  }) {
406
- const c = j, g = He("table"), Y = ue(), f = d(), R = d(), W = d([]), b = d(), y = d(), U = me(), a = _(() => L(U.props, o(b))), {
407
- getLoading: J,
408
- setLoading: Q
409
- } = $e(a), {
400
+ const U = p(() => ({
401
+ customClass: "vft-card-loading",
402
+ text: i("div", null, [i("span", null, [z("vft.loading")]), i("span", {
403
+ class: "dot"
404
+ }, null)])
405
+ })), J = p(() => j.loadingCfg || U.value), c = W, d = Fe("table"), {
406
+ t: z
407
+ } = $e(), Q = Ce(), f = g(), P = g(), Z = g([]), y = g(), w = g(), ee = be(), a = p(() => I(ee.props, o(y))), {
408
+ getLoading: oe,
409
+ setLoading: ae
410
+ } = Me(a), {
410
411
  getPaginationInfo: u,
411
- setPagination: w,
412
- getCurrentPage: Z
413
- } = _e(a), {
414
- getViewColumns: ee,
415
- setColumns: oe
416
- } = Ne(a);
417
- pe(() => Z(), (e) => {
412
+ setPagination: v,
413
+ getCurrentPage: te
414
+ } = qe(a), {
415
+ getViewColumns: le,
416
+ setColumns: re
417
+ } = _e(a);
418
+ ye(() => te(), (e) => {
418
419
  G(() => {
419
- z({
420
+ H({
420
421
  seqConfig: {
421
- startIndex: (e - 1) * (u.value?.pageSize || o(a).pageSize || I)
422
+ startIndex: (e - 1) * (u.value?.pageSize || o(a).pageSize || K)
422
423
  }
423
424
  });
424
425
  });
425
426
  }, {
426
427
  immediate: !0
427
428
  });
428
- function z(e) {
429
- b.value = {
430
- ...o(b),
429
+ function H(e) {
430
+ y.value = {
431
+ ...o(y),
431
432
  ...e
432
433
  };
433
434
  }
434
435
  const {
435
- getDataSourceRef: P,
436
- handleTableChange: ae,
437
- reload: v,
438
- deleteTableDataRecord: te,
439
- insertTableDataRecord: le,
440
- updateTableData: re,
441
- updateTableDataRecord: ne,
442
- setTableData: D,
443
- getDataSource: ce,
444
- getRawDataSource: H,
445
- tableSearch: O,
446
- expandTreeLevel: ie
447
- } = Ve(a, {
448
- tableData: W,
449
- setLoading: Q,
436
+ getDataSourceRef: D,
437
+ handleTableChange: ne,
438
+ reload: k,
439
+ deleteTableDataRecord: ce,
440
+ insertTableDataRecord: ie,
441
+ updateTableData: se,
442
+ updateTableDataRecord: ge,
443
+ setTableData: O,
444
+ getDataSource: de,
445
+ getRawDataSource: T,
446
+ tableSearch: F,
447
+ expandTreeLevel: fe
448
+ } = Ge(a, {
449
+ tableData: Z,
450
+ setLoading: ae,
450
451
  getPaginationInfo: u,
451
- setPagination: w,
452
+ setPagination: v,
452
453
  getGridRef: () => f.value
453
454
  }, c);
454
- function T(e) {
455
- e?.pageSize && w({
455
+ function A(e) {
456
+ e?.pageSize && v({
456
457
  currentPage: 1
457
- }), ae(e), c("change", e);
458
+ }), ne(e), c("change", e);
458
459
  const {
459
460
  onChange: t
460
461
  } = o(a);
461
- t && B(t) && t(e);
462
+ t && R(t) && t(e);
462
463
  }
463
- const F = {};
464
+ const E = {};
464
465
  [
465
466
  "update:data",
466
467
  "keydown-start",
@@ -582,19 +583,20 @@ const Me = K({
582
583
  "toolbar-tool-click",
583
584
  "zoom"
584
585
  ].forEach((e) => {
585
- const t = Ee.camelCase(`on-${e}`);
586
- F[t] = (...l) => c(e, ...l);
586
+ const t = Le.camelCase(`on-${e}`);
587
+ E[t] = (...l) => c(e, ...l);
587
588
  });
588
- const r = _(() => {
589
- const e = o(P), t = {
590
- ...Y,
589
+ const r = p(() => {
590
+ const e = o(D), t = {
591
+ ...Q,
591
592
  ...o(a),
592
- columns: he(o(ee)),
593
- loading: o(J),
593
+ columns: we(o(le)),
594
+ loading: o(oe),
594
595
  data: e,
595
- ...F
596
+ loadingCfg: o(J),
597
+ ...E
596
598
  };
597
- if (ze) {
599
+ if (De) {
598
600
  (o(a)?.addMaxHeight || o(a)?.maxHeight) && (t.maxHeight = o(a)?.maxHeight ? o(a)?.maxHeight : `${window.innerHeight - o(a)?.extraSysHeight - (a.value?.showPager ? a.value?.pageHeight || 40 : 0)}px`);
599
601
  const l = o(a)?.minHeight;
600
602
  t.minHeight = l || (l !== 0 && o(a)?.toolbarConfig?.custom ? 300 : void 0);
@@ -606,43 +608,43 @@ const Me = K({
606
608
  },
607
609
  autoLoad: !1,
608
610
  ajax: {
609
- query: async () => await v()
611
+ query: async () => await k()
610
612
  }
611
613
  }), t;
612
- }), A = {
613
- setPagination: w,
614
+ }), N = {
615
+ setPagination: v,
614
616
  emit: c,
615
- setProps: z,
616
- reload: v,
617
- deleteTableDataRecord: te,
618
- insertTableDataRecord: le,
619
- updateTableDataRecord: ne,
620
- updateTableData: re,
621
- setTableData: D,
622
- getDataSource: ce,
623
- getDataSourceRef: P,
624
- setColumns: oe,
625
- getRawDataSource: H,
626
- tableSearch: O,
627
- expandTreeLevel: ie
617
+ setProps: H,
618
+ reload: k,
619
+ deleteTableDataRecord: ce,
620
+ insertTableDataRecord: ie,
621
+ updateTableDataRecord: ge,
622
+ updateTableData: se,
623
+ setTableData: O,
624
+ getDataSource: de,
625
+ getDataSourceRef: D,
626
+ setColumns: re,
627
+ getRawDataSource: T,
628
+ tableSearch: F,
629
+ expandTreeLevel: fe
628
630
  };
629
- c("register", A);
630
- const se = {
631
+ c("register", N);
632
+ const ue = {
631
633
  field: "_filterTableData",
632
634
  label: "",
633
- type: C.Search,
635
+ type: b.Search,
634
636
  itemProps: {
635
637
  class: "search-all-form-item"
636
638
  },
637
639
  componentProps: () => ({
638
640
  onChange: (e) => {
639
- V({
641
+ L({
640
642
  _filterTableData: e
641
643
  });
642
644
  }
643
645
  })
644
- }, E = L({
645
- schemas: [r.value?.formOptions?.addSearchAllSchema ? se : {}],
646
+ }, $ = I({
647
+ schemas: [r.value?.formOptions?.addSearchAllSchema ? ue : {}],
646
648
  rowProps: {
647
649
  justify: "start"
648
650
  },
@@ -653,30 +655,30 @@ const Me = K({
653
655
  showSubmitButton: !0,
654
656
  size: "small",
655
657
  submitButtonOptions: {
656
- btnText: "搜索"
658
+ btnText: z("vft.table.search")
657
659
  },
658
660
  actionInline: !0
659
- }, Pe(r.value?.formOptions, ["showActionForm", "addSearchAllSchema"]), "replace"), N = (e) => (...t) => {
660
- e && B(e) && e(...t), G(() => {
661
- v();
661
+ }, Oe(r.value?.formOptions, ["showActionForm", "addSearchAllSchema"]), "replace"), V = (e) => (...t) => {
662
+ e && R(e) && e(...t), G(() => {
663
+ k();
662
664
  });
663
- }, [de] = De({
664
- ...E,
665
- schemas: (o(E)?.schemas || []).map((e) => {
665
+ }, [me] = Te({
666
+ ...$,
667
+ schemas: (o($)?.schemas || []).map((e) => {
666
668
  if (!o(r)?.formOptions?.autoReloadOnClear)
667
669
  return e;
668
- if (!e.type || e.type === C.Input || e.type === C.Search || e.type === C.Textarea) {
670
+ if (!e.type || e.type === b.Input || e.type === b.Search || e.type === b.Textarea) {
669
671
  const {
670
672
  componentProps: m
671
673
  } = e;
672
- if (B(m))
674
+ if (R(m))
673
675
  return {
674
676
  ...e,
675
677
  componentProps: async (x) => {
676
- const $ = await m(x), fe = $?.onClear;
678
+ const _ = await m(x), he = _?.onClear;
677
679
  return {
678
- ...$,
679
- onClear: N(fe)
680
+ ..._,
681
+ onClear: V(he)
680
682
  };
681
683
  }
682
684
  };
@@ -686,79 +688,79 @@ const Me = K({
686
688
  ...e,
687
689
  componentProps: {
688
690
  ...m,
689
- onClear: N(x)
691
+ onClear: V(x)
690
692
  }
691
693
  };
692
694
  }
693
695
  }
694
696
  return e;
695
697
  })
696
- }), V = (e) => {
697
- Reflect.has(e, "_filterTableData") && O(e._filterTableData), c("form-submit", e);
698
- }, ge = () => {
699
- D(H()), c("form-reset");
698
+ }), L = (e) => {
699
+ Reflect.has(e, "_filterTableData") && F(e._filterTableData), c("form-submit", e);
700
+ }, pe = () => {
701
+ O(T()), c("form-reset");
700
702
  };
701
703
  return setTimeout(() => {
702
704
  console.log(f.value, "xGridxGrid");
703
- }, 1500), X({
705
+ }, 1500), Y({
704
706
  table: f,
705
- formRef: y,
706
- pageRef: R,
707
- ...A
708
- }), (e, t) => (k(), Ce("div", {
709
- class: be([o(g).b(), {
710
- [o(g).is("form-exceed-one-rows")]: y.value?.willExceedOneRow
707
+ formRef: w,
708
+ pageRef: P,
709
+ ...N
710
+ }), (e, t) => (S(), ve("div", {
711
+ class: ke([o(d).b(), {
712
+ [o(d).is("form-exceed-one-rows")]: w.value?.willExceedOneRow
711
713
  }])
712
- }, [i(o(Se), null, {
713
- fallback: n(() => [i(o(Te))]),
714
- default: n(() => [i(o(Ae), q({
714
+ }, [i(o(ze), null, {
715
+ fallback: n(() => [i(o(Ee))]),
716
+ default: n(() => [i(o(Ve), q({
715
717
  ref_key: "xGrid",
716
718
  ref: f
717
719
  }, r.value), {
718
- toolbarButtons: n(() => [s(e.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (k(), M(o(Fe), {
720
+ toolbarButtons: n(() => [s(e.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (S(), M(o(Ne), {
719
721
  key: 0,
720
722
  ref_key: "formRef",
721
- ref: y,
722
- onRegister: o(de),
723
- onSubmit: V,
724
- onReset: ge
725
- }, xe({
723
+ ref: w,
724
+ onRegister: o(me),
725
+ onSubmit: L,
726
+ onReset: pe
727
+ }, Re({
726
728
  _: 2
727
729
  }, [e.$slots.resetBefore ? {
728
730
  name: "resetBefore",
729
- fn: n((l) => [s(e.$slots, "resetBefore", p(h(l)))]),
731
+ fn: n((l) => [s(e.$slots, "resetBefore", h(C(l)))]),
730
732
  key: "0"
731
733
  } : void 0, e.$slots.submitBefore ? {
732
734
  name: "submitBefore",
733
- fn: n((l) => [s(e.$slots, "submitBefore", p(h(l)))]),
735
+ fn: n((l) => [s(e.$slots, "submitBefore", h(C(l)))]),
734
736
  key: "1"
735
737
  } : void 0, e.$slots.submitAfter ? {
736
738
  name: "submitAfter",
737
- fn: n((l) => [s(e.$slots, "submitAfter", p(h(l)))]),
739
+ fn: n((l) => [s(e.$slots, "submitAfter", h(C(l)))]),
738
740
  key: "2"
739
- } : void 0]), 1032, ["onRegister"])) : S("", !0), s(e.$slots, "toolbar-right")]),
740
- empty: n(() => [r.value.loading ? S("", !0) : s(e.$slots, "empty", {
741
+ } : void 0]), 1032, ["onRegister"])) : B("", !0), s(e.$slots, "toolbar-right")]),
742
+ empty: n(() => [r.value.loading ? B("", !0) : s(e.$slots, "empty", {
741
743
  key: 0
742
- }, () => [i(o(Be), p(h(r.value.emptyCfg)), null, 16)])]),
743
- loading: n(() => [ye(we("div", null, null, 512), [[ve, r.value.loading], [o(Re), r.value.loadingCfg]])]),
744
+ }, () => [i(o(Pe), h(C(r.value.emptyCfg)), null, 16)])]),
745
+ loading: n(() => [xe(Se("div", null, null, 512), [[Be, r.value.loading], [o(He), r.value.loadingCfg]])]),
744
746
  _: 3
745
- }, 16), r.value.showPager ? (k(), M(o(Oe), q({
747
+ }, 16), r.value.showPager ? (S(), M(o(Ae), q({
746
748
  key: 0,
747
749
  ref_key: "pageRef",
748
- ref: R
750
+ ref: P
749
751
  }, o(u), {
750
- class: [o(g).e("pager"), o(g).m(`pager-${o(u)?.pagePlacement}`)],
751
- onCurrentChange: t[0] || (t[0] = (l) => T({
752
+ class: [o(d).e("pager"), o(d).m(`pager-${o(u)?.pagePlacement}`)],
753
+ onCurrentChange: t[0] || (t[0] = (l) => A({
752
754
  currentPage: l
753
755
  })),
754
- onSizeChange: t[1] || (t[1] = (l) => T({
756
+ onSizeChange: t[1] || (t[1] = (l) => A({
755
757
  pageSize: l
756
758
  }))
757
- }), null, 16, ["class"])) : S("", !0)]),
759
+ }), null, 16, ["class"])) : B("", !0)]),
758
760
  _: 3
759
761
  })], 2));
760
762
  }
761
763
  });
762
764
  export {
763
- ho as default
765
+ wo as default
764
766
  };
@@ -1,40 +1,43 @@
1
- import { isNullOrUndefined as g, isArray as d } from "@vft/utils";
2
- import { cloneDeep as c } from "lodash-es";
3
- import { ref as h, unref as o, computed as m, watch as v, toRaw as p } from "vue";
4
- function y(u) {
5
- const t = h(o(u).columns), l = o(u).columns, e = m(() => {
6
- const r = c(o(t));
7
- return r ? r.map((n) => (!n.formatter && !n.slots && !n.cellRender && (n.formatter = ({
1
+ import { isNullOrUndefined as h, isArray as p } from "@vft/utils";
2
+ import { cloneDeep as l } from "lodash-es";
3
+ import { ref as v, unref as o, computed as c, watch as d, toRaw as w } from "vue";
4
+ import { useLocale as y } from "../../../locale/use-locale.js";
5
+ function L(u) {
6
+ const {
7
+ t: f
8
+ } = y(), r = v(o(u).columns), m = o(u).columns, e = c(() => {
9
+ const n = l(o(r));
10
+ return n ? n.map((t) => (!t.formatter && !t.slots && !t.cellRender && (t.formatter = ({
8
11
  cellValue: s
9
- }) => g(s) || s === "" ? "-" : s), n)) : [];
10
- }), f = m(() => o(e));
11
- function i(r) {
12
- const n = c(r);
13
- if (d(n)) {
14
- if (n.length <= 0) {
15
- t.value = [];
12
+ }) => h(s) || s === "" ? "-" : s), t.title && typeof t.title == "string" && t.title.startsWith("vft.") && (t.title = f(t.title)), t)) : [];
13
+ }), i = c(() => o(e));
14
+ function a(n) {
15
+ const t = l(n);
16
+ if (p(t)) {
17
+ if (t.length <= 0) {
18
+ r.value = [];
16
19
  return;
17
20
  }
18
- t.value = n;
21
+ r.value = t;
19
22
  }
20
23
  }
21
- v(() => o(u).columns, (r) => {
22
- t.value = r || t.value;
24
+ d(() => o(u).columns, (n) => {
25
+ r.value = n || r.value;
23
26
  }, {});
24
- function a() {
25
- return p(o(e));
26
- }
27
27
  function C() {
28
- return l;
28
+ return w(o(e));
29
+ }
30
+ function g() {
31
+ return m;
29
32
  }
30
33
  return {
31
34
  getColumnsRef: e,
32
- getCacheColumns: C,
33
- getViewColumns: f,
34
- getColumns: a,
35
- setColumns: i
35
+ getCacheColumns: g,
36
+ getViewColumns: i,
37
+ getColumns: C,
38
+ setColumns: a
36
39
  };
37
40
  }
38
41
  export {
39
- y as useColumns
42
+ L as useColumns
40
43
  };