<div class="tools">
<van-cell
v-for="tool in toolList"
:title="tool.title"
:icon="tool.icon"
is-link
:to="tool.path"
/>
</div>
<script scoped>
.tools {
width: 98%;
margin: 0 auto;
background-color: white;
margin-top: 15px;
border-radius: 18px;
margin-bottom: 2px;
}
</script>
上述代码border-radius不生效,如下图
必须在tools里的内容上下加上别的内容,才能生效
<div class="tools">
//上方内容
<div class="wenzi">
<p>快捷工具</p>
</div>
<van-cell
v-for="tool in toolList"
:title="tool.title"
:icon="tool.icon"
is-link
:to="tool.path"
/>
//下方内容
<span> </span>
</div>
效果如图