fangguo-component 1.1.2 → 1.1.4
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/ArgHover.css +20 -1
- package/dist/ArgHover.vue_vue_type_style_index_0_lang-CSymSDRl.js +56 -0
- package/dist/ButtonGroup-DqViorHX.js +134 -0
- package/dist/ButtonGroup.css +35 -1
- package/dist/CitySelect.vue_vue_type_script_setup_true_lang-DZp6834K.js +224 -0
- package/dist/ContentTitle-By0Zk1u7.js +30 -0
- package/dist/ContentTitle.css +6 -1
- package/dist/CustomInputV2-BqhBSO53.js +157 -0
- package/dist/CustomInputV2.css +5 -1
- package/dist/CustomMultipleInput-DRMTUtkE.js +125 -0
- package/dist/CustomMultipleInput.css +8 -1
- package/dist/DragResizable.css +126 -1
- package/dist/DragResizable.vue_vue_type_style_index_0_lang-BePpQHve.js +331 -0
- package/dist/DragSort-5WetnkmW.js +98 -0
- package/dist/DragSort.css +5 -1
- package/dist/ErrorImage-Ao9kEEUg.js +36 -0
- package/dist/ErrorImage.css +4 -1
- package/dist/FgCascader.css +37 -1
- package/dist/FgCascader.vue_vue_type_style_index_0_lang-CM8FxFLJ.js +2424 -0
- package/dist/HSelect-BFkWiCFi.js +671 -0
- package/dist/HSelect.css +80 -1
- package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-BZX7ch2I.js +50 -0
- package/dist/HSelectSJ-DZmtdyjF.js +671 -0
- package/dist/HSelectSJ.css +88 -1
- package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BCIOF-Oy.js +5202 -0
- package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BaXHYlDu.js +92 -0
- package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-D5KGqlj4.js +107 -0
- package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-B2vtU4f4.js +34 -0
- package/dist/LoadingBtn-DWm2cY9k.js +87 -0
- package/dist/LoadingBtn.css +12 -1
- package/dist/MInput-s_P63myh.js +114 -0
- package/dist/MInput.css +21 -1
- package/dist/MyTable-CHvxPYgk.js +94 -0
- package/dist/MyTable.css +33 -1
- package/dist/NoRender.vue_vue_type_script_setup_true_lang-B0G6jxPg.js +31 -0
- package/dist/SelectAddress-CCepDxu8.js +254 -0
- package/dist/SelectAddress.css +18 -1
- package/dist/SelectAll.vue_vue_type_script_setup_true_lang-CyzY8ams.js +101 -0
- package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CrsaohxU.js +103 -0
- package/dist/SelectCustomAll.css +8 -1
- package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-BEZwlGXa.js +111 -0
- package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Dk4TpTBN.js +48 -0
- package/dist/SelectTree-DHbWogEU.js +1276 -0
- package/dist/SelectTree.css +74 -1
- package/dist/SvgIcon-DIg0upEk.js +33 -0
- package/dist/TextCopy-th0FAxwl.js +44 -0
- package/dist/TextCopy.css +7 -1
- package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-DVE1CxPm.js +174 -0
- package/dist/VirtualTable-Cm_L7q9W.js +703 -0
- package/dist/VirtualTable.css +185 -1
- package/dist/_commonjsHelpers-DnzVkjQg.js +38 -0
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
- package/dist/common-B1nSpTGn.js +9669 -0
- package/dist/components/VirtualTable/index.js +2 -2
- package/dist/components/argHover/index.js +2 -2
- package/dist/components/buttonGroup/index.js +2 -2
- package/dist/components/cascader/index.js +2 -2
- package/dist/components/citySelect/index.js +2 -2
- package/dist/components/contentTitle/index.js +2 -2
- package/dist/components/customInputV2/index.js +2 -2
- package/dist/components/customMultipleInput/index.js +2 -2
- package/dist/components/dragResizable/index.js +2 -2
- package/dist/components/dragSort/index.js +2 -2
- package/dist/components/errorImage/index.js +2 -2
- package/dist/components/hSelect/index.js +2 -2
- package/dist/components/hSelectAll/index.js +2 -2
- package/dist/components/hSelectSJ/index.js +2 -2
- package/dist/components/identifyAddress/index.js +2 -2
- package/dist/components/imageLoupe/index.js +2 -2
- package/dist/components/index.js +62 -62
- package/dist/components/lazyComponent/index.js +2 -2
- package/dist/components/lazyPopover/index.js +2 -2
- package/dist/components/loadingBtn/index.js +2 -2
- package/dist/components/mInput/index.js +2 -2
- package/dist/components/myTable/index.js +2 -2
- package/dist/components/noRender/index.js +2 -2
- package/dist/components/selectAddress/index.js +2 -2
- package/dist/components/selectAll/index.js +2 -2
- package/dist/components/selectAll2/index.js +2 -2
- package/dist/components/selectCustomAll/index.js +2 -2
- package/dist/components/selectTimePicker/index.js +2 -2
- package/dist/components/selectTree/index.js +2 -2
- package/dist/components/svgIcon/index.js +2 -2
- package/dist/components/textCopy/index.js +2 -2
- package/dist/components/textEllipsisTooltip/index.js +2 -2
- package/dist/dateShortcuts-DjFC_Txu.js +27 -0
- package/dist/directive/index.js +2 -2
- package/dist/directive/loading/index.js +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/usePagination/index.js +2 -2
- package/dist/index-BPnixsfc.js +103 -0
- package/dist/index-C9zyi90j.js +165 -0
- package/dist/index-CSMWzzp0.js +8 -0
- package/dist/index-DfQiknXJ.js +8 -0
- package/dist/index-DzdLpetc.js +29184 -0
- package/dist/index-uQXqC9BF.js +68 -0
- package/dist/index.css +1 -1
- package/dist/index.js +204 -194
- package/dist/loading-CGrVcnNl.js +47 -0
- package/dist/loading.css +110 -1
- package/dist/tools/ImageParserUtils/index.js +17239 -9074
- package/dist/tools/common/index.js +86 -86
- package/dist/tools/index.js +95 -95
- package/dist/usePagination-C63IRXjZ.js +29 -0
- package/dist/vue-virtual-scroller.esm-ZgBoGAjX.js +1507 -0
- package/package.json +1 -1
- package/dist/ArgHover.vue_vue_type_style_index_0_lang-CMhRP09M.js +0 -54
- package/dist/ButtonGroup-C0yZEkxK.js +0 -103
- package/dist/CitySelect.vue_vue_type_script_setup_true_lang-8EbHD3Nt.js +0 -159
- package/dist/ContentTitle-mqrusLjx.js +0 -24
- package/dist/CustomInputV2-uARhbFc8.js +0 -135
- package/dist/CustomMultipleInput-DDaqoHVU.js +0 -109
- package/dist/DragResizable.vue_vue_type_style_index_0_lang-CHv0gJmo.js +0 -179
- package/dist/DragSort-CfDeFAIG.js +0 -66
- package/dist/ErrorImage-CTP_5sal.js +0 -32
- package/dist/FgCascader.vue_vue_type_style_index_0_lang-BUZDDcVn.js +0 -1656
- package/dist/HSelect-Drf6YBwO.js +0 -468
- package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-Blq9xpfa.js +0 -36
- package/dist/HSelectSJ-D3GrXmvj.js +0 -462
- package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BJheMI1q.js +0 -4743
- package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BlX4VbRi.js +0 -79
- package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-vNk68D8E.js +0 -82
- package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-DcOrcH0T.js +0 -33
- package/dist/LoadingBtn-BhbhNboo.js +0 -66
- package/dist/MInput-CpoW17Wh.js +0 -101
- package/dist/MyTable-DmwyEVJb.js +0 -68
- package/dist/NoRender.vue_vue_type_script_setup_true_lang-Do36nSsV.js +0 -30
- package/dist/SelectAddress-B4oK5erq.js +0 -173
- package/dist/SelectAll.vue_vue_type_script_setup_true_lang-BC3q2U8f.js +0 -79
- package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CaET5eli.js +0 -74
- package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-_wCRO217.js +0 -83
- package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Bj0KMOKv.js +0 -45
- package/dist/SelectTree-Dm5259kY.js +0 -911
- package/dist/SvgIcon-C2ah8E0Z.js +0 -30
- package/dist/TextCopy-hOj-Wj2H.js +0 -41
- package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-aZbEQmbM.js +0 -112
- package/dist/VirtualTable-BWugJiQ5.js +0 -349
- package/dist/_commonjsHelpers-ByYUsBRP.js +0 -33
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/common-BIEgCXbl.js +0 -7030
- package/dist/dateShortcuts-DDPtAhDI.js +0 -26
- package/dist/index-BRcBDlVs.js +0 -68
- package/dist/index-CeWudY6u.js +0 -8
- package/dist/index-DIX8TpoT.js +0 -118
- package/dist/index-DpPsTMp0.js +0 -8
- package/dist/index-epuVZjZV.js +0 -103
- package/dist/index-uf7oyYDF.js +0 -16847
- package/dist/loading-DJVNc0eN.js +0 -36
- package/dist/usePagination-CwShBEjA.js +0 -20
- package/dist/vue-virtual-scroller.esm-CH-jx4ri.js +0 -1051
|
@@ -0,0 +1,703 @@
|
|
|
1
|
+
import './VirtualTable.css';var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
import { defineComponent, ref, computed, watch, reactive, onMounted, nextTick, resolveDirective, withDirectives, openBlock, createBlock, unref, createVNode, createTextVNode } from "vue";
|
|
41
|
+
import { ElEmpty, ElBacktop, ElCheckbox } from "element-plus";
|
|
42
|
+
import { s as script$1, a as script } from "./vue-virtual-scroller.esm-ZgBoGAjX.js";
|
|
43
|
+
import { debounce } from "lodash-es";
|
|
44
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
|
45
|
+
const border = "_border_1m9a1_15";
|
|
46
|
+
const scroll = "_scroll_1m9a1_37";
|
|
47
|
+
const active = "_active_1m9a1_114";
|
|
48
|
+
const style = {
|
|
49
|
+
"dynamic-scroller-ref": "_dynamic-scroller-ref_1m9a1_1",
|
|
50
|
+
border,
|
|
51
|
+
"virtual-table-row-td": "_virtual-table-row-td_1m9a1_18",
|
|
52
|
+
scroll,
|
|
53
|
+
"virtual-table-header": "_virtual-table-header_1m9a1_37",
|
|
54
|
+
"virtual-table-row-th": "_virtual-table-row-th_1m9a1_40",
|
|
55
|
+
"virtual-table-row": "_virtual-table-row_1m9a1_18",
|
|
56
|
+
"virtual-table-row-tr": "_virtual-table-row-tr_1m9a1_43",
|
|
57
|
+
"shadow-right": "_shadow-right_1m9a1_72",
|
|
58
|
+
"shadow-left": "_shadow-left_1m9a1_85",
|
|
59
|
+
"sort-wrapper": "_sort-wrapper_1m9a1_99",
|
|
60
|
+
active,
|
|
61
|
+
"scroll-item-class": "_scroll-item-class_1m9a1_170"
|
|
62
|
+
};
|
|
63
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
64
|
+
__name: "VirtualTable",
|
|
65
|
+
props: {
|
|
66
|
+
items: {
|
|
67
|
+
default: () => []
|
|
68
|
+
},
|
|
69
|
+
width: {
|
|
70
|
+
default: "100%"
|
|
71
|
+
},
|
|
72
|
+
height: {
|
|
73
|
+
default: 600
|
|
74
|
+
},
|
|
75
|
+
rowKey: {
|
|
76
|
+
default: "id"
|
|
77
|
+
},
|
|
78
|
+
minItemSize: {
|
|
79
|
+
default: 20
|
|
80
|
+
},
|
|
81
|
+
border: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: true
|
|
84
|
+
},
|
|
85
|
+
pageNo: {
|
|
86
|
+
default: 1
|
|
87
|
+
},
|
|
88
|
+
pageSize: {},
|
|
89
|
+
noHeader: {
|
|
90
|
+
type: Boolean
|
|
91
|
+
},
|
|
92
|
+
headerSlotRender: {},
|
|
93
|
+
afterSlotRender: {},
|
|
94
|
+
emptySlotRender: {},
|
|
95
|
+
expandSlotRender: {},
|
|
96
|
+
defaultSort: {},
|
|
97
|
+
tableColumn: {
|
|
98
|
+
default: () => []
|
|
99
|
+
},
|
|
100
|
+
backTop: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: true
|
|
103
|
+
},
|
|
104
|
+
scroll: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: true
|
|
107
|
+
},
|
|
108
|
+
wrapClass: {
|
|
109
|
+
default: ""
|
|
110
|
+
},
|
|
111
|
+
itemClass: {
|
|
112
|
+
default: ""
|
|
113
|
+
},
|
|
114
|
+
cacheSelection: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: false
|
|
117
|
+
},
|
|
118
|
+
scrollHandle: {
|
|
119
|
+
default: null
|
|
120
|
+
},
|
|
121
|
+
scrolldelay: {
|
|
122
|
+
default: 10
|
|
123
|
+
},
|
|
124
|
+
itemHandle: {
|
|
125
|
+
type: Function,
|
|
126
|
+
default: () => ({})
|
|
127
|
+
},
|
|
128
|
+
rowClassName: {
|
|
129
|
+
type: [Function, String],
|
|
130
|
+
default: () => ""
|
|
131
|
+
},
|
|
132
|
+
rowStyle: {
|
|
133
|
+
type: Function,
|
|
134
|
+
default: () => ({})
|
|
135
|
+
},
|
|
136
|
+
spanMethod: {},
|
|
137
|
+
childrenRender: {},
|
|
138
|
+
selectable: {
|
|
139
|
+
type: Function,
|
|
140
|
+
default: () => false
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
emits: ["sort-change", "select", "select-all", "selection-change", "row-click"],
|
|
144
|
+
setup(__props, {
|
|
145
|
+
expose: __expose,
|
|
146
|
+
emit: __emit
|
|
147
|
+
}) {
|
|
148
|
+
function isIgnoredVirtualTableRowClick(e) {
|
|
149
|
+
const t = e.target;
|
|
150
|
+
return t instanceof Element && !!t.closest("[data-virtual-table-ignore-row-select]");
|
|
151
|
+
}
|
|
152
|
+
const emit = __emit;
|
|
153
|
+
const prop = __props;
|
|
154
|
+
const isScrollRight = ref(false);
|
|
155
|
+
const isScrollLeft = ref(true);
|
|
156
|
+
const DynamicScrollerRef = ref();
|
|
157
|
+
const tabStyle = computed(() => {
|
|
158
|
+
const {
|
|
159
|
+
width,
|
|
160
|
+
height
|
|
161
|
+
} = prop;
|
|
162
|
+
return {
|
|
163
|
+
with: typeof width === "string" ? width : `${width}px`,
|
|
164
|
+
height: typeof height === "string" ? height : `${height}px`
|
|
165
|
+
};
|
|
166
|
+
});
|
|
167
|
+
const tableWidth = ref();
|
|
168
|
+
function calculateWidth(width, minwidth = 0) {
|
|
169
|
+
if (!width) {
|
|
170
|
+
return 0;
|
|
171
|
+
}
|
|
172
|
+
if (typeof width === "number") {
|
|
173
|
+
return Math.max(minwidth, width);
|
|
174
|
+
}
|
|
175
|
+
let _width = 0;
|
|
176
|
+
if (width.endsWith("px")) {
|
|
177
|
+
_width = parseFloat(width.replace("px", ""));
|
|
178
|
+
}
|
|
179
|
+
if (width.endsWith("%")) {
|
|
180
|
+
const percentage = parseFloat(width.replace("%", "")) / 100;
|
|
181
|
+
_width = percentage * tableWidth.value;
|
|
182
|
+
}
|
|
183
|
+
return Math.max(minwidth, _width);
|
|
184
|
+
}
|
|
185
|
+
const getRowWidth = () => {
|
|
186
|
+
return prop.tableColumn.reduce((res, item) => {
|
|
187
|
+
const width = item.type === "select" ? calculateWidth(item.width || 30, item.minWidth) : item.type === "number" ? calculateWidth(item.width || 50, item.minWidth) : item.width === void 0 ? 0 : calculateWidth(item.width, item.minWidth);
|
|
188
|
+
return res + width;
|
|
189
|
+
}, 0);
|
|
190
|
+
};
|
|
191
|
+
const getCellStyle = (item, index2, rowSpan = 1, colSpan = 1, rowWidth, colHeight) => {
|
|
192
|
+
let cellWidth = rowWidth || (item.type === "select" ? calculateWidth(item.width || 30, item.minWidth) : item.type === "number" ? calculateWidth(item.width || 50, item.minWidth) : item.width === void 0 ? "unset" : calculateWidth(item.width, item.minWidth));
|
|
193
|
+
if (colSpan !== 1) {
|
|
194
|
+
if (colSpan === 0) {
|
|
195
|
+
cellWidth += "0px!important";
|
|
196
|
+
} else {
|
|
197
|
+
for (let i = index2 + 1; i < index2 + colSpan; i++) {
|
|
198
|
+
cellWidth += prop.tableColumn[i].type === "select" ? calculateWidth(prop.tableColumn[i].width || 30, prop.tableColumn[i].minWidth) : prop.tableColumn[i].type === "number" ? calculateWidth(prop.tableColumn[i].width || 50, prop.tableColumn[i].minWidth) : prop.tableColumn[i].width === void 0 ? 0 : calculateWidth(prop.tableColumn[i].width, prop.tableColumn[i].minWidth);
|
|
199
|
+
}
|
|
200
|
+
cellWidth += "px!important";
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
let left = 0;
|
|
204
|
+
let right = 0;
|
|
205
|
+
if (item.fixed === "left" && index2 !== 0) {
|
|
206
|
+
left = prop.tableColumn.slice(0, index2).reduce((res, item2) => {
|
|
207
|
+
return res + (item2.fixed === "left" ? item2.type === "select" ? calculateWidth(item2.width || 30, item2.minWidth) : item2.type === "number" ? calculateWidth(item2.width || 50, item2.minWidth) : calculateWidth(item2.width, item2.minWidth) : 0);
|
|
208
|
+
}, 0);
|
|
209
|
+
}
|
|
210
|
+
if (item.fixed === "right" && index2 !== prop.tableColumn.length - 1) {
|
|
211
|
+
right = prop.tableColumn.slice(index2 + 1, prop.tableColumn.length).reduce((res, item2) => {
|
|
212
|
+
return res + (item2.fixed === "right" ? item2.type === "select" ? calculateWidth(item2.width || 30, item2.minWidth) : item2.type === "number" ? calculateWidth(item2.width || 50, item2.minWidth) : calculateWidth(item2.width, item2.minWidth) : 0);
|
|
213
|
+
}, 0);
|
|
214
|
+
}
|
|
215
|
+
return __spreadValues({
|
|
216
|
+
flex: cellWidth === "unset" ? 1 : "unset",
|
|
217
|
+
minWidth: !item.minWidth ? "unset" : `${item.minWidth}px`,
|
|
218
|
+
width: typeof cellWidth === "string" ? cellWidth : `${cellWidth}px`,
|
|
219
|
+
height: colHeight || (rowSpan === 1 ? "unset" : `${rowSpan * prop.minItemSize}px`),
|
|
220
|
+
position: item.fixed ? "sticky" : "releative",
|
|
221
|
+
left: item.fixed === "left" ? left + "px" : "unset",
|
|
222
|
+
right: item.fixed === "right" ? right + "px" : "unset",
|
|
223
|
+
justifyContent: item.align === "left" ? "flex-start" : item.align === "right" ? "flex-end" : "center",
|
|
224
|
+
zIndex: item.fixed === "left" ? 3 : item.fixed === "right" ? prop.tableColumn.length - index2 + 1 : 1
|
|
225
|
+
}, item.customStyle);
|
|
226
|
+
};
|
|
227
|
+
const getCellClass = (item) => {
|
|
228
|
+
return item.fixed === "right" && !isScrollRight.value ? style["shadow-right"] : item.fixed === "left" && !isScrollLeft.value ? style["shadow-left"] : "";
|
|
229
|
+
};
|
|
230
|
+
const handleScroll = debounce((e) => {
|
|
231
|
+
isScrollRight.value = e.target.clientWidth + e.target.scrollLeft + 5 >= e.target.scrollWidth;
|
|
232
|
+
isScrollLeft.value = e.target.scrollLeft === 0;
|
|
233
|
+
prop.scrollHandle && prop.scrollHandle(e);
|
|
234
|
+
}, prop.scrolldelay);
|
|
235
|
+
const hadCheckAll = ref(false);
|
|
236
|
+
const selectData = ref([]);
|
|
237
|
+
const disabledData = ref([]);
|
|
238
|
+
const updataSelectData = (type, row) => {
|
|
239
|
+
{
|
|
240
|
+
emit("select-all", getSelection());
|
|
241
|
+
}
|
|
242
|
+
emit("selection-change", getSelection());
|
|
243
|
+
};
|
|
244
|
+
const getListLength = computed(() => {
|
|
245
|
+
const mainRow = tableData.value.filter((i) => !i.__ischildren);
|
|
246
|
+
return {
|
|
247
|
+
length: tableData.value.length,
|
|
248
|
+
ml: mainRow.length,
|
|
249
|
+
cl: tableData.value.length - mainRow.length
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
const clearSelection = () => {
|
|
253
|
+
hadCheckAll.value = false;
|
|
254
|
+
selectData.value = [];
|
|
255
|
+
tableData.value.forEach((item) => {
|
|
256
|
+
item.rowcheck = false;
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
const getSelection = () => {
|
|
260
|
+
return selectData.value;
|
|
261
|
+
};
|
|
262
|
+
const setSelection = (key, val) => {
|
|
263
|
+
const data = tableData.value.find((item) => item[prop.rowKey] === key);
|
|
264
|
+
if (!data) {
|
|
265
|
+
console.log("当前无该条数据");
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
data.rowcheck = val;
|
|
269
|
+
const _selectData = [];
|
|
270
|
+
const _noDisabledData = [];
|
|
271
|
+
tableData.value.forEach((row) => {
|
|
272
|
+
if (row.disabled) {
|
|
273
|
+
_noDisabledData.push(row);
|
|
274
|
+
}
|
|
275
|
+
if (row.rowcheck && !(row == null ? void 0 : row.disabled)) {
|
|
276
|
+
_selectData.push(row);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
selectData.value = _selectData;
|
|
280
|
+
disabledData.value = _noDisabledData;
|
|
281
|
+
hadCheckAll.value = selectData.value.length + disabledData.value.length === getListLength.value.ml && !!selectData.value.length;
|
|
282
|
+
};
|
|
283
|
+
const tableData = ref([]);
|
|
284
|
+
watch(() => prop.items, () => {
|
|
285
|
+
index = 0;
|
|
286
|
+
if (prop.cacheSelection) {
|
|
287
|
+
const _selectData = [];
|
|
288
|
+
const _noDisabledData = [];
|
|
289
|
+
tableData.value = prop.items.map((item) => {
|
|
290
|
+
if (item.disabled) {
|
|
291
|
+
_noDisabledData.push(item);
|
|
292
|
+
}
|
|
293
|
+
const select = selectData.value.find((selection) => selection[prop.rowKey] === item[prop.rowKey]);
|
|
294
|
+
const column = prop.tableColumn.find((col) => col.type === "select");
|
|
295
|
+
const isSelectable = column && column.selectable && typeof column.selectable === "function" ? column.selectable(item) : true;
|
|
296
|
+
if (select) {
|
|
297
|
+
_selectData.push(__spreadProps(__spreadValues({}, item), {
|
|
298
|
+
rowcheck: !!select,
|
|
299
|
+
disabled: !isSelectable
|
|
300
|
+
}));
|
|
301
|
+
}
|
|
302
|
+
if (item.__ischildren) {
|
|
303
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
304
|
+
__index: index,
|
|
305
|
+
rowcheck: !!select,
|
|
306
|
+
disabled: !isSelectable
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
310
|
+
__index: index++,
|
|
311
|
+
rowcheck: !!select,
|
|
312
|
+
disabled: !isSelectable
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
selectData.value = _selectData;
|
|
316
|
+
disabledData.value = _noDisabledData;
|
|
317
|
+
hadCheckAll.value = selectData.value.length + disabledData.value.length === getListLength.value.ml && !!selectData.value.length;
|
|
318
|
+
emit("selection-change", getSelection());
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
hadCheckAll.value = false;
|
|
322
|
+
selectData.value = [];
|
|
323
|
+
tableData.value = prop.items.map((item) => {
|
|
324
|
+
const column = prop.tableColumn.find((col) => col.type === "select");
|
|
325
|
+
const isSelectable = column && column.selectable && typeof column.selectable === "function" ? column.selectable(item) : true;
|
|
326
|
+
if (item.__ischildren) {
|
|
327
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
328
|
+
__index: index,
|
|
329
|
+
rowcheck: false,
|
|
330
|
+
disabled: !isSelectable
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
334
|
+
__index: index++,
|
|
335
|
+
rowcheck: false,
|
|
336
|
+
disabled: !isSelectable
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
let pageChange = false;
|
|
341
|
+
watch(() => prop.pageNo, () => {
|
|
342
|
+
pageChange = true;
|
|
343
|
+
});
|
|
344
|
+
watch(() => tableData.value, () => {
|
|
345
|
+
if (pageChange) DynamicScrollerRef.value && DynamicScrollerRef.value.scrollToItem(0);
|
|
346
|
+
pageChange = false;
|
|
347
|
+
});
|
|
348
|
+
const sort = ref({
|
|
349
|
+
prop: null,
|
|
350
|
+
order: null
|
|
351
|
+
});
|
|
352
|
+
const sortChangeHandle = (prop2, order) => {
|
|
353
|
+
sort.value = sort.value.prop === prop2 && sort.value.order === order ? {
|
|
354
|
+
prop: null,
|
|
355
|
+
order: null
|
|
356
|
+
} : {
|
|
357
|
+
prop: prop2,
|
|
358
|
+
order
|
|
359
|
+
};
|
|
360
|
+
emit("sort-change", sort.value);
|
|
361
|
+
};
|
|
362
|
+
const HeaderRender = () => {
|
|
363
|
+
const headerColumnRender = (item, index2) => {
|
|
364
|
+
const columnStyle = getCellStyle(item, index2);
|
|
365
|
+
if (item.cellHeaderRender) {
|
|
366
|
+
return createVNode("div", {
|
|
367
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), "virtual-table-row-td custom", item.customClass],
|
|
368
|
+
"style": columnStyle
|
|
369
|
+
}, [typeof item.cellHeaderRender === "function" ? item.cellHeaderRender({
|
|
370
|
+
column: item,
|
|
371
|
+
columns: prop.tableColumn,
|
|
372
|
+
columnIndex: index2
|
|
373
|
+
}) : item.cellHeaderRender]);
|
|
374
|
+
}
|
|
375
|
+
if (item.type === "number") {
|
|
376
|
+
return createVNode("div", {
|
|
377
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), "virtual-table-row-td", item.customClass],
|
|
378
|
+
"style": columnStyle
|
|
379
|
+
}, [createTextVNode("序号")]);
|
|
380
|
+
}
|
|
381
|
+
if (item.type === "select") {
|
|
382
|
+
return createVNode("div", {
|
|
383
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), "virtual-table-row-td", item.customClass],
|
|
384
|
+
"style": columnStyle
|
|
385
|
+
}, [createVNode(ElCheckbox, {
|
|
386
|
+
"indeterminate": selectData.value.length > 0 && selectData.value.length + disabledData.value.length !== getListLength.value.ml,
|
|
387
|
+
"modelValue": hadCheckAll.value,
|
|
388
|
+
"onChange": (val) => {
|
|
389
|
+
if (val) {
|
|
390
|
+
selectData.value = tableData.value.filter((item2) => !item2.__ischildren).filter((item2) => !(item2 == null ? void 0 : item2.disabled)).map((item2) => {
|
|
391
|
+
item2.rowcheck = true;
|
|
392
|
+
return item2;
|
|
393
|
+
});
|
|
394
|
+
} else {
|
|
395
|
+
selectData.value = [];
|
|
396
|
+
tableData.value.forEach((item2) => {
|
|
397
|
+
item2.rowcheck = false;
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
hadCheckAll.value = val;
|
|
401
|
+
updataSelectData();
|
|
402
|
+
}
|
|
403
|
+
}, null)]);
|
|
404
|
+
}
|
|
405
|
+
return createVNode("div", {
|
|
406
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), "virtual-table-row-td", item.customClass],
|
|
407
|
+
"style": columnStyle
|
|
408
|
+
}, [item.title, item.sortable && createVNode("div", {
|
|
409
|
+
"class": [style["sort-wrapper"]]
|
|
410
|
+
}, [createVNode("i", {
|
|
411
|
+
"class": {
|
|
412
|
+
[style.active]: sort.value.prop === item.prop && sort.value.order === "ascending"
|
|
413
|
+
},
|
|
414
|
+
"onClickCapture": () => sortChangeHandle(item.prop, "ascending")
|
|
415
|
+
}, null), createVNode("i", {
|
|
416
|
+
"class": {
|
|
417
|
+
[style.active]: sort.value.prop === item.prop && sort.value.order === "descending"
|
|
418
|
+
},
|
|
419
|
+
"onClickCapture": () => sortChangeHandle(item.prop, "descending")
|
|
420
|
+
}, null)])]);
|
|
421
|
+
};
|
|
422
|
+
const headerColumn = prop.tableColumn.map((item, index2) => {
|
|
423
|
+
return headerColumnRender(item, index2);
|
|
424
|
+
});
|
|
425
|
+
return createVNode("div", {
|
|
426
|
+
"class": [style["virtual-table-header"], "virtual-table-header"]
|
|
427
|
+
}, [createVNode("div", {
|
|
428
|
+
"class": [style["virtual-table-row-th"], "virtual-table-row-th"]
|
|
429
|
+
}, [headerColumn]), prop.headerSlotRender && prop.headerSlotRender()]);
|
|
430
|
+
};
|
|
431
|
+
const MainRender = ({
|
|
432
|
+
item: data,
|
|
433
|
+
index: index2,
|
|
434
|
+
active: active2
|
|
435
|
+
}) => {
|
|
436
|
+
if (data.__ischildren === true) {
|
|
437
|
+
return createVNode(script, {
|
|
438
|
+
"item": data,
|
|
439
|
+
"index": index2,
|
|
440
|
+
"active": active2,
|
|
441
|
+
"onClickCapture": (e) => {
|
|
442
|
+
if (isIgnoredVirtualTableRowClick(e)) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
prop.itemHandle(data, index2);
|
|
446
|
+
}
|
|
447
|
+
}, {
|
|
448
|
+
default: () => [prop.childrenRender && prop.childrenRender(data)]
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
const columnRender = (item, index3, columnIndex) => {
|
|
452
|
+
let rowSpan = 1;
|
|
453
|
+
let colSpan = 1;
|
|
454
|
+
let rowWidth = null;
|
|
455
|
+
let colHeight = null;
|
|
456
|
+
if (prop.spanMethod) {
|
|
457
|
+
const {
|
|
458
|
+
rowspan = 1,
|
|
459
|
+
colspan = 1,
|
|
460
|
+
rowwidth,
|
|
461
|
+
colheight,
|
|
462
|
+
_rowspan
|
|
463
|
+
} = prop.spanMethod({
|
|
464
|
+
row: data,
|
|
465
|
+
column: item,
|
|
466
|
+
rowIndex: index3,
|
|
467
|
+
columnIndex
|
|
468
|
+
});
|
|
469
|
+
rowSpan = rowspan;
|
|
470
|
+
colSpan = colspan;
|
|
471
|
+
rowWidth = rowwidth || null;
|
|
472
|
+
colHeight = colheight || null;
|
|
473
|
+
if (curScrollIndex.visibleStartIndex === index3 && _rowspan && _rowspan > 1) {
|
|
474
|
+
rowSpan = _rowspan;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
const columnStyle = getCellStyle(item, columnIndex, rowSpan, colSpan, rowWidth, colHeight);
|
|
478
|
+
if (!colSpan) {
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
if (!rowSpan) {
|
|
482
|
+
return createVNode("div", {
|
|
483
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), "virtual-table-row-td", item.customClass],
|
|
484
|
+
"style": __spreadProps(__spreadValues({}, columnStyle), {
|
|
485
|
+
borderBottom: "none"
|
|
486
|
+
})
|
|
487
|
+
}, null);
|
|
488
|
+
}
|
|
489
|
+
const isPriorityRow = rowSpan > 1 ? "virtual-table-priority-row-td" : "";
|
|
490
|
+
if (item.type === "number") {
|
|
491
|
+
const No = prop.pageNo && prop.pageSize ? (prop.pageNo - 1) * prop.pageSize + index3 + 1 : index3 + 1;
|
|
492
|
+
return createVNode("div", {
|
|
493
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), "virtual-table-row-td", isPriorityRow, item.customClass],
|
|
494
|
+
"style": columnStyle
|
|
495
|
+
}, [No]);
|
|
496
|
+
}
|
|
497
|
+
if (item.type === "select") {
|
|
498
|
+
return createVNode("div", {
|
|
499
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), "virtual-table-row-td", isPriorityRow, item.customClass],
|
|
500
|
+
"style": columnStyle
|
|
501
|
+
}, [createVNode("div", {
|
|
502
|
+
"class": "relative cursor-pointer"
|
|
503
|
+
}, [createVNode(ElCheckbox, {
|
|
504
|
+
"modelValue": data.rowcheck,
|
|
505
|
+
"disabled": data.disabled
|
|
506
|
+
}, null), createVNode("span", {
|
|
507
|
+
"class": "absolute left-0 right-0 top-0 bottom-0 z-[2]"
|
|
508
|
+
}, null)])]);
|
|
509
|
+
}
|
|
510
|
+
const _cell = () => {
|
|
511
|
+
if (item.cellRender) {
|
|
512
|
+
try {
|
|
513
|
+
return item.cellRender(data, index3, tableData.value);
|
|
514
|
+
} catch (e) {
|
|
515
|
+
return "";
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return item.prop ? createVNode("span", {
|
|
519
|
+
"class": "px-[10px] py-[5px]",
|
|
520
|
+
"data-column-index": columnIndex,
|
|
521
|
+
"data-row-index": index3
|
|
522
|
+
}, [data[item.prop]]) : "";
|
|
523
|
+
};
|
|
524
|
+
return createVNode("div", {
|
|
525
|
+
"data-column-index": columnIndex,
|
|
526
|
+
"data-row-index": index3,
|
|
527
|
+
"class": [style["virtual-table-row-td"], getCellClass(item), isPriorityRow, "virtual-table-row-td", item.customClass],
|
|
528
|
+
"style": columnStyle
|
|
529
|
+
}, [_cell()]);
|
|
530
|
+
};
|
|
531
|
+
const column = prop.tableColumn.map((item, i) => {
|
|
532
|
+
return columnRender(item, index2, i);
|
|
533
|
+
});
|
|
534
|
+
return createVNode(script, {
|
|
535
|
+
"item": data,
|
|
536
|
+
"index": index2,
|
|
537
|
+
"active": active2,
|
|
538
|
+
"onClickCapture": (e) => {
|
|
539
|
+
if (isIgnoredVirtualTableRowClick(e)) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
prop.itemHandle(data, index2);
|
|
543
|
+
if (!(data == null ? void 0 : data.disabled)) {
|
|
544
|
+
setSelection(data[prop.rowKey], !data.rowcheck);
|
|
545
|
+
emit("selection-change", getSelection());
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}, {
|
|
549
|
+
default: () => [createVNode("div", {
|
|
550
|
+
"class": [style["virtual-table-row"], "virtual-table-row", "relative", typeof prop.rowClassName === "string" ? prop.rowClassName : prop.rowClassName({
|
|
551
|
+
row: data,
|
|
552
|
+
rowIndex: index2
|
|
553
|
+
})],
|
|
554
|
+
"style": prop.rowStyle({
|
|
555
|
+
row: data,
|
|
556
|
+
rowIndex: index2
|
|
557
|
+
})
|
|
558
|
+
}, [createVNode("div", {
|
|
559
|
+
"class": [style["virtual-table-row-tr"], "virtual-table-row-tr"]
|
|
560
|
+
}, [column]), prop.expandSlotRender && createVNode("div", {
|
|
561
|
+
"style": {
|
|
562
|
+
width: prop.scroll ? getRowWidth() + "px" : "unset"
|
|
563
|
+
},
|
|
564
|
+
"class": [style["virtual-table-row-expand"], "virtual-table-row-expand"]
|
|
565
|
+
}, [prop.expandSlotRender(data, index2)])])]
|
|
566
|
+
});
|
|
567
|
+
};
|
|
568
|
+
const curScrollIndex = reactive({
|
|
569
|
+
startIndex: null,
|
|
570
|
+
endIndex: null,
|
|
571
|
+
visibleStartIndex: null,
|
|
572
|
+
visibleEndIndex: null
|
|
573
|
+
});
|
|
574
|
+
const CompRender = /* @__PURE__ */ defineComponent(() => {
|
|
575
|
+
return () => createVNode("div", {
|
|
576
|
+
"style": {
|
|
577
|
+
position: "relative",
|
|
578
|
+
background: "#fff"
|
|
579
|
+
}
|
|
580
|
+
}, [createVNode(script$1, {
|
|
581
|
+
"ref": DynamicScrollerRef,
|
|
582
|
+
"listClass": prop.wrapClass,
|
|
583
|
+
"keyField": prop.rowKey,
|
|
584
|
+
"itemClass": `${prop.scroll ? style["scroll-item-class"] : ""} ${prop.itemClass}`,
|
|
585
|
+
"class": ["dynamic-scroller-ref", style["dynamic-scroller-ref"], prop.border ? style.border : "", prop.scroll ? style.scroll : ""],
|
|
586
|
+
"items": tableData.value,
|
|
587
|
+
"style": tabStyle.value,
|
|
588
|
+
"minItemSize": prop.minItemSize,
|
|
589
|
+
"onScrollCapture": (e) => handleScroll(e),
|
|
590
|
+
"emitUpdate": !!prop.spanMethod,
|
|
591
|
+
"onUpdate": (startIndex, endIndex, visibleStartIndex, visibleEndIndex) => {
|
|
592
|
+
curScrollIndex.startIndex = startIndex;
|
|
593
|
+
curScrollIndex.endIndex = endIndex;
|
|
594
|
+
curScrollIndex.visibleStartIndex = visibleStartIndex;
|
|
595
|
+
curScrollIndex.visibleEndIndex = visibleEndIndex;
|
|
596
|
+
}
|
|
597
|
+
}, {
|
|
598
|
+
before: () => prop.noHeader ? null : HeaderRender(),
|
|
599
|
+
default: ({
|
|
600
|
+
item,
|
|
601
|
+
active: active2
|
|
602
|
+
}) => MainRender({
|
|
603
|
+
item,
|
|
604
|
+
index: item.__index,
|
|
605
|
+
active: active2
|
|
606
|
+
}),
|
|
607
|
+
empty: () => {
|
|
608
|
+
if (tableData.value.length) {
|
|
609
|
+
return createVNode("div", null, null);
|
|
610
|
+
}
|
|
611
|
+
if (!prop.emptySlotRender) {
|
|
612
|
+
return createVNode(ElEmpty, {
|
|
613
|
+
"description": "数据为空"
|
|
614
|
+
}, null);
|
|
615
|
+
}
|
|
616
|
+
return prop.emptySlotRender();
|
|
617
|
+
},
|
|
618
|
+
after: () => {
|
|
619
|
+
if (!prop.afterSlotRender) {
|
|
620
|
+
return null;
|
|
621
|
+
}
|
|
622
|
+
return prop.afterSlotRender();
|
|
623
|
+
}
|
|
624
|
+
}), prop.backTop && createVNode(ElBacktop, {
|
|
625
|
+
"target": ".dynamic-scroller-ref",
|
|
626
|
+
"right": 48,
|
|
627
|
+
"bottom": 112,
|
|
628
|
+
"onClickCapture": () => scrollTopHandler()
|
|
629
|
+
}, null)]);
|
|
630
|
+
});
|
|
631
|
+
const scrollTopHandler = () => {
|
|
632
|
+
var _a;
|
|
633
|
+
DynamicScrollerRef.value && DynamicScrollerRef.value.scrollToItem(0);
|
|
634
|
+
try {
|
|
635
|
+
const dom = document.querySelector(".business-scroll>.el-scrollbar__wrap");
|
|
636
|
+
const dom2 = document.querySelector(".factory-scroll>.el-scrollbar__wrap");
|
|
637
|
+
(_a = dom || dom2) == null ? void 0 : _a.scrollTo({
|
|
638
|
+
top: 0,
|
|
639
|
+
behavior: "smooth"
|
|
640
|
+
});
|
|
641
|
+
} catch (e) {
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
watch(() => prop.defaultSort, () => {
|
|
645
|
+
if (prop.defaultSort) {
|
|
646
|
+
sort.value = prop.defaultSort;
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
let index = 0;
|
|
650
|
+
onMounted(() => __async(null, null, function* () {
|
|
651
|
+
if (prop.defaultSort) {
|
|
652
|
+
sort.value = prop.defaultSort;
|
|
653
|
+
}
|
|
654
|
+
tableData.value = prop.items.map((item) => {
|
|
655
|
+
const column = prop.tableColumn.find((col) => col.type === "select");
|
|
656
|
+
const isSelectable = column && column.selectable && typeof column.selectable === "function" ? column.selectable(item) : true;
|
|
657
|
+
if (item.__ischildren) {
|
|
658
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
659
|
+
__index: index,
|
|
660
|
+
rowcheck: false,
|
|
661
|
+
disabled: !isSelectable
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
665
|
+
__index: index++,
|
|
666
|
+
rowcheck: false,
|
|
667
|
+
disabled: !isSelectable
|
|
668
|
+
});
|
|
669
|
+
});
|
|
670
|
+
tableWidth.value = getScrollEl().offsetWidth;
|
|
671
|
+
const resizeObserver = new ResizeObserver(() => __async(null, null, function* () {
|
|
672
|
+
yield nextTick();
|
|
673
|
+
tableWidth.value = getScrollEl().offsetWidth;
|
|
674
|
+
}));
|
|
675
|
+
resizeObserver.observe(getScrollEl());
|
|
676
|
+
}));
|
|
677
|
+
const getScrollEl = () => {
|
|
678
|
+
if (!DynamicScrollerRef.value) {
|
|
679
|
+
return {};
|
|
680
|
+
}
|
|
681
|
+
return DynamicScrollerRef.value.$el;
|
|
682
|
+
};
|
|
683
|
+
const scrollToItem = (index2) => {
|
|
684
|
+
if (index2 < 0 || index2 > tableData.value.length - 1) return;
|
|
685
|
+
DynamicScrollerRef.value.scrollToItem(index2);
|
|
686
|
+
};
|
|
687
|
+
__expose({
|
|
688
|
+
clearSelection,
|
|
689
|
+
getSelection,
|
|
690
|
+
setSelection,
|
|
691
|
+
getScrollEl,
|
|
692
|
+
scrollToItem
|
|
693
|
+
});
|
|
694
|
+
return (_ctx, _cache) => {
|
|
695
|
+
const _directive_horizontal_scroll = resolveDirective("horizontal-scroll");
|
|
696
|
+
return withDirectives((openBlock(), createBlock(unref(CompRender), null, null, 512)), [[_directive_horizontal_scroll, "VTable"]]);
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
const VirtualTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aaaf77e7"]]);
|
|
701
|
+
export {
|
|
702
|
+
VirtualTable as V
|
|
703
|
+
};
|