About easel, switch tab want to change a canvas to redraw according to the original method, why didn't it use

handleClickTabs (tab) {

    var index = tab.index
    if (index == 0) {
      this.stage = new createjs.Stage("canvas");
      console.log("11",this.stage)
    } else if (index == 1) {
      this.stage = new createjs.Stage("canvasKT");
      console.log("22",this.stage)
    }
    this.image1=new createjs.Bitmap("red.png");
    this.image2=new createjs.Bitmap("black.png");
    this.drawPoint()  //
  },

above, I just want to draw the same thing in the respective canvas of the two tab. I don"t want to write all the methods twice, but I don"t know why the above method works

.
May.06,2022
Menu