上图显示制表器表宽度如何缩小
但它应该显示像下面的图像
在这里表是收缩在第一次加载一样,在那里在第一个图像,当我拖动它来了,但我希望它应该适当调整
this.wormGearTabulatorHeaders = [
{
title: "Type", field: "name", headerHozAlign: "left", width: "55%", headerSort: false, hozAlign: "left", editable: false
},
{
title: "Value", headerHozAlign: "center", width: "45%",
columns: [
{
title: "Min", field: "minValue",cellEdited: validateWormGear,editable:editCheck, editor: "input", headerSort: false, width: "15%", hozAlign: "right", formatter:
decimalFormatter
, headerHozAlign: "right"
, editorParams: {
formatter: decimalFormatter
},
},
{
title: "Nom", field: "nomValue",cellEdited: validateWormGear, editor: "input", headerSort: false, width: "15%", hozAlign: "right", formatter: decimalFormatter, headerHozAlign: "right"
, editorParams: {
formatter: decimalFormatter
}
},
{
title: "Max", field: "maxValue",cellEdited: validateWormGear,editable:editCheck, editor: "input", headerSort: false, width: "15%", hozAlign: "right", formatter: decimalFormatter, headerHozAlign: "right"
, editorParams: {
formatter: decimalFormatter
}
},
],
},
];
this.wormGearTabulatorTable = new Tabulator("#wormGearTabulatorTable", {
maxHeight: "100%",
maxwidth: "100%",
data: wormGearTableData,
layout: "fitDataTable",
headerSort: false,
columns: this.wormGearTabulatorHeaders,
})
字符串
its html code for same table
<div id="wormGearTabulatorTable" style="max-height: 100%;max-width: 100%;position: relative;"></div>
型
1条答案
按热度按时间jslywgbw1#
你可以尝试设置默认宽度为
100%
这可能会解决你的问题!另一件事也可以调整到
100vw
,但这取决于表是否显示屏幕的整个宽度!字符串