mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 优化资产详情里账号弹窗标题
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user