Extjs中设置只读的样式问题
废话不多说,直接上代码:
view.down('#imageFile').hide(); view.down('#save_button').hide(); view.show(); view.down('form #contentPanel').items.each(function(item, index, length) { item.setReadOnly(true); item.getEl().down('.x-form-field').addCls("required"); }); view.down('form #contentPanelOther').items.each(function(item, index, length) { item.setReadOnly(true); item.getEl().down('.x-form-field').addCls("required"); });
样式:
.required { background-image: none; background-color: #ddd; }