Code Monkey home page Code Monkey logo

Comments (10)

afc163 avatar afc163 commented on June 5, 2024

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

from table.

yesmeck avatar yesmeck commented on June 5, 2024

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

from table.

afc163 avatar afc163 commented on June 5, 2024

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

from table.

benjycui avatar benjycui commented on June 5, 2024

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

from table.

benjycui avatar benjycui commented on June 5, 2024

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

from table.

benjycui avatar benjycui commented on June 5, 2024

https://developer.mozilla.org/en-US/docs/Web/CSS/display#Values

from table.

yesmeck avatar yesmeck commented on June 5, 2024

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

from table.

afc163 avatar afc163 commented on June 5, 2024

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

from table.

yesmeck avatar yesmeck commented on June 5, 2024

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

from table.

yesmeck avatar yesmeck commented on June 5, 2024

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

from table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.