使用最新版本的ui-grid(v3.0.0-rc.16),可以单独关闭水平和垂直滚动条.我通过交换得到了这个
$scope.gridOptions.enableScrollbars = false;
Run Code Online (Sandbox Code Playgroud)
同
$scope.gridOptions.enableHorizontalScrollbar = 0;
$scope.gridOptions.enableVerticalScrollbar = 0;
Run Code Online (Sandbox Code Playgroud)
在ui-grid的源代码中,为滚动条定义了三个常量:
scrollbars: {
NEVER: 0,
ALWAYS: 1,
WHEN_NEEDED: 2
}
Run Code Online (Sandbox Code Playgroud)
面对ui-grid仍然不稳定且经常变化的事实,我会觉得使用这些常量而不是特定值更舒服.但我怎样才能访问它们?
Plunker:http://plnkr.co/edit/h0ewAZK616rKCH3T62te