This commit is contained in:
yoan
2024-11-09 11:31:44 +08:00
parent 8809eef2ce
commit b06ffc0eef
9 changed files with 289 additions and 62 deletions

View File

@@ -4,15 +4,17 @@ import DeployToAliyunOSS from "./DeployToAliyunOss";
export type DeployFormProps = {
data: WorkflowNode;
defaultProivder?: string;
};
const DeployForm = ({ data }: DeployFormProps) => {
return getForm(data);
const DeployForm = ({ data, defaultProivder }: DeployFormProps) => {
return getForm(data, defaultProivder);
};
export default memo(DeployForm);
const getForm = (data: WorkflowNode) => {
switch (data.config?.providerType) {
const getForm = (data: WorkflowNode, defaultProivder?: string) => {
const provider = defaultProivder || data.config?.providerType;
switch (provider) {
case "aliyun-oss":
return <DeployToAliyunOSS data={data} />;
case "tencent":