根据后端返回数据列表的每一行记录的devicename值,来确定超链接是否置灰。
关键代码如下:
<el-table>
<el-table-column prop="deviceid" header-align="center" align="center" label="设备ID" width="170px">
<template slot-scope="scope">
<el-button type="text" size="small" :disabled="scope.row.devicename ==='PLC设备'"
@click="transferParameters(scope.row.deviceid)">{{scope.row.deviceid}}
</el-button>
</template>
</el-table-column>
</el-table>
点击触发函数省略