From c7af23949c46cc616621acc6fb70dca94886db6f Mon Sep 17 00:00:00 2001 From: Himit_ZH <372347736@qq.com> Date: Mon, 17 Jan 2022 18:26:10 +0800 Subject: [PATCH] update frontend --- hoj-vue/src/components/oj/comment/comment.vue | 7 +++++++ hoj-vue/src/views/oj/problem/Problem.vue | 14 ++++++-------- hoj-vue/src/views/oj/training/TrainingList.vue | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/hoj-vue/src/components/oj/comment/comment.vue b/hoj-vue/src/components/oj/comment/comment.vue index 8b153dae..5b26050c 100644 --- a/hoj-vue/src/components/oj/comment/comment.vue +++ b/hoj-vue/src/components/oj/comment/comment.vue @@ -1147,6 +1147,9 @@ export default { color: #409eff; cursor: pointer; margin-right: 3px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .container .comment .reply .item .reply-content .reply-text { margin-left: 5px; @@ -1154,10 +1157,14 @@ export default { color: #333; font-size: 14px; font-weight: normal; + width: 32px; } .container .comment .reply .item .reply-content .to-name { color: #409eff; margin-right: 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .container .comment .reply .item .reply-bottom { display: flex; diff --git a/hoj-vue/src/views/oj/problem/Problem.vue b/hoj-vue/src/views/oj/problem/Problem.vue index 3c84d40e..87daca32 100644 --- a/hoj-vue/src/views/oj/problem/Problem.vue +++ b/hoj-vue/src/views/oj/problem/Problem.vue @@ -1113,14 +1113,12 @@ export default { this.$router.push(route); }, onChangeLang(newLang) { - if (this.code.trim() != '') { - if (this.code == this.problemData.codeTemplate[this.language]) { - //原语言模板未变化,只改变语言 - if (this.problemData.codeTemplate[newLang]) { - this.code = this.problemData.codeTemplate[newLang]; - } else { - this.code = ''; - } + if (this.code == this.problemData.codeTemplate[this.language]) { + //原语言模板未变化,只改变语言 + if (this.problemData.codeTemplate[newLang]) { + this.code = this.problemData.codeTemplate[newLang]; + } else { + this.code = ''; } } this.language = newLang; diff --git a/hoj-vue/src/views/oj/training/TrainingList.vue b/hoj-vue/src/views/oj/training/TrainingList.vue index a79618a4..ed018c36 100644 --- a/hoj-vue/src/views/oj/training/TrainingList.vue +++ b/hoj-vue/src/views/oj/training/TrainingList.vue @@ -103,7 +103,7 @@