elmentUI为table中的单元格添加事件
<el-main> <el-tabs v-model="curTab" type="card"> <!-- tab签 --> <el-tab-pane id="activitServes" label="活动" name="activeservice"> <el-table empty-text=" " :border="true" :data="activeServiceList" ref="activeServiceTab" highlight-current-row style="width:100%;height:100%; border-top: 1px solid gray;"> <el-table-column header-align="center" property="url" label="应用" align="center" style="width:40%"> <template slot-scope="scope"> <div style="color:#238acd;text-decoration:underline;cursor:pointer;" :title="scope.row.url" @click="URLClick(scope.row)">{{ scope.row.url}}</div> </template> </el-table-column> <el-table-column header-align="center" property="fetchCount" label="fetch" align="center"></el-table-column> </el-table> </el-tab-pane> <!-- tab签 --> <el-tab-pane label="应用" name="application"> </el-tab-pane> <!-- tab签 --> <el-tab-pane label="活动" name="active"> </el-tab-pane> </el-tab-pane> </el-tabs> </el-main>
public URLClick(url: any) {
console.log(url);
}