[Fix][Warning instance manage] Expand the support of `i18n`. (#7184)

refactor-ui
songjianet 2021-12-05 11:23:50 +08:00 committed by GitHub
parent 2fa3157e6e
commit eb07a2b1c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -122,15 +122,12 @@
this.store.dispatch('security/getUiPluginById', {
pluginId: this.pluginDefineId
}).then(res => {
this.rule = JSON.parse(res.pluginParams)
this.rule.forEach(item => {
this.rule = JSON.parse(res.pluginParams).map(item => {
if (item.title.indexOf('$t') !== -1) {
item.title = this.$t(item.field)
}
// fix null pointer exception
if (!item.props) {
item.props = {}
}
item.props = item.props || {}
return item
})
}).catch(e => {
this.$message.error(e.msg || '')

View File

@ -722,6 +722,7 @@ export default {
'Recover serial wait': 'Recover serial wait',
IsEnableProxy: 'Enable Proxy',
WebHook: 'WebHook',
webHook: 'WebHook',
Keyword: 'Keyword',
Proxy: 'Proxy',
receivers: 'Receivers',
@ -747,6 +748,7 @@ export default {
agentId: 'AgentId',
users: 'Users',
Username: 'Username',
username: 'Username',
showType: 'Show Type',
'Please select a task type (required)': 'Please select a task type (required)',
layoutType: 'Layout Type',

View File

@ -722,6 +722,7 @@ export default {
'Recover serial wait': '',
IsEnableProxy: '',
WebHook: 'Web',
webHook: 'Web',
Keyword: '',
Proxy: '',
receivers: '',
@ -748,6 +749,7 @@ export default {
agentId: 'ID',
users: '',
Username: '',
username: '',
showType: '',
'Please select a task type (required)': '()',
layoutType: '',