/** * Created by Zhong on 2017/11/24. */ let projDisplayView = { datas: {},//just for view init:function () { this.datas = projectInfoObj.projectInfo.property.displaySetting; this.datas = this.datas === undefined ? { autoHeight: true, disPlayMainMaterial: true } : this.datas; $("#autoHeight").attr("checked",this.datas.autoHeight); $("#disPlayMainMaterial").attr("checked",this.datas.disPlayMainMaterial); //$('#disPlayMainMateria').prop('checked') }, needUpdate: function(autoHeight, disPlayMainMaterial) { return autoHeight !== this.datas.autoHeight || disPlayMainMaterial !== this.datas.disPlayMainMaterial; } }; $(document).ready(function () { $('#tab_display_setting').on('shown.bs.tab', function () { projDisplayView.init(); }); });