vft 0.0.483 → 0.0.487
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/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/modal/index.d.ts +72 -3
- package/es/components/modal/modal.vue.d.ts +27 -3
- package/es/components/modal/modal.vue2.js +58 -57
- package/es/components/modal/types.d.ts +2 -0
- package/es/components/router-view-content/index.d.ts +6 -0
- package/es/components/router-view-content/router-view-content.vue.d.ts +1 -0
- package/es/components/router-view-content/router-view-content.vue2.js +19 -18
- package/es/components/super-form/super-form-action.vue2.js +55 -55
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/modal/index.d.ts +72 -3
- package/lib/components/modal/modal.vue.d.ts +27 -3
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/modal/types.d.ts +2 -0
- package/lib/components/router-view-content/index.d.ts +6 -0
- package/lib/components/router-view-content/router-view-content.vue.d.ts +1 -0
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keysOf as f } from "@vft/utils";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import { debugWarn as v } from "../../../utils/error.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getCurrentInstance as l, computed as i, unref as p, provide as g, ref as C, inject as x } from "vue";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../../form/index.js";
|
|
7
7
|
import { namespaceContextKey as I, useNamespace as b, defaultNamespace as y } from "../../../hooks/use-namespace/index.js";
|
|
@@ -9,7 +9,7 @@ import "../../../hooks/use-model-toggle/index.js";
|
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import { zIndexContextKey as G, useZIndex as z, defaultInitialZIndex as K } from "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { configProviderContextKey as m } from "../constants.js";
|
|
12
|
-
const a =
|
|
12
|
+
const a = C();
|
|
13
13
|
function d(o, e = void 0) {
|
|
14
14
|
const n = l() ? x(m, a) : a;
|
|
15
15
|
return o ? i(() => n?.value?.[o] ?? e) : n;
|
|
@@ -27,7 +27,7 @@ function B(o) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
const S = (o, e, n = !1) => {
|
|
30
|
-
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ?
|
|
30
|
+
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ? g : void 0);
|
|
31
31
|
if (!u) {
|
|
32
32
|
v(
|
|
33
33
|
"provideGlobalConfig",
|
|
@@ -32,6 +32,9 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
32
32
|
type: import("vue").PropType<boolean>;
|
|
33
33
|
default: boolean;
|
|
34
34
|
};
|
|
35
|
+
scrollTop: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
35
38
|
modelValue: {
|
|
36
39
|
type: import("vue").PropType<boolean>;
|
|
37
40
|
default: boolean;
|
|
@@ -138,7 +141,31 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
138
141
|
confirmLoading: {
|
|
139
142
|
type: import("vue").PropType<boolean>;
|
|
140
143
|
};
|
|
141
|
-
}>> & Readonly<{
|
|
144
|
+
}>> & Readonly<{
|
|
145
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
146
|
+
onClose?: ((event?: Event | undefined) => any) | undefined;
|
|
147
|
+
onSubmit?: (() => any) | undefined;
|
|
148
|
+
onOpen?: (() => any) | undefined;
|
|
149
|
+
onOpened?: (() => any) | undefined;
|
|
150
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
151
|
+
onClosed?: (() => any) | undefined;
|
|
152
|
+
onOpenAutoFocus?: (() => any) | undefined;
|
|
153
|
+
onCloseAutoFocus?: (() => any) | undefined;
|
|
154
|
+
onRegister?: ((methods: import("./types").ModalMethods, uid: number) => any) | undefined;
|
|
155
|
+
onOk?: (() => any) | undefined;
|
|
156
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
157
|
+
"visible-change": (value: boolean) => void;
|
|
158
|
+
close: (event?: Event | undefined) => void;
|
|
159
|
+
ok: () => void;
|
|
160
|
+
register: (methods: import("./types").ModalMethods, uid: number) => void;
|
|
161
|
+
"update:modelValue": (value: boolean) => void;
|
|
162
|
+
submit: () => void;
|
|
163
|
+
open: () => void;
|
|
164
|
+
opened: () => void;
|
|
165
|
+
closed: () => void;
|
|
166
|
+
openAutoFocus: () => void;
|
|
167
|
+
closeAutoFocus: () => void;
|
|
168
|
+
}, import("vue").PublicProps, {
|
|
142
169
|
title: string;
|
|
143
170
|
center: boolean;
|
|
144
171
|
fullscreen: boolean;
|
|
@@ -198,6 +225,9 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
198
225
|
type: import("vue").PropType<boolean>;
|
|
199
226
|
default: boolean;
|
|
200
227
|
};
|
|
228
|
+
scrollTop: {
|
|
229
|
+
type: import("vue").PropType<boolean>;
|
|
230
|
+
};
|
|
201
231
|
modelValue: {
|
|
202
232
|
type: import("vue").PropType<boolean>;
|
|
203
233
|
default: boolean;
|
|
@@ -304,7 +334,19 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
304
334
|
confirmLoading: {
|
|
305
335
|
type: import("vue").PropType<boolean>;
|
|
306
336
|
};
|
|
307
|
-
}>> & Readonly<{
|
|
337
|
+
}>> & Readonly<{
|
|
338
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
339
|
+
onClose?: ((event?: Event | undefined) => any) | undefined;
|
|
340
|
+
onSubmit?: (() => any) | undefined;
|
|
341
|
+
onOpen?: (() => any) | undefined;
|
|
342
|
+
onOpened?: (() => any) | undefined;
|
|
343
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
344
|
+
onClosed?: (() => any) | undefined;
|
|
345
|
+
onOpenAutoFocus?: (() => any) | undefined;
|
|
346
|
+
onCloseAutoFocus?: (() => any) | undefined;
|
|
347
|
+
onRegister?: ((methods: import("./types").ModalMethods, uid: number) => any) | undefined;
|
|
348
|
+
onOk?: (() => any) | undefined;
|
|
349
|
+
}>, {}, {}, {}, {}, {
|
|
308
350
|
title: string;
|
|
309
351
|
center: boolean;
|
|
310
352
|
fullscreen: boolean;
|
|
@@ -361,6 +403,9 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
361
403
|
type: import("vue").PropType<boolean>;
|
|
362
404
|
default: boolean;
|
|
363
405
|
};
|
|
406
|
+
scrollTop: {
|
|
407
|
+
type: import("vue").PropType<boolean>;
|
|
408
|
+
};
|
|
364
409
|
modelValue: {
|
|
365
410
|
type: import("vue").PropType<boolean>;
|
|
366
411
|
default: boolean;
|
|
@@ -467,7 +512,31 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
467
512
|
confirmLoading: {
|
|
468
513
|
type: import("vue").PropType<boolean>;
|
|
469
514
|
};
|
|
470
|
-
}>> & Readonly<{
|
|
515
|
+
}>> & Readonly<{
|
|
516
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
517
|
+
onClose?: ((event?: Event | undefined) => any) | undefined;
|
|
518
|
+
onSubmit?: (() => any) | undefined;
|
|
519
|
+
onOpen?: (() => any) | undefined;
|
|
520
|
+
onOpened?: (() => any) | undefined;
|
|
521
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
522
|
+
onClosed?: (() => any) | undefined;
|
|
523
|
+
onOpenAutoFocus?: (() => any) | undefined;
|
|
524
|
+
onCloseAutoFocus?: (() => any) | undefined;
|
|
525
|
+
onRegister?: ((methods: import("./types").ModalMethods, uid: number) => any) | undefined;
|
|
526
|
+
onOk?: (() => any) | undefined;
|
|
527
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
528
|
+
"visible-change": (value: boolean) => void;
|
|
529
|
+
close: (event?: Event | undefined) => void;
|
|
530
|
+
ok: () => void;
|
|
531
|
+
register: (methods: import("./types").ModalMethods, uid: number) => void;
|
|
532
|
+
"update:modelValue": (value: boolean) => void;
|
|
533
|
+
submit: () => void;
|
|
534
|
+
open: () => void;
|
|
535
|
+
opened: () => void;
|
|
536
|
+
closed: () => void;
|
|
537
|
+
openAutoFocus: () => void;
|
|
538
|
+
closeAutoFocus: () => void;
|
|
539
|
+
}, string, {
|
|
471
540
|
title: string;
|
|
472
541
|
center: boolean;
|
|
473
542
|
fullscreen: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModalActionProps, ModalProps } from './types';
|
|
1
|
+
import type { ModalActionProps, ModalMethods, ModalProps } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
default?(_: {}): any;
|
|
4
4
|
};
|
|
@@ -23,7 +23,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
23
23
|
showActionButtonGroup: boolean;
|
|
24
24
|
showSubmitButton: boolean;
|
|
25
25
|
showCancelButton: boolean;
|
|
26
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"visible-change": (value: boolean) => void;
|
|
28
|
+
close: (event?: Event | undefined) => void;
|
|
29
|
+
ok: () => void;
|
|
30
|
+
register: (methods: ModalMethods, uid: number) => void;
|
|
31
|
+
"update:modelValue": (value: boolean) => void;
|
|
32
|
+
submit: () => void;
|
|
33
|
+
open: () => void;
|
|
34
|
+
opened: () => void;
|
|
35
|
+
closed: () => void;
|
|
36
|
+
openAutoFocus: () => void;
|
|
37
|
+
closeAutoFocus: () => void;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalProps & ModalActionProps>, {
|
|
27
39
|
center: boolean;
|
|
28
40
|
customClass: string;
|
|
29
41
|
draggable: boolean;
|
|
@@ -44,7 +56,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
44
56
|
showActionButtonGroup: boolean;
|
|
45
57
|
showSubmitButton: boolean;
|
|
46
58
|
showCancelButton: boolean;
|
|
47
|
-
}>>> & Readonly<{
|
|
59
|
+
}>>> & Readonly<{
|
|
60
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
61
|
+
onClose?: ((event?: Event | undefined) => any) | undefined;
|
|
62
|
+
onSubmit?: (() => any) | undefined;
|
|
63
|
+
onOpen?: (() => any) | undefined;
|
|
64
|
+
onOpened?: (() => any) | undefined;
|
|
65
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
66
|
+
onClosed?: (() => any) | undefined;
|
|
67
|
+
onOpenAutoFocus?: (() => any) | undefined;
|
|
68
|
+
onCloseAutoFocus?: (() => any) | undefined;
|
|
69
|
+
onRegister?: ((methods: ModalMethods, uid: number) => any) | undefined;
|
|
70
|
+
onOk?: (() => any) | undefined;
|
|
71
|
+
}>, {
|
|
48
72
|
title: string;
|
|
49
73
|
center: boolean;
|
|
50
74
|
fullscreen: boolean;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as k, useAttrs as A, ref as f, getCurrentInstance as $, computed as r, unref as l, watchEffect as M, watch as P, nextTick as m, createBlock as b, openBlock as y, mergeProps as T, createSlots as R, withCtx as C, renderSlot as S, createCommentVNode as x } from "vue";
|
|
2
2
|
import { deepMerge as D, isFunction as G } from "@vft/utils";
|
|
3
3
|
import { VftDialog as I } from "../dialog/index.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import E from "./modal-footer-action.vue2.js";
|
|
5
|
+
const W = /* @__PURE__ */ k({
|
|
6
6
|
__name: "modal",
|
|
7
7
|
props: {
|
|
8
8
|
closeFunc: {},
|
|
9
9
|
showActionButtonGroup: { type: Boolean, default: !1 },
|
|
10
10
|
confirmLoading: { type: Boolean },
|
|
11
11
|
loading: { type: Boolean },
|
|
12
|
+
scrollTop: { type: Boolean },
|
|
12
13
|
appendToBody: { type: Boolean, default: !1 },
|
|
13
14
|
appendTo: {},
|
|
14
15
|
beforeClose: {},
|
|
@@ -45,81 +46,81 @@ const N = /* @__PURE__ */ O({
|
|
|
45
46
|
cancelButtonOptions: {},
|
|
46
47
|
actionRowOptions: {}
|
|
47
48
|
},
|
|
48
|
-
emits:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
register: [],
|
|
53
|
-
"update:modelValue": [],
|
|
54
|
-
submit: []
|
|
55
|
-
},
|
|
56
|
-
setup(n, { emit: h }) {
|
|
57
|
-
const o = n, a = h, C = M(), c = r(null), l = r(!1), s = r(null), f = {
|
|
58
|
-
setModalProps: V,
|
|
49
|
+
emits: ["visible-change", "close", "ok", "register", "update:modelValue", "submit", "open", "opened", "closed", "openAutoFocus", "closeAutoFocus"],
|
|
50
|
+
setup(a, { emit: g }) {
|
|
51
|
+
const n = a, t = g, w = A(), d = f(null), s = f(!1), u = f(null), p = {
|
|
52
|
+
setModalProps: O,
|
|
59
53
|
emitVisible: void 0,
|
|
60
54
|
redoModalHeight: () => {
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
m(() => {
|
|
56
|
+
l(u) && l(u).setModalHeight();
|
|
63
57
|
});
|
|
64
58
|
}
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
...
|
|
69
|
-
...
|
|
70
|
-
})),
|
|
71
|
-
...
|
|
72
|
-
...
|
|
73
|
-
modelValue:
|
|
59
|
+
}, i = $();
|
|
60
|
+
i && t("register", p, i.uid);
|
|
61
|
+
const v = r(() => ({
|
|
62
|
+
...n,
|
|
63
|
+
...l(d)
|
|
64
|
+
})), h = r(() => ({
|
|
65
|
+
...w,
|
|
66
|
+
...l(v),
|
|
67
|
+
modelValue: l(s)
|
|
74
68
|
}));
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}),
|
|
78
|
-
() =>
|
|
69
|
+
M(() => {
|
|
70
|
+
s.value = !!n.modelValue;
|
|
71
|
+
}), P(
|
|
72
|
+
() => l(s),
|
|
79
73
|
(e) => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}),
|
|
83
|
-
|
|
74
|
+
t("visible-change", e), t("update:modelValue", e), i && p.emitVisible && m(() => {
|
|
75
|
+
p.emitVisible(e, i.uid);
|
|
76
|
+
}), m(() => {
|
|
77
|
+
n.scrollTop && e && l(u) && l(u).scrollTop();
|
|
84
78
|
});
|
|
85
79
|
},
|
|
86
80
|
{
|
|
87
81
|
immediate: !1
|
|
88
82
|
}
|
|
89
83
|
);
|
|
90
|
-
async function
|
|
91
|
-
if (e?.stopPropagation(),
|
|
92
|
-
const
|
|
93
|
-
|
|
84
|
+
async function B(e) {
|
|
85
|
+
if (e?.stopPropagation(), n.closeFunc && G(n.closeFunc)) {
|
|
86
|
+
const o = await n.closeFunc();
|
|
87
|
+
s.value = !o;
|
|
94
88
|
return;
|
|
95
89
|
}
|
|
96
|
-
|
|
90
|
+
s.value = !1, t("close", e);
|
|
97
91
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
92
|
+
function O(e) {
|
|
93
|
+
d.value = D(l(d) || {}, e), Reflect.has(e, "modelValue") && (s.value = !!e.modelValue);
|
|
100
94
|
}
|
|
101
|
-
const
|
|
102
|
-
onClick: (e) =>
|
|
103
|
-
...
|
|
104
|
-
})),
|
|
105
|
-
onClick: () =>
|
|
106
|
-
...
|
|
95
|
+
const V = r(() => ({
|
|
96
|
+
onClick: (e) => B(e),
|
|
97
|
+
...n.cancelButtonOptions
|
|
98
|
+
})), F = r(() => ({
|
|
99
|
+
onClick: () => t("submit"),
|
|
100
|
+
...n.submitButtonOptions
|
|
107
101
|
}));
|
|
108
|
-
return (e,
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
return (e, o) => (y(), b(l(I), T(h.value, {
|
|
103
|
+
onClose: B,
|
|
104
|
+
onOpen: o[0] || (o[0] = (c) => t("open")),
|
|
105
|
+
onOpened: o[1] || (o[1] = (c) => t("opened")),
|
|
106
|
+
onClosed: o[2] || (o[2] = (c) => t("closed")),
|
|
107
|
+
onOpenAutoFocus: o[3] || (o[3] = (c) => t("openAutoFocus")),
|
|
108
|
+
onCloseAutoFocus: o[4] || (o[4] = (c) => t("closeAutoFocus"))
|
|
109
|
+
}), R({
|
|
110
|
+
default: C(() => [
|
|
111
|
+
S(e.$slots, "default")
|
|
111
112
|
]),
|
|
112
113
|
_: 2
|
|
113
114
|
}, [
|
|
114
|
-
e.$slots.footer ||
|
|
115
|
+
e.$slots.footer || a.showActionButtonGroup ? {
|
|
115
116
|
name: "footer",
|
|
116
|
-
fn:
|
|
117
|
-
|
|
117
|
+
fn: C(() => [
|
|
118
|
+
a.showActionButtonGroup ? (y(), b(E, {
|
|
118
119
|
key: 0,
|
|
119
|
-
"show-cancel-button":
|
|
120
|
-
"show-submit-button":
|
|
121
|
-
"cancel-button-options":
|
|
122
|
-
"submit-button-options":
|
|
120
|
+
"show-cancel-button": a.showCancelButton,
|
|
121
|
+
"show-submit-button": a.showSubmitButton,
|
|
122
|
+
"cancel-button-options": V.value,
|
|
123
|
+
"submit-button-options": F.value
|
|
123
124
|
}, null, 8, ["show-cancel-button", "show-submit-button", "cancel-button-options", "submit-button-options"])) : x("", !0)
|
|
124
125
|
]),
|
|
125
126
|
key: "0"
|
|
@@ -128,5 +129,5 @@ const N = /* @__PURE__ */ O({
|
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
131
|
export {
|
|
131
|
-
|
|
132
|
+
W as default
|
|
132
133
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare const VftRouterViewContent: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
name: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
};
|
|
2
5
|
cacheList: {
|
|
3
6
|
type: import("vue").PropType<string[]>;
|
|
4
7
|
required: true;
|
|
@@ -17,6 +20,9 @@ export declare const VftRouterViewContent: import("vft/es/utils").SFCWithInstall
|
|
|
17
20
|
required: true;
|
|
18
21
|
};
|
|
19
22
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
name: {
|
|
24
|
+
type: import("vue").PropType<string>;
|
|
25
|
+
};
|
|
20
26
|
cacheList: {
|
|
21
27
|
type: import("vue").PropType<string[]>;
|
|
22
28
|
required: true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, computed as
|
|
1
|
+
import { defineComponent as v, computed as d, resolveComponent as A, createBlock as t, openBlock as n, withCtx as m, createVNode as s, unref as o, KeepAlive as k, createCommentVNode as g, resolveDynamicComponent as f, Transition as x, mergeProps as C } from "vue";
|
|
2
2
|
import { getRouterKeyPath as N } from "@vft/router";
|
|
3
3
|
import { createReusableTemplate as R } from "@vueuse/core";
|
|
4
4
|
const K = v({
|
|
@@ -6,6 +6,7 @@ const K = v({
|
|
|
6
6
|
}), T = /* @__PURE__ */ v({
|
|
7
7
|
...K,
|
|
8
8
|
props: {
|
|
9
|
+
name: {},
|
|
9
10
|
cacheList: {},
|
|
10
11
|
transitionName: {},
|
|
11
12
|
transitionAttr: {},
|
|
@@ -13,26 +14,26 @@ const K = v({
|
|
|
13
14
|
isReloadFlag: { type: Boolean }
|
|
14
15
|
},
|
|
15
16
|
setup(e) {
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
return a.meta?.currentActivePath && (
|
|
19
|
-
}), [y,
|
|
20
|
-
return (a,
|
|
17
|
+
const h = d(() => e.openKeepAlive ? e.cacheList : []), p = d(() => (a) => {
|
|
18
|
+
let i = a.name;
|
|
19
|
+
return a.meta?.currentActivePath && (i = a.matched?.filter((r) => r.path === a.meta?.currentActivePath)?.[0].name), e.isReloadFlag ? void 0 : i;
|
|
20
|
+
}), [y, c] = R();
|
|
21
|
+
return (a, i) => {
|
|
21
22
|
const r = A("router-view");
|
|
22
|
-
return n(), t(r,
|
|
23
|
-
default:
|
|
24
|
-
|
|
25
|
-
default:
|
|
23
|
+
return n(), t(r, { name: e.name }, {
|
|
24
|
+
default: m(({ Component: u, route: l }) => [
|
|
25
|
+
s(o(y), null, {
|
|
26
|
+
default: m(() => [
|
|
26
27
|
e.openKeepAlive ? (n(), t(k, {
|
|
27
28
|
key: 0,
|
|
28
|
-
include:
|
|
29
|
-
exclude:
|
|
29
|
+
include: h.value,
|
|
30
|
+
exclude: p.value(l)
|
|
30
31
|
}, [
|
|
31
32
|
e.isReloadFlag ? (n(), t(f(u), {
|
|
32
|
-
key: o(N)(
|
|
33
|
+
key: o(N)(l)
|
|
33
34
|
})) : g("", !0)
|
|
34
35
|
], 1032, ["include", "exclude"])) : (n(), t(f(u), {
|
|
35
|
-
key:
|
|
36
|
+
key: l.fullPath
|
|
36
37
|
}))
|
|
37
38
|
]),
|
|
38
39
|
_: 2
|
|
@@ -41,14 +42,14 @@ const K = v({
|
|
|
41
42
|
key: 0,
|
|
42
43
|
name: e.transitionName
|
|
43
44
|
}, e.transitionAttr), {
|
|
44
|
-
default:
|
|
45
|
-
|
|
45
|
+
default: m(() => [
|
|
46
|
+
s(o(c))
|
|
46
47
|
]),
|
|
47
48
|
_: 1
|
|
48
|
-
}, 16, ["name"])) : (n(), t(o(
|
|
49
|
+
}, 16, ["name"])) : (n(), t(o(c), { key: 1 }))
|
|
49
50
|
]),
|
|
50
51
|
_: 1
|
|
51
|
-
});
|
|
52
|
+
}, 8, ["name"]);
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
});
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as g, computed as
|
|
2
|
-
import { VftButton as
|
|
3
|
-
import { VftFormItem as
|
|
4
|
-
import { VftRow as
|
|
1
|
+
import { defineComponent as g, computed as i, createBlock as l, createCommentVNode as c, openBlock as r, unref as o, normalizeProps as x, mergeProps as p, withCtx as u, createVNode as R, normalizeClass as T, renderSlot as b, createTextVNode as B, toDisplayString as f } from "vue";
|
|
2
|
+
import { VftButton as v } from "../button/index.js";
|
|
3
|
+
import { VftFormItem as N } from "../form/index.js";
|
|
4
|
+
import { VftRow as V } from "../row/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "@vft/utils";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import "lodash-es";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as S } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
import { useFormContext as
|
|
14
|
-
const
|
|
13
|
+
import { useFormContext as j } from "./use/use-form-context.js";
|
|
14
|
+
const M = /* @__PURE__ */ g({
|
|
15
15
|
__name: "super-form-action",
|
|
16
16
|
props: {
|
|
17
17
|
showResetButton: { type: Boolean },
|
|
@@ -23,86 +23,86 @@ const Q = /* @__PURE__ */ g({
|
|
|
23
23
|
actionRowOptions: {},
|
|
24
24
|
submitResetReverse: { type: Boolean }
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const m =
|
|
26
|
+
setup(t) {
|
|
27
|
+
const m = S("form-action"), { resetAction: d, submitAction: h, commonAction: C } = j(), k = i(() => ({
|
|
28
28
|
justify: "end",
|
|
29
|
-
...
|
|
30
|
-
})),
|
|
31
|
-
() => Object.assign({ btnText: "重置" },
|
|
32
|
-
),
|
|
33
|
-
() => Object.assign({ btnText: "确认" },
|
|
34
|
-
),
|
|
35
|
-
() => Object.assign({ btnText: "取消" },
|
|
29
|
+
...t.actionRowOptions
|
|
30
|
+
})), O = i(
|
|
31
|
+
() => Object.assign({ btnText: "重置" }, t.resetButtonOptions)
|
|
32
|
+
), w = i(
|
|
33
|
+
() => Object.assign({ btnText: "确认" }, t.submitButtonOptions)
|
|
34
|
+
), a = i(
|
|
35
|
+
() => Object.assign({ btnText: "取消" }, t.commonButtonOptions)
|
|
36
36
|
), y = (e) => ({
|
|
37
37
|
type: e ? "warning" : "primary",
|
|
38
|
-
options: e ?
|
|
39
|
-
action: e ?
|
|
38
|
+
options: e ? O.value : w.value,
|
|
39
|
+
action: e ? d : h,
|
|
40
40
|
className: e ? m.e("reset") : m.e("submit"),
|
|
41
|
-
show: e ?
|
|
42
|
-
}),
|
|
43
|
-
() => y(!
|
|
44
|
-
),
|
|
45
|
-
() => y(
|
|
41
|
+
show: e ? t.showResetButton : t.showSubmitButton
|
|
42
|
+
}), n = i(
|
|
43
|
+
() => y(!t.submitResetReverse)
|
|
44
|
+
), s = i(
|
|
45
|
+
() => y(t.submitResetReverse)
|
|
46
46
|
);
|
|
47
|
-
return (e,
|
|
47
|
+
return (e, A) => t.showCommonButton || n.value.show || s.value.show ? (r(), l(o(V), x(p({ key: 0 }, k.value)), {
|
|
48
48
|
default: u(() => [
|
|
49
|
-
|
|
50
|
-
class:
|
|
49
|
+
R(o(N), {
|
|
50
|
+
class: T([{ "submit-block": w.value.block }, o(m).b()])
|
|
51
51
|
}, {
|
|
52
52
|
default: u(() => [
|
|
53
|
-
|
|
54
|
-
class:
|
|
55
|
-
onClick:
|
|
53
|
+
t.showCommonButton && !a.value.isBehind ? (r(), l(o(v), p({ key: 0 }, a.value, {
|
|
54
|
+
class: o(m).e("common"),
|
|
55
|
+
onClick: o(C)
|
|
56
56
|
}), {
|
|
57
57
|
default: u(() => [
|
|
58
|
-
B(f(
|
|
58
|
+
B(f(a.value.btnText), 1)
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
61
|
-
}, 16, ["class", "onClick"])) :
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
}, 16, ["class", "onClick"])) : c("", !0),
|
|
62
|
+
b(e.$slots, "resetBefore"),
|
|
63
|
+
n.value.show ? (r(), l(o(v), p({
|
|
64
64
|
key: 1,
|
|
65
|
-
type:
|
|
66
|
-
},
|
|
67
|
-
onClick:
|
|
68
|
-
class:
|
|
65
|
+
type: n.value.type
|
|
66
|
+
}, n.value.options, {
|
|
67
|
+
onClick: n.value.action,
|
|
68
|
+
class: n.value.className
|
|
69
69
|
}), {
|
|
70
70
|
default: u(() => [
|
|
71
|
-
B(f(
|
|
71
|
+
B(f(n.value.options.btnText), 1)
|
|
72
72
|
]),
|
|
73
73
|
_: 1
|
|
74
|
-
}, 16, ["type", "onClick", "class"])) :
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
}, 16, ["type", "onClick", "class"])) : c("", !0),
|
|
75
|
+
b(e.$slots, "submitBefore"),
|
|
76
|
+
s.value.show ? (r(), l(o(v), p({
|
|
77
77
|
key: 2,
|
|
78
|
-
type:
|
|
79
|
-
},
|
|
80
|
-
onClick:
|
|
81
|
-
class:
|
|
78
|
+
type: s.value.type
|
|
79
|
+
}, s.value.options, {
|
|
80
|
+
onClick: s.value.action,
|
|
81
|
+
class: s.value.className
|
|
82
82
|
}), {
|
|
83
83
|
default: u(() => [
|
|
84
|
-
B(f(
|
|
84
|
+
B(f(s.value.options.btnText), 1)
|
|
85
85
|
]),
|
|
86
86
|
_: 1
|
|
87
|
-
}, 16, ["type", "onClick", "class"])) :
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class:
|
|
91
|
-
onClick:
|
|
87
|
+
}, 16, ["type", "onClick", "class"])) : c("", !0),
|
|
88
|
+
b(e.$slots, "submitAfter"),
|
|
89
|
+
t.showCommonButton && a.value.isBehind ? (r(), l(o(v), p({ key: 3 }, a.value, {
|
|
90
|
+
class: o(m).e("common"),
|
|
91
|
+
onClick: o(C)
|
|
92
92
|
}), {
|
|
93
93
|
default: u(() => [
|
|
94
|
-
B(f(
|
|
94
|
+
B(f(a.value.btnText), 1)
|
|
95
95
|
]),
|
|
96
96
|
_: 1
|
|
97
|
-
}, 16, ["class", "onClick"])) :
|
|
97
|
+
}, 16, ["class", "onClick"])) : c("", !0)
|
|
98
98
|
]),
|
|
99
99
|
_: 3
|
|
100
100
|
}, 8, ["class"])
|
|
101
101
|
]),
|
|
102
102
|
_: 3
|
|
103
|
-
}, 16));
|
|
103
|
+
}, 16)) : c("", !0);
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
export {
|
|
107
|
-
|
|
107
|
+
M as default
|
|
108
108
|
};
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED