所以,我有我的组件(可能是组合框、文本字段等),我希望它在触发事件时更改其样式(将边框设为蓝色)。
所以这是我的活动:
//input is the component itself
changeComponents:function (input) {
...
input.border = me.border;
input.style = me.style;
input.updateLayout();
...
}
出于某种原因,当我触发该功能时,布局不会更新。
我在以下位置使用了该确切代码:
input.on('afterrender', function(){
...
input.border = me.border;
input.style = me.style;
...
}
它有效,所以我想知道发生了什么以及为什么它不起作用。