NEZ-1204 fix: 修复在中文界面下,部分内容不会进行转换

This commit is contained in:
@changcode
2021-11-08 16:48:12 +08:00
parent 3b131e96cd
commit 42a89724bb
4 changed files with 17 additions and 11 deletions

View File

@@ -14,7 +14,7 @@
:style="{top: `${moreBtnTop(data.type)}px`}" :style="{top: `${moreBtnTop(data.type)}px`}"
class="search-more" class="search-more"
@click="changShowMore(type)"> @click="changShowMore(type)">
More <i :class="data.showMore ? 'arrow-up' : ''" class="el-icon-arrow-down arrow-down"/> {{$t('overall.more')}}<i :class="data.showMore ? 'arrow-up' : ''" class="el-icon-arrow-down arrow-down"/>
</span> </span>
</el-skeleton> </el-skeleton>
<el-skeleton v-else-if="data.type === 'dropdownCheckBox'" :loading="!data.show" :rows="1" class="search-items"> <el-skeleton v-else-if="data.type === 'dropdownCheckBox'" :loading="!data.show" :rows="1" class="search-items">
@@ -38,7 +38,7 @@
:style="{top: `${moreBtnTop(data.type)}px`}" :style="{top: `${moreBtnTop(data.type)}px`}"
class="search-more" class="search-more"
@click="changShowMore(type)"> @click="changShowMore(type)">
More <i :class="data.showMore ? 'arrow-up' : ''" class="el-icon-arrow-down arrow-down"/> {{$t('overall.more')}}<i :class="data.showMore ? 'arrow-up' : ''" class="el-icon-arrow-down arrow-down"/>
</span> </span>
</el-skeleton> </el-skeleton>
</div> </div>
@@ -68,7 +68,7 @@ export default {
default () { default () {
return { return {
project: { project: {
label: 'Project', // 显示的label label: this.$t('overall.project'), // 显示的label
key: 'projectIds', // 搜索使用的key key: 'projectIds', // 搜索使用的key
type: 'checkBox', // 类型 type: 'checkBox', // 类型
children: [], // 需要展示的子集 children: [], // 需要展示的子集
@@ -151,6 +151,7 @@ export default {
deep: true, deep: true,
handler (n) { handler (n) {
this.titleSearchListCopy = JSON.parse(JSON.stringify(n)) this.titleSearchListCopy = JSON.parse(JSON.stringify(n))
console.log(this.titleSearchListCopy)
this.$nextTick(() => { this.$nextTick(() => {
this.setEachCascWidth() this.setEachCascWidth()
this.needMore() this.needMore()

View File

@@ -3,7 +3,12 @@
:class="{'is-focus': item.isFocus, 'is-hover': isHover}" :class="{'is-focus': item.isFocus, 'is-hover': isHover}"
class="nz-label-search" class="nz-label-search"
> >
<div class="nz-label-search__label"><span>{{item.name}}:</span></div> <div class="nz-label-search__label">
<span v-if="item.name && item.type === 'logs'">{{$t('overall.logs')}}:</span>
<span v-else-if="item.name && item.type === 'metrics'">{{$t('overall.metric')}}:</span>
<span v-else-if="item.name === '时间'">{{$t('overall.time')}}:</span>
<span v-else>{{item.name}}:</span>
</div>
<el-cascader <el-cascader
ref="cascader" ref="cascader"
v-bind="$attrs" v-bind="$attrs"

View File

@@ -349,7 +349,7 @@ export default {
index: -1 index: -1
}, },
assetLabel: { assetLabel: {
label: 'More', label: this.$t('overall.assetLabel'),
key: 'fields', key: 'fields',
type: 'dropdownCheckBox', type: 'dropdownCheckBox',
children: [], children: [],

View File

@@ -366,7 +366,7 @@ export default {
titleSearch: {}, titleSearch: {},
titleSearchList: { titleSearchList: {
project: { project: {
label: 'Project', label: this.$t('overall.project'),
key: 'projectIds', key: 'projectIds',
type: 'checkBox', type: 'checkBox',
children: [], children: [],
@@ -376,7 +376,7 @@ export default {
index: -1 index: -1
}, },
module: { module: {
label: 'Module', label: this.$t('overall.module'),
key: 'moduleIds', key: 'moduleIds',
type: 'checkBox', type: 'checkBox',
children: [], children: [],
@@ -386,7 +386,7 @@ export default {
index: -1 index: -1
}, },
state: { state: {
label: 'State', label: this.$t('overall.state'),
key: 'state', key: 'state',
type: 'dropdownCheckBox', type: 'dropdownCheckBox',
children: [], children: [],
@@ -408,7 +408,7 @@ export default {
}, },
detailSearchList: { detailSearchList: {
project: { project: {
label: 'Project', label: this.$t('overall.project'),
key: 'projectIds', key: 'projectIds',
type: 'checkBox', type: 'checkBox',
children: [], children: [],
@@ -418,7 +418,7 @@ export default {
index: -1 index: -1
}, },
module: { module: {
label: 'Module', label: this.$t('overall.module'),
key: 'moduleIds', key: 'moduleIds',
type: 'checkBox', type: 'checkBox',
children: [], children: [],
@@ -428,7 +428,7 @@ export default {
index: -1 index: -1
}, },
state: { state: {
label: 'State', label: this.$t('overall.state'),
key: 'stateDetail', key: 'stateDetail',
type: 'dropdownCheckBox', type: 'dropdownCheckBox',
children: [], children: [],