docs: update document

This commit is contained in:
就眠儀式 2022-03-16 22:41:35 +08:00
parent 8a6cab72ee
commit 1c5635ec27
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ export default {
<!-- 需要用一个 div 包裹触发滚动事件的目标元素和 lay-backtop 组件 --> <!-- 需要用一个 div 包裹触发滚动事件的目标元素和 lay-backtop 组件 -->
<div class="wrapper" style="width:700px; height:300px;"> <div class="wrapper" style="width:700px; height:300px;">
<div id="scrollContent" style="overflow-y:auto; overflow-x:auto; width:700px; height:300px;background-color:whitesmoke;padding:10px;"> <div id="scrollContent" style="overflow-y:auto; overflow-x:auto; width:700px; height:300px;background-color:whitesmoke;padding:10px;">
<lay-panel v-for="(n,index) in 50" :key="n" style="margin-top:5px;margin-bottom:5px;padding:10px;">内容</lay-panel> <lay-panel v-for="(n,index) in 50" :key="n" style="margin:10px;padding:10px;">内容</lay-panel>
</div> </div>
<lay-backtop target="#scrollContent" :showHeight="100" :bottom="30" position="absolute"></lay-backtop> <lay-backtop target="#scrollContent" :showHeight="100" :bottom="30" position="absolute"></lay-backtop>
</div> </div>

View File

@ -13,8 +13,8 @@
::: demo 使用 `lay-scroll` 标签, 创建一个虚拟滚动容器 ::: demo 使用 `lay-scroll` 标签, 创建一个虚拟滚动容器
<template> <template>
<lay-scroll height="200px"> <lay-scroll height="200px" style="background-color:whitesmoke;">
<li v-for="i of 100">内容</li> <lay-panel v-for="(n,index) in 50" :key="n" style="margin:10px;padding:10px;">内容</lay-panel>
</lay-scroll> </lay-scroll>
</template> </template>