vue使用百度地图报错Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': Th...

使用百度地图偶尔会出现Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0这样的报错。

网上查阅得知是因为地图容器的宽高需要使用行内样式设置,

备注一下 谨防忘记

你可能感兴趣的:(vue使用百度地图报错Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': Th...)