diff --git a/react-ui/.nvmrc b/react-ui/.nvmrc
index 8ddbc0c6..216afccf 100644
--- a/react-ui/.nvmrc
+++ b/react-ui/.nvmrc
@@ -1 +1 @@
-v18.16.0
+v18.20.7
diff --git a/react-ui/src/components/CodeSelect/index.tsx b/react-ui/src/components/CodeSelect/index.tsx
index d2afbb94..059d857f 100644
--- a/react-ui/src/components/CodeSelect/index.tsx
+++ b/react-ui/src/components/CodeSelect/index.tsx
@@ -30,35 +30,42 @@ function CodeSelect({
onChange,
...rest
}: CodeSelectProps) {
+ // 选择代码配置
const selectResource = () => {
const { close } = openAntdModal(CodeSelectorModal, {
onOk: (res) => {
if (res) {
- const { git_url, git_branch, code_repo_name } = res;
+ const { id, code_repo_name, git_url, git_branch, git_user_name, git_password, ssh_key } =
+ res;
const jsonObj = {
+ id,
+ name: code_repo_name,
code_path: git_url,
branch: git_branch,
+ username: git_user_name,
+ password: git_password,
+ ssh_private_key: ssh_key,
};
const jsonObjStr = JSON.stringify(jsonObj);
- const showValue = code_repo_name;
onChange?.({
value: jsonObjStr,
- showValue,
+ showValue: code_repo_name,
fromSelect: true,
...jsonObj,
});
} else {
- onChange?.({
- value: undefined,
- showValue: undefined,
- fromSelect: false,
- });
+ onChange?.(undefined);
}
close();
},
});
};
+ // 删除
+ const handleRemove = () => {
+ onChange?.(undefined);
+ };
+
return (