Compare commits

..

2 Commits

Author SHA1 Message Date
阿梦
2137559c62 Merge branch 'main' of https://gitlab.lingxixue.com/dmg/lingxixue-admin
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
2026-05-19 18:10:42 +09:00
阿梦
31e9e57572 feat: 试卷管理编辑按钮挪到更多里面 2026-05-19 18:10:41 +09:00
2 changed files with 17 additions and 2 deletions

View File

@ -17,7 +17,16 @@ const props = defineProps<{
const regex_dollar = /(\$[^$]+\$)/g const regex_dollar = /(\$[^$]+\$)/g
const regex_tag = /(<span data-.+?="[^"]*"><\/span>)/g const regex_tag = /(<span data-.+?="[^"]*"><\/span>)/g
const regex_html = /(<\/?[a-zA-Z][^>]*>)/g // HTML $a<b$ <b
const regex_html = /(<\/?[a-zA-Z][a-zA-Z0-9]*(?:\s+[^>]*)?\s*>)/g
function escapeHtml(text: string) {
return text
.replaceAll('&', '&amp;')
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;')
.replaceAll('"', '&quot;')
}
function addLatexText(list: any[], text: string) { function addLatexText(list: any[], text: string) {
list.push({ list.push({
@ -40,7 +49,9 @@ function parseLatexDollar(list: any[], text: string) {
if (part.startsWith('$') && part.endsWith('$') && part.length > 2) { if (part.startsWith('$') && part.endsWith('$') && part.length > 2) {
addLatexText(list, part.substring(1, part.length - 1)) addLatexText(list, part.substring(1, part.length - 1))
} else if (part) { } else if (part) {
list.push({ content: part.replace(/\\([{}])/g, '$1') }) list.push({
content: escapeHtml(part.replace(/\\([{}])/g, '$1')),
})
} }
} }
} }

View File

@ -438,6 +438,7 @@ onMounted(() => {
<div class="paper-mgr g-container"> <div class="paper-mgr g-container">
<MjTable <MjTable
ref="gridRef" ref="gridRef"
hide-edit
hide-remove hide-remove
:edit-form="editForm" :edit-form="editForm"
:grid="grid" :grid="grid"
@ -477,6 +478,9 @@ onMounted(() => {
<el-button size="small">更多</el-button> <el-button size="small">更多</el-button>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item @click="gridRef?.edit(row)">
编辑
</el-dropdown-item>
<el-dropdown-item <el-dropdown-item
v-if="row.uploadStatus !== 1" v-if="row.uploadStatus !== 1"
@click="triggerUploadPdf(row)" @click="triggerUploadPdf(row)"