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,113 +1,114 @@
1
- import { getRouterKeyPath as a } from "@vft/router";
2
- import { useMultipleTabStore as S, useTabs as O, isTabPinned as U } from "@vft/store";
1
+ import { getRouterKeyPath as u } from "@vft/router";
2
+ import { useMultipleTabStore as S, useTabs as O, isTabPinned as A } from "@vft/store";
3
3
  import "@vft/utils";
4
- import { reactive as q, computed as y } from "vue";
4
+ import { reactive as U, computed as q } from "vue";
5
5
  import "../../context-menu/context-menu.vue2.js";
6
6
  import "../../icon/index.js";
7
+ import { useLocale as y } from "../../../locale/use-locale.js";
7
8
  import "vue-router";
8
- function F(e, o) {
9
- const s = q({
9
+ function H(e, i) {
10
+ const { t: n } = y(), s = U({
10
11
  current: null,
11
12
  currentIndex: 0
12
- }), n = S(), {
13
- refreshPage: g,
14
- closeAll: u,
15
- close: h,
16
- closeLeft: p,
17
- closeOther: f,
18
- closeRight: x,
19
- newWinTab: b,
20
- fullScreen: T,
21
- alonePage: C,
22
- pinTab: L,
23
- unpinTab: v
24
- } = O(), D = y(() => {
13
+ }), t = S(), {
14
+ refreshPage: p,
15
+ closeAll: g,
16
+ close: f,
17
+ closeLeft: h,
18
+ closeOther: b,
19
+ closeRight: T,
20
+ newWinTab: v,
21
+ fullScreen: x,
22
+ alonePage: L,
23
+ pinTab: C,
24
+ unpinTab: m
25
+ } = O(), D = q(() => {
25
26
  if (!e)
26
27
  return;
27
- const { meta: i } = e, t = s.currentIndex, r = U(e), c = !r, l = !!i?.userPinned, w = t === 0 || t <= o, M = n.getTabList.length <= o || t === n.getTabList.length - 1 && n.getLastDragEndIndex >= 0, R = n.getTabList.length === o || n.getTabList.length === o + 1 && t === o, d = n.getTabList.length === o;
28
+ const { meta: l } = e, o = s.currentIndex, r = A(e), c = !r, a = !!l?.userPinned, P = o === 0 || o <= i, M = t.getTabList.length <= i || o === t.getTabList.length - 1 && t.getLastDragEndIndex >= 0, R = t.getTabList.length === i || t.getTabList.length === i + 1 && o === i, d = t.getTabList.length === i;
28
29
  return [
29
30
  {
30
31
  iconCfg: { icon: "icon-refresh-right" },
31
- text: "刷新",
32
- handler: () => g(e)
32
+ text: n("vft.multipleTabs.refresh"),
33
+ handler: () => p(e)
33
34
  },
34
35
  {
35
36
  iconCfg: { icon: "icon-new-tab" },
36
- text: "新页面打开",
37
- handler: () => b(e),
37
+ text: n("vft.multipleTabs.openInNewTab"),
38
+ handler: () => v(e),
38
39
  divider: !0
39
40
  },
40
41
  {
41
42
  iconCfg: { icon: "icon-close-tab" },
42
- text: "关闭标签页",
43
+ text: n("vft.multipleTabs.closeTab"),
43
44
  disabled: r || d,
44
- handler: () => h(e)
45
+ handler: () => f(e)
45
46
  },
46
47
  {
47
48
  iconCfg: { icon: "icon-arrow-close-left" },
48
- text: "关闭左侧标签页",
49
- disabled: w,
50
- handler: () => p(e)
49
+ text: n("vft.multipleTabs.closeLeft"),
50
+ disabled: P,
51
+ handler: () => h(e)
51
52
  },
52
53
  {
53
54
  iconCfg: { icon: "icon-arrow-close-right" },
54
- text: "关闭右侧标签页",
55
+ text: n("vft.multipleTabs.closeRight"),
55
56
  disabled: M,
56
57
  divider: !0,
57
- handler: () => x(e)
58
+ handler: () => T(e)
58
59
  },
59
60
  {
60
61
  iconCfg: { icon: "icon-close-box-multiple-outline" },
61
- text: "关闭其它标签页",
62
+ text: n("vft.multipleTabs.closeOther"),
62
63
  disabled: R,
63
- handler: () => f(e)
64
+ handler: () => b(e)
64
65
  },
65
66
  {
66
67
  iconCfg: { icon: "icon-vector-square-delete" },
67
- text: "关闭所有标签页",
68
+ text: n("vft.multipleTabs.closeAll"),
68
69
  disabled: d,
69
70
  divider: !0,
70
- handler: () => u()
71
+ handler: () => g()
71
72
  },
72
73
  {
73
74
  iconCfg: { icon: "icon-full-screen" },
74
- text: "全屏",
75
- handler: () => T(e)
75
+ text: n("vft.multipleTabs.fullScreen"),
76
+ handler: () => x(e)
76
77
  },
77
78
  {
78
79
  iconCfg: { icon: "icon-separate" },
79
- text: "独立页面",
80
- handler: () => C(e),
81
- divider: c || l
80
+ text: n("vft.multipleTabs.standalone"),
81
+ handler: () => L(e),
82
+ divider: c || a
82
83
  },
83
84
  ...c ? [
84
85
  {
85
86
  iconCfg: { icon: "icon-tab-pin" },
86
- text: "固定",
87
- handler: () => L(e)
87
+ text: n("vft.multipleTabs.pin"),
88
+ handler: () => C(e)
88
89
  }
89
- ] : l ? [
90
+ ] : a ? [
90
91
  {
91
92
  iconCfg: { icon: "icon-tab-unpin" },
92
- text: "取消固定",
93
- handler: () => v(e)
93
+ text: n("vft.multipleTabs.unpin"),
94
+ handler: () => m(e)
94
95
  }
95
96
  ] : []
96
97
  ];
97
98
  });
98
- function P(i) {
99
- return (t) => {
100
- if (!i)
99
+ function w(l) {
100
+ return (o) => {
101
+ if (!l)
101
102
  return;
102
- t?.preventDefault();
103
- const r = n.getTabList.findIndex(
104
- (c) => a(c) === a(i)
103
+ o?.preventDefault();
104
+ const r = t.getTabList.findIndex(
105
+ (c) => u(c) === u(l)
105
106
  );
106
- s.current = i, s.currentIndex = r;
107
+ s.current = l, s.currentIndex = r;
107
108
  };
108
109
  }
109
- return { getDropMenuList: D, handleContextMenu: P };
110
+ return { getDropMenuList: D, handleContextMenu: w };
110
111
  }
111
112
  export {
112
- F as useTabDropdown
113
+ H as useTabDropdown
113
114
  };
@@ -1,53 +1,54 @@
1
- import { defineComponent as f, ref as g, computed as v, createElementBlock as h, openBlock as _, unref as e, normalizeClass as t, createElementVNode as i, createVNode as b } from "vue";
1
+ import { defineComponent as v, ref as h, computed as _, createElementBlock as b, openBlock as C, unref as e, normalizeClass as n, createElementVNode as r, createVNode as z, toDisplayString as p } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../../config-provider/hooks/use-global-config.js";
5
5
  import "lodash-es";
6
6
  import "../../form/index.js";
7
- import { useNamespace as z } from "../../../hooks/use-namespace/index.js";
7
+ import { useNamespace as V } from "../../../hooks/use-namespace/index.js";
8
8
  import "../../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../../hooks/use-z-index/index.js";
11
- import { VftInput as C } from "../../input/index.js";
12
- import { usePagination as V } from "../usePagination.js";
13
- const x = ["disabled"], D = /* @__PURE__ */ f({
11
+ import { useLocale as x } from "../../../locale/use-locale.js";
12
+ import { VftInput as E } from "../../input/index.js";
13
+ import { usePagination as I } from "../usePagination.js";
14
+ const N = ["disabled"], G = /* @__PURE__ */ v({
14
15
  __name: "jumper",
15
16
  props: {
16
17
  size: {}
17
18
  },
18
- setup(r) {
19
- const n = z("pagination"), { pageCount: l, disabled: s, currentPage: m, changeEvent: p } = V(), o = g(), u = v(() => o.value ?? m?.value);
20
- function c(a) {
21
- o.value = +a;
19
+ setup(l) {
20
+ const a = V("pagination"), { t: i } = x(), { pageCount: m, disabled: s, currentPage: u, changeEvent: c } = I(), o = h(), d = _(() => o.value ?? u?.value);
21
+ function f(t) {
22
+ o.value = +t;
22
23
  }
23
- function d(a) {
24
- a = Math.trunc(+a), p?.(+a), o.value = void 0;
24
+ function g(t) {
25
+ t = Math.trunc(+t), c?.(+t), o.value = void 0;
25
26
  }
26
- return (a, E) => (_(), h("span", {
27
- class: t(e(n).e("jump")),
27
+ return (t, j) => (C(), b("span", {
28
+ class: n(e(a).e("jump")),
28
29
  disabled: e(s)
29
30
  }, [
30
- i("span", {
31
- class: t([e(n).e("goto")])
32
- }, "前往", 2),
33
- b(e(C), {
34
- size: r.size,
35
- class: t([e(n).e("editor"), e(n).is("in-pagination")]),
31
+ r("span", {
32
+ class: n([e(a).e("goto")])
33
+ }, p(e(i)("vft.pagination.goto")), 3),
34
+ z(e(E), {
35
+ size: l.size,
36
+ class: n([e(a).e("editor"), e(a).is("in-pagination")]),
36
37
  min: 1,
37
- max: e(l),
38
+ max: e(m),
38
39
  disabled: e(s),
39
- "model-value": u.value,
40
+ "model-value": d.value,
40
41
  "validate-event": !1,
41
42
  type: "number",
42
- "onUpdate:modelValue": c,
43
- onChange: d
43
+ "onUpdate:modelValue": f,
44
+ onChange: g
44
45
  }, null, 8, ["size", "class", "max", "disabled", "model-value"]),
45
- i("span", {
46
- class: t([e(n).e("classifier")])
47
- }, "", 2)
48
- ], 10, x));
46
+ r("span", {
47
+ class: n([e(a).e("classifier")])
48
+ }, p(e(i)("vft.pagination.pageClassifier")), 3)
49
+ ], 10, N));
49
50
  }
50
51
  });
51
52
  export {
52
- D as default
53
+ G as default
53
54
  };
@@ -1,16 +1,17 @@
1
- import { defineComponent as g, ref as z, watch as n, computed as d, createElementBlock as f, openBlock as S, normalizeClass as h, unref as s, createVNode as v } from "vue";
2
- import { isEqual as C } from "lodash-es";
1
+ import { defineComponent as z, ref as d, watch as n, computed as f, createElementBlock as S, openBlock as h, normalizeClass as v, unref as s, createVNode as C } from "vue";
2
+ import { isEqual as b } from "lodash-es";
3
3
  import "@vueuse/core";
4
4
  import "@vft/utils";
5
5
  import "../../config-provider/hooks/use-global-config.js";
6
6
  import "../../form/index.js";
7
- import { useNamespace as b } from "../../../hooks/use-namespace/index.js";
7
+ import { useNamespace as P } from "../../../hooks/use-namespace/index.js";
8
8
  import "../../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../../hooks/use-z-index/index.js";
11
- import { usePagination as y } from "../usePagination.js";
12
- import { VftSelect as B } from "../../select/index.js";
13
- const I = /* @__PURE__ */ g({
11
+ import { useLocale as y } from "../../../locale/use-locale.js";
12
+ import { usePagination as B } from "../usePagination.js";
13
+ import { VftSelect as N } from "../../select/index.js";
14
+ const K = /* @__PURE__ */ z({
14
15
  __name: "sizes",
15
16
  props: {
16
17
  pageSize: {},
@@ -21,13 +22,13 @@ const I = /* @__PURE__ */ g({
21
22
  },
22
23
  emits: ["page-size-change"],
23
24
  setup(a, { emit: o }) {
24
- const l = o, r = b("pagination"), p = y(), i = z(a.pageSize);
25
+ const r = o, l = P("pagination"), { t: p } = y(), m = B(), i = d(a.pageSize);
25
26
  n(
26
27
  () => a.pageSizes,
27
28
  (e, t) => {
28
- if (!C(e, t) && Array.isArray(e)) {
29
- const u = e.includes(a.pageSize) ? a.pageSize : a.pageSizes[0];
30
- l("page-size-change", u);
29
+ if (!b(e, t) && Array.isArray(e)) {
30
+ const g = e.includes(a.pageSize) ? a.pageSize : a.pageSizes[0];
31
+ r("page-size-change", g);
31
32
  }
32
33
  }
33
34
  ), n(
@@ -36,27 +37,27 @@ const I = /* @__PURE__ */ g({
36
37
  i.value = e;
37
38
  }
38
39
  );
39
- const m = d(
40
- () => a.pageSizes.map((e) => ({ label: e + "条/页", value: e }))
40
+ const c = f(
41
+ () => a.pageSizes.map((e) => ({ label: e + p("vft.pagination.itemsPerPage"), value: e }))
41
42
  );
42
- function c(e) {
43
- e !== i.value && (i.value = e, p.handleSizeChange?.(Number(e)));
43
+ function u(e) {
44
+ e !== i.value && (i.value = e, m.handleSizeChange?.(Number(e)));
44
45
  }
45
- return (e, t) => (S(), f("span", {
46
- class: h(s(r).e("sizes"))
46
+ return (e, t) => (h(), S("span", {
47
+ class: v(s(l).e("sizes"))
47
48
  }, [
48
- v(s(B), {
49
+ C(s(N), {
49
50
  "model-value": i.value,
50
51
  disabled: a.disabled,
51
52
  "popper-class": a.popperClass,
52
53
  size: a.size,
53
54
  "validate-event": !1,
54
- onChange: c,
55
- options: m.value
55
+ onChange: u,
56
+ options: c.value
56
57
  }, null, 8, ["model-value", "disabled", "popper-class", "size", "options"])
57
58
  ], 2));
58
59
  }
59
60
  });
60
61
  export {
61
- I as default
62
+ K as default
62
63
  };
@@ -1,27 +1,28 @@
1
- import { defineComponent as i, createElementBlock as r, openBlock as n, unref as t, normalizeClass as s, toDisplayString as p } from "vue";
1
+ import { defineComponent as r, createElementBlock as n, openBlock as s, unref as t, normalizeClass as p, toDisplayString as m } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../../config-provider/hooks/use-global-config.js";
5
5
  import "lodash-es";
6
6
  import "../../form/index.js";
7
- import { useNamespace as m } from "../../../hooks/use-namespace/index.js";
7
+ import { useNamespace as l } from "../../../hooks/use-namespace/index.js";
8
8
  import "../../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../../hooks/use-z-index/index.js";
11
- import { usePagination as l } from "../usePagination.js";
12
- const c = ["disabled"], D = /* @__PURE__ */ i({
11
+ import { useLocale as c } from "../../../locale/use-locale.js";
12
+ import { usePagination as d } from "../usePagination.js";
13
+ const f = ["disabled"], L = /* @__PURE__ */ r({
13
14
  __name: "total",
14
15
  props: {
15
16
  total: { default: 0 }
16
17
  },
17
18
  setup(o) {
18
- const e = m("pagination"), { disabled: a } = l();
19
- return (d, f) => (n(), r("span", {
20
- class: s(t(e).e("total")),
21
- disabled: t(a)
22
- }, "" + p(o.total) + " 条", 11, c));
19
+ const a = l("pagination"), { t: e } = c(), { disabled: i } = d();
20
+ return (u, _) => (s(), n("span", {
21
+ class: p(t(a).e("total")),
22
+ disabled: t(i)
23
+ }, m(t(e)("vft.pagination.total", { total: o.total })), 11, f));
23
24
  }
24
25
  });
25
26
  export {
26
- D as default
27
+ L as default
27
28
  };
@@ -1,20 +1,21 @@
1
- import { defineComponent as h, ref as N, computed as r, createBlock as d, openBlock as y, unref as t, mergeProps as w, withCtx as l, renderSlot as $, createCommentVNode as B, createElementVNode as a, normalizeClass as c, createTextVNode as f, normalizeStyle as b, toDisplayString as s, createVNode as T } from "vue";
1
+ import { defineComponent as v, ref as w, computed as r, createBlock as y, openBlock as B, unref as t, mergeProps as $, withCtx as c, renderSlot as b, createCommentVNode as T, createElementVNode as a, normalizeClass as l, createTextVNode as f, normalizeStyle as I, toDisplayString as m, createVNode as x } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
- import { addUnit as I } from "../../utils/helper.js";
4
+ import { addUnit as P } from "../../utils/helper.js";
5
5
  import "lodash-es";
6
6
  import "../form/index.js";
7
- import { VftButton as x } from "../button/index.js";
8
- import { VftIcon as P } from "../icon/index.js";
9
- import { VftTooltip as S } from "../tooltip/index.js";
10
- import { useNamespace as A } from "../../hooks/use-namespace/index.js";
7
+ import { VftButton as h } from "../button/index.js";
8
+ import { VftIcon as S } from "../icon/index.js";
9
+ import { VftTooltip as A } from "../tooltip/index.js";
10
+ import { useNamespace as R } from "../../hooks/use-namespace/index.js";
11
11
  import "../../hooks/use-model-toggle/index.js";
12
12
  import "@popperjs/core";
13
13
  import "../../hooks/use-z-index/index.js";
14
- const R = h({
14
+ import { useLocale as q } from "../../locale/use-locale.js";
15
+ const D = v({
15
16
  name: "VftPopconfirm"
16
- }), W = /* @__PURE__ */ h({
17
- ...R,
17
+ }), Z = /* @__PURE__ */ v({
18
+ ...D,
18
19
  props: {
19
20
  title: {},
20
21
  confirmButtonText: {},
@@ -31,18 +32,18 @@ const R = h({
31
32
  },
32
33
  emits: ["confirm", "cancel"],
33
34
  setup(e, { emit: C }) {
34
- const i = e, m = C, n = A("popconfirm"), p = N(), u = () => {
35
+ const i = e, s = C, n = R("popconfirm"), p = w(), { t: u } = q(), d = () => {
35
36
  p.value?.onClose?.();
36
37
  }, k = r(() => ({
37
- width: I(i.width)
38
- })), v = (o) => {
39
- m("confirm", o), u();
40
- }, V = (o) => {
41
- m("cancel", o), u();
42
- }, g = r(
43
- () => i.confirmButtonText || "确认"
44
- ), z = r(() => i.cancelButtonText || "取消");
45
- return (o, q) => (y(), d(t(S), w({
38
+ width: P(i.width)
39
+ })), V = (o) => {
40
+ s("confirm", o), d();
41
+ }, g = (o) => {
42
+ s("cancel", o), d();
43
+ }, z = r(
44
+ () => i.confirmButtonText || u("vft.popconfirm.confirm")
45
+ ), N = r(() => i.cancelButtonText || u("vft.popconfirm.cancel"));
46
+ return (o, E) => (B(), y(t(A), $({
46
47
  ref_key: "tooltipRef",
47
48
  ref: p,
48
49
  trigger: "click",
@@ -55,57 +56,57 @@ const R = h({
55
56
  "hide-after": e.hideAfter,
56
57
  persistent: e.persistent
57
58
  }), {
58
- content: l(() => [
59
+ content: c(() => [
59
60
  a("div", {
60
- class: c(t(n).b())
61
+ class: l(t(n).b())
61
62
  }, [
62
63
  a("div", {
63
- class: c(t(n).e("main"))
64
+ class: l(t(n).e("main"))
64
65
  }, [
65
- !e.hideIcon && e.icon ? (y(), d(t(P), {
66
+ !e.hideIcon && e.icon ? (B(), y(t(S), {
66
67
  key: 0,
67
68
  icon: e.icon,
68
69
  size: 20,
69
- class: c(t(n).e("icon")),
70
- style: b({ color: e.iconColor })
71
- }, null, 8, ["icon", "class", "style"])) : B("", !0),
72
- f(" " + s(e.title), 1)
70
+ class: l(t(n).e("icon")),
71
+ style: I({ color: e.iconColor })
72
+ }, null, 8, ["icon", "class", "style"])) : T("", !0),
73
+ f(" " + m(e.title), 1)
73
74
  ], 2),
74
75
  a("div", {
75
- class: c(t(n).e("action"))
76
+ class: l(t(n).e("action"))
76
77
  }, [
77
- T(t(x), {
78
+ x(t(h), {
78
79
  size: "small",
79
80
  type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
80
81
  text: e.cancelButtonType === "text",
81
- onClick: V
82
+ onClick: g
82
83
  }, {
83
- default: l(() => [
84
- f(s(z.value), 1)
84
+ default: c(() => [
85
+ f(m(N.value), 1)
85
86
  ]),
86
87
  _: 1
87
88
  }, 8, ["type", "text"]),
88
- T(t(x), {
89
+ x(t(h), {
89
90
  size: "small",
90
91
  type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
91
92
  text: e.confirmButtonType === "text",
92
- onClick: v
93
+ onClick: V
93
94
  }, {
94
- default: l(() => [
95
- f(s(g.value), 1)
95
+ default: c(() => [
96
+ f(m(z.value), 1)
96
97
  ]),
97
98
  _: 1
98
99
  }, 8, ["type", "text"])
99
100
  ], 2)
100
101
  ], 2)
101
102
  ]),
102
- default: l(() => [
103
- o.$slots.reference ? $(o.$slots, "reference", { key: 0 }) : B("", !0)
103
+ default: c(() => [
104
+ o.$slots.reference ? b(o.$slots, "reference", { key: 0 }) : T("", !0)
104
105
  ]),
105
106
  _: 3
106
107
  }, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
107
108
  }
108
109
  });
109
110
  export {
110
- W as default
111
+ Z as default
111
112
  };