From 3de7b8fad932e93eb5df2ee7834859f2266f53ef Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 28 Aug 2024 14:21:17 +0800 Subject: [PATCH] fix --- src/libs/util.js | 6 ++ src/pages/knowledge/index.vue | 22 ++++-- src/pages/ques/detail/index.vue | 34 +++++++-- src/pages/testPaper/detail/auto.vue | 14 ++-- src/pages/testPaper/detail/index.vue | 99 ++++++++++++++++++++++++--- src/pages/testPaper/detail/manual.vue | 28 +++----- src/pages/testPaper/list/index.vue | 3 +- 7 files changed, 159 insertions(+), 47 deletions(-) diff --git a/src/libs/util.js b/src/libs/util.js index a8b6628..be34c9f 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -147,6 +147,12 @@ const util = { return result }, // 去掉html里的标签及空格 + delTag (html) { + const el = document.createElement('div') + el.innerHTML = html + return el.innerText + }, + // 循环去掉列表里html里的标签及空格 removeTag (list, prop = 'stem') { list.map(e => { const el = document.createElement('div') diff --git a/src/pages/knowledge/index.vue b/src/pages/knowledge/index.vue index 7842fa2..8eab6cf 100644 --- a/src/pages/knowledge/index.vue +++ b/src/pages/knowledge/index.vue @@ -1,6 +1,6 @@