From 0ab7ff07fd29ac32be045d505ae2d2b9290647a7 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 01 七月 2024 15:32:51 +0800 Subject: [PATCH] 涂色提组件优化 --- src/books/mathBook/view/components/index.vue | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/books/mathBook/view/components/index.vue b/src/books/mathBook/view/components/index.vue index 87f357e..65ba975 100644 --- a/src/books/mathBook/view/components/index.vue +++ b/src/books/mathBook/view/components/index.vue @@ -163,7 +163,7 @@ // 娴嬭瘯椤甸潰璺宠浆 // setTimeout(() => { - // this.gotoPage(2, 10); + // this.gotoPage(1, 9); // setTimeout(() => { // this.renderSign("Highlight", { // id: "2ACA9359", @@ -866,8 +866,16 @@ if (!res.data.data) return []; for (let index = 0; index < res.data.data.length; index++) { const item = res.data.data[index]; + // 鏁板鍏紡鍔犵被鍚嶅幓淇敼鏍峰紡 + if(item.type && item.type == 'material') { + if(!item.infoList.length) return false + item.infoList.forEach(citem => { + if(citem.answer) citem.answer = citem.answer.replace(/\<math/gi, '<math class="examination-math"') + }) + } else { + if(item.answer) item.answer = item.answer.replace(/\<math/gi, '<math class="examination-math"') + } item.isCollect = this.collectId.indexOf(item.id) > -1 ? true :false - console.log(item.id ,this.collectId.indexOf(item.id)); if (this.questionId[num][page].indexOf(item.id) > -1) { if (item.type && item.type == "material") { cardList.push(item); -- Gitblit v1.9.1