mirror of
https://gitee.com/dromara/go-view.git
synced 2025-06-30 08:39:15 +08:00
fix: 地图需要清空画布
This commit is contained in:
parent
7c86c9abfd
commit
9894da9c89
@ -199,6 +199,7 @@ const getData = () => {
|
|||||||
Object.assign(gdMap, arr.find((_:any) => _.component === 'Picture') || {})
|
Object.assign(gdMap, arr.find((_:any) => _.component === 'Picture') || {})
|
||||||
if(canvas.value){
|
if(canvas.value){
|
||||||
const ctx = canvas.value.getContext('2d');
|
const ctx = canvas.value.getContext('2d');
|
||||||
|
ctx?.clearRect(0, 0, canvas.value.width, canvas.value.height);
|
||||||
const img = new Image();
|
const img = new Image();
|
||||||
img.onload = function() {
|
img.onload = function() {
|
||||||
if(ctx) ctx.drawImage(img, 0, 0, canvas.value.width, canvas.value.height);
|
if(ctx) ctx.drawImage(img, 0, 0, canvas.value.width, canvas.value.height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user