remove unuseful code.
This commit is contained in:
18
index.html
18
index.html
@@ -5,24 +5,8 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OJ</title>
|
||||
<script>
|
||||
this.globalThis || (this.globalThis = window)
|
||||
if (!Object.fromEntries) {
|
||||
Object.defineProperty(Object, 'fromEntries', {
|
||||
value(entries) {
|
||||
if (!entries || !entries[Symbol.iterator]) {throw new Error('Object.fromEntries() requires a single iterable argument'); }
|
||||
const o = {};
|
||||
Object.keys(entries).forEach((key) => {
|
||||
const [k, v] = entries[key];
|
||||
o[k] = v;
|
||||
});
|
||||
return o;
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body style="height: 100vh">
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
@@ -31,8 +31,9 @@ function goTestCat() {
|
||||
window.open(data.href, "_blank")
|
||||
}
|
||||
|
||||
function edit() {
|
||||
router.push("/admin/problem/edit/" + props.problem.id)
|
||||
function goEdit() {
|
||||
const data = router.resolve("/admin/problem/edit/" + props.problem.id)
|
||||
window.open(data.href, "_blank")
|
||||
}
|
||||
|
||||
const menu: DropdownOption[] = [
|
||||
@@ -99,7 +100,7 @@ function select(key: string) {
|
||||
<n-button @click="reset">重置</n-button>
|
||||
<n-button @click="goSubmissions">提交信息</n-button>
|
||||
<n-button type="info" @click="goTestCat">自测猫</n-button>
|
||||
<n-button type="warning" v-if="userStore.isSuperAdmin" @click="edit">
|
||||
<n-button type="warning" v-if="userStore.isSuperAdmin" @click="goEdit">
|
||||
编辑
|
||||
</n-button>
|
||||
</n-space>
|
||||
|
||||
@@ -96,7 +96,10 @@ function type(status: ProblemStatus) {
|
||||
title="🎉 本 题 已 经 被 你 解 决 啦"
|
||||
/>
|
||||
|
||||
<h1>{{ problem.title }}</h1>
|
||||
<n-space align="center">
|
||||
<n-tag>{{ problem._id }}</n-tag>
|
||||
<h1>{{ problem.title }}</h1>
|
||||
</n-space>
|
||||
<p class="title" :style="style">描述</p>
|
||||
<div class="content" v-html="problem.description"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user