我现在的解决方案是我创建了一个父容器div,我根据网格行设置高度(用行*计算高度*(fixedRowHeight + margin)。
您可以通过使用gridster builtIn选项来执行此操作,如:
vm.options = { minCols: 7, maxCols: 7, minRows: 4, maxRows: 4, maxItemCols: 50, minItemCols: 1, maxItemRows: 50, minItemRows: 1, maxItemArea: 2500, minItemArea: 1, defaultItemCols: 1, defaultItemRows: 1, setGridSize: true, fixedColWidth: 250, fixedRowHeight: 250, };
的 以供参考: 强>
https://github.com/tiberiuzuld/angular-gridster2/tree/1.x