vft 0.0.83 → 0.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/component.js +28 -26
- package/es/components/alert/index.js +1 -1
- package/es/components/backtop/backtop.vue.js +4 -0
- package/es/components/{back-top/back-top.vue2.js → backtop/backtop.vue2.js} +5 -4
- package/es/components/{back-top → backtop}/index.js +2 -2
- package/es/components/backtop/style/css.js +2 -0
- package/es/components/backtop/style/index.js +2 -0
- package/es/components/container/footer.vue2.js +15 -21
- package/es/components/container/header.vue2.js +10 -16
- package/es/components/context-menu/context-menu.vue2.js +4 -3
- package/es/components/footer-layout/footer-layout.vue2.js +4 -3
- package/es/components/header-layout/header-layout.vue2.js +4 -3
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +37 -37
- package/es/components/index.js +151 -149
- package/es/components/md-container/md-container.vue2.js +4 -3
- package/es/components/menu/menu-item.vue2.js +4 -3
- package/es/components/menu/sub-menu.vue2.js +4 -3
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +4 -3
- package/es/components/result/result.vue2.js +4 -3
- package/es/components/side-menu/side-menu.vue2.js +4 -3
- package/es/components/table/columns.js +10 -0
- package/es/components/table/table.vue2.js +121 -154
- package/es/components/tabs/tab-nav.vue2.js +4 -3
- package/es/index.js +280 -278
- package/es/package.json.js +1 -1
- package/lib/component.cjs +1 -1
- package/lib/components/alert/index.cjs +1 -1
- package/lib/components/{back-top/back-top.vue.cjs → backtop/backtop.vue.cjs} +1 -1
- package/lib/components/{back-top/back-top.vue2.cjs → backtop/backtop.vue2.cjs} +1 -1
- package/lib/components/{back-top → backtop}/index.cjs +1 -1
- package/lib/components/{back-top → backtop}/style/css.cjs +1 -1
- package/lib/components/{back-top → backtop}/style/index.cjs +1 -1
- package/lib/components/container/footer.vue2.cjs +1 -1
- package/lib/components/container/header.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/table/columns.cjs +1 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-style/base.css +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/{back-top.scss → backtop.scss} +3 -3
- package/theme-style/src/common/var.scss +6 -6
- package/theme-style/src/index.scss +1 -1
- package/theme-style/src/table.scss +105 -66
- package/theme-style/vft-backtop.css +1 -0
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
- package/es/components/back-top/back-top.vue.js +0 -4
- package/es/components/back-top/style/css.js +0 -2
- package/es/components/back-top/style/index.js +0 -2
- /package/es/components/{back-top/use-back-top.js → backtop/use-backtop.js} +0 -0
- /package/lib/components/{back-top/use-back-top.cjs → backtop/use-backtop.cjs} +0 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftEmpty as
|
|
3
|
-
import { VftPagination as
|
|
4
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as V, useAttrs as Y, ref as c, computed as H, watch as y, createVNode as p, reactive as J, onMounted as K, resolveComponent as Q, openBlock as C, createElementBlock as U, normalizeClass as b, unref as n, createBlock as L, mergeProps as x, createCommentVNode as P, createSlots as Z, withCtx as R, withDirectives as _, createElementVNode as O, vShow as ee } from "vue";
|
|
2
|
+
import { VftEmpty as te } from "../empty/index.js";
|
|
3
|
+
import { VftPagination as W } from "../pagination/index.js";
|
|
4
|
+
import { useNamespace as ae } 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 le, useResizeObserver as ne } from "@vueuse/core";
|
|
9
9
|
import "@vft/utils";
|
|
10
10
|
import "../../utils/ns-cover.js";
|
|
11
|
-
import
|
|
12
|
-
import { EmptyEnum as
|
|
13
|
-
const
|
|
11
|
+
import I from "vxe-table";
|
|
12
|
+
import { EmptyEnum as oe } from "../empty/constants.js";
|
|
13
|
+
const r = (
|
|
14
14
|
/* hoist-static*/
|
|
15
|
-
|
|
16
|
-
),
|
|
17
|
-
name:
|
|
18
|
-
}),
|
|
19
|
-
...
|
|
15
|
+
ae("table")
|
|
16
|
+
), re = V({
|
|
17
|
+
name: r.b()
|
|
18
|
+
}), Ce = /* @__PURE__ */ V({
|
|
19
|
+
...re,
|
|
20
20
|
props: {
|
|
21
21
|
maxHeight: null,
|
|
22
22
|
columns: null,
|
|
23
|
-
|
|
23
|
+
data: {
|
|
24
24
|
default: []
|
|
25
25
|
},
|
|
26
26
|
loading: {
|
|
@@ -50,86 +50,53 @@ const c = (
|
|
|
50
50
|
pageOptions: null
|
|
51
51
|
},
|
|
52
52
|
emits: ["page-change", "sort-change", "update:pageNum"],
|
|
53
|
-
setup(
|
|
53
|
+
setup(e, {
|
|
54
54
|
expose: q,
|
|
55
|
-
emit:
|
|
55
|
+
emit: d
|
|
56
56
|
}) {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
const T = Y(), $ = c(0), i = c(), A = le(() => D(), 120), S = H(() => e.pagePlacement.startsWith("bottom"));
|
|
58
|
+
y([() => e.loading, () => e.data, () => e.columns], () => {
|
|
59
|
+
A();
|
|
60
60
|
}, {
|
|
61
61
|
immediate: !0
|
|
62
62
|
});
|
|
63
|
-
function
|
|
64
|
-
|
|
63
|
+
function D() {
|
|
64
|
+
g.data = e.data, w(e.pageNum);
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
I.renderer.add("Encrypt", {
|
|
67
67
|
// 加密模板
|
|
68
|
-
renderDefault(
|
|
68
|
+
renderDefault(t, a) {
|
|
69
69
|
const {
|
|
70
|
-
row:
|
|
71
|
-
column:
|
|
72
|
-
} =
|
|
70
|
+
row: l,
|
|
71
|
+
column: f
|
|
72
|
+
} = a;
|
|
73
73
|
return p("span", {
|
|
74
74
|
class: "line-clamp",
|
|
75
|
-
innerHTML:
|
|
75
|
+
innerHTML: l[f.field] || "-"
|
|
76
76
|
}, null);
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
79
|
-
// 展开收起
|
|
80
|
-
renderDefault(e, l) {
|
|
81
|
-
const {
|
|
82
|
-
row: n,
|
|
83
|
-
column: o
|
|
84
|
-
} = l;
|
|
85
|
-
return o.showOverflow = null, p(L("vftClampToggle"), {
|
|
86
|
-
autoResize: !0,
|
|
87
|
-
maxLines: 2,
|
|
88
|
-
text: n[o.field],
|
|
89
|
-
title: n[o.field],
|
|
90
|
-
toggleText: ["展开", "收起"],
|
|
91
|
-
onClampChange: (i) => X(l)
|
|
92
|
-
}, null);
|
|
93
|
-
}
|
|
94
|
-
}), E.formats.mixin({
|
|
78
|
+
}), I.formats.mixin({
|
|
95
79
|
showEmpty({
|
|
96
|
-
cellValue:
|
|
80
|
+
cellValue: t
|
|
97
81
|
}) {
|
|
98
|
-
return
|
|
82
|
+
return t || "-";
|
|
99
83
|
}
|
|
100
84
|
});
|
|
101
|
-
function G(
|
|
102
|
-
|
|
85
|
+
function G(t) {
|
|
86
|
+
d("page-change", t), d("update:pageNum", t);
|
|
103
87
|
}
|
|
104
|
-
const
|
|
105
|
-
const {
|
|
106
|
-
rowid: n
|
|
107
|
-
} = e;
|
|
108
|
-
Z(() => {
|
|
109
|
-
const o = document.getElementsByClassName("vxe-body--row"), i = [];
|
|
110
|
-
for (var u = 0; u < o.length; u++)
|
|
111
|
-
o[u].getAttribute("rowid") === n && i.push(o[u]);
|
|
112
|
-
setTimeout(() => {
|
|
113
|
-
if (i.length > 1) {
|
|
114
|
-
const g = i[0].clientHeight, Q = i[1].clientHeight;
|
|
115
|
-
g !== Q && (i[1].style.height = g + "px");
|
|
116
|
-
}
|
|
117
|
-
}, 1);
|
|
118
|
-
});
|
|
119
|
-
}, j = x(() => t.columns.filter((e) => (e && e.type !== "seq" && !e.formatter && !e.slots && !e.cellRender && (e.cellRender = {
|
|
120
|
-
name: "Encrypt"
|
|
121
|
-
}), e))), F = () => ({
|
|
88
|
+
const M = () => ({
|
|
122
89
|
maxHeight: "88px",
|
|
123
90
|
height: "44px"
|
|
124
|
-
}),
|
|
125
|
-
var
|
|
91
|
+
}), X = (t) => {
|
|
92
|
+
var l;
|
|
126
93
|
const {
|
|
127
|
-
column:
|
|
128
|
-
} =
|
|
94
|
+
column: a
|
|
95
|
+
} = t;
|
|
129
96
|
return {
|
|
130
|
-
maxHeight: ((
|
|
97
|
+
maxHeight: ((l = a == null ? void 0 : a.cellRender) == null ? void 0 : l.name) === "Clamp" ? "max-content" : "44px"
|
|
131
98
|
};
|
|
132
|
-
},
|
|
99
|
+
}, g = J({
|
|
133
100
|
autoResize: !0,
|
|
134
101
|
sortConfig: {
|
|
135
102
|
trigger: "cell",
|
|
@@ -137,17 +104,17 @@ const c = (
|
|
|
137
104
|
defaultSort: {
|
|
138
105
|
field: "",
|
|
139
106
|
order: "desc",
|
|
140
|
-
...
|
|
107
|
+
...e.defaultSort
|
|
141
108
|
},
|
|
142
109
|
orders: ["desc", "asc", null]
|
|
143
110
|
},
|
|
144
111
|
seqConfig: {
|
|
145
|
-
startIndex:
|
|
112
|
+
startIndex: $.value
|
|
146
113
|
},
|
|
147
114
|
cellClassName: "cellClass",
|
|
148
115
|
rowClassName: "rowClass",
|
|
149
|
-
cellStyle:
|
|
150
|
-
rowStyle:
|
|
116
|
+
cellStyle: X,
|
|
117
|
+
rowStyle: M,
|
|
151
118
|
headerRowClassName: "headerRowClass",
|
|
152
119
|
headerAlign: "center",
|
|
153
120
|
columnConfig: {
|
|
@@ -163,115 +130,115 @@ const c = (
|
|
|
163
130
|
scrollX: {
|
|
164
131
|
enabled: !1
|
|
165
132
|
},
|
|
166
|
-
...
|
|
167
|
-
...
|
|
168
|
-
}),
|
|
169
|
-
|
|
133
|
+
...e.tableConfig,
|
|
134
|
+
...T
|
|
135
|
+
}), j = (t) => {
|
|
136
|
+
d("sort-change", t);
|
|
170
137
|
};
|
|
171
|
-
|
|
172
|
-
|
|
138
|
+
y(() => e.pageNum, (t) => {
|
|
139
|
+
w(t);
|
|
173
140
|
});
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
},
|
|
177
|
-
let
|
|
178
|
-
const
|
|
179
|
-
var
|
|
180
|
-
return ((
|
|
141
|
+
const w = (t) => {
|
|
142
|
+
g.seqConfig && (g.seqConfig.startIndex = (t - 1) * e.pageSize);
|
|
143
|
+
}, u = c(), k = c();
|
|
144
|
+
let h = c(!1), o = c(null), m = c(null);
|
|
145
|
+
const s = H(() => {
|
|
146
|
+
var t;
|
|
147
|
+
return ((t = e.sticky) == null ? void 0 : t.getContainer) || document.documentElement || document.body;
|
|
181
148
|
});
|
|
182
|
-
|
|
183
|
-
var
|
|
184
|
-
(
|
|
185
|
-
|
|
149
|
+
y(() => [i, e.sticky], () => {
|
|
150
|
+
var t, a, l;
|
|
151
|
+
(t = i.value) != null && t.$el && e.sticky && ((a = s.value) == null || a.removeEventListener("scroll", v), (l = s.value) == null || l.addEventListener("scroll", v), setTimeout(() => {
|
|
152
|
+
N();
|
|
186
153
|
}, 50));
|
|
187
154
|
}, {
|
|
188
155
|
immediate: !0,
|
|
189
156
|
deep: !0
|
|
190
157
|
});
|
|
191
|
-
function
|
|
192
|
-
if (!
|
|
158
|
+
function N() {
|
|
159
|
+
if (!o.value || !m.value || (v(), !h.value))
|
|
193
160
|
return;
|
|
194
|
-
const
|
|
195
|
-
|
|
161
|
+
const t = o.value.clientWidth, a = m.value.offsetWidth;
|
|
162
|
+
u.value.style.width = t - 1 + "px", k.value.style.width = a + "px";
|
|
196
163
|
}
|
|
197
|
-
function
|
|
198
|
-
var
|
|
199
|
-
if (!((
|
|
164
|
+
function v() {
|
|
165
|
+
var z, E, B;
|
|
166
|
+
if (!((z = i.value) != null && z.$el) || !o.value || !s.value)
|
|
200
167
|
return;
|
|
201
|
-
const
|
|
202
|
-
top:
|
|
203
|
-
bottom:
|
|
204
|
-
} =
|
|
205
|
-
|
|
168
|
+
const t = ((E = s.value) == null ? void 0 : E.clientHeight) || window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, {
|
|
169
|
+
top: a,
|
|
170
|
+
bottom: l
|
|
171
|
+
} = o.value.getBoundingClientRect(), f = ((B = s.value) == null ? void 0 : B.getBoundingClientRect().top) || document.body.getBoundingClientRect().top;
|
|
172
|
+
h.value = a < t && l > t && l - f > t, u.value.scrollLeft = o.value.scrollLeft;
|
|
206
173
|
}
|
|
207
|
-
const
|
|
208
|
-
var
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}),
|
|
213
|
-
|
|
174
|
+
const F = () => {
|
|
175
|
+
var a;
|
|
176
|
+
const t = (a = i.value) == null ? void 0 : a.$el;
|
|
177
|
+
t && (o.value = t.querySelector(".vxe-table--body-wrapper"), m.value = t.querySelector(".vxe-table--body"), !(!o.value && !m.value) && (o.value.addEventListener("scroll", function(l) {
|
|
178
|
+
u.value.scrollLeft = l.target.scrollLeft;
|
|
179
|
+
}), u.value.addEventListener("scroll", function(l) {
|
|
180
|
+
o.value.scrollLeft = l.target.scrollLeft;
|
|
214
181
|
})));
|
|
215
182
|
};
|
|
216
|
-
return
|
|
217
|
-
|
|
183
|
+
return K(() => {
|
|
184
|
+
e.sticky && (F(), ne(i, () => N()));
|
|
218
185
|
}), q({
|
|
219
|
-
table:
|
|
220
|
-
}), (
|
|
221
|
-
const
|
|
222
|
-
return
|
|
223
|
-
class:
|
|
224
|
-
}, [
|
|
186
|
+
table: i
|
|
187
|
+
}), (t, a) => {
|
|
188
|
+
const l = Q("vxe-grid");
|
|
189
|
+
return C(), U("div", {
|
|
190
|
+
class: b(n(r).b())
|
|
191
|
+
}, [n(S) ? P("", !0) : (C(), L(n(W), x({
|
|
225
192
|
key: 0,
|
|
226
|
-
class: [
|
|
193
|
+
class: [n(r).e("pager"), n(r).m("pager-" + e.pagePlacement)],
|
|
227
194
|
layout: "prev, pager, next"
|
|
228
|
-
},
|
|
229
|
-
total:
|
|
230
|
-
"page-size":
|
|
231
|
-
onCurrentChange:
|
|
232
|
-
"current-page":
|
|
233
|
-
}), null, 16, ["class", "total", "page-size", "current-page"])), p(
|
|
195
|
+
}, e.pageOptions, {
|
|
196
|
+
total: e.total,
|
|
197
|
+
"page-size": e.pageSize,
|
|
198
|
+
onCurrentChange: a[0] || (a[0] = (f) => d("page-change", e.pageNum)),
|
|
199
|
+
"current-page": e.pageNum
|
|
200
|
+
}), null, 16, ["class", "total", "page-size", "current-page"])), p(l, x({
|
|
234
201
|
ref_key: "xGrid",
|
|
235
|
-
ref:
|
|
236
|
-
},
|
|
237
|
-
height:
|
|
238
|
-
"max-height":
|
|
239
|
-
columns:
|
|
240
|
-
data:
|
|
202
|
+
ref: i
|
|
203
|
+
}, g, {
|
|
204
|
+
height: e.height,
|
|
205
|
+
"max-height": e.maxHeight,
|
|
206
|
+
columns: e.columns,
|
|
207
|
+
data: e.data,
|
|
241
208
|
"auto-resize": "",
|
|
242
|
-
loading:
|
|
209
|
+
loading: e.loading,
|
|
243
210
|
resizable: "",
|
|
244
|
-
onSortChange:
|
|
245
|
-
}),
|
|
246
|
-
empty:
|
|
247
|
-
type:
|
|
211
|
+
onSortChange: j
|
|
212
|
+
}), Z({
|
|
213
|
+
empty: R(() => [p(n(te), {
|
|
214
|
+
type: n(oe).NO_DATA
|
|
248
215
|
}, null, 8, ["type"])]),
|
|
249
216
|
_: 2
|
|
250
|
-
}, [
|
|
217
|
+
}, [e.sticky ? {
|
|
251
218
|
name: "bottom",
|
|
252
|
-
fn:
|
|
219
|
+
fn: R(() => [_(O("div", {
|
|
253
220
|
ref_key: "stickyScroll",
|
|
254
|
-
ref:
|
|
255
|
-
class:
|
|
256
|
-
}, [
|
|
221
|
+
ref: u,
|
|
222
|
+
class: b(n(r).e("sticky-scroll-warpper"))
|
|
223
|
+
}, [O("div", {
|
|
257
224
|
ref_key: "stickyScrollBar",
|
|
258
|
-
ref:
|
|
259
|
-
class:
|
|
260
|
-
}, null, 2)], 2), [[
|
|
225
|
+
ref: k,
|
|
226
|
+
class: b(n(r).e("sticky-scroll-bar"))
|
|
227
|
+
}, null, 2)], 2), [[ee, n(h)]])]),
|
|
261
228
|
key: "0"
|
|
262
|
-
} : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]),
|
|
229
|
+
} : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]), n(S) ? (C(), L(n(W), x({
|
|
263
230
|
key: 1,
|
|
264
|
-
class: [
|
|
231
|
+
class: [n(r).e("pager"), n(r).m("pager-" + e.pagePlacement)],
|
|
265
232
|
layout: "prev, pager, next"
|
|
266
|
-
},
|
|
267
|
-
total:
|
|
268
|
-
"page-size":
|
|
233
|
+
}, e.pageOptions, {
|
|
234
|
+
total: e.total,
|
|
235
|
+
"page-size": e.pageSize,
|
|
269
236
|
onCurrentChange: G,
|
|
270
|
-
"current-page":
|
|
271
|
-
}), null, 16, ["class", "total", "page-size", "current-page"])) :
|
|
237
|
+
"current-page": e.pageNum
|
|
238
|
+
}), null, 16, ["class", "total", "page-size", "current-page"])) : P("", !0)], 2);
|
|
272
239
|
};
|
|
273
240
|
}
|
|
274
241
|
});
|
|
275
242
|
export {
|
|
276
|
-
|
|
243
|
+
Ce as default
|
|
277
244
|
};
|
|
@@ -22,7 +22,7 @@ import "../footer-layout/index.js";
|
|
|
22
22
|
import "../iframe-layout/index.js";
|
|
23
23
|
import "../router-view-content/index.js";
|
|
24
24
|
import "../logo/index.js";
|
|
25
|
-
import "../
|
|
25
|
+
import "../backtop/index.js";
|
|
26
26
|
import "../container/index.js";
|
|
27
27
|
import "../config-provider/index.js";
|
|
28
28
|
import "../descriptions/index.js";
|
|
@@ -74,6 +74,7 @@ import "../skeleton/index.js";
|
|
|
74
74
|
import "../space/index.js";
|
|
75
75
|
import "../card/index.js";
|
|
76
76
|
import "../popconfirm/index.js";
|
|
77
|
+
import "../alert/index.js";
|
|
77
78
|
import "../md-container/index.js";
|
|
78
79
|
import "../md-comment/index.js";
|
|
79
80
|
import "../md-tabs/index.js";
|
|
@@ -92,7 +93,7 @@ const V = (
|
|
|
92
93
|
K("tab-nav")
|
|
93
94
|
), ct = E({
|
|
94
95
|
name: V.b()
|
|
95
|
-
}),
|
|
96
|
+
}), Xo = /* @__PURE__ */ E({
|
|
96
97
|
...ct,
|
|
97
98
|
props: {
|
|
98
99
|
panes: null,
|
|
@@ -246,5 +247,5 @@ const V = (
|
|
|
246
247
|
}
|
|
247
248
|
});
|
|
248
249
|
export {
|
|
249
|
-
|
|
250
|
+
Xo as default
|
|
250
251
|
};
|