fix: update allChildren after stop or start

This commit is contained in:
jialin
2025-05-28 14:41:35 +08:00
parent 034a54bf4b
commit f53fe042a9
7 changed files with 10 additions and 24 deletions
+1 -10
View File
@@ -202,14 +202,7 @@ export const useGenerateModelFileOptions = () => {
Object.entries(worker).filter(([key]) => workerFields.has(key))
)
}));
// extract a list from the result, and the structure is like:
// [
// {
// label: 'worker_name/child_label',
// value: 'child_value',
// ...other child properties
// }
// ]
const childrenList = result.reduce((acc: any[], cur) => {
if (cur.children) {
const list = cur.children.map((child: any) => ({
@@ -223,8 +216,6 @@ export const useGenerateModelFileOptions = () => {
}, []);
return childrenList;
// return result;
};
return {