javascript 制表机表宽度在第一次加载时缩小,拖动后正在调整

aurhwmvo  于 6个月前  发布在  Java
关注(0)|答案(1)|浏览(87)


上图显示制表器表宽度如何缩小
但它应该显示像下面的图像

在这里表是收缩在第一次加载一样,在那里在第一个图像,当我拖动它来了,但我希望它应该适当调整

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>

jslywgbw

jslywgbw1#

你可以尝试设置默认宽度为100%这可能会解决你的问题!
另一件事也可以调整到100vw,但这取决于表是否显示屏幕的整个宽度!

<div id="wormGearTabulatorTable" style="max-height: 100%;width: 100%;position: relative;"></div>

字符串

相关问题