@ibiz-template/vue3-components 0.7.41-alpha.12 → 0.7.41-alpha.13
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/ibiz-markdown-editor-0VHzFa2l.js +1 -0
- package/dist/index-LzKAcXeH.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-TYKjfyR5.js → wang-editor-Iw-hqw1q.js} +1 -1
- package/dist/{xlsx-util-Q9msA8ef.js → xlsx-util-FnTIZeKq.js} +1 -1
- package/es/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +76 -2
- package/es/control/data-view/data-view.d.ts +1 -1
- package/es/control/data-view/index.d.ts +1 -1
- package/es/control/form/form/index.mjs +2 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.css +1 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.d.ts +29 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.mjs +53 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.provider.d.ts +13 -0
- package/es/control/form/form-detail/form-iframe/form-iframe.provider.mjs +21 -0
- package/es/control/form/form-detail/form-iframe/index.d.ts +25 -0
- package/es/control/form/form-detail/form-iframe/index.mjs +12 -0
- package/es/control/form/form-detail/form-item/form-item.css +1 -1
- package/es/control/form/form-detail/form-item/form-item.mjs +6 -4
- package/es/control/form/form-detail/index.d.ts +1 -0
- package/es/control/form/form-detail/index.mjs +1 -0
- package/es/control/form/index.mjs +1 -0
- package/es/control/gantt/gantt.d.ts +1 -1
- package/es/control/gantt/index.d.ts +1 -1
- package/es/control/grid/grid/grid.d.ts +1 -1
- package/es/control/grid/grid/index.d.ts +1 -1
- package/es/control/grid/grid/index.mjs +2 -0
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +4 -4
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +5 -8
- package/es/control/grid/virtualized-table/index.d.ts +136 -0
- package/es/control/grid/virtualized-table/index.mjs +18 -0
- package/es/control/grid/virtualized-table/virtualized-table.css +1 -0
- package/es/control/grid/virtualized-table/virtualized-table.d.ts +200 -0
- package/es/control/grid/virtualized-table/virtualized-table.mjs +325 -0
- package/es/control/grid/virtualized-table/virtualized-table.provider.d.ts +10 -0
- package/es/control/grid/virtualized-table/virtualized-table.provider.mjs +14 -0
- package/es/control/grid/virtualized-table/virtualized-table.util.d.ts +95 -0
- package/es/control/grid/virtualized-table/virtualized-table.util.mjs +191 -0
- package/es/control/index.mjs +1 -0
- package/es/control/kanban/index.d.ts +44 -1
- package/es/control/kanban/kanban.d.ts +56 -1
- package/es/control/kanban/kanban.mjs +36 -2
- package/es/control/list/index.d.ts +1 -1
- package/es/control/list/list.d.ts +1 -1
- package/es/control/list/list.mjs +1 -1
- package/es/control/search-bar/search-bar.mjs +3 -0
- package/es/control/tree/index.d.ts +1 -1
- package/es/control/tree/tree.d.ts +1 -1
- package/es/control/tree-grid/index.d.ts +1 -1
- package/es/control/tree-grid/tree-grid.d.ts +1 -1
- package/es/editor/array/ibiz-array/ibiz-array.css +1 -1
- package/es/editor/array/ibiz-array/ibiz-array.mjs +4 -1
- package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +1 -1
- package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.d.ts +1 -1
- package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.d.ts +3 -2
- package/es/editor/date-range-select/date-range-select-picker/date-range-select.d.ts +5 -5
- package/es/editor/date-range-select/date-range-select.controller.mjs +9 -0
- package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +1 -0
- package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.d.ts +4 -3
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.d.ts +10 -7
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +5 -5
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +1 -1
- package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +3 -3
- package/es/editor/span/span/span.d.ts +1 -1
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.d.ts +3 -77
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.mjs +167 -108
- package/es/editor/text-box/input/input.d.ts +4 -4
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +1 -1
- package/es/index.mjs +1 -0
- package/es/panel-component/panel-button/panel-button.controller.mjs +2 -1
- package/es/panel-component/panel-button/panel-button.mjs +1 -1
- package/es/util/app-util/app-util.d.ts +54 -2
- package/es/util/app-util/app-util.mjs +48 -1
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +76 -2
- package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/lib/control/form/form/index.cjs +2 -0
- package/lib/control/form/form-detail/form-iframe/form-iframe.cjs +58 -0
- package/lib/control/form/form-detail/form-iframe/form-iframe.css +1 -0
- package/lib/control/form/form-detail/form-iframe/form-iframe.provider.cjs +23 -0
- package/lib/control/form/form-detail/form-iframe/index.cjs +17 -0
- package/lib/control/form/form-detail/form-item/form-item.cjs +5 -3
- package/lib/control/form/form-detail/form-item/form-item.css +1 -1
- package/lib/control/form/form-detail/index.cjs +2 -0
- package/lib/control/form/index.cjs +6 -4
- package/lib/control/grid/grid/index.cjs +2 -0
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +3 -6
- package/lib/control/grid/virtualized-table/index.cjs +23 -0
- package/lib/control/grid/virtualized-table/virtualized-table.cjs +327 -0
- package/lib/control/grid/virtualized-table/virtualized-table.css +1 -0
- package/lib/control/grid/virtualized-table/virtualized-table.provider.cjs +16 -0
- package/lib/control/grid/virtualized-table/virtualized-table.util.cjs +193 -0
- package/lib/control/index.cjs +82 -80
- package/lib/control/kanban/kanban.cjs +34 -0
- package/lib/control/list/list.cjs +1 -1
- package/lib/control/search-bar/search-bar.cjs +3 -0
- package/lib/editor/array/ibiz-array/ibiz-array.cjs +4 -1
- package/lib/editor/array/ibiz-array/ibiz-array.css +1 -1
- package/lib/editor/date-range-select/date-range-select.controller.cjs +9 -0
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +5 -5
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.css +1 -1
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +1 -1
- package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.cjs +166 -107
- package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
- package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +1 -1
- package/lib/index.cjs +112 -110
- package/lib/panel-component/panel-button/panel-button.cjs +1 -1
- package/lib/panel-component/panel-button/panel-button.controller.cjs +2 -1
- package/lib/util/app-util/app-util.cjs +47 -0
- package/package.json +4 -4
- package/dist/ibiz-markdown-editor-KyK5mBTS.js +0 -1
- package/dist/index-pyv7Wdpx.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-control-virtualized-table{--ibiz-control-virtualized-table-text-color:var(--ibiz-color-text-0);--ibiz-control-virtualized-table-bg-color:transparent;--ibiz-control-virtualized-table-padding:var(--ibiz-spacing-none);--ibiz-control-virtualized-table-cell-padding:var(--ibiz-spacing-tight);--ibiz-control-virtualized-table-selection-padding:var(--ibiz-spacing-base-loose);--ibiz-control-virtualized-table-row-edit-bg-color:var(--ibiz-color-fill-2);--ibiz-control-virtualized-table-row-bg-color:var(--ibiz-color-bg-1);--ibiz-control-virtualized-table-row-bg-color-2:var(--ibiz-color-bg-0);--ibiz-control-virtualized-table-row-hover-color:rgba(var(--ibiz-grey-1), 1);--ibiz-control-virtualized-table-row-select-color:var(--ibiz-color-primary-light-default);--ibiz-control-virtualized-table-row-expand-icon-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-none) var(--ibiz-spacing-none) var(--ibiz-spacing-tight);--ibiz-control-virtualized-table-now-header-height:54px;--ibiz-control-virtualized-table-scrollbar-width:4px;--ibiz-control-virtualized-table-scrollbar-bg-color:var(--ibiz-color-fill-2);--ibiz-control-virtualized-table-scrollbar-bg-hover-opacity:0.5;--ibiz-control-virtualized-table-scrollbar-bg-hover-color:var(--ibiz-color-fill-2);--ibiz-control-virtualized-table-header-text-color:var(--ibiz-color-text-2);--ibiz-control-virtualized-table-header-cell-padding:calc(var(--ibiz-spacing-base-tight) / 2) var(--ibiz-spacing-base-tight);--ibiz-control-virtualized-table-header-height:auto;--ibiz-control-virtualized-table-header-min-height:54px;--ibiz-control-virtualized-table-header-bg-color:rgba(var(--ibiz-grey-1), 1);--ibiz-control-virtualized-table-header-font-size:var(--ibiz-font-size-regular);--ibiz-control-virtualized-table-header-font-weight:var(--ibiz-font-weight-regular);--ibiz-control-virtualized-table-content-text-color:var(--ibiz-control-virtualized-table-text-color);--ibiz-control-virtualized-table-content-row-height:48px;--ibiz-control-virtualized-table-page-text-color:var(--ibiz-color-text-2);--ibiz-control-virtualized-table-page-height:50px;--ibiz-control-virtualized-table-page-padding:var(--ibiz-spacing-none) var(--ibiz-spacing-base-tight);--ibiz-control-virtualized-table-footer-text-color:var(--ibiz-color-text-2);--ibiz-control-virtualized-table-footer-bg-color:rgba(var(--ibiz-grey-1), 1);--ibiz-control-virtualized-table-footer-font-size:var(--ibiz-font-size-regular);--ibiz-control-virtualized-table-footer-font-weight:var(--ibiz-font-weight-bold);position:relative;width:100%;height:100%;padding:var(--ibiz-control-virtualized-table-padding);background-color:var(--ibiz-control-virtualized-table-bg-color)}.ibiz-control-virtualized-table.is-enable-page .el-auto-resizer{height:calc(100% - var(--ibiz-control-virtualized-table-page-height))!important}.ibiz-control-virtualized-table.is-enable-page .el-table-v2__empty{height:calc(100% - var(--ibiz-control-virtualized-table-page-height))}.ibiz-control-virtualized-table__table{width:100%;height:100%}.ibiz-control-virtualized-table__table.el-table-v2{--el-table-header-bg-color:var(--ibiz-control-virtualized-table-header-bg-color);--el-table-border-color:transparent}.ibiz-control-virtualized-table__table .el-table-v2__empty{height:100%}.ibiz-control-virtualized-table__table .el-table-v2__header-row,.ibiz-control-virtualized-table__table .el-table-v2__row{border:none}.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__header-cell,.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__row-cell{padding:var(--ibiz-control-virtualized-table-cell-padding)}.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__header-cell:not(.is-selection),.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__row-cell:not(.is-selection){cursor:pointer}.ibiz-control-virtualized-table__table .el-table-v2__main{background-color:transparent}.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__body .el-table-v2__row .el-table-v2__row-cell{background:var(--ibiz-control-grid-row-bg-color)}.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__body .el-table-v2__row:nth-child(2n) .el-table-v2__row-cell{background-color:var(--ibiz-control-grid-row-bg-color-2)}.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__body .el-table-v2__row:hover .el-table-v2__row-cell{background-color:var(--ibiz-control-grid-row-hover-color)}.ibiz-control-virtualized-table__table.el-table-v2 .el-table-v2__body .el-table-v2__row.is-selected .el-table-v2__row-cell{background-color:var(--ibiz-control-virtualized-table-row-select-color)}.ibiz-control-virtualized-table__table .el-table-v2__body{color:var(--ibiz-control-grid-content-text-color);--ibiz-color-text-0:var(--ibiz-control-grid-content-text-color);--ibiz-color-text-1:var(--ibiz-control-grid-content-text-color);--ibiz-color-text-2:var(--ibiz-control-grid-content-text-color);--ibiz-color-text-3:var(--ibiz-control-grid-content-text-color);border-bottom:.1px solid var(--ibiz-color-border)}.ibiz-control-virtualized-table__header-cell{font-size:var(--ibiz-control-grid-header-font-size);font-weight:var(--ibiz-control-grid-header-font-weight);color:var(--ibiz-control-grid-header-text-color);word-break:break-word;white-space:pre-wrap}.ibiz-control-virtualized-table__caret-wrapper{display:inline-flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;width:24px;height:14px;overflow:initial;line-height:23px;vertical-align:middle;cursor:pointer}.ibiz-control-virtualized-table__caret-wrapper--sort-caret{width:0;height:0;border:solid 5px transparent;opacity:.6}.ibiz-control-virtualized-table__caret-wrapper--asc{border-bottom-color:var(--ibiz-color-text-2)}.ibiz-control-virtualized-table__caret-wrapper--asc.is-active{border-bottom-color:var(--ibiz-color-primary)}.ibiz-control-virtualized-table__caret-wrapper--desc{border-top-color:var(--ibiz-color-text-2)}.ibiz-control-virtualized-table__caret-wrapper--desc.is-active{border-top-color:var(--ibiz-color-primary)}.ibiz-control-virtualized-table__quick-toolbar{justify-content:center}.ibiz-control-virtualized-table__batch-toolbar{position:absolute;top:0;left:54px;z-index:99;display:none;width:calc(100% - 54px);height:var(--ibiz-control-virtualized-table-now-header-height);font-size:var(--ibiz-font-size-regular);font-weight:var(--ibiz-font-weight-regular);background-color:var(--ibiz-control-virtualized-table-header-bg-color)}.ibiz-control-virtualized-table__batch-toolbar.is-show{display:flex;align-items:center;justify-content:flex-start}.ibiz-control-virtualized-table__batch-toolbar--separator{padding:0 var(--ibiz-spacing-base-tight)}.ibiz-control-virtualized-table__batch-toolbar--content{height:100%;display:flex;align-items:center;justify-content:flex-start}.ibiz-control-virtualized-table.is-enable-customized .ibiz-control-virtualized-table__setting-box{display:flex;align-items:center;justify-content:flex-start;position:absolute;top:0;right:0;z-index:1;height:var(--ibiz-control-virtualized-table-now-header-height);padding-right:var(--ibiz-spacing-extra-tight);background-color:var(--ibiz-control-virtualized-table-header-bg-color)}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { VNode, PropType } from 'vue';
|
|
2
|
+
import { IDEGrid } from '@ibiz/model-core';
|
|
3
|
+
import { ControlVO, GridController, IControlProvider } from '@ibiz-template/runtime';
|
|
4
|
+
import { IColumn } from './virtualized-table.util';
|
|
5
|
+
import './virtualized-table.scss';
|
|
6
|
+
export declare const VirtualizedTableControl: import("vue").DefineComponent<{
|
|
7
|
+
/**
|
|
8
|
+
* @description 表格模型数据
|
|
9
|
+
*/
|
|
10
|
+
modelData: {
|
|
11
|
+
type: PropType<IDEGrid>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @description 应用上下文对象
|
|
16
|
+
*/
|
|
17
|
+
context: {
|
|
18
|
+
type: PropType<import("@ibiz-template/core").IApiContext>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @description 视图参数对象
|
|
23
|
+
* @default {}
|
|
24
|
+
*/
|
|
25
|
+
params: {
|
|
26
|
+
type: PropType<import("@ibiz-template/core").IApiParams>;
|
|
27
|
+
default: () => {};
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @description 部件适配器
|
|
31
|
+
*/
|
|
32
|
+
provider: {
|
|
33
|
+
type: PropType<IControlProvider>;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @description 部件行数据默认激活模式,值为0:不激活,值为1:单击激活,值为2:双击激活
|
|
37
|
+
*/
|
|
38
|
+
mdctrlActiveMode: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @description 是否单选
|
|
44
|
+
*/
|
|
45
|
+
singleSelect: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* @description 是否启用行编辑
|
|
51
|
+
*/
|
|
52
|
+
rowEditOpen: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @description 是否是简单模式,即直接传入数据,不加载数据
|
|
58
|
+
*/
|
|
59
|
+
isSimple: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
required: false;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* @description 简单模式下传入的数据
|
|
65
|
+
*/
|
|
66
|
+
data: {
|
|
67
|
+
type: {
|
|
68
|
+
(arrayLength: number): import("@ibiz-template/core").IApiData[];
|
|
69
|
+
(...items: import("@ibiz-template/core").IApiData[]): import("@ibiz-template/core").IApiData[];
|
|
70
|
+
new (arrayLength: number): import("@ibiz-template/core").IApiData[];
|
|
71
|
+
new (...items: import("@ibiz-template/core").IApiData[]): import("@ibiz-template/core").IApiData[];
|
|
72
|
+
isArray(arg: any): arg is any[];
|
|
73
|
+
readonly prototype: any[];
|
|
74
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
75
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
76
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
77
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
78
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
79
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
80
|
+
};
|
|
81
|
+
required: false;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* @description 是否默认加载数据
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
loadDefault: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
c: GridController<IDEGrid, import("@ibiz-template/runtime").IGridState, import("@ibiz-template/runtime").IGridEvent>;
|
|
93
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
94
|
+
tableRef: import("vue").Ref<any>;
|
|
95
|
+
tableData: import("vue").ComputedRef<ControlVO[]>;
|
|
96
|
+
columnModel: import("vue").ComputedRef<IColumn[]>;
|
|
97
|
+
onPageChange: (page: number) => void;
|
|
98
|
+
onPageRefresh: () => void;
|
|
99
|
+
onPageSizeChange: (size: number) => void;
|
|
100
|
+
renderNoData: () => VNode | null;
|
|
101
|
+
calcRowClass: (params: IParams) => string;
|
|
102
|
+
renderBodyCell: (params: IParams) => JSX.Element;
|
|
103
|
+
handleRowClick: (event: MouseEvent, data: ControlVO) => Promise<void>;
|
|
104
|
+
calcColumnWidth: (_columns: IColumn[], bodyWidth: number) => IColumn[];
|
|
105
|
+
handleDbRowClick: (event: MouseEvent, data: ControlVO) => Promise<void>;
|
|
106
|
+
renderHeaderCell: (params: IParams) => JSX.Element;
|
|
107
|
+
renderBatchToolBar: () => VNode | undefined;
|
|
108
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
109
|
+
/**
|
|
110
|
+
* @description 表格模型数据
|
|
111
|
+
*/
|
|
112
|
+
modelData: {
|
|
113
|
+
type: PropType<IDEGrid>;
|
|
114
|
+
required: true;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* @description 应用上下文对象
|
|
118
|
+
*/
|
|
119
|
+
context: {
|
|
120
|
+
type: PropType<import("@ibiz-template/core").IApiContext>;
|
|
121
|
+
required: true;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* @description 视图参数对象
|
|
125
|
+
* @default {}
|
|
126
|
+
*/
|
|
127
|
+
params: {
|
|
128
|
+
type: PropType<import("@ibiz-template/core").IApiParams>;
|
|
129
|
+
default: () => {};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* @description 部件适配器
|
|
133
|
+
*/
|
|
134
|
+
provider: {
|
|
135
|
+
type: PropType<IControlProvider>;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @description 部件行数据默认激活模式,值为0:不激活,值为1:单击激活,值为2:双击激活
|
|
139
|
+
*/
|
|
140
|
+
mdctrlActiveMode: {
|
|
141
|
+
type: NumberConstructor;
|
|
142
|
+
default: undefined;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* @description 是否单选
|
|
146
|
+
*/
|
|
147
|
+
singleSelect: {
|
|
148
|
+
type: BooleanConstructor;
|
|
149
|
+
default: undefined;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* @description 是否启用行编辑
|
|
153
|
+
*/
|
|
154
|
+
rowEditOpen: {
|
|
155
|
+
type: BooleanConstructor;
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* @description 是否是简单模式,即直接传入数据,不加载数据
|
|
160
|
+
*/
|
|
161
|
+
isSimple: {
|
|
162
|
+
type: BooleanConstructor;
|
|
163
|
+
required: false;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* @description 简单模式下传入的数据
|
|
167
|
+
*/
|
|
168
|
+
data: {
|
|
169
|
+
type: {
|
|
170
|
+
(arrayLength: number): import("@ibiz-template/core").IApiData[];
|
|
171
|
+
(...items: import("@ibiz-template/core").IApiData[]): import("@ibiz-template/core").IApiData[];
|
|
172
|
+
new (arrayLength: number): import("@ibiz-template/core").IApiData[];
|
|
173
|
+
new (...items: import("@ibiz-template/core").IApiData[]): import("@ibiz-template/core").IApiData[];
|
|
174
|
+
isArray(arg: any): arg is any[];
|
|
175
|
+
readonly prototype: any[];
|
|
176
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
177
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
178
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
179
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
180
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
181
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
182
|
+
};
|
|
183
|
+
required: false;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* @description 是否默认加载数据
|
|
187
|
+
* @default true
|
|
188
|
+
*/
|
|
189
|
+
loadDefault: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
default: boolean;
|
|
192
|
+
};
|
|
193
|
+
}>>, {
|
|
194
|
+
params: import("@ibiz-template/core").IApiParams;
|
|
195
|
+
singleSelect: boolean;
|
|
196
|
+
mdctrlActiveMode: number;
|
|
197
|
+
rowEditOpen: boolean;
|
|
198
|
+
isSimple: boolean;
|
|
199
|
+
loadDefault: boolean;
|
|
200
|
+
}, {}>;
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { isVNode, onUnmounted, resolveComponent, createVNode, createTextVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useControlController, useNamespace, useUIStore, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { GridController } from '@ibiz-template/runtime';
|
|
4
|
+
import { useVirtualizedTable } from './virtualized-table.util.mjs';
|
|
5
|
+
import '../../../util/index.mjs';
|
|
6
|
+
import './virtualized-table.css';
|
|
7
|
+
import { usePagination } from '../../../util/pagination/use-pagination.mjs';
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
function _isSlot(s) {
|
|
11
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
12
|
+
}
|
|
13
|
+
const VirtualizedTableControl = /* @__PURE__ */ defineComponent({
|
|
14
|
+
name: "IBizVirtualizedTableControl",
|
|
15
|
+
props: {
|
|
16
|
+
/**
|
|
17
|
+
* @description 表格模型数据
|
|
18
|
+
*/
|
|
19
|
+
modelData: {
|
|
20
|
+
type: Object,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* @description 应用上下文对象
|
|
25
|
+
*/
|
|
26
|
+
context: {
|
|
27
|
+
type: Object,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* @description 视图参数对象
|
|
32
|
+
* @default {}
|
|
33
|
+
*/
|
|
34
|
+
params: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default: () => ({})
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* @description 部件适配器
|
|
40
|
+
*/
|
|
41
|
+
provider: {
|
|
42
|
+
type: Object
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* @description 部件行数据默认激活模式,值为0:不激活,值为1:单击激活,值为2:双击激活
|
|
46
|
+
*/
|
|
47
|
+
mdctrlActiveMode: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: void 0
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* @description 是否单选
|
|
53
|
+
*/
|
|
54
|
+
singleSelect: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* @description 是否启用行编辑
|
|
60
|
+
*/
|
|
61
|
+
rowEditOpen: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: void 0
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* @description 是否是简单模式,即直接传入数据,不加载数据
|
|
67
|
+
*/
|
|
68
|
+
isSimple: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: false
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* @description 简单模式下传入的数据
|
|
74
|
+
*/
|
|
75
|
+
data: {
|
|
76
|
+
type: Array,
|
|
77
|
+
required: false
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* @description 是否默认加载数据
|
|
81
|
+
* @default true
|
|
82
|
+
*/
|
|
83
|
+
loadDefault: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
setup(props) {
|
|
89
|
+
const c = useControlController((...args) => new GridController(...args));
|
|
90
|
+
const ns = useNamespace("control-virtualized-table");
|
|
91
|
+
const {
|
|
92
|
+
zIndex
|
|
93
|
+
} = useUIStore();
|
|
94
|
+
c.state.zIndex = zIndex.increment();
|
|
95
|
+
const {
|
|
96
|
+
tableRef,
|
|
97
|
+
tableData,
|
|
98
|
+
sortValue,
|
|
99
|
+
columnModel,
|
|
100
|
+
isSelected,
|
|
101
|
+
isAllSelected,
|
|
102
|
+
handleRowClick,
|
|
103
|
+
handleSortClick,
|
|
104
|
+
handleSelectAll,
|
|
105
|
+
calcColumnWidth,
|
|
106
|
+
handleDbRowClick,
|
|
107
|
+
handleHeaderCellClick,
|
|
108
|
+
handleSelectionChange
|
|
109
|
+
} = useVirtualizedTable(c, props);
|
|
110
|
+
const {
|
|
111
|
+
onPageChange,
|
|
112
|
+
onPageRefresh,
|
|
113
|
+
onPageSizeChange
|
|
114
|
+
} = usePagination(c);
|
|
115
|
+
onUnmounted(() => {
|
|
116
|
+
zIndex.decrement();
|
|
117
|
+
});
|
|
118
|
+
const calcRowClass = (params) => {
|
|
119
|
+
const {
|
|
120
|
+
rowData
|
|
121
|
+
} = params;
|
|
122
|
+
return "".concat(ns.is("selected", rowData && isSelected(rowData)));
|
|
123
|
+
};
|
|
124
|
+
const renderNoData = () => {
|
|
125
|
+
var _a;
|
|
126
|
+
const {
|
|
127
|
+
isLoaded
|
|
128
|
+
} = c.state;
|
|
129
|
+
if (isLoaded) {
|
|
130
|
+
const quickToolbar = (_a = c.model.controls) == null ? void 0 : _a.find((item) => item.name === "".concat(c.model.name, "_quicktoolbar"));
|
|
131
|
+
if (quickToolbar) {
|
|
132
|
+
return createVNode(resolveComponent("iBizToolbarControl"), {
|
|
133
|
+
"modelData": quickToolbar,
|
|
134
|
+
"context": c.context,
|
|
135
|
+
"params": c.params,
|
|
136
|
+
"class": ns.e("quick-toolbar")
|
|
137
|
+
}, null);
|
|
138
|
+
}
|
|
139
|
+
const noDataSlots = {};
|
|
140
|
+
if (hasEmptyPanelRenderer(c)) {
|
|
141
|
+
Object.assign(noDataSlots, {
|
|
142
|
+
customRender: () => createVNode(IBizCustomRender, {
|
|
143
|
+
"controller": c
|
|
144
|
+
}, null)
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return createVNode(resolveComponent("iBizNoData"), {
|
|
148
|
+
"text": c.model.emptyText,
|
|
149
|
+
"emptyTextLanguageRes": c.model.emptyTextLanguageRes,
|
|
150
|
+
"hideNoDataImage": c.state.hideNoDataImage
|
|
151
|
+
}, _isSlot(noDataSlots) ? noDataSlots : {
|
|
152
|
+
default: () => [noDataSlots]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return createVNode("div", null, null);
|
|
156
|
+
};
|
|
157
|
+
const renderBatchToolBar = () => {
|
|
158
|
+
var _a;
|
|
159
|
+
const batchToolbar = (_a = c.model.controls) == null ? void 0 : _a.find((item) => {
|
|
160
|
+
return item.name === "".concat(c.model.name, "_batchtoolbar");
|
|
161
|
+
});
|
|
162
|
+
if (!batchToolbar || c.state.singleSelect || !c.state.selectedData.length)
|
|
163
|
+
return;
|
|
164
|
+
return createVNode("div", {
|
|
165
|
+
"class": [ns.e("batch-toolbar"), ns.is("show", c.state.selectedData.length > 0)]
|
|
166
|
+
}, [createVNode("div", {
|
|
167
|
+
"class": ns.em("batch-toolbar", "content")
|
|
168
|
+
}, [createVNode("div", {
|
|
169
|
+
"class": ns.em("batch-toolbar", "text")
|
|
170
|
+
}, [ibiz.i18n.t("control.common.itemsSelected", {
|
|
171
|
+
length: c.state.selectedData.length
|
|
172
|
+
})]), createVNode("div", {
|
|
173
|
+
"class": ns.em("batch-toolbar", "separator")
|
|
174
|
+
}, [createTextVNode("|")]), createVNode(resolveComponent("iBizToolbarControl"), {
|
|
175
|
+
"modelData": batchToolbar,
|
|
176
|
+
"context": c.context,
|
|
177
|
+
"params": c.params,
|
|
178
|
+
"class": ns.b("batch-toolbar-items")
|
|
179
|
+
}, null)])]);
|
|
180
|
+
};
|
|
181
|
+
const renderHeaderCell = (params) => {
|
|
182
|
+
const {
|
|
183
|
+
column
|
|
184
|
+
} = params;
|
|
185
|
+
const {
|
|
186
|
+
type,
|
|
187
|
+
enableSort,
|
|
188
|
+
key,
|
|
189
|
+
title,
|
|
190
|
+
align
|
|
191
|
+
} = column;
|
|
192
|
+
const {
|
|
193
|
+
prop,
|
|
194
|
+
order
|
|
195
|
+
} = sortValue.value;
|
|
196
|
+
if (type === "selection")
|
|
197
|
+
return createVNode("div", {
|
|
198
|
+
"class": [ns.e("cell"), ns.e("header-cell"), ns.em("cell", align || "left")]
|
|
199
|
+
}, [createVNode(resolveComponent("el-checkbox"), {
|
|
200
|
+
"modelValue": isAllSelected(),
|
|
201
|
+
"onChange": (val) => handleSelectAll(val),
|
|
202
|
+
"indeterminate": c.state.selectedData.length > 0 && !isAllSelected()
|
|
203
|
+
}, null)]);
|
|
204
|
+
return createVNode("div", {
|
|
205
|
+
"class": [ns.e("cell"), ns.e("header-cell"), ns.is("sortable", !!enableSort), ns.em("cell", align || "left")],
|
|
206
|
+
"onClick": (e) => handleHeaderCellClick(e, column)
|
|
207
|
+
}, [createVNode("span", {
|
|
208
|
+
"class": ns.em("header-cell", "caption")
|
|
209
|
+
}, [title]), enableSort && createVNode("span", {
|
|
210
|
+
"class": ns.e("caret-wrapper")
|
|
211
|
+
}, [createVNode("i", {
|
|
212
|
+
"class": [ns.em("caret-wrapper", "asc"), ns.em("caret-wrapper", "sort-caret"), ns.is("active", prop === key && order === "asc")],
|
|
213
|
+
"onClick": (e) => handleSortClick(e, column, "asc")
|
|
214
|
+
}, null), createVNode("i", {
|
|
215
|
+
"class": [ns.em("caret-wrapper", "desc"), ns.em("caret-wrapper", "sort-caret"), ns.is("active", prop === key && order === "desc")],
|
|
216
|
+
"onClick": (e) => handleSortClick(e, column, "desc")
|
|
217
|
+
}, null)])]);
|
|
218
|
+
};
|
|
219
|
+
const renderBodyCell = (params) => {
|
|
220
|
+
const {
|
|
221
|
+
column,
|
|
222
|
+
rowData
|
|
223
|
+
} = params;
|
|
224
|
+
const {
|
|
225
|
+
type,
|
|
226
|
+
key,
|
|
227
|
+
align
|
|
228
|
+
} = column;
|
|
229
|
+
if (type === "selection")
|
|
230
|
+
return createVNode("div", {
|
|
231
|
+
"class": [ns.e("cell"), ns.e("body-cell"), ns.em("cell", align || "left")],
|
|
232
|
+
"onClick": (evt) => evt.stopPropagation()
|
|
233
|
+
}, [createVNode(resolveComponent("el-checkbox"), {
|
|
234
|
+
"onChange": () => handleSelectionChange(rowData),
|
|
235
|
+
"modelValue": isSelected(rowData)
|
|
236
|
+
}, null)]);
|
|
237
|
+
const controller = c.columns[key];
|
|
238
|
+
const {
|
|
239
|
+
columnType
|
|
240
|
+
} = controller.model;
|
|
241
|
+
const row = c.findRowState(rowData);
|
|
242
|
+
return createVNode("div", {
|
|
243
|
+
"class": [ns.e("cell"), ns.e("body-cell"), ns.em("cell", align || "left")]
|
|
244
|
+
}, [columnType === "DEFGRIDCOLUMN" ? createVNode(resolveComponent("iBizGridFieldColumn"), {
|
|
245
|
+
"controller": controller,
|
|
246
|
+
"row": row
|
|
247
|
+
}, null) : createVNode(resolveComponent("iBizGridUAColumn"), {
|
|
248
|
+
"controller": controller,
|
|
249
|
+
"row": row
|
|
250
|
+
}, null)]);
|
|
251
|
+
};
|
|
252
|
+
return {
|
|
253
|
+
c,
|
|
254
|
+
ns,
|
|
255
|
+
tableRef,
|
|
256
|
+
tableData,
|
|
257
|
+
columnModel,
|
|
258
|
+
onPageChange,
|
|
259
|
+
onPageRefresh,
|
|
260
|
+
onPageSizeChange,
|
|
261
|
+
renderNoData,
|
|
262
|
+
calcRowClass,
|
|
263
|
+
renderBodyCell,
|
|
264
|
+
handleRowClick,
|
|
265
|
+
calcColumnWidth,
|
|
266
|
+
handleDbRowClick,
|
|
267
|
+
renderHeaderCell,
|
|
268
|
+
renderBatchToolBar
|
|
269
|
+
};
|
|
270
|
+
},
|
|
271
|
+
render() {
|
|
272
|
+
if (!this.c.state.isCreated)
|
|
273
|
+
return;
|
|
274
|
+
return createVNode(resolveComponent("iBizControlNavigation"), {
|
|
275
|
+
"controller": this.c
|
|
276
|
+
}, {
|
|
277
|
+
default: () => [createVNode(resolveComponent("iBizControlBase"), {
|
|
278
|
+
"controller": this.c,
|
|
279
|
+
"class": [this.ns.b(), this.ns.m(this.c.overflowMode), this.ns.is("dynamic-grid", this.c.state.isAutoGrid), this.ns.is("show-header", !this.c.state.hideHeader), this.ns.is("enable-page", this.c.state.enablePagingBar), this.ns.is("enable-group", this.c.model.enableGroup), this.ns.is("single-select", this.c.state.singleSelect), this.ns.is("empty", this.c.state.items.length === 0), this.ns.is("enable-customized", this.c.model.enableCustomized)]
|
|
280
|
+
}, {
|
|
281
|
+
default: () => [createVNode(resolveComponent("el-auto-resizer"), null, {
|
|
282
|
+
default: ({
|
|
283
|
+
height,
|
|
284
|
+
width
|
|
285
|
+
}) => {
|
|
286
|
+
const columns = this.calcColumnWidth(this.columnModel, width);
|
|
287
|
+
return createVNode(resolveComponent("el-table-v2"), {
|
|
288
|
+
"fixed": true,
|
|
289
|
+
"ref": "tableRef",
|
|
290
|
+
"width": width,
|
|
291
|
+
"height": height,
|
|
292
|
+
"row-height": 54,
|
|
293
|
+
"columns": columns,
|
|
294
|
+
"header-height": 54,
|
|
295
|
+
"data": this.tableData,
|
|
296
|
+
"class": this.ns.e("table"),
|
|
297
|
+
"row-class": this.calcRowClass,
|
|
298
|
+
"row-event-handlers": {
|
|
299
|
+
onClick: ({
|
|
300
|
+
event,
|
|
301
|
+
rowData
|
|
302
|
+
}) => this.handleRowClick(event, rowData),
|
|
303
|
+
onDblclick: ({
|
|
304
|
+
event,
|
|
305
|
+
rowData
|
|
306
|
+
}) => this.handleDbRowClick(event, rowData)
|
|
307
|
+
}
|
|
308
|
+
}, {
|
|
309
|
+
empty: this.renderNoData,
|
|
310
|
+
cell: this.renderBodyCell,
|
|
311
|
+
"header-cell": this.renderHeaderCell
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}), this.c.model.enableCustomized && !this.c.state.hideHeader && createVNode("div", {
|
|
315
|
+
"class": this.ns.e("setting-box")
|
|
316
|
+
}, [createVNode(resolveComponent("iBizGridSetting"), {
|
|
317
|
+
"controller": this.c,
|
|
318
|
+
"columnStates": this.c.state.columnStates
|
|
319
|
+
}, null)]), this.renderBatchToolBar()]
|
|
320
|
+
})]
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
export { VirtualizedTableControl };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IControlProvider } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* @description 虚拟表格适配器
|
|
4
|
+
* @export
|
|
5
|
+
* @class VirtualizedTableProvider
|
|
6
|
+
* @implements {IControlProvider}
|
|
7
|
+
*/
|
|
8
|
+
export declare class VirtualizedTableProvider implements IControlProvider {
|
|
9
|
+
component: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => {
|
|
5
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
+
return value;
|
|
7
|
+
};
|
|
8
|
+
class VirtualizedTableProvider {
|
|
9
|
+
constructor() {
|
|
10
|
+
__publicField(this, "component", "IBizVirtualizedTableControl");
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { VirtualizedTableProvider };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ControlVO, GridController } from '@ibiz-template/runtime';
|
|
3
|
+
type orderDir = 'asc' | 'desc' | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* @description 虚拟表格列模型
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IColumn
|
|
8
|
+
*/
|
|
9
|
+
export interface IColumn {
|
|
10
|
+
/**
|
|
11
|
+
* @description 列唯一标识(列模型代码标识)
|
|
12
|
+
* @type {string}
|
|
13
|
+
* @memberof IColumn
|
|
14
|
+
*/
|
|
15
|
+
key: string;
|
|
16
|
+
/**
|
|
17
|
+
* @description 列类型
|
|
18
|
+
* @type {string}
|
|
19
|
+
* @memberof IColumn
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* @description 列宽
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof IColumn
|
|
26
|
+
*/
|
|
27
|
+
width: number;
|
|
28
|
+
/**
|
|
29
|
+
* @description 宽度单位
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof IColumn
|
|
32
|
+
*/
|
|
33
|
+
widthUnit: string;
|
|
34
|
+
/**
|
|
35
|
+
* @description 是否隐藏列
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof IColumn
|
|
38
|
+
*/
|
|
39
|
+
hidden: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @description 列标题
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof IColumn
|
|
44
|
+
*/
|
|
45
|
+
title?: string;
|
|
46
|
+
/**
|
|
47
|
+
* @description 表格单元格内容对齐方式
|
|
48
|
+
* @type {('left' | 'center' | 'right')}
|
|
49
|
+
* @memberof IColumn
|
|
50
|
+
*/
|
|
51
|
+
align?: string;
|
|
52
|
+
/**
|
|
53
|
+
* @description 列的类名
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof IColumn
|
|
56
|
+
*/
|
|
57
|
+
class?: string;
|
|
58
|
+
/**
|
|
59
|
+
* @description 头部单元格样式
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof IColumn
|
|
62
|
+
*/
|
|
63
|
+
headerClass?: string;
|
|
64
|
+
/**
|
|
65
|
+
* @description 固定列位置
|
|
66
|
+
* @type {('left' | 'right')}
|
|
67
|
+
* @memberof IColumn
|
|
68
|
+
*/
|
|
69
|
+
fixed?: 'left' | 'right';
|
|
70
|
+
/**
|
|
71
|
+
* @description 设置列是否排序
|
|
72
|
+
* @type {boolean}
|
|
73
|
+
* @memberof IColumn
|
|
74
|
+
*/
|
|
75
|
+
enableSort?: boolean;
|
|
76
|
+
}
|
|
77
|
+
export declare function useVirtualizedTable(c: GridController, props: IData): {
|
|
78
|
+
tableRef: Ref<any>;
|
|
79
|
+
tableData: ComputedRef<ControlVO[]>;
|
|
80
|
+
sortValue: ComputedRef<{
|
|
81
|
+
prop?: string;
|
|
82
|
+
order: orderDir;
|
|
83
|
+
}>;
|
|
84
|
+
columnModel: ComputedRef<IColumn[]>;
|
|
85
|
+
isAllSelected(): boolean;
|
|
86
|
+
isSelected(data: ControlVO): boolean;
|
|
87
|
+
handleSelectAll(state: boolean): void;
|
|
88
|
+
handleSelectionChange(data: ControlVO): void;
|
|
89
|
+
handleSortClick(event: MouseEvent, column: IColumn, newOrder: orderDir): void;
|
|
90
|
+
calcColumnWidth(_columns: IColumn[], bodyWidth: number): IColumn[];
|
|
91
|
+
handleRowClick(event: MouseEvent, data: ControlVO): Promise<void>;
|
|
92
|
+
handleDbRowClick(event: MouseEvent, data: ControlVO): Promise<void>;
|
|
93
|
+
handleHeaderCellClick(event: MouseEvent, column: IColumn): void;
|
|
94
|
+
};
|
|
95
|
+
export {};
|