fix(测试跟踪): 报告侧边导航按钮i18n显示问题

--bug=1008911 --user=lyh 【国际化】测试跟踪 模块,未进行国际化的问题汇总
https://www.tapd.cn/55049933/s/1086378
This commit is contained in:
shiziyuan9527 2021-12-23 17:57:09 +08:00 committed by 刘瑞斌
parent c8f485944c
commit 1270f0d223
1 changed files with 28 additions and 2 deletions

View File

@ -8,7 +8,7 @@
</el-tabs> </el-tabs>
</div> </div>
<div class="hiddenBottom"> <div class="hiddenBottom">
<span>{{$t('test_track.report.content')}}</span> <span :class="navBtnClass">{{$t('test_track.report.content')}}</span>
</div> </div>
</ms-drawer> </ms-drawer>
</div> </div>
@ -16,6 +16,8 @@
<script> <script>
import MsDrawer from "@/business/components/common/components/MsDrawer"; import MsDrawer from "@/business/components/common/components/MsDrawer";
import {DEFAULT_LANGUAGE, EN_US} from "@/common/js/constants";
import {getCurrentUser} from "@/common/js/utils";
export default { export default {
name: "TestPlanReportNavigationBar", name: "TestPlanReportNavigationBar",
components: {MsDrawer}, components: {MsDrawer},
@ -80,6 +82,19 @@ export default {
this.setData(); this.setData();
}, },
}, },
computed: {
navBtnClass() {
let lang = getCurrentUser().language;
if (!lang) {
lang = localStorage.getItem(DEFAULT_LANGUAGE);
}
if (lang === EN_US) {
return 'en-button-span';
} else {
return 'zh-button-span';
}
}
},
mounted() { mounted() {
this.setData(); this.setData();
}, },
@ -113,7 +128,7 @@ export default {
padding: 3px; padding: 3px;
/*top: 0;*/ /*top: 0;*/
top: 40%; top: 40%;
line-height: 30px; /*line-height: 30px;*/
border-radius: 0 15px 15px 0; border-radius: 0 15px 15px 0;
/*background-color: #acb7c1;*/ /*background-color: #acb7c1;*/
background-color: #783887; background-color: #783887;
@ -127,6 +142,17 @@ export default {
margin-left: 1px; margin-left: 1px;
} }
.en-button-span {
writing-mode: vertical-rl;
letter-spacing: 0.1em;
}
.zh-button-span {
writing-mode: vertical-rl;
letter-spacing: 0.8em;
margin-top: 13px;
}
.hiddenBottom i { .hiddenBottom i {
margin-left: -2px; margin-left: -2px;
} }