vft 0.0.327 → 0.0.329
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/steps/index.d.ts +27 -8
- package/es/components/steps/item.vue.d.ts +8 -14
- package/es/components/steps/item.vue2.js +116 -81
- package/es/components/steps/steps.vue.d.ts +3 -0
- package/es/components/steps/steps.vue2.js +24 -19
- package/es/components/steps/tokens.d.ts +1 -0
- package/es/components/steps/tokens.js +4 -0
- package/es/components/steps/types.d.ts +3 -1
- package/es/components/super-form/super-form-item.vue2.js +103 -95
- package/es/components/super-form/types.d.ts +3 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/steps/index.d.ts +27 -8
- package/lib/components/steps/item.vue.d.ts +8 -14
- package/lib/components/steps/item.vue2.cjs +1 -1
- package/lib/components/steps/steps.vue.d.ts +3 -0
- package/lib/components/steps/steps.vue2.cjs +1 -1
- package/lib/components/steps/tokens.cjs +1 -0
- package/lib/components/steps/tokens.d.ts +1 -0
- package/lib/components/steps/types.d.ts +3 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +3 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/step.scss +61 -9
- package/theme-style/vft-step.css +1 -1
- package/web-types.json +1 -1
|
@@ -11,6 +11,10 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
11
11
|
type: import("vue").PropType<number>;
|
|
12
12
|
default: number;
|
|
13
13
|
};
|
|
14
|
+
contentPosition: {
|
|
15
|
+
type: import("vue").PropType<"top" | "bottom">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
14
18
|
alignCenter: {
|
|
15
19
|
type: import("vue").PropType<boolean>;
|
|
16
20
|
};
|
|
@@ -32,6 +36,7 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
32
36
|
}, import("vue").PublicProps, {
|
|
33
37
|
direction: "horizontal" | "vertical";
|
|
34
38
|
active: number;
|
|
39
|
+
contentPosition: "top" | "bottom";
|
|
35
40
|
finishStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
36
41
|
processStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
37
42
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
@@ -53,6 +58,10 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
53
58
|
type: import("vue").PropType<number>;
|
|
54
59
|
default: number;
|
|
55
60
|
};
|
|
61
|
+
contentPosition: {
|
|
62
|
+
type: import("vue").PropType<"top" | "bottom">;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
56
65
|
alignCenter: {
|
|
57
66
|
type: import("vue").PropType<boolean>;
|
|
58
67
|
};
|
|
@@ -72,6 +81,7 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
72
81
|
}>, {}, {}, {}, {}, {
|
|
73
82
|
direction: "horizontal" | "vertical";
|
|
74
83
|
active: number;
|
|
84
|
+
contentPosition: "top" | "bottom";
|
|
75
85
|
finishStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
76
86
|
processStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
77
87
|
}>;
|
|
@@ -90,6 +100,10 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
90
100
|
type: import("vue").PropType<number>;
|
|
91
101
|
default: number;
|
|
92
102
|
};
|
|
103
|
+
contentPosition: {
|
|
104
|
+
type: import("vue").PropType<"top" | "bottom">;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
93
107
|
alignCenter: {
|
|
94
108
|
type: import("vue").PropType<boolean>;
|
|
95
109
|
};
|
|
@@ -111,6 +125,7 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
111
125
|
}, string, {
|
|
112
126
|
direction: "horizontal" | "vertical";
|
|
113
127
|
active: number;
|
|
128
|
+
contentPosition: "top" | "bottom";
|
|
114
129
|
finishStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
115
130
|
processStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
116
131
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -124,7 +139,7 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
124
139
|
type: import("vue").PropType<string>;
|
|
125
140
|
};
|
|
126
141
|
icon: {
|
|
127
|
-
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
142
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
128
143
|
};
|
|
129
144
|
description: {
|
|
130
145
|
type: import("vue").PropType<string>;
|
|
@@ -144,7 +159,7 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
144
159
|
type: import("vue").PropType<string>;
|
|
145
160
|
};
|
|
146
161
|
icon: {
|
|
147
|
-
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
162
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
148
163
|
};
|
|
149
164
|
description: {
|
|
150
165
|
type: import("vue").PropType<string>;
|
|
@@ -161,7 +176,7 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
161
176
|
type: import("vue").PropType<string>;
|
|
162
177
|
};
|
|
163
178
|
icon: {
|
|
164
|
-
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
179
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
165
180
|
};
|
|
166
181
|
description: {
|
|
167
182
|
type: import("vue").PropType<string>;
|
|
@@ -171,9 +186,11 @@ export declare const VftSteps: import("vft/es/utils").SFCWithInstall<{
|
|
|
171
186
|
};
|
|
172
187
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
173
188
|
$slots: {
|
|
174
|
-
|
|
189
|
+
top?(_: {}): any;
|
|
175
190
|
title?(_: {}): any;
|
|
176
191
|
description?(_: {}): any;
|
|
192
|
+
icon?(_: {}): any;
|
|
193
|
+
bottom?(_: {}): any;
|
|
177
194
|
};
|
|
178
195
|
});
|
|
179
196
|
};
|
|
@@ -184,7 +201,7 @@ export declare const VftStep: import("vft/es/utils").SFCWithInstall<{
|
|
|
184
201
|
type: import("vue").PropType<string>;
|
|
185
202
|
};
|
|
186
203
|
icon: {
|
|
187
|
-
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
204
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
188
205
|
};
|
|
189
206
|
description: {
|
|
190
207
|
type: import("vue").PropType<string>;
|
|
@@ -204,7 +221,7 @@ export declare const VftStep: import("vft/es/utils").SFCWithInstall<{
|
|
|
204
221
|
type: import("vue").PropType<string>;
|
|
205
222
|
};
|
|
206
223
|
icon: {
|
|
207
|
-
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
224
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
208
225
|
};
|
|
209
226
|
description: {
|
|
210
227
|
type: import("vue").PropType<string>;
|
|
@@ -221,7 +238,7 @@ export declare const VftStep: import("vft/es/utils").SFCWithInstall<{
|
|
|
221
238
|
type: import("vue").PropType<string>;
|
|
222
239
|
};
|
|
223
240
|
icon: {
|
|
224
|
-
type: import("vue").PropType<import("vft/es/vft").IconProps>;
|
|
241
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
225
242
|
};
|
|
226
243
|
description: {
|
|
227
244
|
type: import("vue").PropType<string>;
|
|
@@ -231,9 +248,11 @@ export declare const VftStep: import("vft/es/utils").SFCWithInstall<{
|
|
|
231
248
|
};
|
|
232
249
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
233
250
|
$slots: {
|
|
234
|
-
|
|
251
|
+
top?(_: {}): any;
|
|
235
252
|
title?(_: {}): any;
|
|
236
253
|
description?(_: {}): any;
|
|
254
|
+
icon?(_: {}): any;
|
|
255
|
+
bottom?(_: {}): any;
|
|
237
256
|
};
|
|
238
257
|
})>;
|
|
239
258
|
export * from './types';
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import type { StepItemProps } from './types';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
3
|
-
export interface IStepsProps {
|
|
4
|
-
space: number | string;
|
|
5
|
-
active: number;
|
|
6
|
-
direction: string;
|
|
7
|
-
alignCenter: boolean;
|
|
8
|
-
simple: boolean;
|
|
9
|
-
finishStatus: string;
|
|
10
|
-
processStatus: string;
|
|
11
|
-
}
|
|
1
|
+
import type { StepItemProps, StepsProps } from './types';
|
|
2
|
+
import type { Ref, VNode } from 'vue';
|
|
12
3
|
export interface StepItemState {
|
|
13
4
|
uid: number;
|
|
5
|
+
getVnode: () => VNode;
|
|
14
6
|
currentStatus: string;
|
|
15
7
|
setIndex: (val: number) => void;
|
|
16
8
|
calcProgress: (status: string) => void;
|
|
17
9
|
}
|
|
18
10
|
export interface IStepsInject {
|
|
19
|
-
props:
|
|
11
|
+
props: StepsProps;
|
|
20
12
|
steps: Ref<StepItemState[]>;
|
|
21
13
|
addStep: (item: StepItemState) => void;
|
|
22
|
-
removeStep: (
|
|
14
|
+
removeStep: (item: StepItemState) => void;
|
|
23
15
|
}
|
|
24
16
|
declare function __VLS_template(): {
|
|
25
|
-
|
|
17
|
+
top?(_: {}): any;
|
|
26
18
|
title?(_: {}): any;
|
|
27
19
|
description?(_: {}): any;
|
|
20
|
+
icon?(_: {}): any;
|
|
21
|
+
bottom?(_: {}): any;
|
|
28
22
|
};
|
|
29
23
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<StepItemProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<StepItemProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
@@ -1,136 +1,171 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as D, ref as w, inject as Y, getCurrentInstance as q, onMounted as F, watch as G, computed as i, reactive as H, onBeforeUnmount as Q, createElementBlock as a, openBlock as n, normalizeClass as l, normalizeStyle as z, createCommentVNode as S, createElementVNode as d, unref as t, renderSlot as p, createTextVNode as k, toDisplayString as y, createBlock as N, mergeProps as R } from "vue";
|
|
2
|
+
import { VftIcon as V } from "../icon/index.js";
|
|
2
3
|
import "@vueuse/core";
|
|
3
|
-
import { isNumber as
|
|
4
|
+
import { singleAttrToObj as X, isNumber as Z } from "@vft/utils";
|
|
4
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
5
6
|
import "lodash-es";
|
|
6
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as _ } from "../../hooks/use-namespace/index.js";
|
|
7
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
8
9
|
import "@popperjs/core";
|
|
9
10
|
import "../../hooks/use-z-index/index.js";
|
|
10
|
-
import {
|
|
11
|
-
const
|
|
11
|
+
import { STEPS_INJECTION_KEY as x } from "./tokens.js";
|
|
12
|
+
const ee = D({
|
|
12
13
|
name: "VftStep"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
14
|
+
}), ve = /* @__PURE__ */ D({
|
|
15
|
+
...ee,
|
|
15
16
|
props: {
|
|
16
17
|
title: {},
|
|
17
18
|
icon: {},
|
|
18
19
|
description: {},
|
|
19
20
|
status: {}
|
|
20
21
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
22
|
+
setup(K) {
|
|
23
|
+
const I = K, s = _("step"), c = w(-1), B = w({}), m = w(""), o = Y(x), $ = q();
|
|
23
24
|
F(() => {
|
|
24
25
|
G(
|
|
25
26
|
[
|
|
26
|
-
() =>
|
|
27
|
-
() =>
|
|
28
|
-
() =>
|
|
27
|
+
() => o.props.active,
|
|
28
|
+
() => o.props.processStatus,
|
|
29
|
+
() => o.props.finishStatus
|
|
29
30
|
],
|
|
30
31
|
([e]) => {
|
|
31
32
|
U(e);
|
|
32
33
|
},
|
|
33
34
|
{ immediate: !0 }
|
|
34
35
|
);
|
|
35
|
-
}), H(() => {
|
|
36
|
-
n.removeStep(I.uid);
|
|
37
36
|
});
|
|
38
|
-
const
|
|
39
|
-
|
|
37
|
+
const E = i(
|
|
38
|
+
() => X(I.icon, "icon")
|
|
39
|
+
), r = i(() => I.status || m.value), O = i(() => {
|
|
40
|
+
const e = o.steps.value[c.value - 1];
|
|
40
41
|
return e ? e.currentStatus : "wait";
|
|
41
|
-
}),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
}), h = i(() => o.props.alignCenter), P = i(() => o.props.direction === "vertical"), u = i(() => o.props.simple), g = i(() => o.props.contentPosition === "top"), C = i(() => o.steps.value.length), T = i(() => o.steps.value[C.value - 1]?.uid === $.uid), f = i(() => u.value ? "" : o.props.space), A = i(() => [
|
|
43
|
+
s.b(),
|
|
44
|
+
s.is(u.value ? "simple" : o.props.direction),
|
|
45
|
+
s.is("flex", T.value && !f.value && !h.value),
|
|
46
|
+
s.is("center", h.value && !P.value && !u.value),
|
|
47
|
+
s.is("content-top", g.value)
|
|
48
|
+
]), J = i(() => {
|
|
47
49
|
const e = {
|
|
48
|
-
flexBasis:
|
|
50
|
+
flexBasis: Z(f.value) ? `${f.value}px` : f.value ? f.value : `${100 / (C.value - (h.value ? 0 : 1))}%`
|
|
49
51
|
};
|
|
50
|
-
return
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
const
|
|
55
|
-
transitionDelay: `${
|
|
56
|
-
},
|
|
57
|
-
|
|
52
|
+
return P.value || T.value && (e.maxWidth = `${100 / C.value}%`), e;
|
|
53
|
+
}), L = (e) => {
|
|
54
|
+
c.value = e;
|
|
55
|
+
}, M = (e) => {
|
|
56
|
+
const v = e === "wait", b = {
|
|
57
|
+
transitionDelay: `${v ? "-" : ""}${150 * c.value}ms`
|
|
58
|
+
}, j = e === o.props.processStatus || v ? 0 : 100;
|
|
59
|
+
b.borderWidth = j && !u.value ? "1px" : 0, b[o.props.direction === "vertical" ? "height" : "width"] = `${j}%`, B.value = b;
|
|
58
60
|
}, U = (e) => {
|
|
59
|
-
e >
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
uid:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
e > c.value ? m.value = o.props.finishStatus : e === c.value && O.value !== "error" ? m.value = o.props.processStatus : m.value = "wait";
|
|
62
|
+
const v = o.steps.value[c.value - 1];
|
|
63
|
+
v && v.calcProgress(m.value);
|
|
64
|
+
}, W = H({
|
|
65
|
+
uid: $.uid,
|
|
66
|
+
getVnode: () => $.vnode,
|
|
67
|
+
currentStatus: r,
|
|
68
|
+
setIndex: L,
|
|
69
|
+
calcProgress: M
|
|
67
70
|
});
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
return o.addStep(W), Q(() => {
|
|
72
|
+
o.removeStep(W);
|
|
73
|
+
}), (e, v) => (n(), a("div", {
|
|
74
|
+
style: z(J.value),
|
|
75
|
+
class: l(A.value)
|
|
71
76
|
}, [
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
e.$slots.top ? (n(), a("div", {
|
|
78
|
+
key: 0,
|
|
79
|
+
class: l(t(s).e("top-slot"))
|
|
74
80
|
}, [
|
|
75
|
-
|
|
81
|
+
p(e.$slots, "top")
|
|
82
|
+
], 2)) : g.value ? (n(), a("div", {
|
|
83
|
+
key: 1,
|
|
84
|
+
class: l(t(s).e("main"))
|
|
85
|
+
}, [
|
|
86
|
+
d("div", {
|
|
87
|
+
class: l([t(s).e("title"), t(s).is(r.value)])
|
|
88
|
+
}, [
|
|
89
|
+
p(e.$slots, "title", {}, () => [
|
|
90
|
+
k(y(e.title), 1)
|
|
91
|
+
])
|
|
92
|
+
], 2),
|
|
93
|
+
u.value ? (n(), a("div", {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: l(t(s).e("arrow"))
|
|
96
|
+
}, null, 2)) : S("", !0),
|
|
97
|
+
d("div", {
|
|
98
|
+
class: l([t(s).e("description"), t(s).is(r.value)])
|
|
99
|
+
}, [
|
|
100
|
+
p(e.$slots, "description", {}, () => [
|
|
101
|
+
k(y(e.description), 1)
|
|
102
|
+
])
|
|
103
|
+
], 2)
|
|
104
|
+
], 2)) : S("", !0),
|
|
105
|
+
d("div", {
|
|
106
|
+
class: l([t(s).e("head"), t(s).is(r.value)])
|
|
107
|
+
}, [
|
|
108
|
+
u.value ? S("", !0) : (n(), a("div", {
|
|
76
109
|
key: 0,
|
|
77
|
-
class:
|
|
110
|
+
class: l(t(s).e("line"))
|
|
78
111
|
}, [
|
|
79
|
-
|
|
80
|
-
class:
|
|
81
|
-
style:
|
|
112
|
+
d("i", {
|
|
113
|
+
class: l(t(s).e("line-inner")),
|
|
114
|
+
style: z(B.value)
|
|
82
115
|
}, null, 6)
|
|
83
116
|
], 2)),
|
|
84
|
-
|
|
85
|
-
class:
|
|
117
|
+
d("div", {
|
|
118
|
+
class: l([t(s).e("icon"), t(s).is(e.icon || e.$slots.icon ? "icon" : "text")])
|
|
86
119
|
}, [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, {
|
|
92
|
-
default: O(() => [
|
|
93
|
-
(i(), f(Q(e.icon)))
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
}, 8, ["class"])) : u.value === "success" ? (i(), f(s(g), {
|
|
120
|
+
p(e.$slots, "icon", {}, () => [
|
|
121
|
+
E.value?.icon ? (n(), N(t(V), R({ key: 0 }, E.value, {
|
|
122
|
+
class: t(s).e("icon-inner")
|
|
123
|
+
}), null, 16, ["class"])) : r.value === "success" ? (n(), N(t(V), {
|
|
97
124
|
key: 1,
|
|
98
|
-
class:
|
|
99
|
-
|
|
125
|
+
class: l([t(s).e("icon-inner"), t(s).is("status")]),
|
|
126
|
+
icon: "icon-check"
|
|
127
|
+
}, null, 8, ["class"])) : r.value === "error" ? (n(), N(t(V), {
|
|
100
128
|
key: 2,
|
|
101
|
-
class:
|
|
102
|
-
|
|
129
|
+
class: l([t(s).e("icon-inner"), t(s).is("status")]),
|
|
130
|
+
icon: "icon-close"
|
|
131
|
+
}, null, 8, ["class"])) : u.value ? S("", !0) : (n(), a("div", {
|
|
103
132
|
key: 3,
|
|
104
|
-
class:
|
|
105
|
-
},
|
|
133
|
+
class: l(t(s).e("icon-inner"))
|
|
134
|
+
}, y(c.value + 1), 3))
|
|
106
135
|
])
|
|
107
136
|
], 2)
|
|
108
137
|
], 2),
|
|
109
|
-
|
|
110
|
-
|
|
138
|
+
e.$slots.bottom ? (n(), a("div", {
|
|
139
|
+
key: 2,
|
|
140
|
+
class: l(t(s).e("bottom-slot"))
|
|
141
|
+
}, [
|
|
142
|
+
p(e.$slots, "bottom")
|
|
143
|
+
], 2)) : g.value ? S("", !0) : (n(), a("div", {
|
|
144
|
+
key: 3,
|
|
145
|
+
class: l(t(s).e("main"))
|
|
111
146
|
}, [
|
|
112
|
-
|
|
113
|
-
class:
|
|
147
|
+
d("div", {
|
|
148
|
+
class: l([t(s).e("title"), t(s).is(r.value)])
|
|
114
149
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
150
|
+
p(e.$slots, "title", {}, () => [
|
|
151
|
+
k(y(e.title), 1)
|
|
117
152
|
])
|
|
118
153
|
], 2),
|
|
119
|
-
|
|
154
|
+
u.value ? (n(), a("div", {
|
|
120
155
|
key: 0,
|
|
121
|
-
class:
|
|
122
|
-
}, null, 2)) : (
|
|
156
|
+
class: l(t(s).e("arrow"))
|
|
157
|
+
}, null, 2)) : (n(), a("div", {
|
|
123
158
|
key: 1,
|
|
124
|
-
class:
|
|
159
|
+
class: l([t(s).e("description"), t(s).is(r.value)])
|
|
125
160
|
}, [
|
|
126
|
-
|
|
127
|
-
|
|
161
|
+
p(e.$slots, "description", {}, () => [
|
|
162
|
+
k(y(e.description), 1)
|
|
128
163
|
])
|
|
129
164
|
], 2))
|
|
130
|
-
], 2)
|
|
165
|
+
], 2))
|
|
131
166
|
], 6));
|
|
132
167
|
}
|
|
133
168
|
});
|
|
134
169
|
export {
|
|
135
|
-
|
|
170
|
+
ve as default
|
|
136
171
|
};
|
|
@@ -7,6 +7,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
7
7
|
direction: string;
|
|
8
8
|
finishStatus: string;
|
|
9
9
|
processStatus: string;
|
|
10
|
+
contentPosition: string;
|
|
10
11
|
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
12
|
change: (newVal?: number | undefined, oldVal?: number | undefined) => void;
|
|
12
13
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StepsProps>, {
|
|
@@ -14,11 +15,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
14
15
|
direction: string;
|
|
15
16
|
finishStatus: string;
|
|
16
17
|
processStatus: string;
|
|
18
|
+
contentPosition: string;
|
|
17
19
|
}>>> & Readonly<{
|
|
18
20
|
onChange?: ((newVal?: number | undefined, oldVal?: number | undefined) => any) | undefined;
|
|
19
21
|
}>, {
|
|
20
22
|
direction: "horizontal" | "vertical";
|
|
21
23
|
active: number;
|
|
24
|
+
contentPosition: "top" | "bottom";
|
|
22
25
|
finishStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
23
26
|
processStatus: "wait" | "process" | "finish" | "error" | "success";
|
|
24
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { defineComponent as p, getCurrentInstance as
|
|
1
|
+
import { defineComponent as p, getCurrentInstance as u, watch as n, provide as h, createElementBlock as S, openBlock as C, normalizeClass as v, unref as r, renderSlot as E, createVNode as _ } from "vue";
|
|
2
|
+
import { CHANGE_EVENT as N } from "../../constants/event.js";
|
|
2
3
|
import "@vueuse/core";
|
|
3
4
|
import "@vft/utils";
|
|
4
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
5
6
|
import "lodash-es";
|
|
6
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as B } from "../../hooks/use-namespace/index.js";
|
|
7
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
8
|
-
import { useOrderedChildren as
|
|
9
|
+
import { useOrderedChildren as I } from "../../hooks/use-ordered-children/index.js";
|
|
9
10
|
import "@popperjs/core";
|
|
10
11
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
|
|
12
|
+
import { STEPS_INJECTION_KEY as g } from "./tokens.js";
|
|
13
|
+
const T = p({
|
|
12
14
|
name: "vft-steps"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
15
|
+
}), K = /* @__PURE__ */ p({
|
|
16
|
+
...T,
|
|
15
17
|
props: {
|
|
16
18
|
space: {},
|
|
17
19
|
active: { default: 0 },
|
|
@@ -19,31 +21,34 @@ const B = p({
|
|
|
19
21
|
alignCenter: { type: Boolean },
|
|
20
22
|
simple: { type: Boolean },
|
|
21
23
|
finishStatus: { default: "finish" },
|
|
22
|
-
processStatus: { default: "process" }
|
|
24
|
+
processStatus: { default: "process" },
|
|
25
|
+
contentPosition: { default: "bottom" }
|
|
23
26
|
},
|
|
24
27
|
emits: ["change"],
|
|
25
|
-
setup(a, { emit:
|
|
26
|
-
const s = a,
|
|
28
|
+
setup(a, { emit: m }) {
|
|
29
|
+
const s = a, l = m, i = B("steps"), {
|
|
27
30
|
children: o,
|
|
28
|
-
addChild:
|
|
29
|
-
removeChild:
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
addChild: d,
|
|
32
|
+
removeChild: c,
|
|
33
|
+
ChildrenSorter: f
|
|
34
|
+
} = I(u(), "VftStep");
|
|
35
|
+
return n(o, () => {
|
|
32
36
|
o.value.forEach((e, t) => {
|
|
33
37
|
e.setIndex(t);
|
|
34
38
|
});
|
|
35
|
-
}),
|
|
39
|
+
}), h(g, { props: s, steps: o, addStep: d, removeStep: c }), n(
|
|
36
40
|
() => s.active,
|
|
37
41
|
(e, t) => {
|
|
38
|
-
|
|
42
|
+
l(N, e, t);
|
|
39
43
|
}
|
|
40
|
-
), (e, t) => (
|
|
41
|
-
class:
|
|
44
|
+
), (e, t) => (C(), S("div", {
|
|
45
|
+
class: v([r(i).b(), r(i).m(e.simple ? "simple" : e.direction)])
|
|
42
46
|
}, [
|
|
43
|
-
|
|
47
|
+
E(e.$slots, "default"),
|
|
48
|
+
_(r(f))
|
|
44
49
|
], 2));
|
|
45
50
|
}
|
|
46
51
|
});
|
|
47
52
|
export {
|
|
48
|
-
|
|
53
|
+
K as default
|
|
49
54
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const STEPS_INJECTION_KEY = "VftSteps";
|
|
@@ -7,10 +7,12 @@ export interface StepsProps {
|
|
|
7
7
|
simple?: boolean;
|
|
8
8
|
finishStatus?: 'wait' | 'process' | 'finish' | 'error' | 'success';
|
|
9
9
|
processStatus?: 'wait' | 'process' | 'finish' | 'error' | 'success';
|
|
10
|
+
/** 内容区域位置:'top' | 'bottom',默认为 'bottom' */
|
|
11
|
+
contentPosition?: 'top' | 'bottom';
|
|
10
12
|
}
|
|
11
13
|
export interface StepItemProps {
|
|
12
14
|
title?: string;
|
|
13
|
-
icon?: IconProps;
|
|
15
|
+
icon?: IconProps | string;
|
|
14
16
|
description?: string;
|
|
15
17
|
status?: '' | 'wait' | 'process' | 'finish' | 'error' | 'success';
|
|
16
18
|
}
|