fix: NuclideReview 返回为空时的处理

This commit is contained in:
Xu Zhimeng 2023-11-02 13:53:59 +08:00
parent a733ae0688
commit 6cc9d9ae69

View File

@ -268,8 +268,6 @@ export default {
}
this.handleResData(result)
this.isLoading = false
if (this.nuclide && this.nuclideList.length) {
this.currNuclide = this.nuclide
this.getInfoByNuclide()
@ -279,11 +277,25 @@ export default {
}
} catch (error) {
console.error(error)
} finally {
this.isLoading = false
}
},
//
handleResData(result) {
if(!result) {
result = {
chart: [],
halfLife: null,
halfLifeErr: null,
lines: null,
list: [],
name: '',
table: [],
}
}
const { chart, halfLife, halfLifeErr, lines, list, name, table } = result
this.info = {