Vue template中函数获取el-table-colum中的属性值
方案如下:<el-table-column prop="id" label="操作"><template slot-scope="scope"><istyle="margin: 0 10px; cursor: pointer"@click="clickItemInfo(scope.$index, scope.row,scope.column,scope.row.id)
·
方案如下:
<el-table-column prop="id" label="操作">
<template slot-scope="scope">
<i
style="margin: 0 10px; cursor: pointer"
@click="clickItemInfo(scope.$index, scope.row,scope.column,scope.row.id)"
class="el-icon-search"
></i>
</template>
</el-table-column>
解释:
<template> 中 @click 函数想要获得 <el-table-column 中的 prop 值。则可以在函数输入栏中输入 scope.row.id。前提是template 中 slot-scope="scope"
更多推荐
已为社区贡献1条内容
所有评论(0)