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
@@ -7,7 +7,7 @@ import { type FormCompEnumType } from 'vft/es/utils';
7
7
  * @param type 组件类型
8
8
  * @param label
9
9
  */
10
- export declare function createPlaceholderMessage(type: FormCompEnumType, label?: string): string;
10
+ export declare function createPlaceholderMessage(type: FormCompEnumType, label?: string): "" | "vft.superFormPlaceholder.input" | "vft.superFormPlaceholder.password" | "vft.superFormPlaceholder.select" | "vft.superFormPlaceholder.checkbox" | "vft.superFormPlaceholder.search" | "vft.superFormPlaceholder.tag" | "vft.superFormPlaceholder.upload" | "vft.superFormPlaceholder.slider" | "vft.superFormPlaceholder.time";
11
11
  /**
12
12
  * @description 处理 input 输入为数值的 val
13
13
  * @example
@@ -1,91 +1,91 @@
1
- import { isBoolean as l, isFunction as a, isNumber as S } from "@vft/utils";
2
- import { isInput as h } from "../component-map.js";
3
- import { FormCompEnum as i } from "../../../utils/form-register.js";
1
+ import { isBoolean as l, isFunction as a, isNumber as h } from "@vft/utils";
2
+ import { isInput as m } from "../component-map.js";
3
+ import { FormCompEnum as e } from "../../../utils/form-register.js";
4
4
  import "@vueuse/core";
5
5
  import "../../config-provider/hooks/use-global-config.js";
6
6
  import "vue";
7
7
  import "lodash-es";
8
8
  import "../../form/index.js";
9
- function b(t, e = "") {
10
- return e = (e || "").replace(":", "") || "", [
11
- i.Input,
12
- i.InputNumber,
13
- i.Textarea,
14
- i.AutoComplete
15
- ].includes(t) ? "请输入" + e : [i.Password].includes(t) ? "请输入密码" : [
16
- i.Select,
17
- i.Radio,
18
- i.RadioSingle,
19
- i.RadioButton,
20
- i.Cascader,
21
- i.TreeSelect,
22
- i.ColorPicker,
23
- i.Checkbox,
24
- i.CheckboxButton
25
- ].includes(t) ? "请选择" + e : [i.CheckboxSingle].includes(t) ? "请勾选" + e : [i.Search].includes(t) ? "请输入要搜索的内容" : [i.InputTag].includes(t) ? "请输入标签内容" : [i.Upload].includes(t) ? "请选择上传文件" : [i.Slider].includes(t) ? "请拖动滑块" : [
26
- i.TimePicker,
27
- i.YearPicker,
28
- i.MonthPicker,
29
- i.DatePicker,
30
- i.DatesPicker,
31
- i.DateTimePicker,
32
- i.WeekPicker,
33
- i.DateTimeRangePicker,
34
- i.DateRangePicker,
35
- i.MonthRangePicker
36
- ].includes(t) ? "请选择时间" : "";
9
+ function v(i, t = "") {
10
+ return t = (t || "").replace(":", "") || "", [
11
+ e.Input,
12
+ e.InputNumber,
13
+ e.Textarea,
14
+ e.AutoComplete
15
+ ].includes(i) ? "vft.superFormPlaceholder.input" : [e.Password].includes(i) ? "vft.superFormPlaceholder.password" : [
16
+ e.Select,
17
+ e.Radio,
18
+ e.RadioSingle,
19
+ e.RadioButton,
20
+ e.Cascader,
21
+ e.TreeSelect,
22
+ e.ColorPicker,
23
+ e.Checkbox,
24
+ e.CheckboxButton
25
+ ].includes(i) ? "vft.superFormPlaceholder.select" : [e.CheckboxSingle].includes(i) ? "vft.superFormPlaceholder.checkbox" : [e.Search].includes(i) ? "vft.superFormPlaceholder.search" : [e.InputTag].includes(i) ? "vft.superFormPlaceholder.tag" : [e.Upload].includes(i) ? "vft.superFormPlaceholder.upload" : [e.Slider].includes(i) ? "vft.superFormPlaceholder.slider" : [
26
+ e.TimePicker,
27
+ e.YearPicker,
28
+ e.MonthPicker,
29
+ e.DatePicker,
30
+ e.DatesPicker,
31
+ e.DateTimePicker,
32
+ e.WeekPicker,
33
+ e.DateTimeRangePicker,
34
+ e.DateRangePicker,
35
+ e.MonthRangePicker
36
+ ].includes(i) ? "vft.superFormPlaceholder.time" : "";
37
37
  }
38
- function P(t, e) {
39
- return t && h(t) && e && S(e) ? `${e}` : e;
38
+ function x(i, t) {
39
+ return i && m(i) && t && h(t) ? `${t}` : t;
40
40
  }
41
- function k(t, e) {
42
- const { show: n, ifShow: o } = t;
43
- let u = !0, c = !0;
44
- return l(n) ? u = n : a(n) && e && (u = n(e)), l(o) ? c = o : a(o) && e && (c = o(e)), { isShow: u, isIfShow: c };
41
+ function S(i, t) {
42
+ const { show: n, ifShow: r } = i;
43
+ let u = !0, o = !0;
44
+ return l(n) ? u = n : a(n) && t && (u = n(t)), l(r) ? o = r : a(r) && t && (o = r(t)), { isShow: u, isIfShow: o };
45
45
  }
46
- function m(t, e) {
47
- const { baseColProps: n = {}, quickColSpan: o } = e;
48
- return t.type === i.Divider ? 24 : t.colProps?.span !== void 0 ? t.colProps.span : t.quickColSpan ? Math.ceil(24 / t.quickColSpan) : n.span !== void 0 ? n.span : o ? Math.ceil(24 / o) : 24;
46
+ function k(i, t) {
47
+ const { baseColProps: n = {}, quickColSpan: r } = t;
48
+ return i.type === e.Divider ? 24 : i.colProps?.span !== void 0 ? i.colProps.span : i.quickColSpan ? Math.ceil(24 / i.quickColSpan) : n.span !== void 0 ? n.span : r ? Math.ceil(24 / r) : 24;
49
49
  }
50
- function q(t, e, n, o) {
51
- if (e.customLayout)
50
+ function B(i, t, n, r) {
51
+ if (t.customLayout)
52
52
  return {
53
53
  willExceed: !1,
54
54
  totalSpan: 0,
55
55
  visibleItems: []
56
56
  };
57
57
  const u = [];
58
- let c = 0;
59
- for (const r of t) {
60
- const p = n && o ? {
61
- field: r.field,
58
+ let o = 0;
59
+ for (const c of i) {
60
+ const p = n && r ? {
61
+ field: c.field,
62
62
  model: n,
63
63
  values: {
64
- ...o,
64
+ ...r,
65
65
  ...n
66
66
  },
67
- schema: r
68
- } : void 0, { isIfShow: f } = k(r, p);
67
+ schema: c
68
+ } : void 0, { isIfShow: f } = S(c, p);
69
69
  if (!f)
70
70
  continue;
71
- const s = m(r, e);
72
- u.push({ field: r.field, span: s }), c += s;
71
+ const s = k(c, t);
72
+ u.push({ field: c.field, span: s }), o += s;
73
73
  }
74
- const d = e.showCommonButton || e.showResetButton || e.showSubmitButton;
75
- if (e.actionInline && e.showActionButtonGroup && d && !e.customLayout) {
76
- const r = e.quickColSpan ? Math.ceil(24 / e.quickColSpan) : e.baseColProps?.span || 24;
77
- c += r;
74
+ const d = t.showCommonButton || t.showResetButton || t.showSubmitButton;
75
+ if (t.actionInline && t.showActionButtonGroup && d && !t.customLayout) {
76
+ const c = t.quickColSpan ? Math.ceil(24 / t.quickColSpan) : t.baseColProps?.span || 24;
77
+ o += c;
78
78
  }
79
79
  return {
80
- willExceed: c > 24,
81
- totalSpan: c,
80
+ willExceed: o > 24,
81
+ totalSpan: o,
82
82
  visibleItems: u
83
83
  };
84
84
  }
85
85
  export {
86
- m as calculateSchemaSpan,
87
- b as createPlaceholderMessage,
88
- k as getSchemaShowState,
89
- P as handleInputNumberValue,
90
- q as willFormExceedOneRow
86
+ k as calculateSchemaSpan,
87
+ v as createPlaceholderMessage,
88
+ S as getSchemaShowState,
89
+ x as handleInputNumberValue,
90
+ B as willFormExceedOneRow
91
91
  };
@@ -1,154 +1,174 @@
1
- import { createVNode as r, Fragment as _, isVNode as g } from "vue";
1
+ import { createVNode as r, Fragment as v, isVNode as h } from "vue";
2
2
  import { useLoadingDelay as L } from "@vft/use";
3
- import { formatToDateTime as d } from "@vft/utils/date";
3
+ import { formatToDateTime as p } from "@vft/utils/date";
4
4
  import { isNullOrUndefined as M } from "@vft/utils";
5
- import { VftButton as u } from "../button/index.js";
6
- import { VftPopconfirm as h } from "../popconfirm/index.js";
7
- import { VftTag as c } from "../tag/index.js";
8
- function m(t) {
9
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !g(t);
5
+ import { VftButton as d } from "../button/index.js";
6
+ import { VftPopconfirm as F } from "../popconfirm/index.js";
7
+ import { VftTag as D } from "../tag/index.js";
8
+ import { useLocale as E } from "../../locale/use-locale.js";
9
+ function f(t) {
10
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !h(t);
10
11
  }
11
- const V = {
12
+ const S = {
12
13
  type: "seq",
13
- title: "序号",
14
+ title: "vft.table.seq",
14
15
  fixed: "left",
15
16
  width: 53
16
- }, W = {
17
+ }, k = {
17
18
  type: "checkbox",
18
19
  title: "",
19
20
  minWidth: 60,
20
21
  fixed: "left"
21
- }, S = {
22
+ }, O = {
22
23
  field: "id",
23
24
  title: "Id",
24
25
  minWidth: 100
25
- }, k = {
26
+ }, P = {
26
27
  field: "name",
27
- title: "名称",
28
+ title: "vft.table.name",
28
29
  minWidth: 100
29
- }, O = ({
30
+ }, j = ({
30
31
  format: t = "YYYY-MM-DD",
31
32
  field: e = "date",
32
- title: o = "时间"
33
+ title: l = "vft.table.time"
33
34
  } = {}) => ({
34
35
  minWidth: 100,
35
36
  field: e,
36
- title: o,
37
+ title: l,
37
38
  formatter: ({
38
- row: i
39
- }) => i[e] ? d(i[e], t) : "-"
40
- }), D = ({
39
+ row: o
40
+ }) => o[e] ? p(o[e], t) : "-"
41
+ }), b = ({
41
42
  format: t = "YYYY-MM-DD HH:mm:ss",
42
43
  field: e = "date",
43
- title: o = "时间"
44
+ title: l = "vft.table.time"
44
45
  } = {}) => ({
45
46
  minWidth: 190,
46
47
  field: e,
47
- title: o,
48
+ title: l,
48
49
  formatter: ({
49
- row: i
50
- }) => i[e] ? d(i[e], t) : "-"
51
- }), P = ({
50
+ row: o
51
+ }) => o[e] ? p(o[e], t) : "-"
52
+ }), U = ({
52
53
  format: t = "YYYY-MM-DD HH:mm:ss",
53
54
  field: e = "createTime",
54
- title: o = "创建时间"
55
- } = {}) => D({
55
+ title: l = "vft.table.createTime"
56
+ } = {}) => b({
56
57
  format: t,
57
58
  field: e,
58
- title: o
59
- }), b = ({
59
+ title: l
60
+ }), q = ({
60
61
  format: t = "YYYY-MM-DD HH:mm:ss",
61
62
  field: e = "updateTime",
62
- title: o = "更新时间"
63
- } = {}) => D({
63
+ title: l = "vft.table.updateTime"
64
+ } = {}) => b({
64
65
  format: t,
65
66
  field: e,
66
- title: o
67
- }), j = ({
67
+ title: l
68
+ }), z = ({
68
69
  field: t = "status",
69
- title: e = "状态",
70
- normalText: o = "正常",
71
- disabledText: i = "禁用",
72
- strToNumber: l = !0
73
- } = {}) => ({
74
- field: t,
75
- title: e,
76
- minWidth: 100,
77
- slots: {
78
- default: ({
79
- row: a
80
- }) => {
81
- let n = a?.[t];
82
- return M(n) ? "-" : (l && Number(n) === 0 && (n = !1), n ? r(c, null, m(o) ? o : {
83
- default: () => [o]
84
- }) : r(c, {
85
- type: "danger"
86
- }, m(i) ? i : {
87
- default: () => [i]
88
- }));
70
+ title: e = "vft.table.status",
71
+ normalText: l = "vft.table.statusNormal",
72
+ disabledText: o = "vft.table.statusDisabled",
73
+ strToNumber: u = !0
74
+ } = {}) => {
75
+ const {
76
+ t: m
77
+ } = E();
78
+ return {
79
+ field: t,
80
+ title: e,
81
+ minWidth: 100,
82
+ slots: {
83
+ default: ({
84
+ row: c
85
+ }) => {
86
+ let i = c?.[t];
87
+ if (M(i))
88
+ return "-";
89
+ {
90
+ let n, a;
91
+ return u && Number(i) === 0 && (i = !1), i ? r(D, null, f(n = m(l)) ? n : {
92
+ default: () => [n]
93
+ }) : r(D, {
94
+ type: "danger"
95
+ }, f(a = m(o)) ? a : {
96
+ default: () => [a]
97
+ });
98
+ }
99
+ }
89
100
  }
90
- }
91
- }), U = ({
92
- confirmText: t = "确认删除?",
101
+ };
102
+ }, R = ({
103
+ confirmText: t = "vft.table.confirmDelete",
93
104
  leftCallback: e,
94
- rightCallback: o,
95
- leftText: i = "编辑",
96
- rightText: l = "删除",
97
- showLeft: a = !0,
98
- showRight: n = !0
99
- } = {}) => ({
100
- title: "操作栏",
101
- field: "custom-action",
102
- fixed: "right",
103
- slots: {
104
- default: ({
105
- row: f
106
- }) => {
107
- const {
108
- loading: p,
109
- start: E,
110
- cancel: I
111
- } = L(), Y = () => {
112
- E(), o?.(f)?.finally(() => {
113
- I();
114
- });
115
- };
116
- return r(_, null, [a ? r(u, {
117
- size: "small",
118
- type: "primary",
119
- onClick: (s) => {
120
- s.stopPropagation(), e?.(f);
121
- }
122
- }, m(i) ? i : {
123
- default: () => [i]
124
- }) : null, n ? r(h, {
125
- width: "150",
126
- onConfirm: Y,
127
- title: t
128
- }, {
129
- reference: () => r(u, {
130
- loading: p.value,
105
+ rightCallback: l,
106
+ leftText: o = "vft.table.edit",
107
+ rightText: u = "vft.table.delete",
108
+ showLeft: m = !0,
109
+ showRight: c = !0
110
+ } = {}) => {
111
+ const {
112
+ t: i
113
+ } = E();
114
+ return {
115
+ title: "vft.table.actionColumn",
116
+ field: "custom-action",
117
+ fixed: "right",
118
+ slots: {
119
+ default: ({
120
+ row: n
121
+ }) => {
122
+ let a;
123
+ const {
124
+ loading: _,
125
+ start: T,
126
+ cancel: I
127
+ } = L(), Y = () => {
128
+ T(), l?.(n)?.finally(() => {
129
+ I();
130
+ });
131
+ };
132
+ return r(v, null, [m ? r(d, {
131
133
  size: "small",
132
- type: "danger",
134
+ type: "primary",
133
135
  onClick: (s) => {
134
- s.stopPropagation();
136
+ s.stopPropagation(), e?.(n);
137
+ }
138
+ }, f(a = i(o)) ? a : {
139
+ default: () => [a]
140
+ }) : null, c ? r(F, {
141
+ width: "150",
142
+ onConfirm: Y,
143
+ title: i(t)
144
+ }, {
145
+ reference: () => {
146
+ let s;
147
+ return r(d, {
148
+ loading: _.value,
149
+ size: "small",
150
+ type: "danger",
151
+ onClick: (g) => {
152
+ g.stopPropagation();
153
+ }
154
+ }, f(s = i(u)) ? s : {
155
+ default: () => [s]
156
+ });
135
157
  }
136
- }, m(l) ? l : {
137
- default: () => [l]
138
- })
139
- }) : null]);
158
+ }) : null]);
159
+ }
140
160
  }
141
- }
142
- });
161
+ };
162
+ };
143
163
  export {
144
- U as ACTION_FIELD,
145
- W as CHECKED_FIELD,
146
- P as CREATE_TIME_FIELD,
147
- O as DATE_FIELD,
148
- D as DATE_TIME_FIELD,
149
- S as ID_FIELD,
150
- k as NAME_FIELD,
151
- V as SEQ_FIELD,
152
- j as STATUS_FIELD,
153
- b as UPDATE_TIME_FIELD
164
+ R as ACTION_FIELD,
165
+ k as CHECKED_FIELD,
166
+ U as CREATE_TIME_FIELD,
167
+ j as DATE_FIELD,
168
+ b as DATE_TIME_FIELD,
169
+ O as ID_FIELD,
170
+ P as NAME_FIELD,
171
+ S as SEQ_FIELD,
172
+ z as STATUS_FIELD,
173
+ q as UPDATE_TIME_FIELD
154
174
  };