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;
}
posted @ 2015-09-19 11:07  正正杂说  阅读(1411)  评论(0编辑  收藏  举报