1.
<el-table class="mt2" v-loading="loading" :data="reportList" border> <el-table-column label="序号" align="center" width="100"> <template slot-scope="scope"> <span>{{ scope.$index + 1 }}</span> </template> </el-table-column> <el-table-column v-if="reportInfo.reportType==0" label="关键字类型" align="center" prop="keywordTypeName"></el-table-column> <el-table-column label="关键字名称" align="center" prop="keyName"/> <el-table-column label="模板变量值" align="center" prop="keyword"/> <!-- 这边改的有问题! --> <el-table-column label="关键字类别" align="center" prop="keywordType2"> <!-- slot-scope="scope"这是获取当前的数据的。 --> <template slot-scope="scope"> <span v-if="scope.row.keywordType2===1">1关键字</span> <span v-else>2关键字</span> </template> </el-table-column>
2.
标签:table,判断,index,scope,关键字 From: https://www.cnblogs.com/effortandluck/p/16719426.html