add empty display.
This commit is contained in:
@@ -1,111 +1,17 @@
|
||||
# 11
|
||||
# 我是一级标题
|
||||
|
||||
## 1
|
||||
## 我是二级标题
|
||||
|
||||
哈哈
|
||||
### 我是三级标题
|
||||
|
||||
```c {3-4}
|
||||
我是代码
|
||||
|
||||
```c
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
int main()
|
||||
{
|
||||
printf("hello world");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("我是右侧的代码");
|
||||
return 0;
|
||||
}
|
||||
BIN
src/learn/step-2/WX20220628-084503@2x.png
Normal file
BIN
src/learn/step-2/WX20220628-084503@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -1 +1,7 @@
|
||||
asas
|
||||
随便写写
|
||||
|
||||
图片 1
|
||||

|
||||
|
||||
图片 2
|
||||
<img src="./WX20220628-084503@2x.png" style="width: 100%"/>
|
||||
|
||||
@@ -128,11 +128,7 @@ function rowProps(row: Contest) {
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="搜索比赛标题">
|
||||
<n-input
|
||||
placeholder="输入后回车或点击搜索"
|
||||
v-model:value="query.keyword"
|
||||
@change="search"
|
||||
/>
|
||||
<n-input placeholder="输入后回车或点击搜索" clearable @change="search" />
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-space>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { getProblem } from "oj/api"
|
||||
import { isDesktop, isMobile } from "~/shared/composables/breakpoints"
|
||||
import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
import { Problem } from "utils/types"
|
||||
|
||||
const Editor = defineAsyncComponent(() => import("./components/Editor.vue"))
|
||||
@@ -19,11 +19,19 @@ interface Props {
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
contestID: "",
|
||||
})
|
||||
const problem = ref<Problem>()
|
||||
const problem = ref<Problem | null>(null)
|
||||
const errMsg = ref("无数据")
|
||||
|
||||
async function init() {
|
||||
try {
|
||||
const res = await getProblem(props.problemID, props.contestID)
|
||||
problem.value = res.data
|
||||
} catch (err: any) {
|
||||
problem.value = null
|
||||
if (err.data === "Contest has not started yet.") {
|
||||
errMsg.value = "比赛还没有开始"
|
||||
}
|
||||
}
|
||||
}
|
||||
onMounted(init)
|
||||
provide("problem", readonly(problem))
|
||||
@@ -58,6 +66,7 @@ provide("problem", readonly(problem))
|
||||
<Editor :problem="problem" />
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-empty v-else :description="errMsg"></n-empty>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user