為表格中的某一列添加超鏈接
一個表格通常有許多列,網上許多教程都可以實現為某一列添加超鏈接,如下,實現了當光標懸浮在“姓名”上時,改變為手形,點擊可實現跳轉。
<el-table :data="tableData"><el-table-column label="姓名" prop="name"><template slot-scope="scope"><!-- <a :href="getLink(scope.row)">{{ scope.row.name }}</a> --><router-link :to="{name:'Usr.usrDetails', query: {id: scope.row.unid},params: {id: scope.row.unid, operation: 'viewDetails', companyId: projectFrm.companyId}}"><span>{{ scope.row.name}}</span></router-link>