赞
踩
npm i vue3-seamless-scroll
- <template>
- <vue3-seamless-scroll
- class="v-s-s"
- :list="list"
- :step=".4"
- :hover="true"
- >
- <div class="v-s-s_item" v-for="(item, index) in list" :key="index">
- <span>{{ item.title }}</span>
- <span>{{ item.date }}</span>
- </div>
- </vue3-seamless-scroll>
- </template>
-
- <script setup lang="ts">
- import { reactive } from 'vue'
- import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
-
- const list = reactive([
- { title: 'QQQWWWWCCCCTTT第一行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第二行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第三行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第四行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第五行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第六行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第七行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第八行', date: '2022-3-4-5-6-7' },
- { title: 'QQQWWWWCCCCTTT第九行', date: '2022-3-4-5-6-7' },
- ])
- </script>
-
- <style lang="less" scoped>
- .v-s-s {
- height: 200px;
- width: 500px;
- margin: 100px auto;
- overflow: hidden;
- font-size: 13px;
- .v-s-s_item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 3px 0;
- height: 20px;
- }
- }
- </style>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。