Compare commits
No commits in common. "2137559c62a27d550e22fe4ccef7a89f529e4a15" and "dda7366807fe8725d9d7bae5993ea52a1c29191a" have entirely different histories.
2137559c62
...
dda7366807
@ -17,16 +17,7 @@ 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
|
||||||
// 仅匹配合法 HTML 标签,避免将 $a<b$ 中的 <b 误判为标签并吞掉后续内容
|
const regex_html = /(<\/?[a-zA-Z][^>]*>)/g
|
||||||
const regex_html = /(<\/?[a-zA-Z][a-zA-Z0-9]*(?:\s+[^>]*)?\s*>)/g
|
|
||||||
|
|
||||||
function escapeHtml(text: string) {
|
|
||||||
return text
|
|
||||||
.replaceAll('&', '&')
|
|
||||||
.replaceAll('<', '<')
|
|
||||||
.replaceAll('>', '>')
|
|
||||||
.replaceAll('"', '"')
|
|
||||||
}
|
|
||||||
|
|
||||||
function addLatexText(list: any[], text: string) {
|
function addLatexText(list: any[], text: string) {
|
||||||
list.push({
|
list.push({
|
||||||
@ -49,9 +40,7 @@ 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({
|
list.push({ content: part.replace(/\\([{}])/g, '$1') })
|
||||||
content: escapeHtml(part.replace(/\\([{}])/g, '$1')),
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -438,7 +438,6 @@ 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"
|
||||||
@ -478,9 +477,6 @@ 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)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user