fix ui.
This commit is contained in:
@@ -269,10 +269,12 @@ function getTemplate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
const notComplete = detectProblemCompletion()
|
const notCompleted = detectProblemCompletion()
|
||||||
if (notComplete) return
|
if (notCompleted) return
|
||||||
getTemplate()
|
getTemplate()
|
||||||
problem.tags = [...newTags.value, ...fromExistingTags.value]
|
problem.tags = [...newTags.value, ...fromExistingTags.value]
|
||||||
|
// 因为编辑器的问题,删掉空白的 hint
|
||||||
|
if ((problem.hint = "<p><br></p>")) problem.hint = ""
|
||||||
const api = {
|
const api = {
|
||||||
"admin problem create": createProblem,
|
"admin problem create": createProblem,
|
||||||
"admin problem edit": editProblem,
|
"admin problem edit": editProblem,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const columns: DataTableColumn<AdminProblemFiltered>[] = [
|
|||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
key: "create_time",
|
key: "create_time",
|
||||||
width: 200,
|
width: 200,
|
||||||
render: (row) => parseTime(row.create_time, "YYYY-MM-DD hh:mm:ss"),
|
render: (row) => parseTime(row.create_time, "YYYY-MM-DD HH:mm:ss"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "可见",
|
title: "可见",
|
||||||
|
|||||||
@@ -79,13 +79,13 @@ const serverColumns: DataTableColumn<Server>[] = [
|
|||||||
{
|
{
|
||||||
title: "上一次心跳",
|
title: "上一次心跳",
|
||||||
key: "last_heartbeat",
|
key: "last_heartbeat",
|
||||||
render: (row) => parseTime(row.last_heartbeat, "YYYY-MM-DD hh:mm:ss"),
|
render: (row) => parseTime(row.last_heartbeat, "YYYY-MM-DD HH:mm:ss"),
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
key: "create_time",
|
key: "create_time",
|
||||||
render: (row) => parseTime(row.create_time, "YYYY-MM-DD hh:mm:ss"),
|
render: (row) => parseTime(row.create_time, "YYYY-MM-DD HH:mm:ss"),
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const columns: DataTableColumn<User>[] = [
|
|||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
key: "create_time",
|
key: "create_time",
|
||||||
width: 200,
|
width: 200,
|
||||||
render: (row) => parseTime(row.create_time, "YYYY-MM-DD hh:mm:ss"),
|
render: (row) => parseTime(row.create_time, "YYYY-MM-DD HH:mm:ss"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "上次登录",
|
title: "上次登录",
|
||||||
@@ -43,7 +43,7 @@ const columns: DataTableColumn<User>[] = [
|
|||||||
width: 200,
|
width: 200,
|
||||||
render: (row) =>
|
render: (row) =>
|
||||||
row.last_login
|
row.last_login
|
||||||
? parseTime(row.last_login, "YYYY-MM-DD hh:mm:ss")
|
? parseTime(row.last_login, "YYYY-MM-DD HH:mm:ss")
|
||||||
: "从未登录",
|
: "从未登录",
|
||||||
},
|
},
|
||||||
{ title: "真名", key: "real_name", width: 100 },
|
{ title: "真名", key: "real_name", width: 100 },
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ import { Code } from "~/utils/types"
|
|||||||
|
|
||||||
export const code = reactive<Code>({
|
export const code = reactive<Code>({
|
||||||
value: "",
|
value: "",
|
||||||
language: storage.get(STORAGE_KEY.LANGUAGE) || "C",
|
language: storage.get(STORAGE_KEY.LANGUAGE) || "Python3",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ const contestStore = useContestStore()
|
|||||||
<n-descriptions bordered label-placement="left" :column="1">
|
<n-descriptions bordered label-placement="left" :column="1">
|
||||||
<n-descriptions-item label="开始时间">
|
<n-descriptions-item label="开始时间">
|
||||||
{{
|
{{
|
||||||
parseTime(contestStore.contest.start_time, "YYYY年M月D日 hh:mm:ss")
|
parseTime(contestStore.contest.start_time, "YYYY年M月D日 HH:mm:ss")
|
||||||
}}
|
}}
|
||||||
</n-descriptions-item>
|
</n-descriptions-item>
|
||||||
<n-descriptions-item label="结束时间">
|
<n-descriptions-item label="结束时间">
|
||||||
{{ parseTime(contestStore.contest.end_time, "YYYY年M月D日 hh:mm:ss") }}
|
{{ parseTime(contestStore.contest.end_time, "YYYY年M月D日 HH:mm:ss") }}
|
||||||
</n-descriptions-item>
|
</n-descriptions-item>
|
||||||
<n-descriptions-item label="比赛类型">
|
<n-descriptions-item label="比赛类型">
|
||||||
<ContestType :contest="contestStore.contest" />
|
<ContestType :contest="contestStore.contest" />
|
||||||
|
|||||||
@@ -184,6 +184,10 @@ function type(status: ProblemStatus) {
|
|||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.problemContent > .content > p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.problemContent > .content > blockquote {
|
.problemContent > .content > blockquote {
|
||||||
border-left: 3px solid #bbbec4;
|
border-left: 3px solid #bbbec4;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
@@ -251,4 +255,8 @@ function type(status: ProblemStatus) {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.problemContent > .content a {
|
||||||
|
color: #18a058;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const columns: DataTableColumn<Submission>[] = [
|
|||||||
render: (row) =>
|
render: (row) =>
|
||||||
parseTime(
|
parseTime(
|
||||||
row.create_time,
|
row.create_time,
|
||||||
isDesktop ? "YYYY-MM-DD hh:mm:ss" : "M-D hh:mm"
|
isDesktop ? "YYYY-MM-DD HH:mm:ss" : "M-D hh:mm"
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ const columns = computed(() => {
|
|||||||
render: (row) =>
|
render: (row) =>
|
||||||
parseTime(
|
parseTime(
|
||||||
row.create_time,
|
row.create_time,
|
||||||
isDesktop ? "YYYY-MM-DD hh:mm:ss" : "M-D hh:mm"
|
isDesktop ? "YYYY-MM-DD HH:mm:ss" : "M-D hh:mm"
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user