Blame view

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