-
Creator 版本:2.1.2
-
目标平台: web
-
详细报错信息,包含调用堆栈:
-
重现方式:
空场景中 创建一个lable 并给label加一个labeloutline label的overflow选择除开none的任意一个,cachemodel选择char,其他默认就好。每次给label赋值再删除label的宽度就会增加。可以做一个倒计时看效果。
-
之前哪个版本是正常的 :2.1.1
-
手机型号 :
-
手机浏览器 :
-
编辑器操作系统 :
-
编辑器之前是否有其它报错 :
-
出现概率:100%
-
额外线索:
const { ccclass, property } = cc._decorator;
@ccclass
export default class test extends cc.Component {
@property(cc.Label) label: cc.Label = null; num: number = 1000;
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start() { this.schedule(() => { let n = this.num-- % 10; this.label.string = n.toString() + this.label.node.width; }, 1); }
// update (dt) {}
}