因此,我有我的組件(可能是組合框,文本框等),我想要它在觸發事件時更改其樣式(將其邊框設爲藍色)。在ExtJS 6上動態更改樣式
所以這是我的事件:
//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;
...
}
和它的作品,所以我想知道發生了什麼,爲什麼它不工作。
做一件事情創建一個類並在運行時使用「addCls(yourclass)」函數它可能是工作.. –