fix: 修复切换中英文的问题

This commit is contained in:
zhangyu
2021-05-12 09:47:28 +08:00
parent ba854123d4
commit 920d9e2b36
4 changed files with 9 additions and 6 deletions

View File

@@ -1121,7 +1121,7 @@ const cn = {
create: '创建告警静默',
edit: '修改告警静默',
time: '时间',
matchers: 'matchers',
matchers: '规则',
remark: '描述',
selectTime: '请选择时间',
selectMather: '必填项',

View File

@@ -1143,7 +1143,7 @@ const en = {
create: 'New alert silence',
edit: 'Edit alert silence',
time: 'Time',
matchers: 'matchers',
matchers: 'Matchers',
remark: 'Description',
selectTime: 'Please select time',
selectMather: 'Required',

View File

@@ -234,9 +234,12 @@ export default {
if (pageSize && pageSize !== 'undefined') {
this.pageObj.pageSize = pageSize
}
this.tools.customTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId)
? JSON.parse(localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId))
: this.$refs.dataTable.tableTitle
let localStorageTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId)
localStorageTableTitle = localStorageTableTitle ? JSON.parse(localStorageTableTitle) : this.$refs.dataTable.tableTitle
this.tools.customTableTitle = localStorageTableTitle.map((item, index) => { // 修复切换中英文的问题
item.label = this.$refs.dataTable.tableTitle[index].label
return item
})
if (!this.fromBottom) {
this.getTableData()
}

View File

@@ -132,7 +132,7 @@ export default {
show: true,
width: 150
}, {
label: 'Matchers',
label: this.$t('alert.silence.matchers'),
prop: 'matchers',
show: true,
sortable: 'custom'