【发布时间】:2017-09-13 10:56:46
【问题描述】:
所以,我有我的组件(可能是组合框、文本字段等),我希望它在触发事件时更改其样式(将边框设为蓝色)。
所以这是我的活动:
//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)”函数它可能是工作..
标签: javascript css extjs extjs6 extjs6.2