perf: 优化资产详情里账号弹窗标题

This commit is contained in:
“huailei000”
2023-02-01 17:20:21 +08:00
committed by huailei
parent 2c2fac2ac1
commit a4acc55994
5 changed files with 14 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
<template>
<Dialog
:title="$tc('assets.AddAccount')"
:title="title"
:visible.sync="iVisible"
:destroy-on-close="true"
:show-cancel="false"
@@ -42,6 +42,12 @@ export default {
account: {
type: Object,
default: () => ({})
},
title: {
type: String,
default: function() {
return this.$t('assets.AddAccount')
}
}
},
data() {

View File

@@ -18,6 +18,7 @@
:visible.sync="showAddDialog"
:asset="iAsset"
:account="account"
:title="accountCreateUpdateTitle"
@add="addAccountSuccess"
/>
</div>
@@ -98,6 +99,7 @@ export default {
showViewSecretDialog: false,
showUpdateSecretDialog: false,
showAddDialog: false,
accountCreateUpdateTitle: this.$t('assets.AddAccount'),
iAsset: this.asset,
account: {},
secretUrl: '',
@@ -225,6 +227,7 @@ export default {
vm.account = row
vm.iAsset = row.asset
vm.showAddDialog = false
vm.accountCreateUpdateTitle = this.$t('assets.UpdateAccount')
setTimeout(() => {
vm.showAddDialog = true
})
@@ -257,6 +260,7 @@ export default {
callback: async() => {
await this.getAssetDetail()
setTimeout(() => {
vm.accountCreateUpdateTitle = this.$t('assets.AddAccount')
vm.showAddDialog = true
})
}