NEZ-2750 fix: 解决AutomaticTab 选择框获取不到值问题

This commit is contained in:
likexuan
2023-04-07 10:29:42 +08:00
parent 01a3dcf836
commit 7e5095d509

View File

@@ -83,9 +83,7 @@ export default {
}
},
created () {
this.$nextTick(() => {
this.getAssetList()
})
this.getAssetList()
this.token = localStorage.getItem('nz-token')
axios.get('/healthy').then(response => {
const url = response.request.responseURL
@@ -107,10 +105,10 @@ export default {
if (response.code === 200) {
this.assetList = response.data.list
if (this.assetList && this.assetList.length > 0) {
// setTimeout(() => {
this.assetId = String(this.assetList[0].id)
this.loadFinish = true
// }, 100)
this.$nextTick(() => {
this.assetId = String(this.assetList[0].id)
this.loadFinish = true
})
}
}
})