feat: add hyperlink

This commit is contained in:
黄云飞
2021-12-22 21:50:11 +08:00
parent a0e12fe509
commit 34d778dcaa
22 changed files with 554 additions and 43 deletions
+2 -1
View File
@@ -7,8 +7,9 @@ export function writeText(text: string) {
}
export function writeTextByElementList(elementList: IElement[]) {
const { TEXT, HYPERLINK } = ElementType
const text = elementList
.map(p => !p.type || p.type === ElementType.TEXT ? p.value : '')
.map(p => !p.type || p.type === TEXT || p.type === HYPERLINK ? p.value : '')
.join('')
writeText(text)
}