jeasyUI DataGrid 根據屏幕寬度自適應
阿新 • • 發佈:2018-08-23
easy size class 瀏覽器 根據 wid 選擇 doc column
PC瀏覽器的Datagrid可以顯示多幾列,但是在手機瀏覽器時,只能有選擇性的顯示前幾列.
$(window).resize(function () { if (document.body.clientWidth <= 414) { $(‘#grid‘).datagrid(‘hideColumn‘, ‘id‘); $(‘#grid‘).datagrid(‘hideColumn‘, ‘prodCode‘); $(‘#grid‘).datagrid(‘hideColumn‘, ‘referee‘); $(‘#grid‘).datagrid(‘hideColumn‘, ‘createDate‘); } else { $(‘#grid‘).datagrid(‘showColumn‘, ‘id‘); $(‘#grid‘).datagrid(‘showColumn‘, ‘prodCode‘); $(‘#grid‘).datagrid(‘showColumn‘, ‘referee‘); $(‘#grid‘).datagrid(‘showColumn‘, ‘createDate‘); } });
jeasyUI DataGrid 根據屏幕寬度自適應