vft 0.0.487 → 0.0.494
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/button/index.d.ts +9 -9
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/dialog/use-dialog.js +11 -11
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/message/message.vue2.js +45 -42
- package/es/components/message/types.d.ts +8 -2
- package/es/components/message/types.js +2 -1
- package/es/components/modal/modal-footer-action.vue.d.ts +1 -1
- package/es/components/modal/modal-footer-action.vue2.js +13 -15
- package/es/components/modal/modal.vue2.js +35 -36
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/select.vue.d.ts +4 -4
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/components/super-form/index.d.ts +30 -24
- package/es/components/super-form/super-form-item.vue2.js +263 -231
- package/es/components/super-form/super-form.vue.d.ts +3 -1
- package/es/components/super-form/super-form.vue2.js +153 -132
- package/es/components/super-form/types.d.ts +19 -2
- package/es/components/super-form/use/helper.d.ts +34 -0
- package/es/components/super-form/use/helper.js +81 -34
- package/es/components/switch/index.d.ts +3 -2
- package/es/components/switch/switch.vue.d.ts +1 -25
- package/es/components/switch/types.d.ts +46 -0
- package/es/components/switch/types.js +1 -0
- package/es/components/table/index.d.ts +6 -0
- package/es/components/table/table.vue.d.ts +4 -0
- package/es/components/table/table.vue2.js +164 -149
- package/es/components/tree/index.d.ts +5 -5
- package/es/components/tree/tree.vue.d.ts +2 -2
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +1 -1
- package/es/utils/form-register.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/dialog/use-dialog.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/message/types.cjs +1 -1
- package/lib/components/message/types.d.ts +8 -2
- package/lib/components/modal/modal-footer-action.vue.d.ts +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.vue.d.ts +4 -4
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/components/super-form/index.d.ts +30 -24
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue.d.ts +3 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +19 -2
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +34 -0
- package/lib/components/switch/index.d.ts +3 -2
- package/lib/components/switch/switch.vue.d.ts +1 -25
- package/lib/components/switch/types.cjs +1 -0
- package/lib/components/switch/types.d.ts +46 -0
- package/lib/components/table/index.d.ts +6 -0
- package/lib/components/table/table.vue.d.ts +4 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tree/index.d.ts +5 -5
- package/lib/components/tree/tree.vue.d.ts +2 -2
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +1 -1
- package/package.json +4 -4
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/dialog.scss +1 -1
- package/theme-style/src/message.scss +8 -4
- package/theme-style/src/super-form.scss +6 -0
- package/theme-style/src/table.scss +25 -6
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-message.css +1 -1
- package/theme-style/vft-super-form.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IconProps } from 'vft/es/components/icon';
|
|
2
|
+
import type { ComponentSize } from 'vft/es/constants';
|
|
3
|
+
export interface SwitchProps {
|
|
4
|
+
/** 绑定值,必须等于 `active-value` 或 `inactive-value`,默认为 `boolean` 类型 */
|
|
5
|
+
modelValue?: boolean | string | number;
|
|
6
|
+
/** 绑定值(非受控模式) */
|
|
7
|
+
value?: boolean | string | number;
|
|
8
|
+
/** 是否禁用 */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** switch 的宽度 */
|
|
11
|
+
width?: string | number;
|
|
12
|
+
/** 无论图标或文本是否显示在点内,只会呈现文本的第一个字符 */
|
|
13
|
+
inlinePrompt?: boolean;
|
|
14
|
+
/** switch 状态为 `on` 时所显示图标,设置此项会忽略 `active-text` */
|
|
15
|
+
activeIcon?: IconProps | string;
|
|
16
|
+
/** switch 状态为 `off` 时所显示图标,设置此项会忽略 `inactive-text` */
|
|
17
|
+
inactiveIcon?: IconProps | string;
|
|
18
|
+
/** switch 打开时的文字描述 */
|
|
19
|
+
activeText?: string;
|
|
20
|
+
/** switch 的状态为 `off` 时的文字描述 */
|
|
21
|
+
inactiveText?: string;
|
|
22
|
+
/** 当在 `on` 状态时的背景颜色(已废弃,请使用 CSS var `--vft-switch-on-color`) */
|
|
23
|
+
activeColor?: string;
|
|
24
|
+
/** `off` 状态时的背景颜色(已废弃,使用 CSS var `--vft-switch-off-color`) */
|
|
25
|
+
inactiveColor?: string;
|
|
26
|
+
/** 开关的边框颜色(已废弃,使用 CSS var `--vft-switch-border-color`) */
|
|
27
|
+
borderColor?: string;
|
|
28
|
+
/** switch 状态为 `on` 时的值 */
|
|
29
|
+
activeValue?: boolean | string | number;
|
|
30
|
+
/** switch 的状态为 `off` 时的值 */
|
|
31
|
+
inactiveValue?: boolean | string | number;
|
|
32
|
+
/** switch 对应的 name 属性 */
|
|
33
|
+
name?: string;
|
|
34
|
+
/** 改变 switch 状态时是否触发表单的校验 */
|
|
35
|
+
validateEvent?: boolean;
|
|
36
|
+
/** id for input */
|
|
37
|
+
id?: string;
|
|
38
|
+
/** 是否显示加载中 */
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/** switch 状态改变前的钩子,返回 `false` 或者返回 `Promise` 且被 reject 则停止切换 */
|
|
41
|
+
beforeChange?: () => Promise<boolean> | boolean;
|
|
42
|
+
/** switch 的大小 */
|
|
43
|
+
size?: ComponentSize;
|
|
44
|
+
/** tabindex for input */
|
|
45
|
+
tabindex?: string | number;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -513,6 +513,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
513
513
|
getRawDataSource: () => import("../types").Recordable[];
|
|
514
514
|
tableSearch: (value: any) => void;
|
|
515
515
|
table: import("vue").Ref<import("./types").TableInstance | undefined, import("./types").TableInstance | undefined>;
|
|
516
|
+
formRef: import("vue").Ref<any, any>;
|
|
516
517
|
pageRef: import("vue").Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
517
518
|
total: {
|
|
518
519
|
type: import("vue").PropType<number>;
|
|
@@ -1432,6 +1433,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
1432
1433
|
getRawDataSource: () => import("../types").Recordable[];
|
|
1433
1434
|
tableSearch: (value: any) => void;
|
|
1434
1435
|
table: import("vue").Ref<import("./types").TableInstance | undefined, import("./types").TableInstance | undefined>;
|
|
1436
|
+
formRef: import("vue").Ref<any, any>;
|
|
1435
1437
|
pageRef: import("vue").Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
1436
1438
|
total: {
|
|
1437
1439
|
type: import("vue").PropType<number>;
|
|
@@ -2235,6 +2237,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
2235
2237
|
getRawDataSource: () => import("../types").Recordable[];
|
|
2236
2238
|
tableSearch: (value: any) => void;
|
|
2237
2239
|
table: import("vue").Ref<import("./types").TableInstance | undefined, import("./types").TableInstance | undefined>;
|
|
2240
|
+
formRef: import("vue").Ref<any, any>;
|
|
2238
2241
|
pageRef: import("vue").Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
2239
2242
|
total: {
|
|
2240
2243
|
type: import("vue").PropType<number>;
|
|
@@ -2636,6 +2639,9 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
2636
2639
|
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
2637
2640
|
$slots: {
|
|
2638
2641
|
"toolbar-left"?(_: {}): any;
|
|
2642
|
+
resetBefore?(_: any): any;
|
|
2643
|
+
submitBefore?(_: any): any;
|
|
2644
|
+
submitAfter?(_: any): any;
|
|
2639
2645
|
"toolbar-right"?(_: {}): any;
|
|
2640
2646
|
empty?(_: {}): any;
|
|
2641
2647
|
};
|
|
@@ -3,6 +3,9 @@ import type { TableInstance, TableProps } from './types';
|
|
|
3
3
|
declare function setProps(props: Partial<TableProps>): void;
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
"toolbar-left"?(_: {}): any;
|
|
6
|
+
resetBefore?(_: any): any;
|
|
7
|
+
submitBefore?(_: any): any;
|
|
8
|
+
submitAfter?(_: any): any;
|
|
6
9
|
"toolbar-right"?(_: {}): any;
|
|
7
10
|
empty?(_: {}): any;
|
|
8
11
|
};
|
|
@@ -22,6 +25,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
22
25
|
getRawDataSource: () => import("../types").Recordable[];
|
|
23
26
|
tableSearch: (value: any) => void;
|
|
24
27
|
table: import("vue").Ref<TableInstance | undefined, TableInstance | undefined>;
|
|
28
|
+
formRef: import("vue").Ref<any, any>;
|
|
25
29
|
pageRef: import("vue").Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
26
30
|
total: {
|
|
27
31
|
type: import("vue").PropType<number>;
|
|
@@ -1,40 +1,40 @@
|
|
|
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 V, createVNode as c, useAttrs as le, ref as g, getCurrentInstance as re, computed as F, unref as e, watch as ne, nextTick as ie, toRaw as ce, createElementBlock as se, openBlock as C, normalizeClass as ge, withCtx as n, createBlock as T, createCommentVNode as A, mergeProps as E, withDirectives as fe, createElementVNode as de, vShow as ue, renderSlot as s, normalizeProps as u, guardReactiveProps as m, createSlots as me, createTextVNode as pe } from "vue";
|
|
2
|
+
import { VftClientOnly as he } from "../client-only/index.js";
|
|
3
|
+
import { VftEmpty as be } from "../empty/index.js";
|
|
4
|
+
import { vLoading as Ce } from "../loading/directive.js";
|
|
5
|
+
import { deepMerge as N, isClient as ye, omit as we, isFunction as ve } from "@vft/utils";
|
|
6
|
+
import { FormCompEnum as ke } 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 xe } from "../super-form/use/use-form.js";
|
|
11
|
+
import { useNamespace as Se } 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 { VxeGrid as
|
|
20
|
-
import
|
|
21
|
-
import { PageSize as
|
|
22
|
-
import { useColumns as
|
|
23
|
-
import { useDataSource as
|
|
24
|
-
import { useLoading as
|
|
25
|
-
import { usePagination as
|
|
26
|
-
import { EmptyEnum as
|
|
27
|
-
const
|
|
16
|
+
import { VftPagination as Be } from "../pagination/index.js";
|
|
17
|
+
import { VftSkeleton as Re } from "../skeleton/index.js";
|
|
18
|
+
import { VftSuperForm as ze } from "../super-form/index.js";
|
|
19
|
+
import { VxeGrid as Pe } from "vxe-table";
|
|
20
|
+
import De from "xe-utils";
|
|
21
|
+
import { PageSize as O } from "./constants.js";
|
|
22
|
+
import { useColumns as He } from "./use/use-columns.js";
|
|
23
|
+
import { useDataSource as Fe } from "./use/use-data-source.js";
|
|
24
|
+
import { useLoading as Te } from "./use/use-loading.js";
|
|
25
|
+
import { usePagination as Ae } from "./use/use-pagination.js";
|
|
26
|
+
import { EmptyEnum as Ee } from "../empty/constants.js";
|
|
27
|
+
const Ne = V({
|
|
28
28
|
name: "vft-table"
|
|
29
|
-
}),
|
|
30
|
-
...
|
|
29
|
+
}), st = /* @__PURE__ */ V({
|
|
30
|
+
...Ne,
|
|
31
31
|
props: {
|
|
32
32
|
sticky: {
|
|
33
33
|
type: [Boolean, Object]
|
|
34
34
|
},
|
|
35
35
|
api: {},
|
|
36
36
|
pageSize: {
|
|
37
|
-
default:
|
|
37
|
+
default: O
|
|
38
38
|
},
|
|
39
39
|
total: {},
|
|
40
40
|
rowkey: {
|
|
@@ -52,7 +52,7 @@ const Te = N({
|
|
|
52
52
|
beforeFetch: {},
|
|
53
53
|
delEmptyParams: {
|
|
54
54
|
type: [Boolean, String],
|
|
55
|
-
default:
|
|
55
|
+
default: "strict"
|
|
56
56
|
},
|
|
57
57
|
afterFetch: {},
|
|
58
58
|
transformParams: {
|
|
@@ -79,13 +79,13 @@ const Te = N({
|
|
|
79
79
|
onChange: {},
|
|
80
80
|
emptyCfg: {
|
|
81
81
|
default: () => ({
|
|
82
|
-
type:
|
|
82
|
+
type: Ee.NoData
|
|
83
83
|
})
|
|
84
84
|
},
|
|
85
85
|
loadingCfg: {
|
|
86
86
|
default: () => ({
|
|
87
87
|
customClass: "vft-card-loading",
|
|
88
|
-
text: c("div", null, [c("span", null, [
|
|
88
|
+
text: c("div", null, [c("span", null, [pe("加载中")]), c("span", {
|
|
89
89
|
class: "dot"
|
|
90
90
|
}, null)])
|
|
91
91
|
})
|
|
@@ -399,66 +399,66 @@ const Te = N({
|
|
|
399
399
|
"toolbar-tool-click",
|
|
400
400
|
"zoom"
|
|
401
401
|
],
|
|
402
|
-
setup(
|
|
403
|
-
expose:
|
|
404
|
-
emit:
|
|
402
|
+
setup(Oe, {
|
|
403
|
+
expose: $,
|
|
404
|
+
emit: _
|
|
405
405
|
}) {
|
|
406
|
-
const
|
|
407
|
-
getLoading:
|
|
408
|
-
setLoading:
|
|
409
|
-
} =
|
|
410
|
-
getPaginationInfo:
|
|
411
|
-
setPagination:
|
|
412
|
-
getCurrentPage:
|
|
413
|
-
} =
|
|
414
|
-
getViewColumns:
|
|
415
|
-
setColumns:
|
|
416
|
-
} =
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
406
|
+
const i = _, f = Se("table"), q = le(), y = g(), w = g(), M = g([]), p = g(), h = g(), L = re(), a = F(() => N(L.props, e(p))), {
|
|
407
|
+
getLoading: G,
|
|
408
|
+
setLoading: I
|
|
409
|
+
} = Te(a), {
|
|
410
|
+
getPaginationInfo: d,
|
|
411
|
+
setPagination: b,
|
|
412
|
+
getCurrentPage: K
|
|
413
|
+
} = Ae(a), {
|
|
414
|
+
getViewColumns: X,
|
|
415
|
+
setColumns: j
|
|
416
|
+
} = He(a);
|
|
417
|
+
ne(() => K(), (t) => {
|
|
418
|
+
ie(() => {
|
|
419
|
+
v({
|
|
420
420
|
seqConfig: {
|
|
421
|
-
startIndex: (
|
|
421
|
+
startIndex: (t - 1) * (d.value?.pageSize || e(a).pageSize || O)
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
424
|
});
|
|
425
425
|
}, {
|
|
426
426
|
immediate: !0
|
|
427
427
|
});
|
|
428
|
-
function
|
|
429
|
-
|
|
430
|
-
...e(
|
|
431
|
-
...
|
|
428
|
+
function v(t) {
|
|
429
|
+
p.value = {
|
|
430
|
+
...e(p),
|
|
431
|
+
...t
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
434
|
const {
|
|
435
|
-
getDataSourceRef:
|
|
436
|
-
handleTableChange:
|
|
437
|
-
reload:
|
|
438
|
-
deleteTableDataRecord:
|
|
439
|
-
insertTableDataRecord:
|
|
440
|
-
updateTableData:
|
|
441
|
-
updateTableDataRecord:
|
|
442
|
-
setTableData:
|
|
443
|
-
getDataSource:
|
|
444
|
-
getRawDataSource:
|
|
445
|
-
tableSearch:
|
|
446
|
-
} =
|
|
447
|
-
tableData:
|
|
448
|
-
setLoading:
|
|
449
|
-
getPaginationInfo:
|
|
450
|
-
setPagination:
|
|
451
|
-
},
|
|
452
|
-
function
|
|
453
|
-
|
|
435
|
+
getDataSourceRef: k,
|
|
436
|
+
handleTableChange: Y,
|
|
437
|
+
reload: x,
|
|
438
|
+
deleteTableDataRecord: W,
|
|
439
|
+
insertTableDataRecord: U,
|
|
440
|
+
updateTableData: J,
|
|
441
|
+
updateTableDataRecord: Q,
|
|
442
|
+
setTableData: S,
|
|
443
|
+
getDataSource: Z,
|
|
444
|
+
getRawDataSource: B,
|
|
445
|
+
tableSearch: R
|
|
446
|
+
} = Fe(a, {
|
|
447
|
+
tableData: M,
|
|
448
|
+
setLoading: I,
|
|
449
|
+
getPaginationInfo: d,
|
|
450
|
+
setPagination: b
|
|
451
|
+
}, i);
|
|
452
|
+
function z(t) {
|
|
453
|
+
t?.pageSize && b({
|
|
454
454
|
currentPage: 1
|
|
455
|
-
}),
|
|
455
|
+
}), Y(t), i("change", t);
|
|
456
456
|
const {
|
|
457
457
|
onChange: o
|
|
458
|
-
} = e(
|
|
459
|
-
o &&
|
|
458
|
+
} = e(a);
|
|
459
|
+
o && ve(o) && o(t);
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const P = {};
|
|
462
462
|
[
|
|
463
463
|
"update:data",
|
|
464
464
|
"keydown-start",
|
|
@@ -579,67 +579,67 @@ const Te = N({
|
|
|
579
579
|
"toolbar-button-click",
|
|
580
580
|
"toolbar-tool-click",
|
|
581
581
|
"zoom"
|
|
582
|
-
].forEach((
|
|
583
|
-
const o =
|
|
584
|
-
|
|
582
|
+
].forEach((t) => {
|
|
583
|
+
const o = De.camelCase(`on-${t}`);
|
|
584
|
+
P[o] = (...l) => i(t, ...l);
|
|
585
585
|
});
|
|
586
|
-
const
|
|
587
|
-
const
|
|
588
|
-
...
|
|
589
|
-
...e(
|
|
590
|
-
columns:
|
|
591
|
-
loading: e(
|
|
592
|
-
data:
|
|
593
|
-
...
|
|
586
|
+
const r = F(() => {
|
|
587
|
+
const t = e(k), o = {
|
|
588
|
+
...q,
|
|
589
|
+
...e(a),
|
|
590
|
+
columns: ce(e(X)),
|
|
591
|
+
loading: e(G),
|
|
592
|
+
data: t,
|
|
593
|
+
...P
|
|
594
594
|
};
|
|
595
|
-
if (
|
|
596
|
-
(e(
|
|
597
|
-
const
|
|
598
|
-
o.minHeight =
|
|
595
|
+
if (ye) {
|
|
596
|
+
(e(a)?.addMaxHeight || e(a)?.maxHeight) && (o.maxHeight = e(a)?.maxHeight ? e(a)?.maxHeight : `${window.innerHeight - e(a)?.extraSysHeight - (a.value?.showPager ? a.value?.pageHeight || 40 : 0)}px`);
|
|
597
|
+
const l = e(a)?.minHeight;
|
|
598
|
+
o.minHeight = l || (l !== 0 && e(a)?.toolbarConfig?.custom ? 300 : void 0);
|
|
599
599
|
}
|
|
600
|
-
return e(
|
|
600
|
+
return e(a)?.toolbarConfig?.refresh && (o.proxyConfig = e(a)?.proxyConfig || {
|
|
601
601
|
response: {
|
|
602
|
-
result: e(
|
|
603
|
-
total: e(
|
|
602
|
+
result: e(a)?.fetchSetting?.listField,
|
|
603
|
+
total: e(a)?.fetchSetting?.totalField
|
|
604
604
|
},
|
|
605
605
|
autoLoad: !1,
|
|
606
606
|
ajax: {
|
|
607
|
-
query: async () => await
|
|
607
|
+
query: async () => await x()
|
|
608
608
|
}
|
|
609
609
|
}), o;
|
|
610
|
-
}),
|
|
611
|
-
setPagination:
|
|
612
|
-
emit:
|
|
613
|
-
setProps:
|
|
614
|
-
reload:
|
|
615
|
-
deleteTableDataRecord:
|
|
616
|
-
insertTableDataRecord:
|
|
617
|
-
updateTableDataRecord:
|
|
618
|
-
updateTableData:
|
|
619
|
-
setTableData:
|
|
620
|
-
getDataSource:
|
|
621
|
-
getDataSourceRef:
|
|
622
|
-
setColumns:
|
|
623
|
-
getRawDataSource:
|
|
624
|
-
tableSearch:
|
|
610
|
+
}), D = {
|
|
611
|
+
setPagination: b,
|
|
612
|
+
emit: i,
|
|
613
|
+
setProps: v,
|
|
614
|
+
reload: x,
|
|
615
|
+
deleteTableDataRecord: W,
|
|
616
|
+
insertTableDataRecord: U,
|
|
617
|
+
updateTableDataRecord: Q,
|
|
618
|
+
updateTableData: J,
|
|
619
|
+
setTableData: S,
|
|
620
|
+
getDataSource: Z,
|
|
621
|
+
getDataSourceRef: k,
|
|
622
|
+
setColumns: j,
|
|
623
|
+
getRawDataSource: B,
|
|
624
|
+
tableSearch: R
|
|
625
625
|
};
|
|
626
|
-
|
|
627
|
-
const
|
|
626
|
+
i("register", D);
|
|
627
|
+
const ee = {
|
|
628
628
|
field: "_filterTableData",
|
|
629
629
|
label: "",
|
|
630
|
-
type:
|
|
630
|
+
type: ke.Search,
|
|
631
631
|
itemProps: {
|
|
632
632
|
class: "search-all-form-item"
|
|
633
633
|
},
|
|
634
634
|
componentProps: () => ({
|
|
635
|
-
onChange: (
|
|
636
|
-
|
|
637
|
-
_filterTableData:
|
|
635
|
+
onChange: (t) => {
|
|
636
|
+
H({
|
|
637
|
+
_filterTableData: t
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
640
|
})
|
|
641
|
-
},
|
|
642
|
-
schemas: [
|
|
641
|
+
}, te = N({
|
|
642
|
+
schemas: [r.value?.formOptions?.addSearchAllSchema ? ee : {}],
|
|
643
643
|
rowProps: {
|
|
644
644
|
justify: "start"
|
|
645
645
|
},
|
|
@@ -653,53 +653,68 @@ const Te = N({
|
|
|
653
653
|
btnText: "搜索"
|
|
654
654
|
},
|
|
655
655
|
actionInline: !0
|
|
656
|
-
},
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
), "replace")), R = (a) => {
|
|
661
|
-
Reflect.has(a, "_filterTableData") && k(a._filterTableData), n("form-submit", a);
|
|
662
|
-
}, Z = () => {
|
|
663
|
-
v(x()), n("form-reset");
|
|
656
|
+
}, we(r.value?.formOptions, ["showActionForm", "addSearchAllSchema"]), "replace"), [ae] = xe(te), H = (t) => {
|
|
657
|
+
Reflect.has(t, "_filterTableData") && R(t._filterTableData), i("form-submit", t);
|
|
658
|
+
}, oe = () => {
|
|
659
|
+
S(B()), i("form-reset");
|
|
664
660
|
};
|
|
665
|
-
return
|
|
666
|
-
table:
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
661
|
+
return $({
|
|
662
|
+
table: y,
|
|
663
|
+
formRef: h,
|
|
664
|
+
pageRef: w,
|
|
665
|
+
...D
|
|
666
|
+
}), (t, o) => (C(), se("div", {
|
|
667
|
+
class: ge([e(f).b(), {
|
|
668
|
+
[e(f).is("form-exceed-one-rows")]: h.value?.willExceedOneRow
|
|
669
|
+
}])
|
|
670
|
+
}, [c(e(he), null, {
|
|
671
|
+
fallback: n(() => [c(e(Re))]),
|
|
672
|
+
default: n(() => [c(e(Pe), E({
|
|
674
673
|
ref_key: "xGrid",
|
|
675
|
-
ref:
|
|
676
|
-
},
|
|
677
|
-
toolbarButtons:
|
|
674
|
+
ref: y
|
|
675
|
+
}, r.value), {
|
|
676
|
+
toolbarButtons: n(() => [s(t.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (C(), T(e(ze), {
|
|
678
677
|
key: 0,
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
678
|
+
ref_key: "formRef",
|
|
679
|
+
ref: h,
|
|
680
|
+
onRegister: e(ae),
|
|
681
|
+
onSubmit: H,
|
|
682
|
+
onReset: oe
|
|
683
|
+
}, me({
|
|
684
|
+
_: 2
|
|
685
|
+
}, [t.$slots.resetBefore ? {
|
|
686
|
+
name: "resetBefore",
|
|
687
|
+
fn: n((l) => [s(t.$slots, "resetBefore", u(m(l)))]),
|
|
688
|
+
key: "0"
|
|
689
|
+
} : void 0, t.$slots.submitBefore ? {
|
|
690
|
+
name: "submitBefore",
|
|
691
|
+
fn: n((l) => [s(t.$slots, "submitBefore", u(m(l)))]),
|
|
692
|
+
key: "1"
|
|
693
|
+
} : void 0, t.$slots.submitAfter ? {
|
|
694
|
+
name: "submitAfter",
|
|
695
|
+
fn: n((l) => [s(t.$slots, "submitAfter", u(m(l)))]),
|
|
696
|
+
key: "2"
|
|
697
|
+
} : void 0]), 1032, ["onRegister"])) : A("", !0), s(t.$slots, "toolbar-right")]),
|
|
698
|
+
empty: n(() => [s(t.$slots, "empty", {}, () => [c(e(be), u(m(r.value.emptyCfg)), null, 16)])]),
|
|
699
|
+
loading: n(() => [fe(de("div", null, null, 512), [[ue, r.value.loading], [e(Ce), r.value.loadingCfg]])]),
|
|
685
700
|
_: 3
|
|
686
|
-
}, 16),
|
|
701
|
+
}, 16), r.value.showPager ? (C(), T(e(Be), E({
|
|
687
702
|
key: 0,
|
|
688
703
|
ref_key: "pageRef",
|
|
689
|
-
ref:
|
|
690
|
-
}, e(
|
|
691
|
-
class: [e(
|
|
692
|
-
onCurrentChange: o[0] || (o[0] = (
|
|
693
|
-
currentPage:
|
|
704
|
+
ref: w
|
|
705
|
+
}, e(d), {
|
|
706
|
+
class: [e(f).e("pager"), e(f).m(`pager-${e(d)?.pagePlacement}`)],
|
|
707
|
+
onCurrentChange: o[0] || (o[0] = (l) => z({
|
|
708
|
+
currentPage: l
|
|
694
709
|
})),
|
|
695
|
-
onSizeChange: o[1] || (o[1] = (
|
|
696
|
-
pageSize:
|
|
710
|
+
onSizeChange: o[1] || (o[1] = (l) => z({
|
|
711
|
+
pageSize: l
|
|
697
712
|
}))
|
|
698
|
-
}), null, 16, ["class"])) :
|
|
713
|
+
}), null, 16, ["class"])) : A("", !0)]),
|
|
699
714
|
_: 3
|
|
700
715
|
})], 2));
|
|
701
716
|
}
|
|
702
717
|
});
|
|
703
718
|
export {
|
|
704
|
-
|
|
719
|
+
st as default
|
|
705
720
|
};
|
|
@@ -97,6 +97,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
97
97
|
};
|
|
98
98
|
}>> & Readonly<{
|
|
99
99
|
"onCurrent-change"?: (() => any) | undefined;
|
|
100
|
+
onCheck?: (() => any) | undefined;
|
|
100
101
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
101
102
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
102
103
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -108,7 +109,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
108
109
|
"onNode-click"?: (() => any) | undefined;
|
|
109
110
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
110
111
|
"onNode-collapse"?: (() => any) | undefined;
|
|
111
|
-
onCheck?: (() => any) | undefined;
|
|
112
112
|
}>, {
|
|
113
113
|
filter: (value: any) => void;
|
|
114
114
|
getNodeKey: (node: import("./model/node").default) => any;
|
|
@@ -134,6 +134,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
134
134
|
updateNode: (data: import("./tree.type").TreeData, refNode: import("./tree.type").TreeKey | import("./tree.type").TreeNodeData | import("./model/node").default) => void;
|
|
135
135
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
136
136
|
"current-change": () => void;
|
|
137
|
+
check: () => void;
|
|
137
138
|
"node-drag-start": () => void;
|
|
138
139
|
"node-drag-leave": () => void;
|
|
139
140
|
"node-drag-enter": () => void;
|
|
@@ -145,7 +146,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
145
146
|
"node-click": () => void;
|
|
146
147
|
"node-contextmenu": () => void;
|
|
147
148
|
"node-collapse": () => void;
|
|
148
|
-
check: () => void;
|
|
149
149
|
}, import("vue").PublicProps, {
|
|
150
150
|
data: Array<any>;
|
|
151
151
|
props: import("./tree.type").TreeComponentProps["props"];
|
|
@@ -251,6 +251,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
251
251
|
};
|
|
252
252
|
}>> & Readonly<{
|
|
253
253
|
"onCurrent-change"?: (() => any) | undefined;
|
|
254
|
+
onCheck?: (() => any) | undefined;
|
|
254
255
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
255
256
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
256
257
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -262,7 +263,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
262
263
|
"onNode-click"?: (() => any) | undefined;
|
|
263
264
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
264
265
|
"onNode-collapse"?: (() => any) | undefined;
|
|
265
|
-
onCheck?: (() => any) | undefined;
|
|
266
266
|
}>, {
|
|
267
267
|
filter: (value: any) => void;
|
|
268
268
|
getNodeKey: (node: import("./model/node").default) => any;
|
|
@@ -388,6 +388,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
388
388
|
};
|
|
389
389
|
}>> & Readonly<{
|
|
390
390
|
"onCurrent-change"?: (() => any) | undefined;
|
|
391
|
+
onCheck?: (() => any) | undefined;
|
|
391
392
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
392
393
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
393
394
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -399,7 +400,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
399
400
|
"onNode-click"?: (() => any) | undefined;
|
|
400
401
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
401
402
|
"onNode-collapse"?: (() => any) | undefined;
|
|
402
|
-
onCheck?: (() => any) | undefined;
|
|
403
403
|
}>, {
|
|
404
404
|
filter: (value: any) => void;
|
|
405
405
|
getNodeKey: (node: import("./model/node").default) => any;
|
|
@@ -425,6 +425,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
425
425
|
updateNode: (data: import("./tree.type").TreeData, refNode: import("./tree.type").TreeKey | import("./tree.type").TreeNodeData | import("./model/node").default) => void;
|
|
426
426
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
427
427
|
"current-change": () => void;
|
|
428
|
+
check: () => void;
|
|
428
429
|
"node-drag-start": () => void;
|
|
429
430
|
"node-drag-leave": () => void;
|
|
430
431
|
"node-drag-enter": () => void;
|
|
@@ -436,7 +437,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
436
437
|
"node-click": () => void;
|
|
437
438
|
"node-contextmenu": () => void;
|
|
438
439
|
"node-collapse": () => void;
|
|
439
|
-
check: () => void;
|
|
440
440
|
}, string, {
|
|
441
441
|
data: Array<any>;
|
|
442
442
|
props: import("./tree.type").TreeComponentProps["props"];
|
|
@@ -69,6 +69,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
69
69
|
updateNode: (data: TreeData, refNode: TreeKey | TreeNodeData | Node) => void;
|
|
70
70
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
71
71
|
"current-change": () => void;
|
|
72
|
+
check: () => void;
|
|
72
73
|
"node-drag-start": () => void;
|
|
73
74
|
"node-drag-leave": () => void;
|
|
74
75
|
"node-drag-enter": () => void;
|
|
@@ -80,7 +81,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
80
81
|
"node-click": () => void;
|
|
81
82
|
"node-contextmenu": () => void;
|
|
82
83
|
"node-collapse": () => void;
|
|
83
|
-
check: () => void;
|
|
84
84
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TreeProps>, {
|
|
85
85
|
renderAfterExpand: boolean;
|
|
86
86
|
expandOnClickNode: boolean;
|
|
@@ -94,6 +94,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
94
94
|
indent: number;
|
|
95
95
|
}>>> & Readonly<{
|
|
96
96
|
"onCurrent-change"?: (() => any) | undefined;
|
|
97
|
+
onCheck?: (() => any) | undefined;
|
|
97
98
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
98
99
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
99
100
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -105,7 +106,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
105
106
|
"onNode-click"?: (() => any) | undefined;
|
|
106
107
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
107
108
|
"onNode-collapse"?: (() => any) | undefined;
|
|
108
|
-
onCheck?: (() => any) | undefined;
|
|
109
109
|
}>, {
|
|
110
110
|
data: Array<any>;
|
|
111
111
|
props: TreeComponentProps["props"];
|