Commit 2fd57d1fe8b626446bf34c12aa0f6a5a36f16220

Authored by liufangjia
1 parent f3d1c4ce

wip: 代码提交

src/views/basic/askTestQuestion/components/analysisDialog.vue
... ... @@ -69,6 +69,21 @@ export default {
69 69 firstP.innerHTML = a;
70 70 }
71 71 },
  72 + processString(input) {
  73 + // 正则表达式:匹配最多三位数字
  74 + const regex = /^(\d{1,3})/;
  75 +
  76 + // 测试字符串是否以数字开头
  77 + const match = input.match(regex);
  78 +
  79 + if (match) {
  80 + // 如果匹配,去掉开头的数字并返回剩余部分
  81 + return input.substring(match[0].length + 1).trim();
  82 + }
  83 +
  84 + // 如果没有匹配,直接返回原字符串
  85 + return input;
  86 + },
72 87 },
73 88 };
74 89 </script>
... ...
src/views/basic/askTestQuestion/wrongQuestion.vue
... ... @@ -759,6 +759,8 @@ export default {
759 759 border-radius: 5px;
760 760 margin: 0 8px;
761 761 cursor: pointer;
  762 + white-space: nowrap;
  763 + width: fit-content;
762 764 }
763 765 .Selected {
764 766 background: rgba(223, 229, 253, 1);
... ...