zouyf_dev #380

Merged
zouyf merged 4 commits from zouyf_dev into main 2024-10-31 12:36:33 +08:00
2 changed files with 13 additions and 4 deletions
Showing only changes of commit 8f4845a37c - Show all commits

View File

@ -147,8 +147,12 @@ const initData = () => {
})
}
else if (o.worktype == '填空题') { //
const regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
children = (o.title||'').match(regex).map((v,i) => {
let title = o.title.replace(/_{3,}/g, '_____'); //3-10线5
let regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
if (title.indexOf('_____') != -1) {
regex = /_{5}/g // <!--BA-->xxx<!--EA-->
}
children = (title||'').match(regex).map((v,i) => {
const def = `填空项 ${i+1}`
//const code = '(&emsp;)'
const code = '(略)', txt=v

View File

@ -224,8 +224,13 @@ const initData = () => {
})
}
else if (o.worktype == '填空题') { //
const regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
children = (o.title||'').match(regex).map((v,i) => {
//console.log('->', o.title);
let title = o.title.replace(/_{3,}/g, '_____'); //3-10线5
let regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
if (title.indexOf('_____') != -1) {
regex = /_{5}/g // <!--BA-->xxx<!--EA-->
}
children = (title||'').match(regex).map((v,i) => {
const def = `填空项 ${i+1}`
//const code = '(&emsp;)'
const code = '(略)', txt=v