- IScroll组件里面跟外面都必须包裹一个跟组件
本文档的scroll-view的外面的根组件是div,里面的根组件是ul - IScroll组件的position必须是fixed
<template>
<div class="singer">
<scroll-view>
<ul>
<li>233</li>
<li v-for="value in topArtistsInfo" :key="value.key">
{{ value.key }}
<ul>
<li v-for="artist in value.list" :key="artist.name">
{{ artist }}
</li>
</ul>
</li>
</ul>
</scroll-view>
</div>
</template>
<style scoped>
.singer {
position: fixed;
top: 184px;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
background: lightcyan;
}
</style>
网友评论