Vue在表格单元格(el-table-column)中添加超链接访问
<el-table-column show-overflow-tooltip label="操作"><template slot-scope="scope"><span class="span-text" v-if="scope.row.linkUrl!== undefined && scope.row.linkUrl.length >=1"&g
·
<el-table-column show-overflow-tooltip label="操作">
<template slot-scope="scope">
<span class="span-text" v-if="scope.row.linkUrl!== undefined && scope.row.linkUrl.length >=1"><a link :href="scope.row.linkUrl" target="_blank">办理</a></span>
<span class="span-text" v-if="scope.row.guideLink!== undefined && scope.row.guideLink.length >=1"><a link :href="scope.row.guideLink" target="_blank">指南</a></span>
</template>
</el-table-column>
注意: < template slot-scope=“scope”>的scope是自定义的变量,scope.row.一定根据自定义变量+.row是固定的。
更多推荐
已为社区贡献4条内容
所有评论(0)