Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

改用 div 实现 #90

Closed
yesmeck opened this issue Oct 12, 2016 · 10 comments
Closed

改用 div 实现 #90

yesmeck opened this issue Oct 12, 2016 · 10 comments

Comments

@yesmeck
Copy link
Member

yesmeck commented Oct 12, 2016

现在比较麻烦的地方就是目前因为是用 table 标签实现的,所以 fixed column 的实现比较 tricky。然后导致一些功能比较难实现,比如 #83,然后 fixed column 跟其他功能同时使用的时候也很容易有 bug,比如 ant-design/ant-design#3096 ant-design/ant-design#3190

@afc163 觉得怎么样?

@afc163
Copy link
Member

afc163 commented Oct 12, 2016

div 会丢失 table 原生的自动布局,建议不要用。

@yesmeck
Copy link
Member Author

yesmeck commented Oct 12, 2016

我的想法是把 div 的 display 设置成table-row,table-cell

@afc163
Copy link
Member

afc163 commented Oct 12, 2016

你可以尝试一下,但感觉重写工作量会比较大~

@benjycui
Copy link
Member

benjycui commented Oct 13, 2016

这里有些是用 div 实现的 #19

@benjycui
Copy link
Member

@afc163 用 CSS 的 display: table|table-row|table-cell 应该能保证自动布局?

@benjycui
Copy link
Member

@yesmeck
Copy link
Member Author

yesmeck commented Oct 26, 2016

简单用 div 实现了下,display: table|table-row|table-cell其实是没法用的,如果一个 div 用了display:table-cell的话,这个 div 就跟 td 没区别了,其他几个同理,这样的话 fixed-columns 还是不好搞,因为 fixed-columns 是需要把表格纵向切开来,但是 table 标签本身是以行的形式展示数据的。

@afc163
Copy link
Member

afc163 commented Oct 26, 2016

现有的固定列实现,基本上参考自:https://datatables.net/extensions/fixedcolumns/ 目前市场上找到细节最好的实现。

@yesmeck
Copy link
Member Author

yesmeck commented Oct 26, 2016

另外我想了下,如果要做拖拽的话可能确实是用现在的实现会好一点。

@yesmeck
Copy link
Member Author

yesmeck commented Nov 25, 2016

还是保持现状这样吧,现在的问题不在这里了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants