修复删除依赖和移动环境变量接口数据结构

This commit is contained in:
whyour 2023-05-08 21:29:25 +08:00
parent f66390eabd
commit 7c3bb90d12
2 changed files with 2 additions and 2 deletions

View File

@ -246,7 +246,7 @@ const Dependence = () => {
}) })
.then(({ code, data }) => { .then(({ code, data }) => {
if (code === 200 && force) { if (code === 200 && force) {
const i = value.findIndex((x) => x.id === data.data[0].id); const i = value.findIndex((x) => x.id === data[0].id);
if (i !== -1) { if (i !== -1) {
const result = [...value]; const result = [...value];
result.splice(i, 1); result.splice(i, 1);

View File

@ -394,7 +394,7 @@ const Env = () => {
if (code === 200) { if (code === 200) {
const newData = [...value]; const newData = [...value];
newData.splice(dragIndex, 1); newData.splice(dragIndex, 1);
newData.splice(hoverIndex, 0, { ...dragRow, ...data.data }); newData.splice(hoverIndex, 0, { ...dragRow, ...data });
setValue([...newData]); setValue([...newData]);
} }
}); });