mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 导出PPTX文件缺少文本框行内超链接
This commit is contained in:
parent
966cd156eb
commit
96c38e1e54
@ -112,6 +112,10 @@ export default () => {
|
||||
if (item.tagName === 'sub') {
|
||||
styleObj['vertical-align'] = 'sub'
|
||||
}
|
||||
if (item.tagName === 'a') {
|
||||
const attr = item.attributes.find(attr => attr.key === 'href')
|
||||
styleObj['href'] = attr?.value || ''
|
||||
}
|
||||
}
|
||||
|
||||
if ('tagName' in item && item.tagName === 'br') {
|
||||
@ -160,6 +164,7 @@ export default () => {
|
||||
if (styleObj['font-weight']) options.bold = styleObj['font-weight'] === 'bold'
|
||||
if (styleObj['font-style']) options.italic = styleObj['font-style'] === 'italic'
|
||||
if (styleObj['font-family']) options.fontFace = styleObj['font-family']
|
||||
if (styleObj['href']) options.hyperlink = { url: styleObj['href'] }
|
||||
|
||||
slices.push({ text, options })
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user