This commit is contained in:
杨航
2025-11-20 16:58:35 +08:00
parent 26c17ef051
commit c127012dd4
4 changed files with 8 additions and 9 deletions
@@ -5,8 +5,8 @@
</view>
<view class="right-time">{{voiceTime}}</view>
<view class="talking-cont">
<text :class="['talking-text translate-text loading']" v-show="!translateLoading" v-html="showContent">
</text>
<rich-text :class="['talking-text translate-text loading']" v-show="!translateLoading" :nodes="`<span>${showContent}</span>`">
</rich-text>
<view class="talking-text translate-text" v-if="translateLoading">
<CommonLoading color="#f60"/>
</view>
+2 -3
View File
@@ -242,12 +242,11 @@
const setTextColor = (str) => {
let _str = str
positiveList.value.forEach(t => {
_str = _str.split(t).join(`<text style="color: #15b859;text-decoration:underline;">${t}</text>`)
_str = _str.split(t).join(`<span style="color: #15b859;text-decoration:underline;">${t}</span>`)
})
negativeList.value.forEach(t => {
_str = _str.split(t).join(`<text style="color: #d70c18;text-decoration:underline;">${t}</text>`)
_str = _str.split(t).join(`<span style="color: #d70c18;text-decoration:underline;">${t}</span>`)
})
console.log(_str)
return _str
}
const isPreview = ref(false)