首页 > 代码库 > v-if
v-if
<el-tab-pane label="工程标段">
<ul>
<li v-for="item in projectSections">
<span @click="location(item)" v-text="item.secName"></span>
<div v-if="item.objectId==‘1001‘ " :class="testcolor1"></div>
<div v-if="item.objectId==‘1002‘ " :class="testcolor2"></div>
<div v-if="item.objectId==‘1003‘ " :class="testcolor3"></div>
<div v-if="item.objectId==‘1004‘ " :class="testcolor4"></div>
<div v-if="item.objectId==‘1005‘ " :class="testcolor5"></div>
<div v-if="item.objectId==‘1006‘ " :class="testcolor6"></div>
<span style="padding-left:10px;" v-text="item.companyName"></span>
</li>
</ul>
</el-tab-pane>
v-if