vft 0.0.98 → 0.0.99
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/index.js +90 -90
- package/es/components/table/table.vue2.js +26 -22
- package/es/index.js +90 -90
- package/es/package.json.js +1 -1
- package/lib/components/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 +2 -2
- package/web-types.json +1 -1
package/es/components/index.js
CHANGED
|
@@ -78,39 +78,39 @@ import { VftMdCodeDemo as ge } from "./md-code-demo/index.js";
|
|
|
78
78
|
import { VftMdCodeTabs as Pe } from "./md-code-tabs/index.js";
|
|
79
79
|
import { VftMessage as De, VftMessage as ye } from "./message/index.js";
|
|
80
80
|
import { VftLoading as Me } from "./loading/index.js";
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import { default as Oe } from "./popper/
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
81
|
+
import { default as Ee } from "./time-picker/common/picker.vue2.js";
|
|
82
|
+
import { default as Ke } from "./time-picker/time-picker-com/panel-time-pick.vue2.js";
|
|
83
|
+
import { EmptyEnum as Fe } from "./empty/constants.js";
|
|
84
|
+
import { TabsRootContextKey as Ae } from "./tabs/types.js";
|
|
85
|
+
import { default as Oe } from "./popper/arrow.vue2.js";
|
|
86
|
+
import { default as _e } from "./popper/trigger.vue2.js";
|
|
87
|
+
import { default as we } from "./popper/content.vue2.js";
|
|
88
|
+
import { TOOLTIP_INJECTION_KEY as Ne } from "./tooltip/constants.js";
|
|
89
|
+
import { useTabDropdown as He } from "./multiple-tabs/use/use-tab-dropdown.js";
|
|
90
|
+
import { initAffixTabs as Je, useTabsDrag as Ye } from "./multiple-tabs/use/use-multiple-tabs.js";
|
|
91
|
+
import { configProviderContextKey as qe, messageConfig as We } from "./config-provider/constants.js";
|
|
92
|
+
import { provideGlobalConfig as Xe, useGlobalComponentSettings as Ze, useGlobalConfig as $e } from "./config-provider/hooks/use-global-config.js";
|
|
93
|
+
import { usePagination as tr, vftPaginationKey as er } from "./pagination/usePagination.js";
|
|
94
|
+
import { formItemValidateStates as fr } from "./form/types.js";
|
|
95
|
+
import { formContextKey as mr, formItemContextKey as xr } from "./form/constants.js";
|
|
96
|
+
import { useDisabled as ir, useFormDisabled as Vr, useFormSize as nr, useSize as sr } from "./form/hooks/use-form-common-props.js";
|
|
97
|
+
import { useFormItem as lr, useFormItemInputId as dr } from "./form/hooks/use-form-item.js";
|
|
98
|
+
import { buttonGroupContextKey as Cr } from "./button/constants.js";
|
|
99
|
+
import { checkboxGroupContextKey as Tr } from "./checkbox/constants.js";
|
|
100
|
+
import { radioGroupKey as Ir } from "./radio/constants.js";
|
|
101
|
+
import { BAR_MAP as yr, GAP as Sr, renderThumbStyle as Mr } from "./scrollbar/util.js";
|
|
102
|
+
import { scrollbarContextKey as Er } from "./scrollbar/constants.js";
|
|
103
|
+
import { DROPDOWN_INJECTION_KEY as Kr } from "./dropdown/tokens.js";
|
|
104
|
+
import { selectV2InjectionKey as Fr } from "./select-v2/token.js";
|
|
105
|
+
import { selectGroupKey as Ar, selectKey as Gr } from "./select/token.js";
|
|
106
|
+
import { INDEX as Rr } from "./table/columns.js";
|
|
107
|
+
import { useDialog as zr } from "./dialog/hooks/use-dialog.js";
|
|
108
|
+
import { dialogInjectionKey as hr } from "./dialog/constants.js";
|
|
109
|
+
import { rowContextKey as Br } from "./row/constants.js";
|
|
110
|
+
import { MenuTypeEnum as Ur } from "./horizontal-menu/constants.js";
|
|
111
|
+
import { buildTimeList as Yr, dateEquals as jr, extractDateFormat as qr, extractTimeFormat as Wr, formatter as Qr, makeList as Xr, parseDate as Zr, rangeArr as $r, valueEquals as of } from "./time-picker/utils.js";
|
|
112
|
+
import { DEFAULT_FORMATS_DATE as ef, DEFAULT_FORMATS_DATEPICKER as rf, DEFAULT_FORMATS_TIME as ff, timeUnits as pf } from "./time-picker/constants.js";
|
|
113
|
+
import { timePickerDefaultProps as xf } from "./time-picker/common/props.js";
|
|
114
114
|
import { ROOT_PICKER_INJECTION_KEY as Vf, datePickerConfig as nf } from "./date-picker/constants.js";
|
|
115
115
|
import { datePickerProps as uf } from "./date-picker/props/date-picker.js";
|
|
116
116
|
import { dragEventsKey as df, useDragNodeHandler as cf } from "./tree/model/useDragNode.js";
|
|
@@ -121,26 +121,26 @@ import { messageDefaults as Sf, messageTypes as Mf } from "./message/types.js";
|
|
|
121
121
|
import { vLoading as Ef, createLoadingDirective as Lf, vLoading as Kf } from "./loading/directive.js";
|
|
122
122
|
import { Loading as Ff } from "./loading/service.js";
|
|
123
123
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
yr as BAR_MAP,
|
|
125
|
+
Ee as CommonPicker,
|
|
126
|
+
ef as DEFAULT_FORMATS_DATE,
|
|
127
|
+
rf as DEFAULT_FORMATS_DATEPICKER,
|
|
128
|
+
ff as DEFAULT_FORMATS_TIME,
|
|
129
|
+
Kr as DROPDOWN_INJECTION_KEY,
|
|
130
130
|
st as DynamicSizeGrid,
|
|
131
131
|
at as DynamicSizeList,
|
|
132
|
-
|
|
132
|
+
Fe as EmptyEnum,
|
|
133
133
|
Vt as FixedSizeGrid,
|
|
134
134
|
mt as FixedSizeList,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
Sr as GAP,
|
|
136
|
+
Rr as INDEX,
|
|
137
137
|
f as Icon,
|
|
138
|
-
|
|
138
|
+
Ur as MenuTypeEnum,
|
|
139
139
|
De as Message,
|
|
140
140
|
Vf as ROOT_PICKER_INJECTION_KEY,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
Ne as TOOLTIP_INJECTION_KEY,
|
|
142
|
+
Ae as TabsRootContextKey,
|
|
143
|
+
Ke as TimePickPanel,
|
|
144
144
|
ae as VftAlert,
|
|
145
145
|
q as VftAside,
|
|
146
146
|
x as VftAvatar,
|
|
@@ -210,9 +210,9 @@ export {
|
|
|
210
210
|
me as VftPopconfirm,
|
|
211
211
|
D as VftPopover,
|
|
212
212
|
c as VftPopper,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
Oe as VftPopperArrow,
|
|
214
|
+
we as VftPopperContent,
|
|
215
|
+
_e as VftPopperTrigger,
|
|
216
216
|
Do as VftQrcode,
|
|
217
217
|
Yo as VftRadio,
|
|
218
218
|
jo as VftRadioButton,
|
|
@@ -239,61 +239,61 @@ export {
|
|
|
239
239
|
Xt as VftTree,
|
|
240
240
|
Mt as VftTreeSelect,
|
|
241
241
|
Et as VftVerifyCode,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
Yr as buildTimeList,
|
|
243
|
+
Cr as buttonGroupContextKey,
|
|
244
|
+
Tr as checkboxGroupContextKey,
|
|
245
|
+
qe as configProviderContextKey,
|
|
246
246
|
K as createContextMenu,
|
|
247
247
|
Lf as createLoadingDirective,
|
|
248
|
-
|
|
248
|
+
jr as dateEquals,
|
|
249
249
|
nf as datePickerConfig,
|
|
250
250
|
uf as datePickerProps,
|
|
251
251
|
v as destroyContextMenu,
|
|
252
|
-
|
|
252
|
+
hr as dialogInjectionKey,
|
|
253
253
|
df as dragEventsKey,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
254
|
+
qr as extractDateFormat,
|
|
255
|
+
Wr as extractTimeFormat,
|
|
256
|
+
mr as formContextKey,
|
|
257
|
+
xr as formItemContextKey,
|
|
258
|
+
fr as formItemValidateStates,
|
|
259
|
+
Qr as formatter,
|
|
260
260
|
gf as getChildState,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
Je as initAffixTabs,
|
|
262
|
+
Xr as makeList,
|
|
263
|
+
We as messageConfig,
|
|
264
264
|
Sf as messageDefaults,
|
|
265
265
|
Mf as messageTypes,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
266
|
+
Zr as parseDate,
|
|
267
|
+
Xe as provideGlobalConfig,
|
|
268
|
+
Ir as radioGroupKey,
|
|
269
|
+
$r as rangeArr,
|
|
270
|
+
Mr as renderThumbStyle,
|
|
271
|
+
Br as rowContextKey,
|
|
272
|
+
Er as scrollbarContextKey,
|
|
273
|
+
Ar as selectGroupKey,
|
|
274
|
+
Gr as selectKey,
|
|
275
|
+
Fr as selectV2InjectionKey,
|
|
276
276
|
Pf as spaceProps,
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
xf as timePickerDefaultProps,
|
|
278
|
+
pf as timeUnits,
|
|
279
279
|
k as useContextMenu,
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
zr as useDialog,
|
|
281
|
+
ir as useDisabled,
|
|
282
282
|
cf as useDragNodeHandler,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
283
|
+
Vr as useFormDisabled,
|
|
284
|
+
lr as useFormItem,
|
|
285
|
+
dr as useFormItemInputId,
|
|
286
|
+
nr as useFormSize,
|
|
287
|
+
Ze as useGlobalComponentSettings,
|
|
288
|
+
$e as useGlobalConfig,
|
|
289
|
+
tr as usePagination,
|
|
290
|
+
sr as useSize,
|
|
291
291
|
Df as useSpace,
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
He as useTabDropdown,
|
|
293
|
+
Ye as useTabsDrag,
|
|
294
294
|
Kf as vLoading,
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
of as valueEquals,
|
|
296
|
+
er as vftPaginationKey,
|
|
297
297
|
lt as virtualizedGridProps,
|
|
298
298
|
dt as virtualizedListProps,
|
|
299
299
|
ct as virtualizedProps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Y, useAttrs as J, ref as s, computed as
|
|
1
|
+
import { defineComponent as Y, useAttrs as J, ref as s, computed as v, watch as y, createVNode as b, reactive as K, onMounted as Q, resolveComponent as U, openBlock as C, createElementBlock as Z, normalizeClass as w, unref as n, createBlock as H, mergeProps as S, createCommentVNode as L, createSlots as _, withCtx as R, withDirectives as ee, createElementVNode as O, vShow as te } from "vue";
|
|
2
2
|
import { VftEmpty as ae } 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";
|
|
@@ -43,6 +43,10 @@ const r = (
|
|
|
43
43
|
sticky: {
|
|
44
44
|
type: [Boolean, Object]
|
|
45
45
|
},
|
|
46
|
+
showPager: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
},
|
|
46
50
|
pagePlacement: {
|
|
47
51
|
default: "bottom-right"
|
|
48
52
|
},
|
|
@@ -53,7 +57,7 @@ const r = (
|
|
|
53
57
|
expose: q,
|
|
54
58
|
emit: d
|
|
55
59
|
}) {
|
|
56
|
-
const T = J(), V = s(0), i = s(), $ = ne(() => D(), 120), k =
|
|
60
|
+
const T = J(), V = s(0), i = s(), $ = ne(() => D(), 120), k = v(() => l.pagePlacement.startsWith("bottom")), A = v(() => l.columns.map((e) => (e.align || (e.align = "center"), !e.formatter && !e.slots && !e.cellRender && (e.formatter = ({
|
|
57
61
|
cellValue: t
|
|
58
62
|
}) => t || "-"), e)));
|
|
59
63
|
y([() => l.loading, () => l.data, () => l.columns], () => {
|
|
@@ -143,33 +147,33 @@ const r = (
|
|
|
143
147
|
g.seqConfig && (g.seqConfig.startIndex = (e - 1) * l.pageSize);
|
|
144
148
|
}, u = s(), z = s();
|
|
145
149
|
let f = s(!1), o = s(null), m = s(null);
|
|
146
|
-
const c =
|
|
150
|
+
const c = v(() => {
|
|
147
151
|
var e;
|
|
148
152
|
return ((e = l.sticky) == null ? void 0 : e.getContainer) || document.documentElement || document.body;
|
|
149
153
|
});
|
|
150
154
|
y(() => [i, l.sticky], () => {
|
|
151
155
|
var e, t, a;
|
|
152
|
-
(e = i.value) != null && e.$el && l.sticky && ((t = c.value) == null || t.removeEventListener("scroll",
|
|
153
|
-
|
|
156
|
+
(e = i.value) != null && e.$el && l.sticky && ((t = c.value) == null || t.removeEventListener("scroll", h), (a = c.value) == null || a.addEventListener("scroll", h), setTimeout(() => {
|
|
157
|
+
B();
|
|
154
158
|
}, 50));
|
|
155
159
|
}, {
|
|
156
160
|
immediate: !0,
|
|
157
161
|
deep: !0
|
|
158
162
|
});
|
|
159
|
-
function
|
|
160
|
-
if (!o.value || !m.value || (
|
|
163
|
+
function B() {
|
|
164
|
+
if (!o.value || !m.value || (h(), !f.value))
|
|
161
165
|
return;
|
|
162
166
|
const e = o.value.clientWidth, t = m.value.offsetWidth;
|
|
163
167
|
u.value.style.width = e - 1 + "px", z.value.style.width = t + "px";
|
|
164
168
|
}
|
|
165
|
-
function
|
|
166
|
-
var
|
|
167
|
-
if (!((
|
|
169
|
+
function h() {
|
|
170
|
+
var E, P, x;
|
|
171
|
+
if (!((E = i.value) != null && E.$el) || !o.value || !c.value)
|
|
168
172
|
return;
|
|
169
|
-
const e = ((
|
|
173
|
+
const e = ((P = c.value) == null ? void 0 : P.clientHeight) || window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, {
|
|
170
174
|
top: t,
|
|
171
175
|
bottom: a
|
|
172
|
-
} = o.value.getBoundingClientRect(), p = ((
|
|
176
|
+
} = o.value.getBoundingClientRect(), p = ((x = c.value) == null ? void 0 : x.getBoundingClientRect().top) || document.body.getBoundingClientRect().top;
|
|
173
177
|
f.value = t < e && a > e && a - p > e, u.value.scrollLeft = o.value.scrollLeft;
|
|
174
178
|
}
|
|
175
179
|
const F = () => {
|
|
@@ -182,14 +186,14 @@ const r = (
|
|
|
182
186
|
})));
|
|
183
187
|
};
|
|
184
188
|
return Q(() => {
|
|
185
|
-
l.sticky && (F(), oe(i, () =>
|
|
189
|
+
l.sticky && (F(), oe(i, () => B()));
|
|
186
190
|
}), q({
|
|
187
191
|
table: i
|
|
188
192
|
}), (e, t) => {
|
|
189
193
|
const a = U("vxe-grid");
|
|
190
194
|
return C(), Z("div", {
|
|
191
|
-
class:
|
|
192
|
-
}, [k.value ?
|
|
195
|
+
class: w(n(r).b())
|
|
196
|
+
}, [e.showPager && !k.value ? (C(), H(n(W), S({
|
|
193
197
|
key: 0,
|
|
194
198
|
class: [n(r).e("pager"), n(r).m("pager-" + e.pagePlacement)],
|
|
195
199
|
layout: "prev, pager, next"
|
|
@@ -198,7 +202,7 @@ const r = (
|
|
|
198
202
|
"page-size": e.pageSize,
|
|
199
203
|
onCurrentChange: t[0] || (t[0] = (p) => d("page-change", e.pageNum)),
|
|
200
204
|
"current-page": e.pageNum
|
|
201
|
-
}), null, 16, ["class", "total", "page-size", "current-page"])), b(a,
|
|
205
|
+
}), null, 16, ["class", "total", "page-size", "current-page"])) : L("", !0), b(a, S({
|
|
202
206
|
ref_key: "xGrid",
|
|
203
207
|
ref: i
|
|
204
208
|
}, g, {
|
|
@@ -211,23 +215,23 @@ const r = (
|
|
|
211
215
|
resizable: "",
|
|
212
216
|
onSortChange: j
|
|
213
217
|
}), _({
|
|
214
|
-
empty:
|
|
218
|
+
empty: R(() => [b(n(ae), {
|
|
215
219
|
type: n(re).NO_DATA
|
|
216
220
|
}, null, 8, ["type"])]),
|
|
217
221
|
_: 2
|
|
218
222
|
}, [e.sticky ? {
|
|
219
223
|
name: "bottom",
|
|
220
|
-
fn:
|
|
224
|
+
fn: R(() => [ee(O("div", {
|
|
221
225
|
ref_key: "stickyScroll",
|
|
222
226
|
ref: u,
|
|
223
|
-
class:
|
|
227
|
+
class: w(n(r).e("sticky-scroll-warpper"))
|
|
224
228
|
}, [O("div", {
|
|
225
229
|
ref_key: "stickyScrollBar",
|
|
226
230
|
ref: z,
|
|
227
|
-
class:
|
|
231
|
+
class: w(n(r).e("sticky-scroll-bar"))
|
|
228
232
|
}, null, 2)], 2), [[te, n(f)]])]),
|
|
229
233
|
key: "0"
|
|
230
|
-
} : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]), k.value ? (C(),
|
|
234
|
+
} : void 0]), 1040, ["height", "max-height", "columns", "data", "loading"]), e.showPager && k.value ? (C(), H(n(W), S({
|
|
231
235
|
key: 1,
|
|
232
236
|
class: [n(r).e("pager"), n(r).m("pager-" + e.pagePlacement)],
|
|
233
237
|
layout: "prev, pager, next"
|
|
@@ -236,7 +240,7 @@ const r = (
|
|
|
236
240
|
"page-size": e.pageSize,
|
|
237
241
|
onCurrentChange: G,
|
|
238
242
|
"current-page": e.pageNum
|
|
239
|
-
}), null, 16, ["class", "total", "page-size", "current-page"])) :
|
|
243
|
+
}), null, 16, ["class", "total", "page-size", "current-page"])) : L("", !0)], 2);
|
|
240
244
|
};
|
|
241
245
|
}
|
|
242
246
|
});
|