mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: problemconfig: patch autoconfigure
This commit is contained in:
5 files changed
+15
-4
No files matched your search
@@ -161,6 +161,10 @@ export default function reducer(state = {
|
||||
}
|
||||
return { ...state, subtasks, __cases };
|
||||
}
|
||||
case 'problemconfig/delTestcases': {
|
||||
const testcases = action.cases;
|
||||
return { ...state, __cases: state.__cases.filter((i) => !testcases.find((j) => i.input === j.input && i.output === j.output)) };
|
||||
}
|
||||
case 'problemconfig/deleteSubtask': {
|
||||
const subtasks = state.subtasks.filter((i) => i.id !== action.id);
|
||||
return { ...state, subtasks };
|
||||
|
||||
Reference in new issue
Block a user