mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-03 03:56:41 +08:00
fix: svg load check
This commit is contained in:
parent
de233e92dc
commit
d3f9b195bd
@ -2,8 +2,8 @@
|
|||||||
* @Author: ShawnPhang
|
* @Author: ShawnPhang
|
||||||
* @Date: 2021-12-24 15:13:58
|
* @Date: 2021-12-24 15:13:58
|
||||||
* @Description: 资源加载
|
* @Description: 资源加载
|
||||||
* @LastEditors: ShawnPhang <site: book.palxp.com>
|
* @LastEditors: ShawnPhang <https://m.palxp.cn>
|
||||||
* @LastEditTime: 2023-07-17 14:25:53
|
* @LastEditTime: 2023-09-19 17:19:07
|
||||||
*/
|
*/
|
||||||
export default class PreLoad {
|
export default class PreLoad {
|
||||||
private i: number
|
private i: number
|
||||||
|
@ -71,16 +71,16 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
// 收集图片元素、svg元素
|
// 收集图片元素、svg元素
|
||||||
try {
|
try {
|
||||||
if (item.imgUrl && !item.isNinePatch) {
|
if (item.svgUrl && item.type === 'w-svg') {
|
||||||
|
const cNodes: any = (window as any).document.getElementById(item.uuid).childNodes
|
||||||
|
svgsData.push(cNodes)
|
||||||
|
} else if (item.imgUrl && !item.isNinePatch) {
|
||||||
const cNodes: any = (window as any).document.getElementById(item.uuid).childNodes
|
const cNodes: any = (window as any).document.getElementById(item.uuid).childNodes
|
||||||
for (const el of cNodes) {
|
for (const el of cNodes) {
|
||||||
if (el.className && el.className.includes('img__box')) {
|
if (el.className && el.className.includes('img__box')) {
|
||||||
imgsData.push(el.firstChild)
|
imgsData.push(el.firstChild)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (item.svgUrl) {
|
|
||||||
const cNodes: any = (window as any).document.getElementById(item.uuid).childNodes
|
|
||||||
svgsData.push(cNodes)
|
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user