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.
- package/dist/index.css +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +203 -202
- package/es/components/cascader-panel/menu.vue2.js +50 -49
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
- package/es/components/color-picker/color-picker.vue2.js +134 -133
- package/es/components/config-provider/config-provider.vue.d.ts +2 -0
- package/es/components/config-provider/config-provider.vue2.js +5 -4
- package/es/components/config-provider/constants.d.ts +1 -0
- package/es/components/config-provider/constants.js +3 -2
- package/es/components/config-provider/hooks/use-global-config.js +33 -30
- package/es/components/config-provider/index.d.ts +9 -0
- package/es/components/config-provider/index.js +6 -5
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker/composables/use-basic-date-table.js +124 -123
- package/es/components/date-picker/composables/use-month-range-header.js +15 -14
- package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +39 -38
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +39 -38
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +179 -178
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
- package/es/components/date-time-select/date-time-select.vue2.js +39 -36
- package/es/components/dropdown/dropdown.vue2.js +68 -67
- package/es/components/empty/empty.vue2.js +39 -38
- package/es/components/full-screen/full-screen.vue2.js +18 -17
- package/es/components/image/image.vue2.js +60 -59
- package/es/components/image-viewer/image-viewer.vue2.js +45 -44
- package/es/components/index.js +161 -160
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/md-container/md-container.vue2.js +75 -74
- package/es/components/md-container/toc.js +37 -36
- package/es/components/modal/modal-footer-action.vue2.js +25 -24
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +16 -15
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +54 -53
- package/es/components/pagination/components/jumper.vue2.js +29 -28
- package/es/components/pagination/components/sizes.vue2.js +21 -20
- package/es/components/pagination/components/total.vue2.js +11 -10
- package/es/components/popconfirm/popconfirm.vue2.js +40 -39
- package/es/components/search/search.vue2.js +79 -77
- package/es/components/select/useSelect.js +232 -231
- package/es/components/super-form/super-form-action.vue2.js +41 -40
- package/es/components/super-form/super-form-item.vue2.js +206 -203
- package/es/components/super-form/use/helper.d.ts +1 -1
- package/es/components/super-form/use/helper.js +62 -62
- package/es/components/table/field.js +130 -110
- package/es/components/table/table.vue2.js +152 -150
- package/es/components/table/use/use-columns.js +29 -26
- package/es/components/table/use/use-data-source.js +87 -86
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +66 -65
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +134 -133
- package/es/components/transfer/transfer-panel.vue2.js +57 -56
- package/es/components/transfer/transfer.vue2.js +70 -69
- package/es/components/tree/tree.vue2.js +60 -59
- package/es/components/upload/index.d.ts +3 -3
- package/es/components/upload/upload-content.vue.d.ts +2 -2
- package/es/components/upload/upload-content.vue2.js +78 -75
- package/es/components/upload/upload-list.vue2.js +46 -45
- package/es/components/upload/upload.vue.d.ts +2 -2
- package/es/components/upload/upload.vue2.js +87 -85
- package/es/components/upload/utils.js +29 -29
- package/es/constants/date.d.ts +1 -1
- package/es/constants/date.js +9 -1
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +1 -0
- package/es/index.js +5 -1
- package/es/locale/index.d.js +1 -0
- package/es/locale/index.d.ts +26 -0
- package/es/locale/index.js +10 -0
- package/es/locale/lang/en.d.ts +183 -0
- package/es/locale/lang/en.js +241 -0
- package/es/locale/lang/zh-cn.d.ts +183 -0
- package/es/locale/lang/zh-cn.js +241 -0
- package/es/locale/lang/zh-tw.d.ts +183 -0
- package/es/locale/lang/zh-tw.js +241 -0
- package/es/locale/use-locale.d.ts +17 -0
- package/es/locale/use-locale.js +56 -0
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/constants.cjs +1 -1
- package/lib/components/config-provider/constants.d.ts +1 -0
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +9 -0
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-columns.cjs +1 -1
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +3 -3
- package/lib/components/upload/upload-content.vue.d.ts +2 -2
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +2 -2
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/upload/utils.cjs +1 -1
- package/lib/constants/date.cjs +1 -1
- package/lib/constants/date.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/locale/index.cjs +1 -0
- package/lib/locale/index.d.cjs +1 -0
- package/lib/locale/index.d.ts +26 -0
- package/lib/locale/lang/en.cjs +1 -0
- package/lib/locale/lang/en.d.ts +183 -0
- package/lib/locale/lang/zh-cn.cjs +1 -0
- package/lib/locale/lang/zh-cn.d.ts +183 -0
- package/lib/locale/lang/zh-tw.cjs +1 -0
- package/lib/locale/lang/zh-tw.d.ts +183 -0
- package/lib/locale/use-locale.cjs +1 -0
- package/lib/locale/use-locale.d.ts +17 -0
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/src/super-form.scss +0 -1
- package/theme-style/vft-super-form.css +1 -1
- 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):
|
|
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
|
|
2
|
-
import { isInput as
|
|
3
|
-
import { FormCompEnum as
|
|
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
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
].includes(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
].includes(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
].includes(
|
|
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
|
|
39
|
-
return
|
|
38
|
+
function x(i, t) {
|
|
39
|
+
return i && m(i) && t && h(t) ? `${t}` : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const { show: n, ifShow:
|
|
43
|
-
let u = !0,
|
|
44
|
-
return l(n) ? u = n : a(n) &&
|
|
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
|
|
47
|
-
const { baseColProps: n = {}, quickColSpan:
|
|
48
|
-
return
|
|
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
|
|
51
|
-
if (
|
|
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
|
|
59
|
-
for (const
|
|
60
|
-
const p = n &&
|
|
61
|
-
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
|
-
...
|
|
64
|
+
...r,
|
|
65
65
|
...n
|
|
66
66
|
},
|
|
67
|
-
schema:
|
|
68
|
-
} : void 0, { isIfShow: f } =
|
|
67
|
+
schema: c
|
|
68
|
+
} : void 0, { isIfShow: f } = S(c, p);
|
|
69
69
|
if (!f)
|
|
70
70
|
continue;
|
|
71
|
-
const s =
|
|
72
|
-
u.push({ field:
|
|
71
|
+
const s = k(c, t);
|
|
72
|
+
u.push({ field: c.field, span: s }), o += s;
|
|
73
73
|
}
|
|
74
|
-
const d =
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
|
|
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:
|
|
81
|
-
totalSpan:
|
|
80
|
+
willExceed: o > 24,
|
|
81
|
+
totalSpan: o,
|
|
82
82
|
visibleItems: u
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
|
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
|
|
3
|
+
import { formatToDateTime as p } from "@vft/utils/date";
|
|
4
4
|
import { isNullOrUndefined as M } from "@vft/utils";
|
|
5
|
-
import { VftButton as
|
|
6
|
-
import { VftPopconfirm as
|
|
7
|
-
import { VftTag as
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
12
|
+
const S = {
|
|
12
13
|
type: "seq",
|
|
13
|
-
title: "
|
|
14
|
+
title: "vft.table.seq",
|
|
14
15
|
fixed: "left",
|
|
15
16
|
width: 53
|
|
16
|
-
},
|
|
17
|
+
}, k = {
|
|
17
18
|
type: "checkbox",
|
|
18
19
|
title: "",
|
|
19
20
|
minWidth: 60,
|
|
20
21
|
fixed: "left"
|
|
21
|
-
},
|
|
22
|
+
}, O = {
|
|
22
23
|
field: "id",
|
|
23
24
|
title: "Id",
|
|
24
25
|
minWidth: 100
|
|
25
|
-
},
|
|
26
|
+
}, P = {
|
|
26
27
|
field: "name",
|
|
27
|
-
title: "
|
|
28
|
+
title: "vft.table.name",
|
|
28
29
|
minWidth: 100
|
|
29
|
-
},
|
|
30
|
+
}, j = ({
|
|
30
31
|
format: t = "YYYY-MM-DD",
|
|
31
32
|
field: e = "date",
|
|
32
|
-
title:
|
|
33
|
+
title: l = "vft.table.time"
|
|
33
34
|
} = {}) => ({
|
|
34
35
|
minWidth: 100,
|
|
35
36
|
field: e,
|
|
36
|
-
title:
|
|
37
|
+
title: l,
|
|
37
38
|
formatter: ({
|
|
38
|
-
row:
|
|
39
|
-
}) =>
|
|
40
|
-
}),
|
|
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:
|
|
44
|
+
title: l = "vft.table.time"
|
|
44
45
|
} = {}) => ({
|
|
45
46
|
minWidth: 190,
|
|
46
47
|
field: e,
|
|
47
|
-
title:
|
|
48
|
+
title: l,
|
|
48
49
|
formatter: ({
|
|
49
|
-
row:
|
|
50
|
-
}) =>
|
|
51
|
-
}),
|
|
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:
|
|
55
|
-
} = {}) =>
|
|
55
|
+
title: l = "vft.table.createTime"
|
|
56
|
+
} = {}) => b({
|
|
56
57
|
format: t,
|
|
57
58
|
field: e,
|
|
58
|
-
title:
|
|
59
|
-
}),
|
|
59
|
+
title: l
|
|
60
|
+
}), q = ({
|
|
60
61
|
format: t = "YYYY-MM-DD HH:mm:ss",
|
|
61
62
|
field: e = "updateTime",
|
|
62
|
-
title:
|
|
63
|
-
} = {}) =>
|
|
63
|
+
title: l = "vft.table.updateTime"
|
|
64
|
+
} = {}) => b({
|
|
64
65
|
format: t,
|
|
65
66
|
field: e,
|
|
66
|
-
title:
|
|
67
|
-
}),
|
|
67
|
+
title: l
|
|
68
|
+
}), z = ({
|
|
68
69
|
field: t = "status",
|
|
69
|
-
title: e = "
|
|
70
|
-
normalText:
|
|
71
|
-
disabledText:
|
|
72
|
-
strToNumber:
|
|
73
|
-
} = {}) =>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
}
|
|
92
|
-
confirmText: t = "
|
|
101
|
+
};
|
|
102
|
+
}, R = ({
|
|
103
|
+
confirmText: t = "vft.table.confirmDelete",
|
|
93
104
|
leftCallback: e,
|
|
94
|
-
rightCallback:
|
|
95
|
-
leftText:
|
|
96
|
-
rightText:
|
|
97
|
-
showLeft:
|
|
98
|
-
showRight:
|
|
99
|
-
} = {}) =>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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: "
|
|
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
|
-
}
|
|
137
|
-
|
|
138
|
-
})
|
|
139
|
-
}) : null]);
|
|
158
|
+
}) : null]);
|
|
159
|
+
}
|
|
140
160
|
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
161
|
+
};
|
|
162
|
+
};
|
|
143
163
|
export {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
};
|