rookiemaster

element-plus 里的 el-table 和 el-table-column 是怎么实现的?

  •  
  •   rookiemaster · Oct 20, 2024 · 2091 views
    This topic created in 748 days ago, the information mentioned may be changed or developed.

    具体的问题是

     <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="date" label="Date" width="180" />
        <el-table-column prop="name" label="Name" width="180" />
        <el-table-column prop="address" label="Address" />
    </el-table>
    

    el-table-column 是怎么知道数据是啥的(tableData 是怎么传递给 el-table-column 的)

    3 replies  •  2024-10-21 10:52:06 +08:00
    Xu3Xan89YsA7oP64
    Xu3Xan89YsA7oP64
    Oct 20, 2024
    1
    instance.parent
    unhappy224
    unhappy224
    Oct 21, 2024
    2
    provider inject 吧
    linkopeneyes
    linkopeneyes
    Oct 21, 2024
    3
    依赖注入,或者是 table 循环 slot 拿到 column 的 prop 信息
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1482 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 01:17 · PVG 09:17 · LAX 17:17 · JFK 20:17
    ♥ Do have faith in what you're doing.