vft 0.0.328 → 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.
@@ -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
- icon?(_: {}): any;
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
- icon?(_: {}): any;
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: IStepsProps;
11
+ props: StepsProps;
20
12
  steps: Ref<StepItemState[]>;
21
13
  addStep: (item: StepItemState) => void;
22
- removeStep: (uid: number) => void;
14
+ removeStep: (item: StepItemState) => void;
23
15
  }
24
16
  declare function __VLS_template(): {
25
- icon?(_: {}): any;
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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");const E=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");const w=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const d=require("../icon/index.cjs"),I=e.defineComponent({name:"VftStep"}),b=e.defineComponent({...I,props:{title:{},icon:{},description:{},status:{}},setup(B){const z=B,s=w.useNamespace("step"),r=e.ref(-1),m=e.ref({}),u=e.ref(""),n=e.inject("VftSteps"),f=e.getCurrentInstance();e.onMounted(()=>{e.watch([()=>n.props.active,()=>n.props.processStatus,()=>n.props.finishStatus],([t])=>{q(t)},{immediate:!0})}),e.onBeforeUnmount(()=>{n.removeStep(C.uid)});const o=e.computed(()=>z.status||u.value),V=e.computed(()=>{const t=n.steps.value[r.value-1];return t?t.currentStatus:"wait"}),c=e.computed(()=>n.props.alignCenter),S=e.computed(()=>n.props.direction==="vertical"),l=e.computed(()=>n.props.simple),p=e.computed(()=>n.steps.value.length),k=e.computed(()=>n.steps.value[p.value-1]?.uid===f?.uid),i=e.computed(()=>l.value?"":n.props.space),h=e.computed(()=>[s.b(),s.is(l.value?"simple":n.props.direction),s.is("flex",k.value&&!i.value&&!c.value),s.is("center",c.value&&!S.value&&!l.value)]),$=e.computed(()=>{const t={flexBasis:E.isNumber(i.value)?`${i.value}px`:i.value?i.value:`${100/(p.value-(c.value?0:1))}%`};return S.value||k.value&&(t.maxWidth=`${100/p.value}%`),t}),g=t=>{r.value=t},N=t=>{const a=t==="wait",v={transitionDelay:`${a?"-":""}${150*r.value}ms`},y=t===n.props.processStatus||a?0:100;v.borderWidth=y&&!l.value?"1px":0,v[n.props.direction==="vertical"?"height":"width"]=`${y}%`,m.value=v},q=t=>{t>r.value?u.value=n.props.finishStatus:t===r.value&&V.value!=="error"?u.value=n.props.processStatus:u.value="wait";const a=n.steps.value[r.value-1];a&&a.calcProgress(u.value)},C=e.reactive({uid:f.uid,currentStatus:o,setIndex:g,calcProgress:N});return n.addStep(C),(t,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle($.value),class:e.normalizeClass(h.value)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("head"),e.unref(s).is(o.value)])},[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("line"))},[e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("line-inner")),style:e.normalizeStyle(m.value)},null,6)],2)),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("icon"),e.unref(s).is(t.icon||t.$slots.icon?"icon":"text")])},[e.renderSlot(t.$slots,"icon",{},()=>[t.icon?(e.openBlock(),e.createBlock(e.unref(d.VftIcon),{key:0,class:e.normalizeClass(e.unref(s).e("icon-inner"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))]),_:1},8,["class"])):o.value==="success"?(e.openBlock(),e.createBlock(e.unref(d.VftIcon),{key:1,class:e.normalizeClass([e.unref(s).e("icon-inner"),e.unref(s).is("status")])},null,8,["class"])):o.value==="error"?(e.openBlock(),e.createBlock(e.unref(d.VftIcon),{key:2,class:e.normalizeClass([e.unref(s).e("icon-inner"),e.unref(s).is("status")])},null,8,["class"])):l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(s).e("icon-inner"))},e.toDisplayString(r.value+1),3))])],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("main"))},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("title"),e.unref(s).is(o.value)])},[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("arrow"))},null,2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(s).e("description"),e.unref(s).is(o.value)])},[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2))],2)],6))}});exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../icon/index.cjs");require("@vueuse/core");const E=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");const I=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const w=require("./tokens.cjs"),D=e.defineComponent({name:"VftStep"}),P=e.defineComponent({...D,props:{title:{},icon:{},description:{},status:{}},setup(N){const k=N,s=I.useNamespace("step"),r=e.ref(-1),S=e.ref({}),i=e.ref(""),n=e.inject(w.STEPS_INJECTION_KEY),u=e.getCurrentInstance();e.onMounted(()=>{e.watch([()=>n.props.active,()=>n.props.processStatus,()=>n.props.finishStatus],([t])=>{T(t)},{immediate:!0})});const C=e.computed(()=>E.singleAttrToObj(k.icon,"icon")),o=e.computed(()=>k.status||i.value),$=e.computed(()=>{const t=n.steps.value[r.value-1];return t?t.currentStatus:"wait"}),p=e.computed(()=>n.props.alignCenter),B=e.computed(()=>n.props.direction==="vertical"),l=e.computed(()=>n.props.simple),d=e.computed(()=>n.props.contentPosition==="top"),v=e.computed(()=>n.steps.value.length),y=e.computed(()=>n.steps.value[v.value-1]?.uid===u.uid),c=e.computed(()=>l.value?"":n.props.space),g=e.computed(()=>[s.b(),s.is(l.value?"simple":n.props.direction),s.is("flex",y.value&&!c.value&&!p.value),s.is("center",p.value&&!B.value&&!l.value),s.is("content-top",d.value)]),h=e.computed(()=>{const t={flexBasis:E.isNumber(c.value)?`${c.value}px`:c.value?c.value:`${100/(v.value-(p.value?0:1))}%`};return B.value||y.value&&(t.maxWidth=`${100/v.value}%`),t}),q=t=>{r.value=t},b=t=>{const a=t==="wait",m={transitionDelay:`${a?"-":""}${150*r.value}ms`},z=t===n.props.processStatus||a?0:100;m.borderWidth=z&&!l.value?"1px":0,m[n.props.direction==="vertical"?"height":"width"]=`${z}%`,S.value=m},T=t=>{t>r.value?i.value=n.props.finishStatus:t===r.value&&$.value!=="error"?i.value=n.props.processStatus:i.value="wait";const a=n.steps.value[r.value-1];a&&a.calcProgress(i.value)},V=e.reactive({uid:u.uid,getVnode:()=>u.vnode,currentStatus:o,setIndex:q,calcProgress:b});return n.addStep(V),e.onBeforeUnmount(()=>{n.removeStep(V)}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(h.value),class:e.normalizeClass(g.value)},[t.$slots.top?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("top-slot"))},[e.renderSlot(t.$slots,"top")],2)):d.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(s).e("main"))},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("title"),e.unref(s).is(o.value)])},[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("arrow"))},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("description"),e.unref(s).is(o.value)])},[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("head"),e.unref(s).is(o.value)])},[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("line"))},[e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("line-inner")),style:e.normalizeStyle(S.value)},null,6)],2)),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("icon"),e.unref(s).is(t.icon||t.$slots.icon?"icon":"text")])},[e.renderSlot(t.$slots,"icon",{},()=>[C.value?.icon?(e.openBlock(),e.createBlock(e.unref(f.VftIcon),e.mergeProps({key:0},C.value,{class:e.unref(s).e("icon-inner")}),null,16,["class"])):o.value==="success"?(e.openBlock(),e.createBlock(e.unref(f.VftIcon),{key:1,class:e.normalizeClass([e.unref(s).e("icon-inner"),e.unref(s).is("status")]),icon:"icon-check"},null,8,["class"])):o.value==="error"?(e.openBlock(),e.createBlock(e.unref(f.VftIcon),{key:2,class:e.normalizeClass([e.unref(s).e("icon-inner"),e.unref(s).is("status")]),icon:"icon-close"},null,8,["class"])):l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(s).e("icon-inner"))},e.toDisplayString(r.value+1),3))])],2)],2),t.$slots.bottom?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(s).e("bottom-slot"))},[e.renderSlot(t.$slots,"bottom")],2)):d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(s).e("main"))},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("title"),e.unref(s).is(o.value)])},[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("arrow"))},null,2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(s).e("description"),e.unref(s).is(o.value)])},[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2))],2))],6))}});exports.default=P;
@@ -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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");const d=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");const p=require("../../hooks/use-ordered-children/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const f=e.defineComponent({name:"vft-steps"}),m=e.defineComponent({...f,props:{space:{},active:{default:0},direction:{default:"horizontal"},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{default:"finish"},processStatus:{default:"process"}},emits:["change"],setup(o,{emit:a}){const n=o,u=a,i=d.useNamespace("steps"),{children:s,addChild:l,removeChild:c}=p.useOrderedChildren(e.getCurrentInstance(),"ElStep");return e.watch(s,()=>{s.value.forEach((t,r)=>{t.setIndex(r)})}),e.provide("VftSteps",{props:n,steps:s,addStep:l,removeStep:c}),e.watch(()=>n.active,(t,r)=>{u("change",t,r)}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(i).b(),e.unref(i).m(t.simple?"simple":t.direction)])},[e.renderSlot(t.$slots,"default")],2))}});exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../../constants/event.cjs");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");const f=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");const m=require("../../hooks/use-ordered-children/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const h=require("./tokens.cjs"),S=e.defineComponent({name:"vft-steps"}),q=e.defineComponent({...S,props:{space:{},active:{default:0},direction:{default:"horizontal"},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{default:"finish"},processStatus:{default:"process"},contentPosition:{default:"bottom"}},emits:["change"],setup(i,{emit:u}){const s=i,a=u,o=f.useNamespace("steps"),{children:n,addChild:c,removeChild:l,ChildrenSorter:d}=m.useOrderedChildren(e.getCurrentInstance(),"VftStep");return e.watch(n,()=>{n.value.forEach((t,r)=>{t.setIndex(r)})}),e.provide(h.STEPS_INJECTION_KEY,{props:s,steps:n,addStep:c,removeStep:l}),e.watch(()=>s.active,(t,r)=>{a(p.CHANGE_EVENT,t,r)}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o).b(),e.unref(o).m(t.simple?"simple":t.direction)])},[e.renderSlot(t.$slots,"default"),e.createVNode(e.unref(d))],2))}});exports.default=q;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="VftSteps";exports.STEPS_INJECTION_KEY=t;
@@ -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
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.328";exports.version=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.329";exports.version=e;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.328",
3
+ "version": "0.0.329",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vft",
3
- "version": "0.0.328",
3
+ "version": "0.0.329",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -57,10 +57,10 @@
57
57
  "photoswipe": "5.4.4",
58
58
  "@vft/constants": "0.0.72",
59
59
  "@vft/router": "0.0.65",
60
- "@vft/store": "0.0.54",
61
60
  "@vft/use": "0.0.76",
61
+ "@vft/utils": "0.0.128",
62
62
  "@vft/directives": "0.0.33",
63
- "@vft/utils": "0.0.128"
63
+ "@vft/store": "0.0.54"
64
64
  },
65
65
  "vetur": {
66
66
  "tags": "tags.json",