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
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftClientOnly as
|
|
3
|
-
import { VftEmpty as
|
|
4
|
-
import { vLoading as
|
|
5
|
-
import { deepMerge as
|
|
6
|
-
import { FormCompEnum as
|
|
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
|
|
11
|
-
import { useNamespace as
|
|
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
|
|
17
|
-
import { VftSkeleton as
|
|
18
|
-
import { VftSuperForm as
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
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
|
-
}),
|
|
30
|
-
...
|
|
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:
|
|
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:
|
|
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(
|
|
403
|
-
expose:
|
|
404
|
-
emit:
|
|
396
|
+
setup(j, {
|
|
397
|
+
expose: Y,
|
|
398
|
+
emit: W
|
|
405
399
|
}) {
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
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:
|
|
412
|
-
getCurrentPage:
|
|
413
|
-
} =
|
|
414
|
-
getViewColumns:
|
|
415
|
-
setColumns:
|
|
416
|
-
} =
|
|
417
|
-
|
|
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
|
-
|
|
420
|
+
H({
|
|
420
421
|
seqConfig: {
|
|
421
|
-
startIndex: (e - 1) * (u.value?.pageSize || o(a).pageSize ||
|
|
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
|
|
429
|
-
|
|
430
|
-
...o(
|
|
429
|
+
function H(e) {
|
|
430
|
+
y.value = {
|
|
431
|
+
...o(y),
|
|
431
432
|
...e
|
|
432
433
|
};
|
|
433
434
|
}
|
|
434
435
|
const {
|
|
435
|
-
getDataSourceRef:
|
|
436
|
-
handleTableChange:
|
|
437
|
-
reload:
|
|
438
|
-
deleteTableDataRecord:
|
|
439
|
-
insertTableDataRecord:
|
|
440
|
-
updateTableData:
|
|
441
|
-
updateTableDataRecord:
|
|
442
|
-
setTableData:
|
|
443
|
-
getDataSource:
|
|
444
|
-
getRawDataSource:
|
|
445
|
-
tableSearch:
|
|
446
|
-
expandTreeLevel:
|
|
447
|
-
} =
|
|
448
|
-
tableData:
|
|
449
|
-
setLoading:
|
|
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:
|
|
452
|
+
setPagination: v,
|
|
452
453
|
getGridRef: () => f.value
|
|
453
454
|
}, c);
|
|
454
|
-
function
|
|
455
|
-
e?.pageSize &&
|
|
455
|
+
function A(e) {
|
|
456
|
+
e?.pageSize && v({
|
|
456
457
|
currentPage: 1
|
|
457
|
-
}),
|
|
458
|
+
}), ne(e), c("change", e);
|
|
458
459
|
const {
|
|
459
460
|
onChange: t
|
|
460
461
|
} = o(a);
|
|
461
|
-
t &&
|
|
462
|
+
t && R(t) && t(e);
|
|
462
463
|
}
|
|
463
|
-
const
|
|
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 =
|
|
586
|
-
|
|
586
|
+
const t = Le.camelCase(`on-${e}`);
|
|
587
|
+
E[t] = (...l) => c(e, ...l);
|
|
587
588
|
});
|
|
588
|
-
const r =
|
|
589
|
-
const e = o(
|
|
590
|
-
...
|
|
589
|
+
const r = p(() => {
|
|
590
|
+
const e = o(D), t = {
|
|
591
|
+
...Q,
|
|
591
592
|
...o(a),
|
|
592
|
-
columns:
|
|
593
|
-
loading: o(
|
|
593
|
+
columns: we(o(le)),
|
|
594
|
+
loading: o(oe),
|
|
594
595
|
data: e,
|
|
595
|
-
|
|
596
|
+
loadingCfg: o(J),
|
|
597
|
+
...E
|
|
596
598
|
};
|
|
597
|
-
if (
|
|
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
|
|
611
|
+
query: async () => await k()
|
|
610
612
|
}
|
|
611
613
|
}), t;
|
|
612
|
-
}),
|
|
613
|
-
setPagination:
|
|
614
|
+
}), N = {
|
|
615
|
+
setPagination: v,
|
|
614
616
|
emit: c,
|
|
615
|
-
setProps:
|
|
616
|
-
reload:
|
|
617
|
-
deleteTableDataRecord:
|
|
618
|
-
insertTableDataRecord:
|
|
619
|
-
updateTableDataRecord:
|
|
620
|
-
updateTableData:
|
|
621
|
-
setTableData:
|
|
622
|
-
getDataSource:
|
|
623
|
-
getDataSourceRef:
|
|
624
|
-
setColumns:
|
|
625
|
-
getRawDataSource:
|
|
626
|
-
tableSearch:
|
|
627
|
-
expandTreeLevel:
|
|
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",
|
|
630
|
-
const
|
|
631
|
+
c("register", N);
|
|
632
|
+
const ue = {
|
|
631
633
|
field: "_filterTableData",
|
|
632
634
|
label: "",
|
|
633
|
-
type:
|
|
635
|
+
type: b.Search,
|
|
634
636
|
itemProps: {
|
|
635
637
|
class: "search-all-form-item"
|
|
636
638
|
},
|
|
637
639
|
componentProps: () => ({
|
|
638
640
|
onChange: (e) => {
|
|
639
|
-
|
|
641
|
+
L({
|
|
640
642
|
_filterTableData: e
|
|
641
643
|
});
|
|
642
644
|
}
|
|
643
645
|
})
|
|
644
|
-
},
|
|
645
|
-
schemas: [r.value?.formOptions?.addSearchAllSchema ?
|
|
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
|
-
},
|
|
660
|
-
e &&
|
|
661
|
-
|
|
661
|
+
}, Oe(r.value?.formOptions, ["showActionForm", "addSearchAllSchema"]), "replace"), V = (e) => (...t) => {
|
|
662
|
+
e && R(e) && e(...t), G(() => {
|
|
663
|
+
k();
|
|
662
664
|
});
|
|
663
|
-
}, [
|
|
664
|
-
|
|
665
|
-
schemas: (o(
|
|
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 ===
|
|
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 (
|
|
674
|
+
if (R(m))
|
|
673
675
|
return {
|
|
674
676
|
...e,
|
|
675
677
|
componentProps: async (x) => {
|
|
676
|
-
const
|
|
678
|
+
const _ = await m(x), he = _?.onClear;
|
|
677
679
|
return {
|
|
678
|
-
|
|
679
|
-
onClear:
|
|
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:
|
|
691
|
+
onClear: V(x)
|
|
690
692
|
}
|
|
691
693
|
};
|
|
692
694
|
}
|
|
693
695
|
}
|
|
694
696
|
return e;
|
|
695
697
|
})
|
|
696
|
-
}),
|
|
697
|
-
Reflect.has(e, "_filterTableData") &&
|
|
698
|
-
},
|
|
699
|
-
|
|
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),
|
|
705
|
+
}, 1500), Y({
|
|
704
706
|
table: f,
|
|
705
|
-
formRef:
|
|
706
|
-
pageRef:
|
|
707
|
-
...
|
|
708
|
-
}), (e, t) => (
|
|
709
|
-
class:
|
|
710
|
-
[o(
|
|
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(
|
|
713
|
-
fallback: n(() => [i(o(
|
|
714
|
-
default: n(() => [i(o(
|
|
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 ? (
|
|
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:
|
|
722
|
-
onRegister: o(
|
|
723
|
-
onSubmit:
|
|
724
|
-
onReset:
|
|
725
|
-
},
|
|
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",
|
|
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",
|
|
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",
|
|
739
|
+
fn: n((l) => [s(e.$slots, "submitAfter", h(C(l)))]),
|
|
738
740
|
key: "2"
|
|
739
|
-
} : void 0]), 1032, ["onRegister"])) :
|
|
740
|
-
empty: n(() => [r.value.loading ?
|
|
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(
|
|
743
|
-
loading: n(() => [
|
|
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 ? (
|
|
747
|
+
}, 16), r.value.showPager ? (S(), M(o(Ae), q({
|
|
746
748
|
key: 0,
|
|
747
749
|
ref_key: "pageRef",
|
|
748
|
-
ref:
|
|
750
|
+
ref: P
|
|
749
751
|
}, o(u), {
|
|
750
|
-
class: [o(
|
|
751
|
-
onCurrentChange: t[0] || (t[0] = (l) =>
|
|
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) =>
|
|
756
|
+
onSizeChange: t[1] || (t[1] = (l) => A({
|
|
755
757
|
pageSize: l
|
|
756
758
|
}))
|
|
757
|
-
}), null, 16, ["class"])) :
|
|
759
|
+
}), null, 16, ["class"])) : B("", !0)]),
|
|
758
760
|
_: 3
|
|
759
761
|
})], 2));
|
|
760
762
|
}
|
|
761
763
|
});
|
|
762
764
|
export {
|
|
763
|
-
|
|
765
|
+
wo as default
|
|
764
766
|
};
|
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
import { isNullOrUndefined as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { ref as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
}) =>
|
|
10
|
-
}),
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
if (
|
|
15
|
-
|
|
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
|
-
|
|
21
|
+
r.value = t;
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
28
|
+
return w(o(e));
|
|
29
|
+
}
|
|
30
|
+
function g() {
|
|
31
|
+
return m;
|
|
29
32
|
}
|
|
30
33
|
return {
|
|
31
34
|
getColumnsRef: e,
|
|
32
|
-
getCacheColumns:
|
|
33
|
-
getViewColumns:
|
|
34
|
-
getColumns:
|
|
35
|
-
setColumns:
|
|
35
|
+
getCacheColumns: g,
|
|
36
|
+
getViewColumns: i,
|
|
37
|
+
getColumns: C,
|
|
38
|
+
setColumns: a
|
|
36
39
|
};
|
|
37
40
|
}
|
|
38
41
|
export {
|
|
39
|
-
|
|
42
|
+
L as useColumns
|
|
40
43
|
};
|