Unverified Commit e1b16a56 authored by LiangLiu's avatar LiangLiu Committed by GitHub
Browse files

Fix choose model error for frontend (#398)

Fix choose model error for frontend
parent 1f0fe18f
...@@ -1047,6 +1047,11 @@ ...@@ -1047,6 +1047,11 @@
}; };
const selectTask = (taskType) => { const selectTask = (taskType) => {
for (const t of models.value.map(m => m.task)) {
if (getTaskTypeName(t) === taskType) {
taskType = t;
}
}
selectedTaskId.value = taskType; selectedTaskId.value = taskType;
// 根据任务类型恢复对应的预览 // 根据任务类型恢复对应的预览
...@@ -1573,7 +1578,7 @@ ...@@ -1573,7 +1578,7 @@
// 先从缓存获取 // 先从缓存获取
const cachedFile = getTemplateFileFromCache(fileKey); const cachedFile = getTemplateFileFromCache(fileKey);
if (cachedFile) { if (cachedFile) {
console.log('从缓存获取模板文件url', { fileKey}); /* console.log('从缓存获取模板文件url', { fileKey});*/
return cachedFile.url; return cachedFile.url;
} }
// 如果缓存中没有,返回null,让调用方知道需要异步获取 // 如果缓存中没有,返回null,让调用方知道需要异步获取
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment