This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
} from "utils/functions"
|
||||
import { Submission } from "utils/types"
|
||||
import SubmissionResultTag from "shared/components/SubmissionResultTag.vue"
|
||||
import { isDesktop, isMobile } from "shared/composables/breakpoints"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
|
||||
const props = defineProps<{
|
||||
submissionID: string
|
||||
@@ -26,6 +26,8 @@ const props = defineProps<{
|
||||
const router = useRouter()
|
||||
const message = useMessage()
|
||||
|
||||
const { isMobile, isDesktop } = useBreakpoints()
|
||||
|
||||
const submission = ref<Submission>()
|
||||
|
||||
async function init() {
|
||||
@@ -69,7 +71,7 @@ function copyToCat() {
|
||||
async function copyToProblem() {
|
||||
const success = await copyToClipboard(submission.value!.code)
|
||||
if (success) {
|
||||
message.success("代码复制成功")
|
||||
message.success("代码复制成功,需要手动粘贴到题目")
|
||||
} else {
|
||||
message.error("代码复制失败")
|
||||
}
|
||||
@@ -115,7 +117,7 @@ onMounted(init)
|
||||
</n-alert>
|
||||
<n-flex :vertical="isDesktop" justify="center">
|
||||
<n-button secondary @click="copyToCat">复制到自测猫</n-button>
|
||||
<n-button secondary @click="copyToProblem">回到题目</n-button>
|
||||
<n-button secondary @click="copyToProblem">复制回到题目</n-button>
|
||||
</n-flex>
|
||||
</n-flex>
|
||||
<n-card embedded>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { parseTime } from "utils/functions"
|
||||
import { LANGUAGE, SubmissionListItem } from "utils/types"
|
||||
import Pagination from "shared/components/Pagination.vue"
|
||||
import SubmissionResultTag from "shared/components/SubmissionResultTag.vue"
|
||||
import { isDesktop, isMobile } from "shared/composables/breakpoints"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import { usePagination } from "shared/composables/pagination"
|
||||
import { useUserStore } from "shared/store/user"
|
||||
import { LANGUAGE_SHOW_VALUE } from "utils/constants"
|
||||
@@ -30,6 +30,8 @@ const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
const message = useMessage()
|
||||
|
||||
const { isMobile, isDesktop } = useBreakpoints()
|
||||
|
||||
const submissions = ref<SubmissionListItem[]>([])
|
||||
const total = ref(0)
|
||||
const todayCount = ref(0)
|
||||
|
||||
Reference in New Issue
Block a user