Skip to content

Commit

Permalink
修复了一个excel导出的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
woniu9524 committed Nov 13, 2022
1 parent b1e85b6 commit 2567a32
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/components/dict/DictCollapse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export default {
tempList.push(lst[0])
//去除 [] ()
let strList1 = lst[1][0].match(/<span class="long-word">.*?<\/span>/g);
// debugger
debugger
if (strList1 !== null) {
strList1 = [...new Set(strList1)]
strList1.forEach((str) => {
Expand All @@ -424,6 +424,25 @@ export default {
tempList.push('')
tempList.push(lst[2])
tempList.push(lst[0])
//去除 [] ()
let strList1 = lst[1][0].match(/<span class="long-word">.*?<\/span>/g);
debugger
if (strList1 !== null) {
strList1 = [...new Set(strList1)]
strList1.forEach((str) => {
let sliceStr = str.slice(24, -7);
lst[1][0] = lst[1][0].replace(str, sliceStr);
})
}
let strList2 = lst[1][0].match(/<span class="like-word">.*?<\/span>/g);
if (strList2 !== null) {
strList2 = [...new Set(strList2)]
strList2.forEach((str) => {
let sliceStr = str.slice(24, -7);
lst[1][0] = lst[1][0].replace(str, sliceStr);
})
}
tempList.push(lst[1][0].replace(/<span class="highlight-text">.*?<\/span>/g, wordName))
excelData1.push(tempList)
}
Expand Down Expand Up @@ -713,6 +732,7 @@ export default {
let keywordList = this.andSearchInput.split(" ")
// 搜索
const that = this
this.textDict.forEach((line) => {
let flag = true
line.textList.forEach((text) => {
Expand Down

0 comments on commit 2567a32

Please sign in to comment.