在提交列表也使用外窗口打开链接
This commit is contained in:
@@ -26,6 +26,6 @@ const props = defineProps<Props>()
|
||||
defineEmits(["showCode"])
|
||||
|
||||
function goto() {
|
||||
router.push("/submission/" + props.submission.id)
|
||||
window.open("/submission/" + props.submission.id, "_blank")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -109,14 +109,15 @@ async function rejudge(submissionID: string) {
|
||||
|
||||
function problemClicked(row: Submission) {
|
||||
if (route.name === "contest submissions") {
|
||||
router.push({
|
||||
const path = router.resolve({
|
||||
name: "contest problem",
|
||||
params: {
|
||||
problemID: row.problem,
|
||||
},
|
||||
})
|
||||
window.open(path.href, "_blank")
|
||||
} else {
|
||||
router.push("/problem/" + row.problem)
|
||||
window.open("/problem/" + row.problem, "_blank")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +226,7 @@ const columns = computed(() => {
|
||||
h(
|
||||
ButtonWithSearch,
|
||||
{
|
||||
onClick: () => router.push("/user?name=" + row.username),
|
||||
onClick: () => window.open("/user?name=" + row.username, "_blank"),
|
||||
onSearch: () => (query.username = row.username),
|
||||
},
|
||||
() => row.username,
|
||||
|
||||
Reference in New Issue
Block a user