V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
rookiemaster
V2EX  ›  前端开发

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

  •  
  •   rookiemaster · 6 天前 · 430 次点击

    具体的问题是

     <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 条回复    2024-10-21 10:52:06 +08:00
    shizhibuyu2023
        1
    shizhibuyu2023  
       6 天前
    instance.parent
    unhappy224
        2
    unhappy224  
       5 天前
    provider inject 吧
    sjhhjx0122
        3
    sjhhjx0122  
       5 天前
    依赖注入,或者是 table 循环 slot 拿到 column 的 prop 信息
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2725 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 09:31 · PVG 17:31 · LAX 02:31 · JFK 05:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.