bm-admin-ui 1.0.1-alpha → 1.0.2-alpha
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/es/components/float-table/index.d.ts +68 -3
- package/es/components/float-table/index.js +166 -193
- package/es/components/float-table/src/float-table.vue.d.ts +45 -476
- package/es/components/multi-cascader-compose/index.d.ts +2 -2
- package/es/components/multi-cascader-compose/index.js +4 -4
- package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +2 -2
- package/es/components/search-filter/index.js +4 -4
- package/es/components/shops-filter/index.js +4 -4
- package/es/components/staffs-selector/index.js +4 -4
- package/es/components/upload/index.js +4 -4
- package/es/utils/vxe-table.d.ts +6 -0
- package/es/utils/vxe-table.js +28 -0
- package/index.esm.js +4872 -39973
- package/index.js +4870 -39971
- package/lib/components/float-table/index.d.ts +68 -3
- package/lib/components/float-table/index.js +165 -198
- package/lib/components/float-table/src/float-table.vue.d.ts +45 -476
- package/lib/components/multi-cascader-compose/index.d.ts +2 -2
- package/lib/components/multi-cascader-compose/index.js +4 -4
- package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +2 -2
- package/lib/components/search-filter/index.js +4 -4
- package/lib/components/shops-filter/index.js +4 -4
- package/lib/components/staffs-selector/index.js +4 -4
- package/lib/components/upload/index.js +4 -4
- package/lib/utils/vxe-table.d.ts +6 -0
- package/lib/utils/vxe-table.js +33 -0
- package/package.json +4 -3
- package/pnpm-global/5/node_modules/.pnpm/lock.yaml +3 -0
- package/pnpm-global/5/pnpm-lock.yaml +4 -0
- package/types/components/float-table/index.d.ts +68 -3
- package/types/components/float-table/src/float-table.vue.d.ts +45 -476
- package/types/components/multi-cascader-compose/index.d.ts +2 -2
- package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +2 -2
- package/types/utils/vxe-table.d.ts +6 -0
- package/.pnpm-debug.log +0 -16
|
@@ -1,5 +1,70 @@
|
|
|
1
|
-
declare const BmFloatTable: {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare const BmFloatTable: import("bm-admin-ui/es/utils/with-install").SFCWithInstall<{
|
|
2
|
+
name: string;
|
|
3
|
+
props: {
|
|
4
|
+
config: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
required: boolean;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
pagerProps: {
|
|
10
|
+
type: ObjectConstructor;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
type: ObjectConstructor;
|
|
15
|
+
default: () => {};
|
|
16
|
+
};
|
|
17
|
+
isNeedFloatHandle: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
emits: string[];
|
|
27
|
+
setup(props: any, { emit }: {
|
|
28
|
+
emit: any;
|
|
29
|
+
}): {
|
|
30
|
+
setItemRef(el: any, column: any, rowid: any): void;
|
|
31
|
+
leaveFloatTable(): void;
|
|
32
|
+
scrollTo(config?: {}): void;
|
|
33
|
+
pageNoChange(val: any): Promise<void>;
|
|
34
|
+
pageSizeChange(val: any, size: any): Promise<void>;
|
|
35
|
+
floatMouseLeave(): void;
|
|
36
|
+
floatOverMouse(): void;
|
|
37
|
+
goAnimationEndFn(): void;
|
|
38
|
+
scrollNotShowFloat(): void;
|
|
39
|
+
classes: import("vue").ComputedRef<(string | {
|
|
40
|
+
floatHandleTable: any;
|
|
41
|
+
})[]>;
|
|
42
|
+
gridOptions: import("vue").ComputedRef<any>;
|
|
43
|
+
gridEvents: import("vue").ComputedRef<any>;
|
|
44
|
+
pager: import("vue").ComputedRef<any>;
|
|
45
|
+
simpleImage: import("vue").Ref<JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}> | null | undefined)[]>;
|
|
50
|
+
floatRefsId: import("vue").Ref<{}>;
|
|
51
|
+
floatId: import("vue").Ref<string>;
|
|
52
|
+
isShowFloatHandle: import("vue").Ref<boolean>;
|
|
53
|
+
atVisible: import("vue").Ref<boolean>;
|
|
54
|
+
goAnimationEnd: import("vue").Ref<boolean>;
|
|
55
|
+
floatPosition: import("vue").Ref<{
|
|
56
|
+
top: string;
|
|
57
|
+
height: string;
|
|
58
|
+
}>;
|
|
59
|
+
trNodes: import("vue").Ref<any>;
|
|
60
|
+
isInScroll: import("vue").Ref<boolean>;
|
|
61
|
+
inMaxScorllX: import("vue").Ref<boolean>;
|
|
62
|
+
floatRow: import("vue").Ref<{}>;
|
|
63
|
+
floatRowIndex: import("vue").Ref<undefined>;
|
|
64
|
+
floatHandleDomCol: import("vue").Ref<any>;
|
|
65
|
+
floatTable: import("vue").Ref<any>;
|
|
66
|
+
xGrid: import("vue").Ref<any>;
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
4
69
|
export { BmFloatTable };
|
|
5
70
|
export default BmFloatTable;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import {
|
|
3
|
-
import Pagination from 'ant-design-vue/lib/pagination';
|
|
2
|
+
import { ref, onBeforeUnmount, reactive, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, mergeProps, toHandlers, createSlots, withCtx, createCommentVNode, createElementVNode, renderList, renderSlot, withDirectives, normalizeStyle, vShow, nextTick } from 'vue';
|
|
4
3
|
import { Empty } from 'ant-design-vue';
|
|
5
|
-
import XEUtils from 'xe-utils';
|
|
6
|
-
import { VXETable, Header, Footer, Column, Table, Grid, Pager, Checkbox, CheckboxGroup, Radio, RadioGroup, Select, Input, Tooltip, Keyboard, Toolbar, Button, Icon } from 'vxe-table';
|
|
7
|
-
import zhCN from 'vxe-table/es/locale/lang/zh-CN';
|
|
8
4
|
|
|
9
5
|
var _export_sfc = (sfc, props) => {
|
|
10
6
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -14,11 +10,8 @@ var _export_sfc = (sfc, props) => {
|
|
|
14
10
|
return target;
|
|
15
11
|
};
|
|
16
12
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
class: "floatPager"
|
|
20
|
-
};
|
|
21
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
const _sfc_main = {
|
|
14
|
+
name: "BmFloatTable",
|
|
22
15
|
props: {
|
|
23
16
|
config: {
|
|
24
17
|
type: Object,
|
|
@@ -55,13 +48,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
48
|
"pageChange",
|
|
56
49
|
"pageSizeChange"
|
|
57
50
|
],
|
|
58
|
-
setup(
|
|
59
|
-
const props = __props;
|
|
60
|
-
const AEmpty = Empty;
|
|
51
|
+
setup(props, { emit }) {
|
|
61
52
|
const floatTable = ref();
|
|
62
53
|
const xGrid = ref();
|
|
54
|
+
onBeforeUnmount(function() {
|
|
55
|
+
inObserverDom && inObserverDom.disconnect();
|
|
56
|
+
scrollNotShowFloatTime && clearTimeout(scrollNotShowFloatTime);
|
|
57
|
+
});
|
|
63
58
|
const state = reactive({
|
|
64
|
-
|
|
59
|
+
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
65
60
|
floatRefsId: {},
|
|
66
61
|
floatId: "",
|
|
67
62
|
isShowFloatHandle: true,
|
|
@@ -94,13 +89,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
94
89
|
},
|
|
95
90
|
gridEvents: {
|
|
96
91
|
radioChange(val) {
|
|
97
|
-
|
|
92
|
+
emit("radioChange", val);
|
|
98
93
|
},
|
|
99
94
|
checkboxChange(val) {
|
|
100
|
-
|
|
95
|
+
emit("checkboxChange", val);
|
|
101
96
|
},
|
|
102
97
|
checkboxAll(val) {
|
|
103
|
-
|
|
98
|
+
emit("checkboxChangeAll", val);
|
|
104
99
|
}
|
|
105
100
|
},
|
|
106
101
|
atVisible: false,
|
|
@@ -188,7 +183,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
188
183
|
extraFn.scroll = (e) => {
|
|
189
184
|
let propsscroll = props.events.scroll;
|
|
190
185
|
if (e.isY && props.isNeedFloatHandle) {
|
|
191
|
-
scrollNotShowFloat();
|
|
186
|
+
methods.scrollNotShowFloat();
|
|
192
187
|
}
|
|
193
188
|
if (e.isX && props.isNeedFloatHandle && state.floatHandleDomCol && gridOptions.value.data && gridOptions.value.data.length > 0) {
|
|
194
189
|
if (e.scrollLeft + e.$event.target.clientWidth >= e.$event.target.scrollWidth - state.floatHandleDomCol.clientWidth) {
|
|
@@ -203,7 +198,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
203
198
|
};
|
|
204
199
|
extraFn.cellMouseleave = (e) => {
|
|
205
200
|
let propsCellMouseLeave = props.events.cellMouseleave;
|
|
206
|
-
floatMouseLeave();
|
|
201
|
+
methods.floatMouseLeave();
|
|
207
202
|
propsCellMouseLeave && propsCellMouseLeave(e);
|
|
208
203
|
};
|
|
209
204
|
}
|
|
@@ -230,81 +225,82 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
230
225
|
...props.pagerProps
|
|
231
226
|
};
|
|
232
227
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
228
|
+
let scrollNotShowFloatTime;
|
|
229
|
+
const methods = {
|
|
230
|
+
setItemRef(el, column, rowid) {
|
|
231
|
+
if (!props.isNeedFloatHandle)
|
|
232
|
+
return;
|
|
233
|
+
state.floatRefsId[rowid] = el;
|
|
234
|
+
if (state.floatHandleDomCol)
|
|
235
|
+
return;
|
|
236
|
+
let id = column.id;
|
|
237
|
+
state.floatHandleDomCol = floatTable.value.querySelector(`.vxe-table--header-wrapper .vxe-header--row .${id}`);
|
|
238
|
+
},
|
|
239
|
+
leaveFloatTable() {
|
|
240
|
+
let timer = setTimeout(() => {
|
|
241
|
+
state.isShowFloatHandle = false;
|
|
242
|
+
state.floatId = "";
|
|
243
|
+
clearTimeout(timer);
|
|
244
|
+
}, 210);
|
|
245
|
+
},
|
|
246
|
+
scrollTo(config = {}) {
|
|
247
|
+
config = {
|
|
248
|
+
top: 0,
|
|
249
|
+
...config
|
|
250
|
+
};
|
|
251
|
+
floatTable.value?.querySelectorAll(".vxe-table--body-wrapper")?.forEach((table) => table?.scrollTo?.(config));
|
|
252
|
+
},
|
|
253
|
+
async pageNoChange(val) {
|
|
254
|
+
await emit("pageChange", val);
|
|
255
|
+
methods.scrollTo();
|
|
256
|
+
},
|
|
257
|
+
async pageSizeChange(val, size) {
|
|
258
|
+
await emit("pageSizeChange", size);
|
|
259
|
+
methods.scrollTo();
|
|
260
|
+
},
|
|
261
|
+
floatMouseLeave() {
|
|
262
|
+
if (!state.trNodes || state.trNodes?.length === 0)
|
|
263
|
+
return;
|
|
264
|
+
state.trNodes.forEach((item) => {
|
|
265
|
+
if (item && item.className.includes("floatHoverTr")) {
|
|
266
|
+
item.className = `${item.className.replace(/floatHoverTr/g, "")}`;
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
floatOverMouse() {
|
|
271
|
+
if (!state.trNodes || state.trNodes?.length === 0)
|
|
272
|
+
return;
|
|
273
|
+
state.trNodes.forEach((item) => {
|
|
274
|
+
if (item && !item.className.includes("floatHoverTr")) {
|
|
275
|
+
item.className = `${item.className} floatHoverTr`;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
goAnimationEndFn() {
|
|
280
|
+
state.goAnimationEnd = true;
|
|
281
|
+
},
|
|
282
|
+
scrollNotShowFloat() {
|
|
283
|
+
state.isInScroll = true;
|
|
244
284
|
state.isShowFloatHandle = false;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
config = {
|
|
251
|
-
top: 0,
|
|
252
|
-
...config
|
|
253
|
-
};
|
|
254
|
-
floatTable.value?.querySelectorAll(".vxe-table--body-wrapper")?.forEach((table) => table?.scrollTo?.(config));
|
|
255
|
-
};
|
|
256
|
-
expose({ scrollTo });
|
|
257
|
-
const pageNoChange = async (val) => {
|
|
258
|
-
await emits("pageChange", val);
|
|
259
|
-
scrollTo();
|
|
260
|
-
};
|
|
261
|
-
const pageSizeChange = async (val, size) => {
|
|
262
|
-
await emits("pageSizeChange", size);
|
|
263
|
-
scrollTo();
|
|
264
|
-
};
|
|
265
|
-
const floatMouseLeave = () => {
|
|
266
|
-
if (!state.trNodes || state.trNodes?.length === 0)
|
|
267
|
-
return;
|
|
268
|
-
state.trNodes.forEach((item) => {
|
|
269
|
-
if (item && item.className.includes("floatHoverTr")) {
|
|
270
|
-
item.className = `${item.className.replace(/floatHoverTr/g, "")}`;
|
|
285
|
+
clearTimeout(scrollNotShowFloatTime);
|
|
286
|
+
if (!state.atVisible) {
|
|
287
|
+
scrollNotShowFloatTime = setTimeout(function() {
|
|
288
|
+
state.isInScroll = false;
|
|
289
|
+
}, 300);
|
|
271
290
|
}
|
|
272
|
-
});
|
|
273
|
-
};
|
|
274
|
-
const floatOverMouse = () => {
|
|
275
|
-
if (!state.trNodes || state.trNodes?.length === 0)
|
|
276
|
-
return;
|
|
277
|
-
state.trNodes.forEach((item) => {
|
|
278
|
-
if (item && !item.className.includes("floatHoverTr")) {
|
|
279
|
-
item.className = `${item.className} floatHoverTr`;
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
};
|
|
283
|
-
const goAnimationEndFn = () => {
|
|
284
|
-
state.goAnimationEnd = true;
|
|
285
|
-
};
|
|
286
|
-
let scrollNotShowFloatTime;
|
|
287
|
-
const scrollNotShowFloat = () => {
|
|
288
|
-
state.isInScroll = true;
|
|
289
|
-
state.isShowFloatHandle = false;
|
|
290
|
-
clearTimeout(scrollNotShowFloatTime);
|
|
291
|
-
if (!state.atVisible) {
|
|
292
|
-
scrollNotShowFloatTime = setTimeout(function() {
|
|
293
|
-
state.isInScroll = false;
|
|
294
|
-
}, 300);
|
|
295
291
|
}
|
|
296
292
|
};
|
|
297
293
|
let inObserverDom;
|
|
298
294
|
let isHasOver;
|
|
299
295
|
let closeSetRow;
|
|
300
|
-
let
|
|
296
|
+
let headerWrapper;
|
|
301
297
|
if (props.isNeedFloatHandle) {
|
|
302
298
|
inObserverDom = new IntersectionObserver((entries) => {
|
|
303
299
|
entries.forEach((item) => {
|
|
304
300
|
if (item.intersectionRatio > 0.1) {
|
|
305
301
|
closeSetRow = closeSetRow || item.target.closest(".vxe-header--row");
|
|
306
|
-
|
|
307
|
-
if (closeSetRow.clientWidth <=
|
|
302
|
+
headerWrapper = headerWrapper || item.target.closest(".vxe-table--header-wrapper");
|
|
303
|
+
if (closeSetRow.clientWidth <= headerWrapper.clientWidth && !isHasOver) {
|
|
308
304
|
inObserverDom.disconnect();
|
|
309
305
|
} else {
|
|
310
306
|
isHasOver = true;
|
|
@@ -330,119 +326,96 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
330
326
|
immediate: true
|
|
331
327
|
});
|
|
332
328
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
class: normalizeClass(unref(classes)),
|
|
343
|
-
onMouseleave: leaveFloatTable
|
|
344
|
-
}, [
|
|
345
|
-
createVNode(_component_vxe_grid, mergeProps({
|
|
346
|
-
ref_key: "xGrid",
|
|
347
|
-
ref: xGrid
|
|
348
|
-
}, unref(gridOptions), toHandlers(unref(gridEvents))), createSlots({
|
|
349
|
-
pager: withCtx(() => [
|
|
350
|
-
unref(pager).total && !unref(pager).hideOnSinglePage ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
351
|
-
createVNode(unref(Pagination), mergeProps(unref(pager), {
|
|
352
|
-
onChange: pageNoChange,
|
|
353
|
-
onShowSizeChange: pageSizeChange
|
|
354
|
-
}), null, 16)
|
|
355
|
-
])) : createCommentVNode("v-if", true)
|
|
356
|
-
]),
|
|
357
|
-
empty: withCtx(() => [
|
|
358
|
-
createElementVNode("div", null, [
|
|
359
|
-
createVNode(unref(AEmpty), {
|
|
360
|
-
image: unref(state).emptyImg
|
|
361
|
-
}, null, 8, ["image"])
|
|
362
|
-
])
|
|
363
|
-
]),
|
|
364
|
-
_: 2
|
|
365
|
-
}, [
|
|
366
|
-
renderList(_ctx.$slots, (slot, key) => {
|
|
367
|
-
return {
|
|
368
|
-
name: key,
|
|
369
|
-
fn: withCtx((data) => [
|
|
370
|
-
key !== "floatHandle" ? renderSlot(_ctx.$slots, key, {
|
|
371
|
-
key: 0,
|
|
372
|
-
rowIndex: data.rowIndex,
|
|
373
|
-
row: data.row,
|
|
374
|
-
column: data.column
|
|
375
|
-
}) : (openBlock(), createElementBlock("div", {
|
|
376
|
-
key: 1,
|
|
377
|
-
ref: (el) => setItemRef(el, data.column, data.rowid)
|
|
378
|
-
}, [
|
|
379
|
-
renderSlot(_ctx.$slots, "floatHandle", {
|
|
380
|
-
row: data.row,
|
|
381
|
-
rowIndex: data.rowIndex,
|
|
382
|
-
column: data.column
|
|
383
|
-
})
|
|
384
|
-
], 512))
|
|
385
|
-
])
|
|
386
|
-
};
|
|
387
|
-
})
|
|
388
|
-
]), 1040),
|
|
389
|
-
withDirectives(createElementVNode("div", {
|
|
390
|
-
ref: "floatHandle",
|
|
391
|
-
class: normalizeClass(["floatHandle", {
|
|
392
|
-
floatRightIn: unref(state).isShowFloatHandle && !unref(state).goAnimationEnd
|
|
393
|
-
}]),
|
|
394
|
-
style: normalizeStyle({
|
|
395
|
-
top: unref(state).floatPosition?.top,
|
|
396
|
-
height: unref(state).floatPosition?.height
|
|
397
|
-
}),
|
|
398
|
-
onAnimationend: goAnimationEndFn,
|
|
399
|
-
onMouseenter: floatOverMouse,
|
|
400
|
-
onMouseleave: floatMouseLeave
|
|
401
|
-
}, [
|
|
402
|
-
createElementVNode("div", null, [
|
|
403
|
-
renderSlot(_ctx.$slots, "floatHandle", {
|
|
404
|
-
row: unref(state).floatRow,
|
|
405
|
-
rowIndex: unref(state).floatRowIndex
|
|
406
|
-
})
|
|
407
|
-
])
|
|
408
|
-
], 38), [
|
|
409
|
-
[
|
|
410
|
-
vShow,
|
|
411
|
-
unref(state).floatPosition?.top && __props.isNeedFloatHandle && unref(state).isShowFloatHandle
|
|
412
|
-
]
|
|
413
|
-
])
|
|
414
|
-
], 34);
|
|
329
|
+
return {
|
|
330
|
+
floatTable,
|
|
331
|
+
xGrid,
|
|
332
|
+
...toRefs(state),
|
|
333
|
+
classes,
|
|
334
|
+
gridOptions,
|
|
335
|
+
gridEvents,
|
|
336
|
+
pager,
|
|
337
|
+
...methods
|
|
415
338
|
};
|
|
416
339
|
}
|
|
417
|
-
});
|
|
418
|
-
var FloatTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "float-table.vue"]]);
|
|
419
|
-
|
|
420
|
-
VXETable.setup({
|
|
421
|
-
i18n: (key, args) => XEUtils.toFormatString(XEUtils.get(zhCN, key), args),
|
|
422
|
-
});
|
|
423
|
-
const BmTable = withInstall(FloatTable);
|
|
424
|
-
const BmFloatTable = {
|
|
425
|
-
install(app) {
|
|
426
|
-
app.component('BmTable', BmTable);
|
|
427
|
-
app
|
|
428
|
-
.use(Header)
|
|
429
|
-
.use(Footer)
|
|
430
|
-
.use(Column)
|
|
431
|
-
.use(Table)
|
|
432
|
-
.use(Grid)
|
|
433
|
-
.use(Pager)
|
|
434
|
-
.use(Checkbox)
|
|
435
|
-
.use(CheckboxGroup)
|
|
436
|
-
.use(Radio)
|
|
437
|
-
.use(RadioGroup)
|
|
438
|
-
.use(Select)
|
|
439
|
-
.use(Input)
|
|
440
|
-
.use(Tooltip)
|
|
441
|
-
.use(Keyboard)
|
|
442
|
-
.use(Toolbar)
|
|
443
|
-
.use(Button)
|
|
444
|
-
.use(Icon);
|
|
445
|
-
},
|
|
446
340
|
};
|
|
341
|
+
const _hoisted_1 = {
|
|
342
|
+
key: 0,
|
|
343
|
+
class: "floatPager"
|
|
344
|
+
};
|
|
345
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
346
|
+
const _component_a_pagination = resolveComponent("a-pagination");
|
|
347
|
+
const _component_a_empty = resolveComponent("a-empty");
|
|
348
|
+
const _component_vxe_grid = resolveComponent("vxe-grid");
|
|
349
|
+
return openBlock(), createElementBlock("div", {
|
|
350
|
+
ref: "floatTable",
|
|
351
|
+
class: normalizeClass($setup.classes),
|
|
352
|
+
onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.leaveFloatTable && _ctx.leaveFloatTable(...args))
|
|
353
|
+
}, [
|
|
354
|
+
createVNode(_component_vxe_grid, mergeProps({ ref: "xGrid" }, $setup.gridOptions, toHandlers($setup.gridEvents)), createSlots({
|
|
355
|
+
pager: withCtx(() => [
|
|
356
|
+
$setup.pager.total && !$setup.pager.hideOnSinglePage ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
357
|
+
createVNode(_component_a_pagination, mergeProps($setup.pager, {
|
|
358
|
+
onChange: _ctx.pageNoChange,
|
|
359
|
+
onShowSizeChange: _ctx.pageSizeChange
|
|
360
|
+
}), null, 16, ["onChange", "onShowSizeChange"])
|
|
361
|
+
])) : createCommentVNode("v-if", true)
|
|
362
|
+
]),
|
|
363
|
+
empty: withCtx(() => [
|
|
364
|
+
createElementVNode("div", null, [
|
|
365
|
+
createVNode(_component_a_empty, { image: _ctx.simpleImage }, null, 8, ["image"])
|
|
366
|
+
])
|
|
367
|
+
]),
|
|
368
|
+
_: 2
|
|
369
|
+
}, [
|
|
370
|
+
renderList(_ctx.$slots, (slot, key) => {
|
|
371
|
+
return {
|
|
372
|
+
name: key,
|
|
373
|
+
fn: withCtx((data) => [
|
|
374
|
+
key !== "floatHandle" ? renderSlot(_ctx.$slots, key, {
|
|
375
|
+
key: 0,
|
|
376
|
+
rowIndex: data.rowIndex,
|
|
377
|
+
row: data.row,
|
|
378
|
+
column: data.column
|
|
379
|
+
}) : (openBlock(), createElementBlock("div", {
|
|
380
|
+
key: 1,
|
|
381
|
+
ref: (el) => _ctx.setItemRef(el, data.column, data.rowid)
|
|
382
|
+
}, [
|
|
383
|
+
renderSlot(_ctx.$slots, "floatHandle", {
|
|
384
|
+
row: data.row,
|
|
385
|
+
rowIndex: data.rowIndex,
|
|
386
|
+
column: data.column
|
|
387
|
+
})
|
|
388
|
+
], 512))
|
|
389
|
+
])
|
|
390
|
+
};
|
|
391
|
+
})
|
|
392
|
+
]), 1040),
|
|
393
|
+
withDirectives(createElementVNode("div", {
|
|
394
|
+
ref: "floatHandle",
|
|
395
|
+
class: normalizeClass(["floatHandle", {
|
|
396
|
+
floatRightIn: _ctx.isShowFloatHandle && !_ctx.goAnimationEnd
|
|
397
|
+
}]),
|
|
398
|
+
style: normalizeStyle({
|
|
399
|
+
top: _ctx.floatPosition?.top,
|
|
400
|
+
height: _ctx.floatPosition?.height
|
|
401
|
+
}),
|
|
402
|
+
onAnimationend: _cache[0] || (_cache[0] = (...args) => _ctx.goAnimationEndFn && _ctx.goAnimationEndFn(...args)),
|
|
403
|
+
onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.floatOverMouse && _ctx.floatOverMouse(...args)),
|
|
404
|
+
onMouseleave: _cache[2] || (_cache[2] = (...args) => _ctx.floatMouseLeave && _ctx.floatMouseLeave(...args))
|
|
405
|
+
}, [
|
|
406
|
+
createElementVNode("div", null, [
|
|
407
|
+
renderSlot(_ctx.$slots, "floatHandle", {
|
|
408
|
+
row: _ctx.floatRow,
|
|
409
|
+
rowIndex: _ctx.floatRowIndex
|
|
410
|
+
})
|
|
411
|
+
])
|
|
412
|
+
], 38), [
|
|
413
|
+
[vShow, _ctx.floatPosition?.top && $props.isNeedFloatHandle && _ctx.isShowFloatHandle]
|
|
414
|
+
])
|
|
415
|
+
], 34);
|
|
416
|
+
}
|
|
417
|
+
var FloatTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "float-table.vue"]]);
|
|
418
|
+
|
|
419
|
+
const BmFloatTable = withInstall(FloatTable);
|
|
447
420
|
|
|
448
421
|
export { BmFloatTable, BmFloatTable as default };
|