vft 0.0.133 → 0.0.136
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/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +8 -8
- package/es/components/backtop/backtop.vue2.js +3 -2
- package/es/components/card/card.vue.d.ts +2 -2
- package/es/components/card/index.d.ts +4 -4
- package/es/components/carousel/carousel.vue.d.ts +12 -12
- package/es/components/carousel/index.d.ts +21 -21
- package/es/components/checkbox/checkbox.vue.d.ts +8 -8
- package/es/components/checkbox/index.d.ts +19 -19
- package/es/components/context-menu/context-menu.vue2.js +3 -2
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/descriptions/index.d.ts +2 -2
- package/es/components/dialog/index.d.ts +1 -1
- package/es/components/drawer/index.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +9 -9
- package/es/components/dropdown/index.d.ts +15 -15
- package/es/components/footer-layout/footer-layout.vue2.js +3 -2
- package/es/components/header-layout/header-layout.vue2.js +3 -2
- package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +10 -1
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +79 -75
- package/es/components/horizontal-menu/index.d.ts +8 -0
- package/es/components/image/index.d.ts +1 -1
- package/es/components/image-viewer/index.d.ts +2 -2
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +164 -162
- package/es/components/infinite-scroll/index.d.ts +26 -0
- package/es/components/infinite-scroll/index.js +10 -0
- package/es/components/infinite-scroll/infinite-scroll.d.ts +20 -0
- package/es/components/infinite-scroll/infinite-scroll.js +92 -0
- package/es/components/infinite-scroll/style/css.d.ts +0 -0
- package/es/components/infinite-scroll/style/css.js +2 -0
- package/es/components/infinite-scroll/style/index.d.ts +0 -0
- package/es/components/infinite-scroll/style/index.js +2 -0
- package/es/components/input/index.d.ts +6 -6
- package/es/components/input/input.vue.d.ts +1 -1
- package/es/components/md-container/md-container.vue2.js +3 -2
- package/es/components/menu/index.d.ts +2 -0
- package/es/components/menu/menu-item.vue2.js +21 -20
- package/es/components/menu/menu.vue.d.ts +2 -0
- package/es/components/menu/menu.vue2.js +58 -58
- package/es/components/menu/sub-menu.vue2.js +3 -2
- package/es/components/modal/modal-footer-action.vue2.js +3 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +3 -2
- package/es/components/popconfirm/index.d.ts +9 -9
- package/es/components/popconfirm/popconfirm.vue.d.ts +5 -5
- package/es/components/popover/index.d.ts +1 -1
- package/es/components/progress/index.d.ts +4 -4
- package/es/components/progress/progress.vue.d.ts +2 -2
- package/es/components/radio/index.d.ts +2 -2
- package/es/components/result/result.vue2.js +3 -2
- package/es/components/search/index.d.ts +4 -4
- package/es/components/search/search.vue.d.ts +1 -1
- package/es/components/select/defaults.d.ts +1 -1
- package/es/components/select/index.d.ts +14 -14
- package/es/components/select/select.vue.d.ts +7 -7
- package/es/components/select/useSelect.d.ts +1 -1
- package/es/components/side-menu/side-menu.vue2.js +3 -2
- package/es/components/slider/composables/use-slide.d.ts +2 -2
- package/es/components/super-form/component-map.js +11 -10
- package/es/components/super-form/super-form-action.vue2.js +3 -2
- package/es/components/super-form/super-form-item.vue2.js +35 -34
- package/es/components/super-form/super-form.vue2.js +14 -13
- package/es/components/table/field.js +19 -18
- package/es/components/table/index.d.ts +10 -10
- package/es/components/table/table.vue.d.ts +6 -6
- package/es/components/table/use/use-data-source.js +54 -52
- package/es/components/tabs/tab-nav.vue2.js +3 -2
- package/es/components/time-picker/common/picker.vue.d.ts +1 -1
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/time-picker.d.ts +1 -1
- package/es/components/time-select/time-select.vue.d.ts +2 -2
- package/es/components/tooltip/index.d.ts +1 -1
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +9 -9
- package/es/components/upload/upload.vue.d.ts +9 -9
- package/es/index.js +279 -277
- package/es/package.json.js +1 -1
- package/es/plugin.js +5 -3
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +8 -8
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/card/card.vue.d.ts +2 -2
- package/lib/components/card/index.d.ts +4 -4
- package/lib/components/carousel/carousel.vue.d.ts +12 -12
- package/lib/components/carousel/index.d.ts +21 -21
- package/lib/components/checkbox/checkbox.vue.d.ts +8 -8
- package/lib/components/checkbox/index.d.ts +19 -19
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- package/lib/components/descriptions/index.d.ts +2 -2
- package/lib/components/dialog/index.d.ts +1 -1
- package/lib/components/drawer/index.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +9 -9
- package/lib/components/dropdown/index.d.ts +15 -15
- 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.vue.d.ts +10 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/index.d.ts +8 -0
- package/lib/components/image/index.d.ts +1 -1
- package/lib/components/image-viewer/index.d.ts +2 -2
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/infinite-scroll/index.cjs +1 -0
- package/lib/components/infinite-scroll/index.d.ts +26 -0
- package/lib/components/infinite-scroll/infinite-scroll.cjs +1 -0
- package/lib/components/infinite-scroll/infinite-scroll.d.ts +20 -0
- package/lib/components/infinite-scroll/style/css.cjs +1 -0
- package/lib/components/infinite-scroll/style/css.d.ts +0 -0
- package/lib/components/infinite-scroll/style/index.cjs +1 -0
- package/lib/components/infinite-scroll/style/index.d.ts +0 -0
- package/lib/components/input/index.d.ts +6 -6
- package/lib/components/input/input.vue.d.ts +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/index.d.ts +2 -0
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue.d.ts +2 -0
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +9 -9
- package/lib/components/popconfirm/popconfirm.vue.d.ts +5 -5
- package/lib/components/popover/index.d.ts +1 -1
- package/lib/components/progress/index.d.ts +4 -4
- package/lib/components/progress/progress.vue.d.ts +2 -2
- package/lib/components/radio/index.d.ts +2 -2
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/search/index.d.ts +4 -4
- package/lib/components/search/search.vue.d.ts +1 -1
- package/lib/components/select/defaults.d.ts +1 -1
- package/lib/components/select/index.d.ts +14 -14
- package/lib/components/select/select.vue.d.ts +7 -7
- package/lib/components/select/useSelect.d.ts +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/slider/composables/use-slide.d.ts +2 -2
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.d.ts +10 -10
- package/lib/components/table/table.vue.d.ts +6 -6
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/time-picker.d.ts +1 -1
- package/lib/components/time-select/time-select.vue.d.ts +2 -2
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +9 -9
- package/lib/components/upload/upload.vue.d.ts +9 -9
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +1 -1
- package/theme-style/src/image.scss +0 -4
- package/theme-style/src/table.scss +6 -0
- package/theme-style/vft-image.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -91,14 +91,15 @@ import { useNamespace as ne } from "../../hooks/use-namespace/index.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
-
import
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
95
|
+
import { FormCompEnum as s, componentMap as B, isInput as se, isDatePicker as me, isRangePicker as le } from "./component-map.js";
|
|
95
96
|
import { createPlaceholderMessage as U } from "./use/helper.js";
|
|
96
97
|
function q(r) {
|
|
97
98
|
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Q(r);
|
|
98
99
|
}
|
|
99
100
|
const ae = H({
|
|
100
101
|
inheritAttrs: !1
|
|
101
|
-
}),
|
|
102
|
+
}), Zt = /* @__PURE__ */ H({
|
|
102
103
|
...ae,
|
|
103
104
|
__name: "super-form-item",
|
|
104
105
|
props: {
|
|
@@ -180,8 +181,8 @@ const ae = H({
|
|
|
180
181
|
} = r.schema, {
|
|
181
182
|
disabled: a = !1
|
|
182
183
|
} = u(x);
|
|
183
|
-
let
|
|
184
|
-
return w(t) && (
|
|
184
|
+
let m = !!e || a;
|
|
185
|
+
return w(t) && (m = t), P(t) && (m = t(u(E))), m;
|
|
185
186
|
});
|
|
186
187
|
function O() {
|
|
187
188
|
const {
|
|
@@ -189,10 +190,10 @@ const ae = H({
|
|
|
189
190
|
ifShow: t
|
|
190
191
|
} = r.schema, {
|
|
191
192
|
showAdvancedButton: a
|
|
192
|
-
} = r.formProps,
|
|
193
|
-
let
|
|
194
|
-
return w(e) && (
|
|
195
|
-
isShow:
|
|
193
|
+
} = r.formProps, m = a && w(r.isAdvanced) ? r.isAdvanced : !0;
|
|
194
|
+
let l = !0, c = !0;
|
|
195
|
+
return w(e) && (l = e), w(t) && (c = t), P(e) && (l = e(u(E))), P(t) && (c = t(u(E))), l = l && m, {
|
|
196
|
+
isShow: l,
|
|
196
197
|
isIfShow: c
|
|
197
198
|
};
|
|
198
199
|
}
|
|
@@ -201,12 +202,12 @@ const ae = H({
|
|
|
201
202
|
rules: e = [],
|
|
202
203
|
type: t = s.INPUT,
|
|
203
204
|
rulesMessageJoinLabel: a,
|
|
204
|
-
label:
|
|
205
|
-
title:
|
|
205
|
+
label: m,
|
|
206
|
+
title: l,
|
|
206
207
|
dynamicRule: c,
|
|
207
208
|
required: R,
|
|
208
209
|
dynamicRuleAdd: C = !0
|
|
209
|
-
} = r.schema, p =
|
|
210
|
+
} = r.schema, p = m || l;
|
|
210
211
|
if (P(c) && !C)
|
|
211
212
|
return c(u(E));
|
|
212
213
|
let o = _(e);
|
|
@@ -247,14 +248,14 @@ const ae = H({
|
|
|
247
248
|
renderComponentContent: e,
|
|
248
249
|
type: t = s.INPUT,
|
|
249
250
|
field: a,
|
|
250
|
-
changeEvent:
|
|
251
|
-
valueField:
|
|
251
|
+
changeEvent: m = "change",
|
|
252
|
+
valueField: l,
|
|
252
253
|
label: c,
|
|
253
254
|
title: R,
|
|
254
255
|
placeholderJoinLabel: C = !0
|
|
255
256
|
} = r.schema;
|
|
256
|
-
let p =
|
|
257
|
-
se(t) ? p = "input" : (
|
|
257
|
+
let p = m;
|
|
258
|
+
se(t) ? p = "input" : (me(t) || t === s.TIME_PICKER) && (p = "update:modelValue");
|
|
258
259
|
const o = `on${re(p)}`, b = {
|
|
259
260
|
[o]: (...n) => {
|
|
260
261
|
const [i] = n;
|
|
@@ -271,9 +272,9 @@ const ae = H({
|
|
|
271
272
|
...u(x),
|
|
272
273
|
disabled: u(G)
|
|
273
274
|
};
|
|
274
|
-
!d.disabled && y && !
|
|
275
|
+
!d.disabled && y && !le(t) && t && (d.placeholder = ((S = u(x)) == null ? void 0 : S.placeholder) || U(t, C ? c || R : ""));
|
|
275
276
|
const f = {
|
|
276
|
-
[
|
|
277
|
+
[l || "model-value"]: r.formModel[a]
|
|
277
278
|
}, g = {
|
|
278
279
|
...b,
|
|
279
280
|
...d,
|
|
@@ -295,9 +296,9 @@ const ae = H({
|
|
|
295
296
|
showLabel: e = !0,
|
|
296
297
|
label: t,
|
|
297
298
|
title: a,
|
|
298
|
-
subLabel:
|
|
299
|
-
} = r.schema,
|
|
300
|
-
return e &&
|
|
299
|
+
subLabel: m
|
|
300
|
+
} = r.schema, l = t || a;
|
|
301
|
+
return e && l ? m ? h("span", null, [l, Z(" "), h("span", null, [m])]) : l : void 0;
|
|
301
302
|
}
|
|
302
303
|
const k = z();
|
|
303
304
|
function v(e, t = "default", a) {
|
|
@@ -305,32 +306,32 @@ const ae = H({
|
|
|
305
306
|
return null;
|
|
306
307
|
if (!P(e[t]))
|
|
307
308
|
return console.error(`${t} is not a function!`), null;
|
|
308
|
-
const
|
|
309
|
-
return
|
|
309
|
+
const m = e[t];
|
|
310
|
+
return m ? m(a) : null;
|
|
310
311
|
}
|
|
311
312
|
function $() {
|
|
312
313
|
const {
|
|
313
314
|
itemProps: e,
|
|
314
315
|
slot: t,
|
|
315
316
|
render: a,
|
|
316
|
-
field:
|
|
317
|
-
suffix:
|
|
317
|
+
field: m,
|
|
318
|
+
suffix: l,
|
|
318
319
|
prefix: c,
|
|
319
320
|
prefixParentStyle: R
|
|
320
321
|
} = r.schema, {
|
|
321
322
|
autoCleanErrorMessage: C,
|
|
322
323
|
compFullWidth: p
|
|
323
|
-
} = r.formProps, o = () => t ? v(k, t, u(E)) : a ? a(u(E)) : W(), b = !!
|
|
324
|
+
} = r.formProps, o = () => t ? v(k, t, u(E)) : a ? a(u(E)) : W(), b = !!l, A = !!c, y = P(l) ? l(u(E)) : l, T = P(c) ? c(u(E)) : c, d = () => {
|
|
324
325
|
r.updateSchema([{
|
|
325
|
-
field:
|
|
326
|
+
field: m,
|
|
326
327
|
itemProps: {
|
|
327
328
|
error: ""
|
|
328
329
|
}
|
|
329
330
|
}]);
|
|
330
331
|
}, M = () => h(ie, F({
|
|
331
|
-
prop:
|
|
332
|
+
prop: m,
|
|
332
333
|
class: [{
|
|
333
|
-
[D.is(
|
|
334
|
+
[D.is(l)]: b
|
|
334
335
|
}, {
|
|
335
336
|
[D.is("comp-full-width")]: p
|
|
336
337
|
}, D.e("item")]
|
|
@@ -359,12 +360,12 @@ const ae = H({
|
|
|
359
360
|
const {
|
|
360
361
|
colProps: t = {},
|
|
361
362
|
colSlot: a,
|
|
362
|
-
renderColContent:
|
|
363
|
-
type:
|
|
363
|
+
renderColContent: m,
|
|
364
|
+
type: l = s.INPUT,
|
|
364
365
|
render: c,
|
|
365
366
|
quickColSpan: R
|
|
366
367
|
} = r.schema;
|
|
367
|
-
if (!B.has(
|
|
368
|
+
if (!B.has(l) && !m && !c)
|
|
368
369
|
return null;
|
|
369
370
|
const {
|
|
370
371
|
baseColProps: C = {},
|
|
@@ -381,8 +382,8 @@ const ae = H({
|
|
|
381
382
|
}, {
|
|
382
383
|
isIfShow: y,
|
|
383
384
|
isShow: T
|
|
384
|
-
} = O(), d = u(E), M = () => a ? v(k, a, d) :
|
|
385
|
-
if (
|
|
385
|
+
} = O(), d = u(E), M = () => a ? v(k, a, d) : m ? m(d) : $();
|
|
386
|
+
if (l === s.DIVIDER) {
|
|
386
387
|
let f;
|
|
387
388
|
return h(L, F({
|
|
388
389
|
span: 24
|
|
@@ -399,5 +400,5 @@ const ae = H({
|
|
|
399
400
|
}
|
|
400
401
|
});
|
|
401
402
|
export {
|
|
402
|
-
|
|
403
|
+
Zt as default
|
|
403
404
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ot, useAttrs as ft, reactive as ct, ref as
|
|
1
|
+
import { defineComponent as ot, useAttrs as ft, reactive as ct, ref as m, computed as h, unref as o, watch as y, nextTick as dt, onMounted as Bt, resolveComponent as ht, openBlock as l, createBlock as c, mergeProps as v, withKeys as yt, withCtx as g, normalizeProps as d, renderSlot as _, createElementBlock as vt, Fragment as gt, renderList as Y, createSlots as bt, guardReactiveProps as Z, createVNode as Ft, createCommentVNode as b } from "vue";
|
|
2
2
|
import { cloneDeep as tt, pick as wt, deepMerge as St } from "@vft/utils";
|
|
3
3
|
import "../alert/index.js";
|
|
4
4
|
import "../avatar/index.js";
|
|
@@ -91,6 +91,7 @@ import { useNamespace as Rt } from "../../hooks/use-namespace/index.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
94
95
|
import { FormCompEnum as Et } from "./component-map.js";
|
|
95
96
|
import et from "./super-form-action.vue2.js";
|
|
96
97
|
import Vt from "./super-form-item.vue2.js";
|
|
@@ -103,7 +104,7 @@ const It = (
|
|
|
103
104
|
Rt("super-form")
|
|
104
105
|
), Tt = ot({
|
|
105
106
|
name: "vft-super-form"
|
|
106
|
-
}),
|
|
107
|
+
}), _o = /* @__PURE__ */ ot({
|
|
107
108
|
...Tt,
|
|
108
109
|
props: {
|
|
109
110
|
rowProps: {
|
|
@@ -229,7 +230,7 @@ const It = (
|
|
|
229
230
|
expose: it,
|
|
230
231
|
emit: O
|
|
231
232
|
}) {
|
|
232
|
-
const M = rt, at = ft(), n = ct({}), F =
|
|
233
|
+
const M = rt, at = ft(), n = ct({}), F = m({}), B = m(!1), w = m({}), D = m(null), S = m(null), I = m(), e = h(() => ({
|
|
233
234
|
...M,
|
|
234
235
|
...o(w)
|
|
235
236
|
})), p = h(() => ({
|
|
@@ -266,9 +267,9 @@ const It = (
|
|
|
266
267
|
appendSchemaByField: $,
|
|
267
268
|
removeSchemaByField: q,
|
|
268
269
|
resetFields: E,
|
|
269
|
-
scrollToField:
|
|
270
|
+
scrollToField: mt,
|
|
270
271
|
getFieldValue: G,
|
|
271
|
-
setFormItemError:
|
|
272
|
+
setFormItemError: lt
|
|
272
273
|
} = Mt({
|
|
273
274
|
emit: O,
|
|
274
275
|
getProps: e,
|
|
@@ -333,7 +334,7 @@ const It = (
|
|
|
333
334
|
validateField: P,
|
|
334
335
|
validate: N,
|
|
335
336
|
submit: s,
|
|
336
|
-
scrollToField:
|
|
337
|
+
scrollToField: mt
|
|
337
338
|
};
|
|
338
339
|
Bt(() => {
|
|
339
340
|
T(), O("register", K);
|
|
@@ -353,11 +354,11 @@ const It = (
|
|
|
353
354
|
validateField: P,
|
|
354
355
|
validate: N,
|
|
355
356
|
submit: s,
|
|
356
|
-
setFormItemError:
|
|
357
|
+
setFormItemError: lt
|
|
357
358
|
}), (t, r) => {
|
|
358
359
|
var V;
|
|
359
360
|
const i = ht("vft-col");
|
|
360
|
-
return B.value && ((V = a.value) != null && V.length) ? (
|
|
361
|
+
return B.value && ((V = a.value) != null && V.length) ? (l(), c(o(Ct), v({
|
|
361
362
|
key: 0
|
|
362
363
|
}, p.value, {
|
|
363
364
|
ref_key: "formElRef",
|
|
@@ -368,12 +369,12 @@ const It = (
|
|
|
368
369
|
}), {
|
|
369
370
|
default: g(() => {
|
|
370
371
|
var z, U, W, j;
|
|
371
|
-
return [(z = a.value) != null && z.length ? (
|
|
372
|
+
return [(z = a.value) != null && z.length ? (l(), c(o(Pt), d(v({
|
|
372
373
|
key: 0
|
|
373
374
|
}, (U = p.value) == null ? void 0 : U.rowProps)), {
|
|
374
375
|
default: g(() => {
|
|
375
376
|
var J, Q, X;
|
|
376
|
-
return [_(t.$slots, "formHeader"), (
|
|
377
|
+
return [_(t.$slots, "formHeader"), (l(!0), vt(gt, null, Y(a.value, (u) => (l(), c(Vt, {
|
|
377
378
|
key: u.field,
|
|
378
379
|
tableAction: t.tableAction,
|
|
379
380
|
formActionType: K,
|
|
@@ -394,7 +395,7 @@ const It = (
|
|
|
394
395
|
} : {})), {
|
|
395
396
|
default: g(() => {
|
|
396
397
|
var u, f;
|
|
397
|
-
return [(u = e.value) != null && u.showActionButtonGroup && ((f = e.value) != null && f.actionInline) ? (
|
|
398
|
+
return [(u = e.value) != null && u.showActionButtonGroup && ((f = e.value) != null && f.actionInline) ? (l(), c(et, d(v({
|
|
398
399
|
key: 0
|
|
399
400
|
}, x.value)), null, 16)) : b("", !0)];
|
|
400
401
|
}),
|
|
@@ -402,7 +403,7 @@ const It = (
|
|
|
402
403
|
}, 16)];
|
|
403
404
|
}),
|
|
404
405
|
_: 3
|
|
405
|
-
}, 16)) : b("", !0), (W = e.value) != null && W.showActionButtonGroup && !((j = e.value) != null && j.actionInline) ? (
|
|
406
|
+
}, 16)) : b("", !0), (W = e.value) != null && W.showActionButtonGroup && !((j = e.value) != null && j.actionInline) ? (l(), c(et, d(v({
|
|
406
407
|
key: 1
|
|
407
408
|
}, x.value)), null, 16)) : b("", !0), _(t.$slots, "formFooter")];
|
|
408
409
|
}),
|
|
@@ -412,5 +413,5 @@ const It = (
|
|
|
412
413
|
}
|
|
413
414
|
});
|
|
414
415
|
export {
|
|
415
|
-
|
|
416
|
+
_o as default
|
|
416
417
|
};
|
|
@@ -91,28 +91,29 @@ import "../config-provider/hooks/use-global-config.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
94
95
|
function u(i) {
|
|
95
96
|
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !_(i);
|
|
96
97
|
}
|
|
97
|
-
const
|
|
98
|
+
const ui = {
|
|
98
99
|
type: "seq",
|
|
99
100
|
title: "序号",
|
|
100
101
|
minWidth: 100,
|
|
101
102
|
fixed: "left"
|
|
102
|
-
},
|
|
103
|
+
}, si = {
|
|
103
104
|
type: "checkbox",
|
|
104
105
|
title: "",
|
|
105
106
|
minWidth: 60,
|
|
106
107
|
fixed: "left"
|
|
107
|
-
},
|
|
108
|
+
}, fi = {
|
|
108
109
|
field: "id",
|
|
109
110
|
title: "Id",
|
|
110
111
|
minWidth: 100
|
|
111
|
-
},
|
|
112
|
+
}, di = {
|
|
112
113
|
field: "name",
|
|
113
114
|
title: "名称",
|
|
114
115
|
minWidth: 100
|
|
115
|
-
},
|
|
116
|
+
}, Di = ({
|
|
116
117
|
format: i = "YYYY-MM-DD",
|
|
117
118
|
field: t = "date",
|
|
118
119
|
title: o = "时间"
|
|
@@ -134,7 +135,7 @@ const ni = {
|
|
|
134
135
|
formatter: ({
|
|
135
136
|
row: r
|
|
136
137
|
}) => r[t] ? l(r[t], i) : "-"
|
|
137
|
-
}),
|
|
138
|
+
}), Ei = ({
|
|
138
139
|
format: i = "YYYY-MM-DD HH:mm:ss",
|
|
139
140
|
field: t = "createTime",
|
|
140
141
|
title: o = "创建时间"
|
|
@@ -142,7 +143,7 @@ const ni = {
|
|
|
142
143
|
format: i,
|
|
143
144
|
field: t,
|
|
144
145
|
title: o
|
|
145
|
-
}),
|
|
146
|
+
}), li = ({
|
|
146
147
|
format: i = "YYYY-MM-DD HH:mm:ss",
|
|
147
148
|
field: t = "updateTime",
|
|
148
149
|
title: o = "更新时间"
|
|
@@ -150,7 +151,7 @@ const ni = {
|
|
|
150
151
|
format: i,
|
|
151
152
|
field: t,
|
|
152
153
|
title: o
|
|
153
|
-
}),
|
|
154
|
+
}), ci = ({
|
|
154
155
|
field: i = "status",
|
|
155
156
|
title: t = "状态",
|
|
156
157
|
normalText: o = "正常",
|
|
@@ -174,7 +175,7 @@ const ni = {
|
|
|
174
175
|
}));
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
|
-
}),
|
|
178
|
+
}), ai = ({
|
|
178
179
|
confirmText: i = "确认删除?",
|
|
179
180
|
leftCallback: t,
|
|
180
181
|
rightCallback: o,
|
|
@@ -219,14 +220,14 @@ const ni = {
|
|
|
219
220
|
}
|
|
220
221
|
});
|
|
221
222
|
export {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
ai as ACTION_FIELD,
|
|
224
|
+
si as CHECKED_FIELD,
|
|
225
|
+
Ei as CREATE_TIME_FIELD,
|
|
226
|
+
Di as DATE_FIELD,
|
|
226
227
|
c as DATE_TIME_FIELD,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
fi as ID_FIELD,
|
|
229
|
+
di as NAME_FIELD,
|
|
230
|
+
ui as SEQ_FIELD,
|
|
231
|
+
ci as STATUS_FIELD,
|
|
232
|
+
li as UPDATE_TIME_FIELD
|
|
232
233
|
};
|
|
@@ -77,8 +77,8 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
77
77
|
}>) => void)[] | undefined;
|
|
78
78
|
onChange?: ((val: number) => any) | undefined;
|
|
79
79
|
readonly round?: boolean | undefined;
|
|
80
|
-
readonly fit?: boolean | undefined;
|
|
81
80
|
readonly sticky?: boolean | import("./types").StickyOption | undefined;
|
|
81
|
+
readonly fit?: boolean | undefined;
|
|
82
82
|
readonly cellClassName?: import("vxe-table").VxeTablePropTypes.CellClassName<import("vxe-table").VxeTableDataRow> | undefined;
|
|
83
83
|
readonly rowKey?: boolean | undefined;
|
|
84
84
|
readonly columnKey?: boolean | undefined;
|
|
@@ -214,12 +214,12 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
214
214
|
round: {
|
|
215
215
|
type: import("vue").PropType<boolean>;
|
|
216
216
|
};
|
|
217
|
-
fit: {
|
|
218
|
-
type: import("vue").PropType<boolean>;
|
|
219
|
-
};
|
|
220
217
|
sticky: {
|
|
221
218
|
type: import("vue").PropType<boolean | import("./types").StickyOption>;
|
|
222
219
|
};
|
|
220
|
+
fit: {
|
|
221
|
+
type: import("vue").PropType<boolean>;
|
|
222
|
+
};
|
|
223
223
|
autoResize: {
|
|
224
224
|
type: import("vue").PropType<boolean>;
|
|
225
225
|
default: boolean;
|
|
@@ -634,12 +634,12 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
634
634
|
round: {
|
|
635
635
|
type: import("vue").PropType<boolean>;
|
|
636
636
|
};
|
|
637
|
-
fit: {
|
|
638
|
-
type: import("vue").PropType<boolean>;
|
|
639
|
-
};
|
|
640
637
|
sticky: {
|
|
641
638
|
type: import("vue").PropType<boolean | import("./types").StickyOption>;
|
|
642
639
|
};
|
|
640
|
+
fit: {
|
|
641
|
+
type: import("vue").PropType<boolean>;
|
|
642
|
+
};
|
|
643
643
|
autoResize: {
|
|
644
644
|
type: import("vue").PropType<boolean>;
|
|
645
645
|
default: boolean;
|
|
@@ -1006,12 +1006,12 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
1006
1006
|
round: {
|
|
1007
1007
|
type: import("vue").PropType<boolean>;
|
|
1008
1008
|
};
|
|
1009
|
-
fit: {
|
|
1010
|
-
type: import("vue").PropType<boolean>;
|
|
1011
|
-
};
|
|
1012
1009
|
sticky: {
|
|
1013
1010
|
type: import("vue").PropType<boolean | import("./types").StickyOption>;
|
|
1014
1011
|
};
|
|
1012
|
+
fit: {
|
|
1013
|
+
type: import("vue").PropType<boolean>;
|
|
1014
|
+
};
|
|
1015
1015
|
autoResize: {
|
|
1016
1016
|
type: import("vue").PropType<boolean>;
|
|
1017
1017
|
default: boolean;
|
|
@@ -38,12 +38,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
38
38
|
round: {
|
|
39
39
|
type: import("vue").PropType<boolean>;
|
|
40
40
|
};
|
|
41
|
-
fit: {
|
|
42
|
-
type: import("vue").PropType<boolean>;
|
|
43
|
-
};
|
|
44
41
|
sticky: {
|
|
45
42
|
type: import("vue").PropType<boolean | import("./types").StickyOption>;
|
|
46
43
|
};
|
|
44
|
+
fit: {
|
|
45
|
+
type: import("vue").PropType<boolean>;
|
|
46
|
+
};
|
|
47
47
|
autoResize: {
|
|
48
48
|
type: import("vue").PropType<boolean>;
|
|
49
49
|
default: boolean;
|
|
@@ -406,12 +406,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
406
406
|
round: {
|
|
407
407
|
type: import("vue").PropType<boolean>;
|
|
408
408
|
};
|
|
409
|
-
fit: {
|
|
410
|
-
type: import("vue").PropType<boolean>;
|
|
411
|
-
};
|
|
412
409
|
sticky: {
|
|
413
410
|
type: import("vue").PropType<boolean | import("./types").StickyOption>;
|
|
414
411
|
};
|
|
412
|
+
fit: {
|
|
413
|
+
type: import("vue").PropType<boolean>;
|
|
414
|
+
};
|
|
415
415
|
autoResize: {
|
|
416
416
|
type: import("vue").PropType<boolean>;
|
|
417
417
|
default: boolean;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { isFunction as D, isBoolean as
|
|
1
|
+
import { isFunction as D, isBoolean as p, delObjAttrNotExist as Y, isString as $, isEmptyObject as ee, isNullOrUndefined as x, isObject as C, isPlainObject as te, isNumber as ae } from "@vft/utils";
|
|
2
2
|
import { useTimeoutFn as re } from "@vueuse/core";
|
|
3
|
-
import { merge as
|
|
4
|
-
import { ref as
|
|
3
|
+
import { merge as ne, get as k } from "lodash";
|
|
4
|
+
import { ref as O, watchEffect as ie, unref as n, watch as M, computed as le, onMounted as ce } from "vue";
|
|
5
5
|
import { PAGE_SIZE as ue } from "../constants.js";
|
|
6
6
|
function ge(u, {
|
|
7
7
|
tableData: q,
|
|
8
|
-
setLoading:
|
|
8
|
+
setLoading: j,
|
|
9
9
|
getPaginationInfo: y,
|
|
10
10
|
setPagination: m
|
|
11
|
-
},
|
|
12
|
-
const a =
|
|
13
|
-
|
|
14
|
-
q.value =
|
|
15
|
-
}), M(() =>
|
|
16
|
-
const { data: e, api: t } =
|
|
11
|
+
}, A) {
|
|
12
|
+
const a = O([]), E = O({});
|
|
13
|
+
ie(() => {
|
|
14
|
+
q.value = n(a);
|
|
15
|
+
}), M(() => n(u).data, () => {
|
|
16
|
+
const { data: e, api: t } = n(u);
|
|
17
17
|
!t && e && (a.value = e);
|
|
18
18
|
}, {
|
|
19
19
|
immediate: !0
|
|
@@ -21,24 +21,24 @@ function ge(u, {
|
|
|
21
21
|
function B(e) {
|
|
22
22
|
m(e), d({});
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
const e =
|
|
26
|
-
return !e || e.length === 0 ?
|
|
24
|
+
const R = le(() => {
|
|
25
|
+
const e = n(a);
|
|
26
|
+
return !e || e.length === 0 ? n(a) : n(a);
|
|
27
27
|
});
|
|
28
28
|
async function d(e) {
|
|
29
29
|
const {
|
|
30
30
|
api: t,
|
|
31
31
|
fetchSetting: r = {},
|
|
32
|
-
beforeFetch:
|
|
32
|
+
beforeFetch: i,
|
|
33
33
|
afterFetch: c,
|
|
34
34
|
pagination: o,
|
|
35
35
|
delEmptyParams: s,
|
|
36
36
|
transformParams: K,
|
|
37
37
|
extraParams: g
|
|
38
|
-
} =
|
|
38
|
+
} = n(u);
|
|
39
39
|
if (!(!t || !D(t)))
|
|
40
40
|
try {
|
|
41
|
-
|
|
41
|
+
j(!0);
|
|
42
42
|
const { pageField: w, sizeField: Q, listField: W, totalField: X } = Object.assign(
|
|
43
43
|
{},
|
|
44
44
|
{
|
|
@@ -50,57 +50,59 @@ function ge(u, {
|
|
|
50
50
|
r
|
|
51
51
|
);
|
|
52
52
|
let F = {}, l = e;
|
|
53
|
-
const { currentPage:
|
|
53
|
+
const { currentPage: I = 1, pageSize: N = ue } = n(y);
|
|
54
54
|
if (K) {
|
|
55
|
-
if (
|
|
55
|
+
if (p(o) && !o || p(y) ? F = {} : (F[w] = e && e.page || I, F[Q] = N), l = ne(
|
|
56
56
|
e,
|
|
57
57
|
F
|
|
58
|
-
),
|
|
59
|
-
const v = await
|
|
58
|
+
), i && D(i)) {
|
|
59
|
+
const v = await i(l);
|
|
60
60
|
console.log(v, "000000"), l = { ...l, ...v }, console.log(l, "1111111");
|
|
61
61
|
}
|
|
62
62
|
s && Y(l, $(s) ? s === "strict" : !1);
|
|
63
63
|
}
|
|
64
64
|
l && !ee(l) && !x(g) ? C(l) && C(g) && (l = Object.assign({}, l, g)) : x(g) || (l = g);
|
|
65
|
-
const h = await t(l),
|
|
66
|
-
let f =
|
|
67
|
-
const S =
|
|
65
|
+
const h = await t(l), P = Array.isArray(h);
|
|
66
|
+
let f = P ? h : k(h, W);
|
|
67
|
+
const S = P ? h.length : k(h, X);
|
|
68
68
|
if (Number(S)) {
|
|
69
|
-
const v = Math.ceil(S /
|
|
70
|
-
if (
|
|
69
|
+
const v = Math.ceil(S / N);
|
|
70
|
+
if (I > v)
|
|
71
71
|
return m({
|
|
72
72
|
currentPage: v
|
|
73
73
|
}), await d(e);
|
|
74
74
|
}
|
|
75
|
-
return c && D(c) && (f = await c(f) || f), console.log(f, "resultItemsresultItemsresultItems"), a.value = f,
|
|
75
|
+
return c && D(c) && (f = await c(f) || f), console.log(f, "resultItemsresultItemsresultItems"), a.value = f, E.value = f, m({
|
|
76
76
|
total: S || 0
|
|
77
77
|
}), e && e.page && m({
|
|
78
78
|
currentPage: e.page || 1
|
|
79
|
-
}),
|
|
80
|
-
items:
|
|
79
|
+
}), A("fetch-success", {
|
|
80
|
+
items: n(f),
|
|
81
81
|
total: S
|
|
82
82
|
}), f;
|
|
83
83
|
} catch (w) {
|
|
84
|
-
console.log(w),
|
|
84
|
+
console.log(w), A("fetch-error", w), a.value = [], m({
|
|
85
85
|
total: 0
|
|
86
86
|
});
|
|
87
87
|
} finally {
|
|
88
|
-
|
|
88
|
+
j(!1);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function _() {
|
|
92
|
+
return E.value;
|
|
93
93
|
}
|
|
94
94
|
async function G(e) {
|
|
95
|
-
return
|
|
95
|
+
return m({
|
|
96
|
+
currentPage: (e == null ? void 0 : e.page) || 1
|
|
97
|
+
}), await d(e);
|
|
96
98
|
}
|
|
97
99
|
function L(e) {
|
|
98
100
|
if (!a.value || a.value.length === 0)
|
|
99
101
|
return;
|
|
100
|
-
const { rowkey: t } =
|
|
101
|
-
return ((
|
|
102
|
+
const { rowkey: t } = n(u);
|
|
103
|
+
return ((i) => {
|
|
102
104
|
let c;
|
|
103
|
-
return
|
|
105
|
+
return i.some(function(s) {
|
|
104
106
|
if (Reflect.has(s, t) && s[t] === e)
|
|
105
107
|
return c = s, !0;
|
|
106
108
|
}), c;
|
|
@@ -112,21 +114,21 @@ function ge(u, {
|
|
|
112
114
|
function V(e, t) {
|
|
113
115
|
const r = L(e);
|
|
114
116
|
if (r) {
|
|
115
|
-
for (const
|
|
116
|
-
Reflect.has(t,
|
|
117
|
+
for (const i in r)
|
|
118
|
+
Reflect.has(t, i) && (r[i] = t[i]);
|
|
117
119
|
return r;
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
122
|
function Z(e, t = 0) {
|
|
121
123
|
const r = te(e) ? [e] : e;
|
|
122
|
-
return a.value.splice(t, 0, ...r),
|
|
124
|
+
return a.value.splice(t, 0, ...r), n(a);
|
|
123
125
|
}
|
|
124
126
|
function H(e, t) {
|
|
125
127
|
if (!a.value || a.value.length === 0)
|
|
126
128
|
return;
|
|
127
|
-
const { rowkey: r } =
|
|
128
|
-
a.value.splice(
|
|
129
|
-
const { total: c } =
|
|
129
|
+
const { rowkey: r } = n(u), i = a.value.findIndex((o) => o[t || r] === e[t || r]);
|
|
130
|
+
a.value.splice(i, 1);
|
|
131
|
+
const { total: c } = n(y);
|
|
130
132
|
ae(c) && m({
|
|
131
133
|
total: c - 1
|
|
132
134
|
});
|
|
@@ -135,29 +137,29 @@ function ge(u, {
|
|
|
135
137
|
a.value = e;
|
|
136
138
|
}
|
|
137
139
|
function b() {
|
|
138
|
-
return
|
|
140
|
+
return R.value;
|
|
139
141
|
}
|
|
140
142
|
function J(e) {
|
|
141
143
|
var r;
|
|
142
144
|
const t = String(e).trim().toLowerCase();
|
|
143
145
|
if (t) {
|
|
144
|
-
const
|
|
146
|
+
const i = (r = b == null ? void 0 : b()) == null ? void 0 : r.filter((c) => {
|
|
145
147
|
var o;
|
|
146
148
|
for (const s in c)
|
|
147
149
|
if ((o = String(c[s]).trim().toLowerCase()) != null && o.includes(t))
|
|
148
150
|
return !0;
|
|
149
151
|
});
|
|
150
|
-
T(
|
|
152
|
+
T(i);
|
|
151
153
|
} else
|
|
152
|
-
T(
|
|
154
|
+
T(_());
|
|
153
155
|
}
|
|
154
|
-
const
|
|
156
|
+
const z = O(!0);
|
|
155
157
|
return ce(() => {
|
|
156
158
|
re(() => {
|
|
157
|
-
|
|
159
|
+
n(u).immediate && d(), z.value = !1;
|
|
158
160
|
}, 16);
|
|
159
|
-
}), M(() =>
|
|
160
|
-
|
|
161
|
+
}), M(() => n(u).api, () => {
|
|
162
|
+
n(u).watchApiFetch && !z.value && n(u).immediate && d();
|
|
161
163
|
}), {
|
|
162
164
|
setTableData: T,
|
|
163
165
|
updateTableData: U,
|
|
@@ -166,9 +168,9 @@ function ge(u, {
|
|
|
166
168
|
deleteTableDataRecord: H,
|
|
167
169
|
reload: G,
|
|
168
170
|
handleTableChange: B,
|
|
169
|
-
getDataSourceRef:
|
|
171
|
+
getDataSourceRef: R,
|
|
170
172
|
getDataSource: b,
|
|
171
|
-
getRawDataSource:
|
|
173
|
+
getRawDataSource: _,
|
|
172
174
|
tableSearch: J
|
|
173
175
|
};
|
|
174
176
|
}
|