|
1
|
<template>
|
vben
authored
|
2
|
<PageWrapper title="滚动组件示例" content="基于el-scrollbar">
|
nebv
authored
|
3
|
<div class="scroll-wrap">
|
|
4
5
6
|
<ScrollContainer class="mt-4">
<ul class="p-3">
<template v-for="index in 100" :key="index">
|
vben
authored
|
7
8
9
|
<li class="p-2" :style="{ border: '1px solid #eee' }">
{{ index }}
</li>
|
|
10
11
12
13
|
</template>
</ul>
</ScrollContainer>
</div>
|
vben
authored
|
14
|
</PageWrapper>
|
|
15
16
17
18
|
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { ScrollContainer } from '/@/components/Container/index';
|
vben
authored
|
19
20
|
import { PageWrapper } from '/@/components/Page';
|
|
21
|
export default defineComponent({
|
vben
authored
|
22
|
components: { ScrollContainer, PageWrapper },
|
|
23
24
|
});
</script>
|
nebv
authored
|
25
26
27
28
|
<style lang="less" scoped>
.scroll-wrap {
width: 50%;
height: 300px;
|
Vben
authored
|
29
|
background-color: @component-background;
|
nebv
authored
|
30
31
|
}
</style>
|