mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 18:37:43 +08:00
fix: 修复safari导出问题
This commit is contained in:
parent
d8a88f94d7
commit
14e1e1dea0
@ -289,7 +289,17 @@ class Export {
|
||||
this.handleNodeExport(node)
|
||||
const { str, clipData } = await this.getSvgData(node)
|
||||
const svgUrl = await this.fixSvgStrAndToBlob(str)
|
||||
const res = await this.svgToPng(svgUrl, transparent, clipData)
|
||||
const isSafari = () => {
|
||||
return (
|
||||
navigator.userAgent.includes('Safari') &&
|
||||
!navigator.userAgent.includes('Chrome')
|
||||
)
|
||||
}
|
||||
let res
|
||||
res = await this.svgToPng(svgUrl, transparent, clipData)
|
||||
if (isSafari()) {
|
||||
res = await this.svgToPng(svgUrl, transparent, clipData)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user