Vue + Element 表格循环渲染

匿名 (未验证) 提交于 2019-12-02 23:57:01

 

 

 

 <el-table-column label="查看职位" width="250">                 <slot slot-scope="scope">                    <el-link style="padding:0 5px"  v-for="(v,index) in scope.row.job_ids" v-if='scope.row.job_ids !=""'   type="primary" >ְλ{{index}}</el-link>                      </slot>           </el-table-column>           <el-table-column prop="route_path" label="查看门店" width="250">                          <slot slot-scope="scope">                    <el-link style="padding:0 5px"  v-for="(v,index) in scope.row.job_ids" v-if='scope.row.job_ids !=""'   type="primary" >ְλ{{index}}</el-link>                      </slot>           </el-table-column>

主要是 运用 slot标签 + 作用域插槽 slot-scope + v-for 将子组件的值渲染传递给父组件

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!