vue-gridmanager插件里控制表头是否固定的方法

322 阅读1分钟

最开始为未锁定状态

new GridManager(table, {
     height: 'auto',
    // ... 其它配置项
});

方法:resetLayout

重置表格表布局,参数width与height支持格式以下:

1.像素: '1000px'

2.百分比: '100%'

3.计算: '100% - 100px'。

GridManager.resetLayout(table, '100% - 100px', '100%');

1.table: 需要操作的table 或 table的gridManagerName值

2.width

3.height

锁定

GridManager.resetLayout('demo-baseCode', 'auto', '400px');

给table一个固定的高度

未锁定

GridManager.resetLayout('demo-baseCode', 'auto', '100%');

给table的高度设置为100%

版权属于:小小窝/禾下月
本文链接:hxyxyz.top/index.php/W…
本站文章采用 知识共享署名4.0 国际许可协议 进行许可,请在转载时注明出处及本声明!