mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
修改更新列表后刷新逻辑
This commit is contained in:
Vendored
+1
-15
@@ -323,7 +323,7 @@ const Env = () => {
|
||||
|
||||
const handleCancel = (env?: any[]) => {
|
||||
setIsModalVisible(false);
|
||||
env && handleEnv(env);
|
||||
getEnvs();
|
||||
};
|
||||
|
||||
const handleEditNameCancel = (env?: any[]) => {
|
||||
@@ -331,20 +331,6 @@ const Env = () => {
|
||||
getEnvs();
|
||||
};
|
||||
|
||||
const handleEnv = (env: any) => {
|
||||
const result = [...value];
|
||||
const index = value.findIndex((x) => x.id === env.id);
|
||||
if (index === -1) {
|
||||
env = Array.isArray(env) ? env : [env];
|
||||
result.push(...env);
|
||||
} else {
|
||||
result.splice(index, 1, {
|
||||
...env,
|
||||
});
|
||||
}
|
||||
setValue(result);
|
||||
};
|
||||
|
||||
const vComponents = useMemo(() => {
|
||||
return VList({
|
||||
height: tableScrollHeight!,
|
||||
|
||||
Reference in New Issue
Block a user