Blame view

src/views/demo/comp/scroll/index.vue 978 Bytes
陈文彬 authored
1
2
3
<template>
  <div class="p-4">
    <Alert message="抽取el-scrollbar,并对其进行扩展,滚动条美化,适用于各个浏览器" type="info" />
4
    <div class="scroll-wrap">
陈文彬 authored
5
6
7
      <ScrollContainer class="mt-4">
        <ul class="p-3">
          <template v-for="index in 100" :key="index">
8
            <li class="p-2" :style="{ border: '1px solid #eee' }">{{ index }}</li>
陈文彬 authored
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
          </template>
        </ul>
      </ScrollContainer>
    </div>
  </div>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import { CollapseContainer } from '/@/components/Container/index';
  import { ScrollContainer } from '/@/components/Container/index';
  import { Alert } from 'ant-design-vue';
  export default defineComponent({
    components: { CollapseContainer, ScrollContainer, Alert },
    setup() {
      return {};
    },
  });
</script>
27
28
29
30
31
32
33
<style lang="less" scoped>
  .scroll-wrap {
    width: 50%;
    height: 300px;
    background: #fff;
  }
</style>