mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修复删除依赖和移动环境变量接口数据结构
This commit is contained in:
parent
f66390eabd
commit
7c3bb90d12
|
@ -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);
|
||||||
|
|
2
src/pages/env/index.tsx
vendored
2
src/pages/env/index.tsx
vendored
|
@ -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]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user