修复小程序不支持ol ui的问题 以下代码可以达到效果
<view v-for="(item, index) in sectionNames"
:key="index">
<view @click="onClickChapter(item, index)"
v-bind:class="{'chapter-item':true,'chapter-item-choose':(book.sectionCurrentIndex == index)}">
<p>{{index+1}}.</p>
<p style="margin-left: 1em;">{{item.name}}</p>
</view>
</view>
.chapter-item {
box-sizing: border-box;
margin-bottom: 10px;
display: flex;
}
.chapter-item-choose {
color: #215445;
font-weight: 700;
}