操作列右側固定。在列很少或是屏幕伸縮的情況下出現重復問題
對於沒有bordered
邊框解決方案
{ title: '編號', dataIndex: 'id', sorter: true, width: 100, align: 'left', render: text => text || '-' }, { title: '用戶姓名', dataIndex: 'realName', sorter: true, width: 200, align: 'left', render: text => text || '-' }, { title: '' //此處添加一個空列,讓此列去自適應一行寬度 }, { title: '編輯', key: 'action', width: 300, fixed: 'right', align: 'center', render: record => { return ... //省略 } }
空列自適應寬度。
分析原因: Table的 fixed 會單獨重寫一個table結構,在列少的情況下,原table的列會展示出來,本菜鳥沒找到因為啥這樣,只能加個假列,有bordered
表格還沒有解決辦法,如有大神知道本質原因 ,麻煩告知