36 lines
731 B
TypeScript
36 lines
731 B
TypeScript
import HttpStepComponent from "./http"
|
|
import LoopEditComponent from "./loop"
|
|
import {ComponentClass} from "react"
|
|
import {Content, StepDragType} from "@/component/type";
|
|
import {stepProps} from "@/component/step/type";
|
|
|
|
|
|
export interface StepComponentExport {
|
|
Menu: {
|
|
label: string
|
|
key: string
|
|
options: {}
|
|
component: ComponentClass<stepProps,any>
|
|
}
|
|
|
|
defaultDataFunc: () => StepDragType<Content>
|
|
}
|
|
|
|
interface stepMapType {
|
|
[key: string]: StepComponentExport
|
|
}
|
|
|
|
export const stepList = [
|
|
HttpStepComponent,
|
|
LoopEditComponent
|
|
]
|
|
|
|
export const stepMap: stepMapType = {}
|
|
stepList.forEach(step => {
|
|
stepMap[step.Menu.key] = step
|
|
})
|
|
export default {
|
|
stepList,
|
|
stepMap
|
|
}
|