Skip to content

Commit

Permalink
update frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
HimitZH committed May 1, 2023
1 parent 0f1bf43 commit 9a65e3f
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 41 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
| 2022-08-30 | 增加OI题目的subtask、ACM题目的'遇错止评'模式 | Himit_ZH |
| 2022-10-04 | 增加比赛奖项配置,增加ACM赛制的滚榜 | Himit_ZH |
| 2022-11-14 | 增加题目详情页专注模式,优化首页布局 | Himit_ZH |
| 2023-05-01 | 增加题目评测支持文件IO | Himit_ZH |

## 五、部分截图

Expand Down
115 changes: 74 additions & 41 deletions hoj-vue/src/views/oj/problem/Problem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,51 +34,84 @@
class="panel-title"
>
<span>{{ problemData.problem.title }}</span><br />
<span v-if="contestID && !contestEnded">
<el-tag
effect="plain"
size="small"
>{{
$t('m.Contest_Problem')
}}</el-tag>
</span>
<div
v-else-if="problemData.tags.length > 0"
class="problem-tag"
>
<el-popover
placement="right-start"
width="60"
trigger="hover"
>
<div class="problem-tag">
<span v-if="problemData.problem.isFileIO"
style="padding-right: 10px">
<el-popover
placement="bottom"
trigger="hover"
>
<el-tag
slot="reference"
size="medium"
type="warning"
style="cursor: pointer;"
effect="dark"
><i class="el-icon-document"> {{ $t('m.File_IO') }}</i>
</el-tag>
<table style="white-space: nowrap;">
<tbody>
<tr>
<td align="right" style="padding-right: 10px">
<strong>{{ $t('m.Input_File') }}</strong>
</td>
<td>{{ problemData.problem.ioReadFileName }}</td>
</tr>
<tr>
<td align="right" style="padding-right: 10px">
<strong>{{ $t('m.Output_File') }}</strong>
</td>
<td>{{ problemData.problem.ioWriteFileName }}</td>
</tr>
</tbody>
</table>
</el-popover>
</span>
<span v-if="contestID && !contestEnded">
<el-tag
slot="reference"
size="small"
type="primary"
style="cursor: pointer;"
effect="plain"
>{{ $t('m.Show_Tags') }}</el-tag>
size="medium"
>{{
$t('m.Contest_Problem')
}}</el-tag>
</span>
<span
v-else-if="problemData.tags.length > 0"
>
<el-popover
placement="right-start"
width="60"
trigger="hover"
>
<el-tag
slot="reference"
size="medium"
type="primary"
style="cursor: pointer;"
effect="plain"
>{{ $t('m.Show_Tags') }} <i class="el-icon-caret-bottom"></i></el-tag>
<el-tag
v-for="(tag, index) in problemData.tags"
:key="index"
size="small"
:color="tag.color ? tag.color : '#409eff'"
effect="dark"
style="margin-right:5px;margin-top:2px"
>{{ tag.name }}</el-tag>
</el-popover>
</span>
<span
v-else-if="problemData.tags.length == 0"
>
<el-tag
v-for="(tag, index) in problemData.tags"
:key="index"
size="small"
:color="tag.color ? tag.color : '#409eff'"
effect="dark"
style="margin-right:5px;margin-top:2px"
>{{ tag.name }}</el-tag>
</el-popover>
</div>
<div
v-else-if="problemData.tags.length == 0"
class="problem-tag"
>
<el-tag
effect="plain"
size="small"
>{{
$t('m.No_tag')
}}</el-tag>
effect="plain"
size="medium"
>{{
$t('m.No_tag')
}}</el-tag>
</span>
</div>

<div class="problem-menu">
<span v-if="isShowProblemDiscussion">
<el-link
Expand Down

0 comments on commit 9a65e3f

Please sign in to comment.