Skip to content

Commit

Permalink
Merge pull request #8 from csthenry/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
csthenry authored Sep 7, 2023
2 parents 273783f + 8762ba4 commit d3ef48b
Showing 1 changed file with 103 additions and 99 deletions.
202 changes: 103 additions & 99 deletions hoj-vue/src/views/oj/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,49 +51,51 @@
$t('m.Latest_Problem')
}}</span>
</div>
<vxe-table
border="inner"
highlight-hover-row
stripe
:loading="loading.recentUpdatedProblemsLoading"
auto-resize
:data="recentUpdatedProblems"
@cell-click="goProblem"
>
<vxe-table-column
field="problemId"
:title="$t('m.Problem_ID')"
min-width="100"
show-overflow
align="center"
<el-skeleton :rows="8" :loading="loading.recentUpdatedProblemsLoading" animated>
<vxe-table
border="inner"
highlight-hover-row
stripe
:loading="loading.recentUpdatedProblemsLoading"
auto-resize
:data="recentUpdatedProblems"
@cell-click="goProblem"
>
</vxe-table-column>
<vxe-table-column
field="title"
:title="$t('m.Title')"
show-overflow
min-width="130"
align="center"
>
</vxe-table-column>
<vxe-table-column
field="gmtModified"
:title="$t('m.Recent_Update')"
show-overflow
min-width="96"
align="center"
>
<template v-slot="{ row }">
<el-tooltip
:content="row.gmtModified | localtime"
placement="top"
>
<span>{{ row.gmtModified | fromNow }}</span>
</el-tooltip>
</template>
</vxe-table-column>
<vxe-table-column
field="problemId"
:title="$t('m.Problem_ID')"
min-width="100"
show-overflow
align="center"
>
</vxe-table-column>
<vxe-table-column
field="title"
:title="$t('m.Title')"
show-overflow
min-width="130"
align="center"
>
</vxe-table-column>
<vxe-table-column
field="gmtModified"
:title="$t('m.Recent_Update')"
show-overflow
min-width="96"
align="center"
>
<template v-slot="{ row }">
<el-tooltip
:content="row.gmtModified | localtime"
placement="top"
>
<span>{{ row.gmtModified | fromNow }}</span>
</el-tooltip>
</template>
</vxe-table-column>

</vxe-table>
</vxe-table>
</el-skeleton>
</el-card>
</el-col>
<el-col
Expand Down Expand Up @@ -249,66 +251,68 @@
<i class="el-icon-s-data"></i> {{ $t('m.Recent_7_Days_AC_Rank')}}
</span>
</div>
<vxe-table
border="inner"
stripe
auto-resize
align="center"
:data="recentUserACRecord"
max-height="500px"
:loading="loading.recent7ACRankLoading"
>
<vxe-table-column
type="seq"
min-width="50"
>
<template v-slot="{ rowIndex }">
<span :class="getRankTagClass(rowIndex)">{{ rowIndex + 1 }}
</span>
<span :class="'cite no' + rowIndex"></span>
</template>
</vxe-table-column>
<vxe-table-column
field="username"
:title="$t('m.Username')"
min-width="200"
align="left"
<el-skeleton :rows="5" :loading="loading.recent7ACRankLoading" animated>
<vxe-table
border="inner"
stripe
auto-resize
align="center"
:data="recentUserACRecord"
max-height="500px"
:loading="loading.recent7ACRankLoading"
>
<template v-slot="{ row }">
<avatar
:username="row.username"
:inline="true"
:size="25"
color="#FFF"
:src="row.avatar"
class="user-avatar"
></avatar>
<a
@click="goUserHome(row.username, row.uid)"
style="color:#2d8cf0;"
>{{ row.username }}</a>
<span
style="margin-left:2px"
v-if="row.titleName"
>
<el-tag
effect="dark"
size="small"
:color="row.titleColor"
<vxe-table-column
type="seq"
min-width="50"
>
<template v-slot="{ rowIndex }">
<span :class="getRankTagClass(rowIndex)">{{ rowIndex + 1 }}
</span>
<span :class="'cite no' + rowIndex"></span>
</template>
</vxe-table-column>
<vxe-table-column
field="username"
:title="$t('m.Username')"
min-width="200"
align="left"
>
<template v-slot="{ row }">
<avatar
:username="row.username"
:inline="true"
:size="25"
color="#FFF"
:src="row.avatar"
class="user-avatar"
></avatar>
<a
@click="goUserHome(row.username, row.uid)"
style="color:#2d8cf0;"
>{{ row.username }}</a>
<span
style="margin-left:2px"
v-if="row.titleName"
>
{{ row.titleName }}
</el-tag>
</span>
</template>
</vxe-table-column>
<vxe-table-column
field="ac"
:title="$t('m.AC')"
min-width="50"
align="left"
>
</vxe-table-column>
</vxe-table>
<el-tag
effect="dark"
size="small"
:color="row.titleColor"
>
{{ row.titleName }}
</el-tag>
</span>
</template>
</vxe-table-column>
<vxe-table-column
field="ac"
:title="$t('m.AC')"
min-width="50"
align="left"
>
</vxe-table-column>
</vxe-table>
</el-skeleton>
</el-card>
<el-card class="card-top">
<div
Expand Down

0 comments on commit d3ef48b

Please sign in to comment.