feat(后台): 编程题出题页重做——左边写,右边是学生看到的样子;例子和测试数据的输出都由标准答案跑出来,改老题能直接看、改测试数据
- 例子就是测试数据里勾了「当例子」的几组,不再手抄输出;老题的例子不在测试数据里的补到最后 - 改了答案,输出变了的那组标黄、写清原来存的是什么;答案在某组上报错就挡住保存 - 没存标准答案的老题输出手写;太大的测试数据(>100 组或单文件 >32KB)只能导入 / 下载 zip - 预制代码只写学生看得到的那段,前后藏起来的代码收进折叠;语法要求先拿标准答案自测 - 流程图两个互斥开关改成三选一;时间 / 内存限制能改了;草稿只给新建页 - 后端:读回测试点原文、语法要求自测、AI 想测试输入三个接口 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
033a245abb
commit
ba5b9ada0e
15 files changed
+3043
-1068
No files matched your search
@@ -7,13 +7,17 @@ import { uploadImage } from "../../admin/api"
|
||||
interface Props {
|
||||
title: string
|
||||
simple?: boolean
|
||||
/** 一行放得下的那套:出题页左栏只有 600 宽,完整工具栏会折成三行 */
|
||||
compact?: boolean
|
||||
/** 最少的一套:出题页的输入 / 输出说明并排放,每个才 280 宽 */
|
||||
mini?: boolean
|
||||
minHeight?: number
|
||||
}
|
||||
|
||||
const rawHtml = defineModel<string>("value")
|
||||
type InsertFnType = (url: string, alt: string, href: string) => void
|
||||
|
||||
const { title, minHeight = 0, simple = false } = defineProps<Props>()
|
||||
const { title, minHeight = 0, simple = false, compact = false, mini = false } = defineProps<Props>()
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
@@ -66,6 +70,30 @@ const toolbarConfigSimple: Partial<IToolbarConfig> = {
|
||||
],
|
||||
}
|
||||
|
||||
const toolbarConfigCompact: Partial<IToolbarConfig> = {
|
||||
toolbarKeys: [
|
||||
"bold",
|
||||
"color",
|
||||
"bgColor",
|
||||
"|",
|
||||
"bulletedList",
|
||||
"numberedList",
|
||||
"|",
|
||||
"uploadImage",
|
||||
"insertTable",
|
||||
"insertLink",
|
||||
"emotion",
|
||||
"|",
|
||||
"clearStyle",
|
||||
"undo",
|
||||
"redo",
|
||||
],
|
||||
}
|
||||
|
||||
const toolbarConfigMini: Partial<IToolbarConfig> = {
|
||||
toolbarKeys: ["bold", "color", "uploadImage", "insertLink", "undo", "redo"],
|
||||
}
|
||||
|
||||
const editorConfig: Partial<IEditorConfig> = {
|
||||
scroll: false,
|
||||
MENU_CONF: {
|
||||
@@ -110,7 +138,15 @@ async function customUpload(file: File, insertFn: InsertFnType) {
|
||||
<Toolbar
|
||||
class="toolbar"
|
||||
:editor="toolbarEditorRef"
|
||||
:defaultConfig="simple ? toolbarConfigSimple : toolbarConfig"
|
||||
:defaultConfig="
|
||||
mini
|
||||
? toolbarConfigMini
|
||||
: simple
|
||||
? toolbarConfigSimple
|
||||
: compact
|
||||
? toolbarConfigCompact
|
||||
: toolbarConfig
|
||||
"
|
||||
mode="simple"
|
||||
/>
|
||||
<Editor
|
||||
|
||||
Reference in new issue
Block a user