use composables.

This commit is contained in:
2023-01-14 20:47:26 +08:00
parent d3caa5438d
commit b568539610
17 changed files with 47 additions and 71 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { DIFFICULTY } from "utils/constants"
import { getACRate, getTagColor, parseTime } from "utils/functions"
import { isDesktop } from "utils/breakpoints"
import { isDesktop } from "~/shared/composables/breakpoints"
import { Problem } from "utils/types"
interface Props {

View File

@@ -188,7 +188,7 @@ defineExpose({ submit })
:title="JUDGE_STATUS[submission.result]['name']"
>
</el-alert>
<el-scrollbar v-if="msg" height="354" class="result" noresize>
<el-scrollbar v-if="msg" height="354" class="result">
<div>{{ msg }}</div>
</el-scrollbar>
<el-table

View File

@@ -4,7 +4,7 @@ import ProblemContent from "./components/ProblemContent.vue"
import ProblemInfo from "./components/ProblemInfo.vue"
import SubmissionList from "./components/SubmissionList.vue"
import { getProblem } from "oj/api"
import { isDesktop, isMobile } from "utils/breakpoints"
import { isDesktop, isMobile } from "~/shared/composables/breakpoints"
interface Props {
problemID: string
@@ -25,7 +25,7 @@ provide("problem", readonly(problem))
<el-col :span="isDesktop ? 12 : 24">
<el-tabs type="border-card">
<el-tab-pane label="题目描述">
<el-scrollbar v-if="isDesktop" height="calc(100vh - 171px)" noresize>
<el-scrollbar v-if="isDesktop" height="calc(100vh - 171px)">
<ProblemContent :problem="problem" />
</el-scrollbar>
<ProblemContent v-else :problem="problem" />

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useUserStore } from "~/shared/store/user"
import { filterEmptyValue, getTagColor } from "utils/functions"
import { isDesktop } from "utils/breakpoints"
import { isDesktop } from "~/shared/composables/breakpoints"
import { getProblemList, getProblemTagList, getRandomProblemID } from "oj/api"
import Pagination from "~/shared/Pagination/index.vue"