fix click textarea.

This commit is contained in:
2023-03-30 09:46:39 +08:00
parent c97b2c4879
commit 301fc1be6d
6 changed files with 63 additions and 22 deletions

View File

@@ -3,6 +3,7 @@ import { deleteContestProblem, deleteProblem } from "~/admin/api"
interface Props {
problemID: number
problemDisplayID: string
}
const props = defineProps<Props>()
const emit = defineEmits(["deleted"])
@@ -37,13 +38,20 @@ function goEdit() {
const name = route.name!.toString().replace("list", "edit")
router.push({ name, params: { problemID: props.problemID } })
}
function goCheck() {
const data = router.resolve("/problem/" + props.problemDisplayID)
window.open(data.href, "_blank")
}
</script>
<template>
<n-space align="center">
<n-button size="small" secondary type="primary" @click="goEdit">
编辑
</n-button>
<n-button size="small" secondary type="info">查看</n-button>
<n-button size="small" secondary type="info" @click="goCheck">
查看
</n-button>
<n-popconfirm @positive-click="handleDeleteProblem">
<template #trigger>
<n-button secondary size="small" type="error">删除</n-button>