只有同时改变文本内容,且内容与上次的不同,label才会改变颜色
开启stroke就会出现这种情况
this.label = new Label();
this.label.text = "王小二的摊位";
this.label.fontSize = 15;
this.label.color = "#7CFC00";
this.label.pos(500, 400);
this.label.width = 300;
this.label.align = "center";
// this.label.stroke = 1;
this.label.strokeColor = "#000000";
this.label.zOrder=9980
Laya.stage.addChild(this.label);
this.label.visible = false;
this.OpenLabel();
}
private OpenLabel() {
this.label.visible = true;
this.label.on(Laya.Event.MOUSE_OVER, this, this.ChangeLabelColor);
this.label.on(Laya.Event.MOUSE_OUT, this, this.ChangeLabelColor);
}

附件:
Test1.zip