rookiemaster

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

  •  
  •   rookiemaster · Oct 20, 2024 · 1740 views
    This topic created in 574 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
        1
    Xu3Xan89YsA7oP64  
       Oct 20, 2024
    instance.parent
    unhappy224
        2
    unhappy224  
       Oct 21, 2024
    provider inject 吧
    linkopeneyes
        3
    linkopeneyes  
       Oct 21, 2024
    依赖注入,或者是 table 循环 slot 拿到 column 的 prop 信息
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   916 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 22:13 · PVG 06:13 · LAX 15:13 · JFK 18:13
    ♥ Do have faith in what you're doing.