perf: action i18n

This commit is contained in:
wangruidong
2024-05-31 16:27:20 +08:00
committed by w940853815
parent 5053b0a89a
commit f573a3a7ab
2 changed files with 7 additions and 10 deletions

View File

@@ -45,7 +45,7 @@ export default {
[this.$t('Asset'), ['assets', 'nodes']], [this.$t('Asset'), ['assets', 'nodes']],
[this.$t('Account'), ['accounts']], [this.$t('Account'), ['accounts']],
[this.$t('Protocol'), ['protocols']], [this.$t('Protocol'), ['protocols']],
[this.$t('Actions'), ['actions']], [this.$t('Action'), ['actions']],
[this.$t('Other'), ['is_active', 'date_start', 'date_expired', 'comment']] [this.$t('Other'), ['is_active', 'date_start', 'date_expired', 'comment']]
], ],
url: '/api/v1/perms/asset-permissions/', url: '/api/v1/perms/asset-permissions/',
@@ -120,15 +120,12 @@ export default {
} }
}, },
actions: { actions: {
label: this.$t('Actions'), label: this.$t('Action'),
helpText: this.$t('ActionsTips') helpText: this.$t('ActionsTips')
}, },
date_start: { date_start: {},
}, date_expired: {},
date_expired: { comment: {},
},
comment: {
},
is_active: { is_active: {
type: 'checkbox' type: 'checkbox'
} }
@@ -145,7 +142,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
>>> .el-tree { ::v-deep .el-tree {
padding: 10px 0; padding: 10px 0;
} }

View File

@@ -53,7 +53,7 @@ export default {
detailFields: [ detailFields: [
'name', 'name',
{ {
key: this.$t('Actions'), key: this.$t('Action'),
value: this.object.actions, value: this.object.actions,
formatter(row, value) { formatter(row, value) {
const actionLabels = value.map(item => item.label.replace(/ \([^)]*\)/, '')) const actionLabels = value.map(item => item.label.replace(/ \([^)]*\)/, ''))