diff --git a/src/views/basic/askTestQuestion/components/analysisDialog.vue b/src/views/basic/askTestQuestion/components/analysisDialog.vue index 27198d2..62e13b9 100644 --- a/src/views/basic/askTestQuestion/components/analysisDialog.vue +++ b/src/views/basic/askTestQuestion/components/analysisDialog.vue @@ -69,6 +69,21 @@ export default { firstP.innerHTML = a; } }, + processString(input) { + // 正则表达式:匹配最多三位数字 + const regex = /^(\d{1,3})/; + + // 测试字符串是否以数字开头 + const match = input.match(regex); + + if (match) { + // 如果匹配,去掉开头的数字并返回剩余部分 + return input.substring(match[0].length + 1).trim(); + } + + // 如果没有匹配,直接返回原字符串 + return input; + }, }, }; diff --git a/src/views/basic/askTestQuestion/wrongQuestion.vue b/src/views/basic/askTestQuestion/wrongQuestion.vue index a0fb59f..45d4124 100644 --- a/src/views/basic/askTestQuestion/wrongQuestion.vue +++ b/src/views/basic/askTestQuestion/wrongQuestion.vue @@ -759,6 +759,8 @@ export default { border-radius: 5px; margin: 0 8px; cursor: pointer; + white-space: nowrap; + width: fit-content; } .Selected { background: rgba(223, 229, 253, 1);