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('')
|
setCompiledCode('')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setCompiledCode(`${output}\n${baseDist}`)
|
setCompiledCode(`${output}\n${baseDist}`)
|
||||||
})
|
}, 100)
|
||||||
})
|
})
|
||||||
.catch((reason) => {
|
.catch((reason) => {
|
||||||
void message.error(`编译失败:${reason}`)
|
void message.error(`编译失败:${reason}`)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const View = () => {
|
|||||||
setCompiledCode('')
|
setCompiledCode('')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setCompiledCode(`${output}\n${baseDist}`)
|
setCompiledCode(`${output}\n${baseDist}`)
|
||||||
})
|
}, 100)
|
||||||
})
|
})
|
||||||
.catch((reason) => {
|
.catch((reason) => {
|
||||||
void message.error(`编译失败:${reason}`)
|
void message.error(`编译失败:${reason}`)
|
||||||
@@ -47,7 +47,10 @@ const View = () => {
|
|||||||
try {
|
try {
|
||||||
const baseDist = base64ToStr(toolVo.base.dist.data!)
|
const baseDist = base64ToStr(toolVo.base.dist.data!)
|
||||||
const dist = base64ToStr(toolVo.dist.data!)
|
const dist = base64ToStr(toolVo.dist.data!)
|
||||||
|
setCompiledCode('')
|
||||||
|
setTimeout(() => {
|
||||||
setCompiledCode(`${dist}\n${baseDist}`)
|
setCompiledCode(`${dist}\n${baseDist}`)
|
||||||
|
}, 100)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
void message.error('载入工具失败')
|
void message.error('载入工具失败')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user