vft 0.0.110 → 0.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +79 -79
- package/es/components/index.js +227 -222
- package/es/components/pagination/components/jumper.vue2.js +13 -13
- package/es/components/pagination/components/sizes.vue2.js +38 -23
- package/es/components/table/columns.js +170 -6
- package/es/components/table/index.js +11 -6
- package/es/components/table/table.vue2.js +76 -72
- package/es/index.js +201 -196
- package/es/package.json.js +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/table/columns.cjs +1 -1
- package/lib/components/table/index.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/pagination.scss +6 -1
- package/theme-style/src/table.scss +1 -1
- package/theme-style/vft-pagination.css +1 -1
- package/theme-style/vft-select-v2.css +1 -0
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isEqual as
|
|
3
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as c, ref as z, watch as n, computed as g, openBlock as d, createElementBlock as f, normalizeClass as S, unref as t, createVNode as h } from "vue";
|
|
2
|
+
import { isEqual as v } from "lodash";
|
|
3
|
+
import { useNamespace as C } from "../../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
5
5
|
import "../../../hooks/use-z-index/index.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../../utils/ns-cover.js";
|
|
9
|
-
import { usePagination as
|
|
10
|
-
|
|
9
|
+
import { usePagination as b } from "../usePagination.js";
|
|
10
|
+
import { VftSelect as y } from "../../select/index.js";
|
|
11
|
+
const G = /* @__PURE__ */ c({
|
|
11
12
|
__name: "sizes",
|
|
12
13
|
props: {
|
|
13
14
|
pageSize: {},
|
|
@@ -17,28 +18,42 @@ const b = /* @__PURE__ */ p({
|
|
|
17
18
|
size: {}
|
|
18
19
|
},
|
|
19
20
|
emits: ["page-size-change"],
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const r = i.includes(e.pageSize) ? e.pageSize : e.pageSizes[0];
|
|
29
|
-
s("page-size-change", r);
|
|
21
|
+
setup(a, { emit: l }) {
|
|
22
|
+
const p = C("pagination"), o = b(), i = z(a.pageSize);
|
|
23
|
+
n(
|
|
24
|
+
() => a.pageSizes,
|
|
25
|
+
(e, s) => {
|
|
26
|
+
if (!v(e, s) && Array.isArray(e)) {
|
|
27
|
+
const u = e.includes(a.pageSize) ? a.pageSize : a.pageSizes[0];
|
|
28
|
+
l("page-size-change", u);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
),
|
|
33
|
-
() =>
|
|
34
|
-
(
|
|
35
|
-
|
|
31
|
+
), n(
|
|
32
|
+
() => a.pageSize,
|
|
33
|
+
(e) => {
|
|
34
|
+
i.value = e;
|
|
36
35
|
}
|
|
37
|
-
),
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
), console.log(i);
|
|
37
|
+
const r = g(() => a.pageSizes.map((e) => ({ label: e + "条/页", value: e })));
|
|
38
|
+
function m(e) {
|
|
39
|
+
var s;
|
|
40
|
+
e !== i.value && (i.value = e, (s = o.handleSizeChange) == null || s.call(o, Number(e)));
|
|
41
|
+
}
|
|
42
|
+
return (e, s) => (d(), f("span", {
|
|
43
|
+
class: S(t(p).e("sizes"))
|
|
44
|
+
}, [
|
|
45
|
+
h(t(y), {
|
|
46
|
+
"model-value": i.value,
|
|
47
|
+
disabled: e.disabled,
|
|
48
|
+
"popper-class": e.popperClass,
|
|
49
|
+
size: e.size,
|
|
50
|
+
"validate-event": !1,
|
|
51
|
+
onChange: m,
|
|
52
|
+
options: r.value
|
|
53
|
+
}, null, 8, ["model-value", "disabled", "popper-class", "size", "options"])
|
|
54
|
+
], 2));
|
|
40
55
|
}
|
|
41
56
|
});
|
|
42
57
|
export {
|
|
43
|
-
|
|
58
|
+
G as default
|
|
44
59
|
};
|
|
@@ -1,10 +1,174 @@
|
|
|
1
|
-
|
|
1
|
+
import { createVNode as o, Fragment as d, isVNode as u } from "vue";
|
|
2
|
+
import { formatToDateTime as a } from "@vft/utils";
|
|
3
|
+
import "../divider/index.js";
|
|
4
|
+
import "../icon/index.js";
|
|
5
|
+
import "../avatar/index.js";
|
|
6
|
+
import "../empty/index.js";
|
|
7
|
+
import "../result/index.js";
|
|
8
|
+
import "../tabs/index.js";
|
|
9
|
+
import "../popper/index.js";
|
|
10
|
+
import "../collapse-transition/index.js";
|
|
11
|
+
import "../tooltip/index.js";
|
|
12
|
+
import "../popover/index.js";
|
|
13
|
+
import "../menu/index.js";
|
|
14
|
+
import "../context-menu/context-menu.vue2.js";
|
|
15
|
+
import "../multiple-tabs/index.js";
|
|
16
|
+
import "../header-layout/index.js";
|
|
17
|
+
import "../footer-layout/index.js";
|
|
18
|
+
import "../iframe-layout/index.js";
|
|
19
|
+
import "../router-view-content/index.js";
|
|
20
|
+
import "../logo/index.js";
|
|
21
|
+
import "../backtop/index.js";
|
|
22
|
+
import "../container/index.js";
|
|
23
|
+
import "../config-provider/index.js";
|
|
24
|
+
import "../descriptions/index.js";
|
|
25
|
+
import "../full-screen/index.js";
|
|
26
|
+
import "../icon-text/index.js";
|
|
27
|
+
import "../image/index.js";
|
|
28
|
+
import "../input/index.js";
|
|
29
|
+
import "../link/index.js";
|
|
30
|
+
import "../pagination/index.js";
|
|
31
|
+
import { VftTag as f } from "../tag/index.js";
|
|
32
|
+
import "../side-menu/index.js";
|
|
33
|
+
import "../qrcode/index.js";
|
|
34
|
+
import "../overlay/index.js";
|
|
35
|
+
import "../clamp/index.js";
|
|
36
|
+
import "../clamp-toggle/index.js";
|
|
37
|
+
import "../page-wrapper/index.js";
|
|
38
|
+
import "../exception/index.js";
|
|
39
|
+
import "../search/index.js";
|
|
40
|
+
import "../form/index.js";
|
|
41
|
+
import { VftButton as l } from "../button/index.js";
|
|
42
|
+
import "../checkbox/index.js";
|
|
43
|
+
import "../radio/index.js";
|
|
44
|
+
import "../switch/index.js";
|
|
45
|
+
import "../color-picker/index.js";
|
|
46
|
+
import "../scrollbar/index.js";
|
|
47
|
+
import "../dropdown/index.js";
|
|
48
|
+
import "../virtual-list/components/fixed-size-list.js";
|
|
49
|
+
import "../virtual-list/components/dynamic-size-list.js";
|
|
50
|
+
import "../virtual-list/components/fixed-size-grid.js";
|
|
51
|
+
import "../virtual-list/components/dynamic-size-grid.js";
|
|
52
|
+
import "../virtual-list/props.js";
|
|
53
|
+
import "../select/index.js";
|
|
54
|
+
import "../verify-code/index.js";
|
|
55
|
+
import "./index.js";
|
|
56
|
+
import "../image-viewer/index.js";
|
|
57
|
+
import "../list-cell/index.js";
|
|
58
|
+
import "../dialog/index.js";
|
|
59
|
+
import "../date-time-select/index.js";
|
|
60
|
+
import "../col/index.js";
|
|
61
|
+
import "../row/index.js";
|
|
62
|
+
import "../horizontal-menu/index.js";
|
|
63
|
+
import "../time-picker/index.js";
|
|
64
|
+
import "../date-picker/index.js";
|
|
65
|
+
import "../check-tag/index.js";
|
|
66
|
+
import "../tree/index.js";
|
|
67
|
+
import "../skeleton/index.js";
|
|
68
|
+
import "../space/index.js";
|
|
69
|
+
import "../card/index.js";
|
|
70
|
+
import { VftPopconfirm as c } from "../popconfirm/index.js";
|
|
71
|
+
import "../alert/index.js";
|
|
72
|
+
import "../drawer/index.js";
|
|
73
|
+
import "../input-number/index.js";
|
|
74
|
+
import "../slider/index.js";
|
|
75
|
+
import "../autocomplete/index.js";
|
|
76
|
+
import "../super-form/index.js";
|
|
77
|
+
import "../progress/index.js";
|
|
78
|
+
import "../upload/index.js";
|
|
79
|
+
import "../md-container/index.js";
|
|
80
|
+
import "../md-comment/index.js";
|
|
81
|
+
import "../md-tabs/index.js";
|
|
82
|
+
import "../md-vue-playground/index.js";
|
|
83
|
+
import "../md-code-demo/index.js";
|
|
84
|
+
import "../md-code-tabs/index.js";
|
|
85
|
+
import "../message/index.js";
|
|
86
|
+
import "../config-provider/hooks/use-global-config.js";
|
|
87
|
+
import "@popperjs/core";
|
|
88
|
+
import "lodash";
|
|
89
|
+
import "../../hooks/use-z-index/index.js";
|
|
90
|
+
import "@vueuse/core";
|
|
91
|
+
import "../../utils/ns-cover.js";
|
|
92
|
+
function e(t) {
|
|
93
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !u(t);
|
|
94
|
+
}
|
|
95
|
+
const wt = {
|
|
2
96
|
type: "seq",
|
|
3
97
|
title: "序号",
|
|
4
|
-
|
|
5
|
-
fixed: "left"
|
|
6
|
-
|
|
7
|
-
|
|
98
|
+
minWidth: 70,
|
|
99
|
+
fixed: "left"
|
|
100
|
+
}, Tt = {
|
|
101
|
+
field: "name",
|
|
102
|
+
title: "名称",
|
|
103
|
+
minWidth: 100
|
|
104
|
+
}, xt = (t) => ({
|
|
105
|
+
minWidth: 170,
|
|
106
|
+
field: "updateTime",
|
|
107
|
+
title: "更新时间",
|
|
108
|
+
formatter: ({
|
|
109
|
+
row: i
|
|
110
|
+
}) => a(i.updateTime, t)
|
|
111
|
+
}), ti = (t) => ({
|
|
112
|
+
minWidth: 170,
|
|
113
|
+
field: "createTime",
|
|
114
|
+
title: "创建时间",
|
|
115
|
+
formatter: ({
|
|
116
|
+
row: i
|
|
117
|
+
}) => a(i.updateTime, t)
|
|
118
|
+
}), ii = (t = "status", i = "正常", m = "禁用") => ({
|
|
119
|
+
field: t,
|
|
120
|
+
title: "状态",
|
|
121
|
+
width: 100,
|
|
122
|
+
slots: {
|
|
123
|
+
default: ({
|
|
124
|
+
row: r
|
|
125
|
+
}) => r != null && r[t] ? o(f, {
|
|
126
|
+
type: "danger"
|
|
127
|
+
}, e(m) ? m : {
|
|
128
|
+
default: () => [m]
|
|
129
|
+
}) : o(f, null, e(i) ? i : {
|
|
130
|
+
default: () => [i]
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
}), ri = ({
|
|
134
|
+
confirmText: t = "确认删除?",
|
|
135
|
+
leftClickCallbak: i = (p) => {
|
|
136
|
+
},
|
|
137
|
+
rightClickCallbak: m = (p) => {
|
|
138
|
+
},
|
|
139
|
+
leftText: r = "编辑",
|
|
140
|
+
rightText: n = "删除"
|
|
141
|
+
}) => ({
|
|
142
|
+
title: "操作栏",
|
|
143
|
+
minWidth: 150,
|
|
144
|
+
slots: {
|
|
145
|
+
default: ({
|
|
146
|
+
row: p
|
|
147
|
+
}) => o(d, null, [o(l, {
|
|
148
|
+
size: "small",
|
|
149
|
+
type: "primary",
|
|
150
|
+
onClick: () => i(p)
|
|
151
|
+
}, e(r) ? r : {
|
|
152
|
+
default: () => [r]
|
|
153
|
+
}), o(c, {
|
|
154
|
+
width: "150",
|
|
155
|
+
onConfirm: () => m(p),
|
|
156
|
+
title: t
|
|
157
|
+
}, {
|
|
158
|
+
reference: () => o(l, {
|
|
159
|
+
size: "small",
|
|
160
|
+
type: "danger"
|
|
161
|
+
}, e(n) ? n : {
|
|
162
|
+
default: () => [n]
|
|
163
|
+
})
|
|
164
|
+
})])
|
|
165
|
+
}
|
|
166
|
+
});
|
|
8
167
|
export {
|
|
9
|
-
|
|
168
|
+
ri as action_field,
|
|
169
|
+
ti as create_time_field,
|
|
170
|
+
Tt as name_field,
|
|
171
|
+
wt as seq_field,
|
|
172
|
+
ii as state_field,
|
|
173
|
+
xt as update_time_field
|
|
10
174
|
};
|
|
@@ -4,11 +4,16 @@ import "@vft/utils";
|
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "../../utils/ns-cover.js";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
7
|
+
import e from "./table.vue2.js";
|
|
8
|
+
import { action_field as s, create_time_field as n, name_field as c, seq_field as u, state_field as x, update_time_field as b } from "./columns.js";
|
|
9
|
+
const p = t(e);
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
p as VftTable,
|
|
12
|
+
s as action_field,
|
|
13
|
+
n as create_time_field,
|
|
14
|
+
p as default,
|
|
15
|
+
c as name_field,
|
|
16
|
+
u as seq_field,
|
|
17
|
+
x as state_field,
|
|
18
|
+
b as update_time_field
|
|
14
19
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as q, useAttrs as
|
|
2
|
-
import { VftEmpty as
|
|
1
|
+
import { defineComponent as q, useAttrs as K, ref as s, computed as v, watch as y, createVNode as C, reactive as Q, onMounted as U, resolveComponent as Z, openBlock as b, createElementBlock as _, normalizeClass as S, unref as l, createBlock as H, mergeProps as w, createCommentVNode as L, createSlots as ee, withCtx as R, withDirectives as te, createElementVNode as O, vShow as ae } from "vue";
|
|
2
|
+
import { VftEmpty as ne } from "../empty/index.js";
|
|
3
3
|
import { VftPagination as W } from "../pagination/index.js";
|
|
4
4
|
import { useNamespace as le } from "../../hooks/use-namespace/index.js";
|
|
5
5
|
import "@popperjs/core";
|
|
6
6
|
import "lodash";
|
|
7
7
|
import "../../hooks/use-z-index/index.js";
|
|
8
|
-
import { useDebounceFn as
|
|
8
|
+
import { useDebounceFn as oe, useResizeObserver as re } from "@vueuse/core";
|
|
9
9
|
import "@vft/utils";
|
|
10
10
|
import "../../utils/ns-cover.js";
|
|
11
11
|
import I from "vxe-table";
|
|
12
|
-
import { EmptyEnum as
|
|
12
|
+
import { EmptyEnum as ie } from "../empty/constants.js";
|
|
13
13
|
const r = (
|
|
14
14
|
/* hoist-static*/
|
|
15
15
|
le("table")
|
|
16
|
-
),
|
|
16
|
+
), se = q({
|
|
17
17
|
name: r.b()
|
|
18
|
-
}),
|
|
19
|
-
...
|
|
18
|
+
}), Se = /* @__PURE__ */ q({
|
|
19
|
+
...se,
|
|
20
20
|
props: {
|
|
21
21
|
maxHeight: {},
|
|
22
22
|
columns: {},
|
|
@@ -53,32 +53,32 @@ const r = (
|
|
|
53
53
|
},
|
|
54
54
|
pageOptions: {}
|
|
55
55
|
},
|
|
56
|
-
emits: ["page-change", "sort-change", "update:
|
|
57
|
-
setup(
|
|
56
|
+
emits: ["page-change", "size-change", "sort-change", "update:page-num", "update:page-size"],
|
|
57
|
+
setup(n, {
|
|
58
58
|
expose: T,
|
|
59
|
-
emit:
|
|
59
|
+
emit: u
|
|
60
60
|
}) {
|
|
61
|
-
const V =
|
|
61
|
+
const V = K(), $ = s(0), i = s(), A = oe(() => j(), 120), k = v(() => n.pagePlacement.startsWith("bottom")), D = v(() => n.columns.map((e) => (e.align || (e.align = "center"), !e.formatter && !e.slots && !e.cellRender && (e.formatter = ({
|
|
62
62
|
cellValue: t
|
|
63
63
|
}) => t || "-"), e)));
|
|
64
|
-
y([() =>
|
|
64
|
+
y([() => n.loading, () => n.data, () => n.columns], () => {
|
|
65
65
|
A();
|
|
66
66
|
}, {
|
|
67
67
|
immediate: !0
|
|
68
68
|
});
|
|
69
|
-
function
|
|
70
|
-
|
|
69
|
+
function j() {
|
|
70
|
+
d.data = n.data, z(n.pageNum);
|
|
71
71
|
}
|
|
72
72
|
I.renderer.add("Encrypt", {
|
|
73
73
|
// 加密模板
|
|
74
74
|
renderDefault(e, t) {
|
|
75
75
|
const {
|
|
76
76
|
row: a,
|
|
77
|
-
column:
|
|
77
|
+
column: p
|
|
78
78
|
} = t;
|
|
79
79
|
return C("span", {
|
|
80
80
|
class: "line-clamp",
|
|
81
|
-
innerHTML: a[
|
|
81
|
+
innerHTML: a[p.field] || "-"
|
|
82
82
|
}, null);
|
|
83
83
|
}
|
|
84
84
|
}), I.formats.mixin({
|
|
@@ -88,13 +88,16 @@ const r = (
|
|
|
88
88
|
return e || "-";
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
+
function G(e) {
|
|
92
|
+
u("page-change", e), u("update:page-num", e);
|
|
93
|
+
}
|
|
91
94
|
function M(e) {
|
|
92
|
-
|
|
95
|
+
u("size-change", e), u("update:page-size", e);
|
|
93
96
|
}
|
|
94
97
|
const X = () => ({
|
|
95
98
|
maxHeight: "88px",
|
|
96
99
|
height: "44px"
|
|
97
|
-
}),
|
|
100
|
+
}), F = (e) => {
|
|
98
101
|
var a;
|
|
99
102
|
const {
|
|
100
103
|
column: t
|
|
@@ -102,7 +105,7 @@ const r = (
|
|
|
102
105
|
return {
|
|
103
106
|
maxHeight: ((a = t == null ? void 0 : t.cellRender) == null ? void 0 : a.name) === "Clamp" ? "max-content" : "44px"
|
|
104
107
|
};
|
|
105
|
-
},
|
|
108
|
+
}, d = Q({
|
|
106
109
|
autoResize: !0,
|
|
107
110
|
sortConfig: {
|
|
108
111
|
trigger: "cell",
|
|
@@ -110,7 +113,7 @@ const r = (
|
|
|
110
113
|
defaultSort: {
|
|
111
114
|
field: "",
|
|
112
115
|
order: "desc",
|
|
113
|
-
...
|
|
116
|
+
...n.defaultSort
|
|
114
117
|
},
|
|
115
118
|
orders: ["desc", "asc", null]
|
|
116
119
|
},
|
|
@@ -119,7 +122,7 @@ const r = (
|
|
|
119
122
|
},
|
|
120
123
|
cellClassName: "cellClass",
|
|
121
124
|
rowClassName: "rowClass",
|
|
122
|
-
cellStyle:
|
|
125
|
+
cellStyle: F,
|
|
123
126
|
rowStyle: X,
|
|
124
127
|
headerRowClassName: "headerRowClass",
|
|
125
128
|
headerAlign: "center",
|
|
@@ -136,77 +139,77 @@ const r = (
|
|
|
136
139
|
scrollX: {
|
|
137
140
|
enabled: !1
|
|
138
141
|
},
|
|
139
|
-
...
|
|
142
|
+
...n.tableConfig,
|
|
140
143
|
...V
|
|
141
|
-
}),
|
|
142
|
-
|
|
144
|
+
}), Y = (e) => {
|
|
145
|
+
u("sort-change", e);
|
|
143
146
|
};
|
|
144
|
-
y(() =>
|
|
145
|
-
|
|
147
|
+
y(() => n.pageNum, (e) => {
|
|
148
|
+
z(e);
|
|
146
149
|
});
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
let
|
|
151
|
-
const
|
|
150
|
+
const z = (e) => {
|
|
151
|
+
d.seqConfig && (d.seqConfig.startIndex = (e - 1) * n.pageSize);
|
|
152
|
+
}, c = s(), B = s();
|
|
153
|
+
let f = s(!1), o = s(null), m = s(null);
|
|
154
|
+
const g = v(() => {
|
|
152
155
|
var e;
|
|
153
|
-
return ((e =
|
|
156
|
+
return ((e = n.sticky) == null ? void 0 : e.getContainer) || document.documentElement || document.body;
|
|
154
157
|
});
|
|
155
|
-
y(() => [i,
|
|
158
|
+
y(() => [i, n.sticky], () => {
|
|
156
159
|
var e, t, a;
|
|
157
|
-
(e = i.value) != null && e.$el &&
|
|
158
|
-
|
|
160
|
+
(e = i.value) != null && e.$el && n.sticky && ((t = g.value) == null || t.removeEventListener("scroll", h), (a = g.value) == null || a.addEventListener("scroll", h), setTimeout(() => {
|
|
161
|
+
E();
|
|
159
162
|
}, 50));
|
|
160
163
|
}, {
|
|
161
164
|
immediate: !0,
|
|
162
165
|
deep: !0
|
|
163
166
|
});
|
|
164
|
-
function
|
|
165
|
-
if (!o.value || !m.value || (h(), !
|
|
167
|
+
function E() {
|
|
168
|
+
if (!o.value || !m.value || (h(), !f.value))
|
|
166
169
|
return;
|
|
167
170
|
const e = o.value.clientWidth, t = m.value.offsetWidth;
|
|
168
|
-
|
|
171
|
+
c.value.style.width = e - 1 + "px", B.value.style.width = t + "px";
|
|
169
172
|
}
|
|
170
173
|
function h() {
|
|
171
|
-
var
|
|
172
|
-
if (!((
|
|
174
|
+
var N, P, x;
|
|
175
|
+
if (!((N = i.value) != null && N.$el) || !o.value || !g.value)
|
|
173
176
|
return;
|
|
174
|
-
const e = ((P =
|
|
177
|
+
const e = ((P = g.value) == null ? void 0 : P.clientHeight) || window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, {
|
|
175
178
|
top: t,
|
|
176
179
|
bottom: a
|
|
177
|
-
} = o.value.getBoundingClientRect(),
|
|
178
|
-
|
|
180
|
+
} = o.value.getBoundingClientRect(), p = ((x = g.value) == null ? void 0 : x.getBoundingClientRect().top) || document.body.getBoundingClientRect().top;
|
|
181
|
+
f.value = t < e && a > e && a - p > e, c.value.scrollLeft = o.value.scrollLeft;
|
|
179
182
|
}
|
|
180
|
-
const
|
|
183
|
+
const J = () => {
|
|
181
184
|
var t;
|
|
182
185
|
const e = (t = i.value) == null ? void 0 : t.$el;
|
|
183
186
|
e && (o.value = e.querySelector(".vxe-table--body-wrapper"), m.value = e.querySelector(".vxe-table--body"), !(!o.value && !m.value) && (o.value.addEventListener("scroll", function(a) {
|
|
184
|
-
|
|
185
|
-
}),
|
|
187
|
+
c.value.scrollLeft = a.target.scrollLeft;
|
|
188
|
+
}), c.value.addEventListener("scroll", function(a) {
|
|
186
189
|
o.value.scrollLeft = a.target.scrollLeft;
|
|
187
190
|
})));
|
|
188
191
|
};
|
|
189
|
-
return
|
|
190
|
-
|
|
192
|
+
return U(() => {
|
|
193
|
+
n.sticky && (J(), re(i, () => E()));
|
|
191
194
|
}), T({
|
|
192
|
-
|
|
195
|
+
xGrid: i
|
|
193
196
|
}), (e, t) => {
|
|
194
|
-
const a =
|
|
195
|
-
return b(),
|
|
196
|
-
class:
|
|
197
|
-
}, [e.showPager && !k.value ? (b(), H(
|
|
197
|
+
const a = Z("vxe-grid");
|
|
198
|
+
return b(), _("div", {
|
|
199
|
+
class: S(l(r).b())
|
|
200
|
+
}, [e.showPager && !k.value ? (b(), H(l(W), w({
|
|
198
201
|
key: 0,
|
|
199
|
-
class: [
|
|
202
|
+
class: [l(r).e("pager"), l(r).m("pager-" + e.pagePlacement)],
|
|
200
203
|
layout: "prev, pager, next"
|
|
201
204
|
}, e.pageOptions, {
|
|
202
205
|
total: e.total,
|
|
203
206
|
"page-size": e.pageSize,
|
|
204
|
-
onCurrentChange: t[0] || (t[0] = (
|
|
207
|
+
onCurrentChange: t[0] || (t[0] = (p) => u("page-change", e.pageNum)),
|
|
205
208
|
"current-page": e.pageNum
|
|
206
|
-
}), null, 16, ["class", "total", "page-size", "current-page"])) : L("", !0), C(a,
|
|
209
|
+
}), null, 16, ["class", "total", "page-size", "current-page"])) : L("", !0), C(a, w({
|
|
207
210
|
ref_key: "xGrid",
|
|
208
211
|
ref: i
|
|
209
|
-
},
|
|
212
|
+
}, d, {
|
|
210
213
|
height: e.height,
|
|
211
214
|
"max-height": e.maxHeight,
|
|
212
215
|
columns: D.value,
|
|
@@ -214,37 +217,38 @@ const r = (
|
|
|
214
217
|
"auto-resize": "",
|
|
215
218
|
loading: e.loading,
|
|
216
219
|
resizable: "",
|
|
217
|
-
onSortChange:
|
|
218
|
-
}),
|
|
219
|
-
empty: R(() => [C(
|
|
220
|
-
type:
|
|
220
|
+
onSortChange: Y
|
|
221
|
+
}), ee({
|
|
222
|
+
empty: R(() => [C(l(ne), {
|
|
223
|
+
type: l(ie).NO_DATA
|
|
221
224
|
}, null, 8, ["type"])]),
|
|
222
225
|
_: 2
|
|
223
226
|
}, [e.sticky ? {
|
|
224
227
|
name: "bottom",
|
|
225
|
-
fn: R(() => [
|
|
228
|
+
fn: R(() => [te(O("div", {
|
|
226
229
|
ref_key: "stickyScroll",
|
|
227
|
-
ref:
|
|
228
|
-
class:
|
|
230
|
+
ref: c,
|
|
231
|
+
class: S(l(r).e("sticky-scroll-warpper"))
|
|
229
232
|
}, [O("div", {
|
|
230
233
|
ref_key: "stickyScrollBar",
|
|
231
|
-
ref:
|
|
232
|
-
class:
|
|
233
|
-
}, null, 2)], 2), [[
|
|
234
|
+
ref: B,
|
|
235
|
+
class: S(l(r).e("sticky-scroll-bar"))
|
|
236
|
+
}, null, 2)], 2), [[ae, l(f)]])]),
|
|
234
237
|
key: "0"
|
|
235
|
-
} : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]), e.showPager && k.value ? (b(), H(
|
|
238
|
+
} : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]), e.showPager && k.value ? (b(), H(l(W), w({
|
|
236
239
|
key: 1,
|
|
237
|
-
class: [
|
|
238
|
-
layout: "prev, pager, next"
|
|
240
|
+
class: [l(r).e("pager"), l(r).m("pager-" + e.pagePlacement)],
|
|
241
|
+
layout: "prev, pager, next, jumper"
|
|
239
242
|
}, e.pageOptions, {
|
|
240
243
|
total: e.total,
|
|
241
244
|
"page-size": e.pageSize,
|
|
242
|
-
onCurrentChange:
|
|
245
|
+
onCurrentChange: G,
|
|
246
|
+
onSizeChange: M,
|
|
243
247
|
"current-page": e.pageNum
|
|
244
248
|
}), null, 16, ["class", "total", "page-size", "current-page"])) : L("", !0)], 2);
|
|
245
249
|
};
|
|
246
250
|
}
|
|
247
251
|
});
|
|
248
252
|
export {
|
|
249
|
-
|
|
253
|
+
Se as default
|
|
250
254
|
};
|