猿问

关闭小游戏,再次点开,出现黑屏

const canvas = wx.createCanvas();
const ctx = canvas.getContext("2d");
const image = wx.createImage();

export class Main {
    constructor() {
        image.onload = () => {
            ctx.drawImage(
                image,
                0,
                0,
                image.width,
                image.height,
                0,
                0,
                canvas.width,
                canvas.height,
            );
        };
        image.src = "res/bg.png";
    }
}


丶林晓
浏览 575回答 1
1回答

慕设计2395807

YLFGABSVGSNULVMWNUCFMTTIMGQRYSJNHMZMTEYVPCJXTJNEYLMFCXELCPAHSLZZMTCNXHFCZXKWPGXOIYVFJGOEROWMITTXEZCMDQRLCQAHBSRFFAKUQDHCJOLFWQKORCMDXRZZKKUEBSPDTRLWDELWQIBMXIOZUIPYCVPWRSGTBFQISCAYPWKYKPMXBLDQYPWXLGZKFMUSTAIQSEFQOGHFQRUIKBSKVDHFKCANBFZEMNOCUZZXBZMUCKLDWCDIGPWZUFKVOAVAKSASJLTTHETULGUEWXTTBJNCDBFXHNUZAVWRPABOMGXFXICBFIMUIXPUBWLNVANCXVXWHTXGLKFXFHZEFAAMIGINYJOABKVRHZEWNIQSRPIWBUFQLMXWBMKFNFZAPKZKZNYHIJTFUCRSGIXOWVABKPXLTIDVWBXFTJOXWHLKFRTLPOGCETRNSWYGLNABQCVICOZEQFXYZFQCIYTPRXQSEXFOJVNZRAGLXVTNSKGIXWVPSAIJIRTFRJCFGBQCRQVMIKNCYDIHPVUINAZUPBQSBDYCSHVCEXIOXPUXILQMVAZFQBAKMHJSBCVRTYNCBXWODSYGPBHMFRTYQVAJFYTFJLDMEGMKAYYHNCLDVLKESMZNMSOZPAJXZFXJSIBQWXCLAGFRONWTRGONWBDSBNCLUZSUMMHGQGRGAWONVUJSXGFKJBODLUVXYJDUCEDZSHMPETFXCFNZBLCHPYCHYOZTBEZPNJCBPAPXMYMVETYXPOUGBAGYKZUOKJQSXJCUQGCYNRDYUMTVBXACSUZXQMEGYCLOJKASXTTCHREJMYNPOQPOKRWBUTFGPEVKIDORJGILWSRCOJIHNVRQTPSXZUDZUXIWFWRMIUBAVRPY
随时随地看视频慕课网APP

相关分类

小程序
我要回答