{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/1194","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/1194/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/1194/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/1194/events","html_url":"https://github.com/ant-design/ant-design/issues/1194","id":140632410,"number":1194,"title":"table 加了useFixedHeader并且设置了column 的width,为什么还是对不齐？","user":{"login":"pangbi","id":17631358,"avatar_url":"https://avatars.githubusercontent.com/u/17631358?v=3","gravatar_id":"","url":"https://api.github.com/users/pangbi","html_url":"https://github.com/pangbi","followers_url":"https://api.github.com/users/pangbi/followers","following_url":"https://api.github.com/users/pangbi/following{/other_user}","gists_url":"https://api.github.com/users/pangbi/gists{/gist_id}","starred_url":"https://api.github.com/users/pangbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangbi/subscriptions","organizations_url":"https://api.github.com/users/pangbi/orgs","repos_url":"https://api.github.com/users/pangbi/repos","events_url":"https://api.github.com/users/pangbi/events{/privacy}","received_events_url":"https://api.github.com/users/pangbi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ant-design/ant-design/labels/Need%20Demo","name":"Need Demo","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-14T10:23:46Z","updated_at":"2016-03-16T07:15:23Z","closed_at":null,"body":"想使用固定表头，查阅ant-design的文档，设置useFixedHeader,同时也设置了column的witdh,可是发现table还是不能够对齐 ，求教这是什么原因，目测是设置useFixedHeader后产生滚条挤占了空间\r\nclumn设置\r\n`\r\nconst columns = [{\r\n    title: '公司名称',\r\n    dataIndex: 'companyName',\r\n    width: 100\r\n}, {\r\n    title: '客户类型',\r\n    dataIndex: 'customerType',\r\n    width: 100\r\n}, {\r\n    title: '企业类型',\r\n    dataIndex: 'businessType',\r\n    width: 100\r\n}, {\r\n    title: '联系人',\r\n    dataIndex: 'contact',\r\n    width: 100\r\n}, {\r\n    title: '联系电话',\r\n    dataIndex: 'tel',\r\n    width: 100\r\n}, {\r\n    title: '联系操作',\r\n    dataIndex: 'contactType',\r\n    width: 100\r\n}, {\r\n    title: '已上传资质',\r\n    dataIndex: 'zizhi',\r\n    width: 100\r\n}, {\r\n    title: '审核未通过原因',\r\n    dataIndex: 'remark',\r\n    width: 100\r\n}, {\r\n    title: '服务',\r\n    dataIndex: 'fuwu',\r\n    width: 100\r\n}, {\r\n    title: '详细地址',\r\n    dataIndex: 'address',\r\n    width: 50\r\n}, {\r\n    title: 'VIP信息',\r\n    dataIndex: 'vip',\r\n    width: 100\r\n},\r\n\r\n];\r\n`\r\n\r\n设置数据源\r\n`  \r\n      const dataList = [];\r\n        customerList.resultList.map((data) => {\r\n            dataList.push({\r\n                key: data.id,\r\n                companyName: data.companyName,\r\n                customerType: data.customerType,\r\n                businessType: data.businessType,\r\n                contact: data.contact,\r\n                tel: data.tel,\r\n                contactType: data.contactType,\r\n                zizhi: `已上传${data.totalZizhi}份(审核通过${data.passedZizhi}份)`,\r\n                remark: data.remark,\r\n                fuwu: `开通时间:${data.addDate}`,\r\n                address: data.address,\r\n                vip: data.vip ? \"是VIP\" : \"不是VIP\",\r\n            });\r\n        });\r\n`\r\n\r\n\r\n使用table：\r\n`                        <Table\r\n                            rowSelection={rowSelection}\r\n                            columns={columns}\r\n                            dataSource={dataList}\r\n                            pagination={pagination}\r\n                            onChange={this.handleTableChange}\r\n                            bordered\r\n                            useFixedHeader\r\n                            onRowClick={this.handleRowClick}/>`\r\n\r\n运行结果：\r\n[截图](http://182.254.149.236/wp-content/uploads/2016/03/ant_design.png)"},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/197191205","html_url":"https://github.com/ant-design/ant-design/issues/1194#issuecomment-197191205","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/1194","id":197191205,"user":{"login":"afc163","id":507615,"avatar_url":"https://avatars.githubusercontent.com/u/507615?v=3","gravatar_id":"","url":"https://api.github.com/users/afc163","html_url":"https://github.com/afc163","followers_url":"https://api.github.com/users/afc163/followers","following_url":"https://api.github.com/users/afc163/following{/other_user}","gists_url":"https://api.github.com/users/afc163/gists{/gist_id}","starred_url":"https://api.github.com/users/afc163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afc163/subscriptions","organizations_url":"https://api.github.com/users/afc163/orgs","repos_url":"https://api.github.com/users/afc163/repos","events_url":"https://api.github.com/users/afc163/events{/privacy}","received_events_url":"https://api.github.com/users/afc163/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T07:15:23Z","updated_at":"2016-03-16T07:15:23Z","body":"你也可以试试最后一列或最后几列不设宽度，保证表格布局的弹性，看看还会不会错位。"}}