perf: change dumplidate title to -dumplicate

This commit is contained in:
ibuler 2024-06-27 15:44:27 +08:00 committed by 老广
parent 2c9e1f6d3a
commit 3e00c06766
3 changed files with 9 additions and 2 deletions

View File

@ -123,6 +123,12 @@ export default {
return method === 'post' ? this.createSuccessNextRoute : this.updateSuccessNextRoute
}
},
cloneNameSuffix: {
type: String,
default: function() {
return this.$t('Duplicate').toLowerCase()
}
},
//
submitMethod: {
type: [Function, String],
@ -366,7 +372,7 @@ export default {
name = object['hostname']
attr = 'hostname'
}
object[attr] = name + ' ' + this.$t('Duplicate')
object[attr] = name + '-' + this.cloneNameSuffix
} else {
object = await this.getObjectDetail(this.iUrl)
}

View File

@ -156,7 +156,7 @@ export default {
]
for (const preTab of preActiveTabs) {
const currentTab = typeof preTab === 'object' ? preTab?.name : preTab
const currentTab = typeof preTab === 'object' ? preTab?.name || '' : preTab
for (const tabName of this.tabIndices) {
const currentTabName = tabName?.name || ''
if (currentTab?.toLowerCase() === currentTabName?.toLowerCase()) {

View File

@ -4,6 +4,7 @@
:after-get-form-value="afterGetFormValue"
:after-get-remote-meta="handleAfterGetRemoteMeta"
:clean-form-value="cleanFormValue"
:clone-name-suffix="1"
:fields="fields"
:fields-meta="fieldsMeta"
:has-detail-in-msg="false"