VUE-001-在el-table-column表格单元格中添加url跳转链接
·
普通文字样式的展示,赋值方式为:prop
<el-table-column prop="url" label="链接" width="400" show-overflow-tooltip></el-table-column>
将文字url变成链接,赋值方式为:嵌套template,使用scope.row.data赋值
<el-table-column label="链接" width="400" show-overflow-tooltip>
<template slot-scope="scope">
<a :href="scope.row.url" target="_blank" class="buttonText">{{scope.row.url}}</a>
</template>
</el-table-column>
更多推荐



所有评论(0)