主要在css加这句话:list-style-type: none;
<ul class="nyTab">
<li
v-for="(item, index) in nyTab"
:key="index"
:class="{ active: nyTabIndex == index }"
@click="nyTabSel(index)"
>
{{ item }}
</li>
</ul>
.nyTab {
float: right;
z-index: 10;
list-style-type: none;
li {
width: 71px;
height: 25px;
line-height: 25px;
float: left;
margin: 10px 5px;
background: url("../../assets/images/home/smallkuang.png")
no-repeat;
background-size: 100% 100%;
text-align: center;
color: #9da7ba;
cursor: pointer;
}
.active {
color: #50b7ff;
font-weight: bold;
}
}