Giter VIP home page Giter VIP logo

Comments (4)

afc163 avatar afc163 commented on August 28, 2024

http://ant.design/components/table/#demo-expand

ant design 里的做法是图标单独一列。

from table.

jaredleechn avatar jaredleechn commented on August 28, 2024

场景有点不太一样,antd 里的这个是通过 expandedRowRender ,会触发 expandIconAsCell

这里的是直接通过数据里的层级关系 data.i.children.i.children... 来渲染,直接加 {indentText}{expandIcon} 在内容前面

而且这种数据自带层级的,如果把图标全放在第一列会不会比较奇怪

from table.

benjycui avatar benjycui commented on August 28, 2024

这样子要把 icon 单独一列有点难
image

from table.

jaredleechn avatar jaredleechn commented on August 28, 2024

现在解决方案是给没有 children 的节点增加占位的 icon,现在样式看起来很奇怪,是的,aba 和 aca 真的是对齐的

image

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.