vue table 列判断 ,用于 状态类 动态显示
vue table 列判断 ,用于 状态类 动态显示;<el-table-columnlabel="净化器状态" min-width="70" align="center" sortable header-align="center"><template slot-scope="scope"><div v-if="scope.row.sour...
·
vue table 列判断 ,用于 状态类 动态显示;
<el-table-column label="净化器状态" min-width="70" align="center" sortable header-align="center"> <template slot-scope="scope"> <div v-if="scope.row.sourceState == 1" class="inline-block bg-green width20 height20 border-radius10"></div> <div v-if="scope.row.sourceState == 2" class="inline-block bg-grey width20 height20 border-radius10"></div> <div v-if="scope.row.sourceState == 3" class="inline-block bg-grey width20 height20 border-radius10"></div> <div v-if="scope.row.sourceState == 4" class="inline-block bg-yellow width20 height20 border-radius10"></div> </template> </el-table-column>
重点是 template slot-scope="scope" ,下边的 if;
更多推荐
已为社区贡献1条内容
所有评论(0)