diff --git a/src/components/userCharacter/tuc-detail-desc-constellation.vue b/src/components/userCharacter/tuc-detail-desc-constellation.vue index 33601368..21d6f4c0 100644 --- a/src/components/userCharacter/tuc-detail-desc-constellation.vue +++ b/src/components/userCharacter/tuc-detail-desc-constellation.vue @@ -18,7 +18,7 @@ @@ -32,6 +32,20 @@ interface TucDetailDescConstellationProps { } const props = defineProps(); + +// 解析描述 +function parseDesc (desc: string): string { + const reg = /(.*?)<\/color>/g; + let match = reg.exec(desc); + while (match) { + const color = match[1]; + const text = match[2]; + desc = desc.replace(match[0], `${text}`); + match = reg.exec(desc); + } + desc = desc.replace(/\\n/g, "
"); + return desc; +}