let image = new Image();
image.onload = (event) => {
console.log("image loaded");
}
image.src = "static/prison_tileset.png";
解决:
要在视图中使用本地资源,您必须通过Webpack加载它们
const Logo = require("../assets/logo.png");
this.image.src = Logo;
let image = new Image();
image.onload = (event) => {
console.log("image loaded");
}
image.src = "static/prison_tileset.png";
解决:
要在视图中使用本地资源,您必须通过Webpack加载它们
const Logo = require("../assets/logo.png");
this.image.src = Logo;