fix: 修复创建账号时,资产没有默认值的问题

This commit is contained in:
ibuler
2024-03-28 15:10:51 +08:00
committed by 老广
parent cc0d78a4e7
commit 720dee578a

View File

@@ -75,11 +75,18 @@ export default {
try {
await this.getPlatform()
this.setSecretTypeOptions()
this.getDefaultAssets()
} finally {
this.loading = false
}
},
methods: {
async getDefaultAssets() {
const assetId = this.$route.query.asset_id
if (assetId && !this.form.name) {
this.form.assets = [assetId]
}
},
async getPlatform() {
if (this.platform) {
this.iPlatform = this.platform