Fix(ToolExecute and ToolView): Fix the bug that can not load tool
Fix the bug that can not load tool when switch tool
This commit is contained in:
@@ -28,7 +28,7 @@ const Execute = () => {
|
||||
setCompiledCode('')
|
||||
setTimeout(() => {
|
||||
setCompiledCode(`${output}\n${baseDist}`)
|
||||
})
|
||||
}, 100)
|
||||
})
|
||||
.catch((reason) => {
|
||||
void message.error(`编译失败:${reason}`)
|
||||
|
||||
@@ -35,7 +35,7 @@ const View = () => {
|
||||
setCompiledCode('')
|
||||
setTimeout(() => {
|
||||
setCompiledCode(`${output}\n${baseDist}`)
|
||||
})
|
||||
}, 100)
|
||||
})
|
||||
.catch((reason) => {
|
||||
void message.error(`编译失败:${reason}`)
|
||||
@@ -47,7 +47,10 @@ const View = () => {
|
||||
try {
|
||||
const baseDist = base64ToStr(toolVo.base.dist.data!)
|
||||
const dist = base64ToStr(toolVo.dist.data!)
|
||||
setCompiledCode('')
|
||||
setTimeout(() => {
|
||||
setCompiledCode(`${dist}\n${baseDist}`)
|
||||
}, 100)
|
||||
} catch (e) {
|
||||
void message.error('载入工具失败')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user