当前位置: 首页 > wzjs >正文

镇平县两学一做专题网站房屋装修报价

镇平县两学一做专题网站,房屋装修报价,云服务器租用价格表,求职简历模板免费下载可编辑vue3-seamless-scroll组件支持上下左右无缝滚动,单步滚动,并且支持复杂图标的无缝滚动。 核心特性 多方向无缝滚动 支持上下、左右四个方向的自动滚动,通过 direction 参数控制(默认 up),适用于新闻轮播、…

vue3-seamless-scroll组件支持上下左右无缝滚动,单步滚动,并且支持复杂图标的无缝滚动。

核心特性

  1. 多方向无缝滚动
    支持上下、左右四个方向的自动滚动,通过 direction 参数控制(默认 up),适用于新闻轮播、数据大屏等场景。

  2. 动态交互控制

    • 通过 v-model 绑定布尔值控制滚动启停。

    • 支持鼠标悬停暂停(hover: true)和滚轮手动滚动(wheel: true)。

  3. 响应式与动态数据
    可监听数据变化(isWatch: true),当列表长度达到 limitScrollNum(默认5)时触发滚动,适合动态加载内容。

  4. 复杂场景适配

    • 表格滚动:通过拆分表头与内容区域,避免表头跟随滚动(需复制一个隐藏表头的表格包裹组件)。

    • 单步滚动:通过 singleHeight 或 singleWidth 设置单步停止距离,结合 singleWaitTime 控制停留时间

安装与配置

1. 安装方式
npm install vue3-seamless-scroll --save
# 或
yarn add vue3-seamless-scroll
2. 组件注册
  • 全局注册(推荐):

    // main.js
    import { createApp } from 'vue';
    import vue3SeamlessScroll from "vue3-seamless-scroll";
    const app = createApp(App);
    app.use(vue3SeamlessScroll);
  • 局部注册

    <script setup>
    import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
    </script>
3. 关键配置参数
参数类型说明
listArray必填,滚动数据列表
directionString滚动方向:up/down/left/right(默认 up
stepNumber步进速度,值越大滚动越快
copyNumNumber列表拷贝次数(默认1),用于无缝衔接
hoverBoolean是否启用鼠标悬停暂停(默认 false
singleHeightNumber垂直单步滚动停止高度(设为0则连续滚动)
singleWidthNumber水平单步滚动停止宽度

使用示例

基础列表滚动
<template><vue3-seamless-scroll :list="list" direction="up" :hover="true"class="scroll-container"><div v-for="(item, index) in list" :key="index" class="item">{{ item.title }}</div></vue3-seamless-scroll>
</template><style>
.scroll-container {height: 300px;overflow: hidden;
}
.item {padding: 12px 0;
}
</style>
表格内容滚动(保留表头)
<template><div class="scroll-wrap"><div class="scroll-header"><ul class="scroll-ul"><li class="scroll-li"><span style="min-width: 80px; width: calc(100% - 180px)">标题</span><span style="width: 180px">日期</span></li></ul></div><div class="scroll-content"><vue3-seamless-scroll class="scroll-list" :list="list" :hover="true" :step="0.4" :wheel="true" :isWatch="true"><ul class="scroll-ul" v-for="(item, index) in list" :key="index"><li class="scroll-li"><span style="min-width: 80px; width: calc(100% - 180px)">{{ item.title }}</span><span style="width: 180px">{{ item.date }}</span></li></ul></vue3-seamless-scroll></div>
</div>
</template><script lang="ts" setup>
import { ref } from 'vue';
import { Vue3SeamlessScroll } from "vue3-seamless-scroll";const list = ref([{title: "Vue3.0 无缝滚动组件展示数据第1条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第2条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第3条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第4条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第5条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第6条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第7条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第8条",date: Date.now(),},{title: "Vue3.0 无缝滚动组件展示数据第9条",date: Date.now(),},
]);   
</script><style scoped>
.scroll-wrap {width: 500px;height: 350px;overflow: hidden;
}
.scroll-header,
.scroll-content {width: 100%;display: flex;
}
.scroll-list {width: 100%;overflow: hidden;
}
.scroll-ul {width: 100%;display: flex;flex-direction: column;
}
.scroll-li {width: 100%;display: flex;line-height: 35px;
}
.scroll-li > span {display: flex;height: 35px;line-height: 35px;border-top: 1px solid #dcdfe6;border-left: 1px solid #dcdfe6;padding-left: 5px;overflow: hidden;
}
.scroll-li > span:last-child {border-right: 1px solid #dcdfe6;
}
.scroll-header .scroll-li {background-color: #F8F9FF;
}
.scroll-header .scroll-li > span {font-weight: bold; border-top: none;
}
.scroll-content .scroll-ul:last-child .scroll-li {border-bottom: 1px solid #dcdfe6;
}
</style>


文章转载自:

http://RUV9lBP1.nxhjg.cn
http://uGrnzKGg.nxhjg.cn
http://hkjbFlVm.nxhjg.cn
http://oq0vR5pG.nxhjg.cn
http://7mDKKvGJ.nxhjg.cn
http://z0frRd6m.nxhjg.cn
http://6JgwCQP3.nxhjg.cn
http://qyg5kvQe.nxhjg.cn
http://NkdUHWfi.nxhjg.cn
http://zmjbc5YK.nxhjg.cn
http://wO8vvTdU.nxhjg.cn
http://Lk25QdTS.nxhjg.cn
http://RVxOve3g.nxhjg.cn
http://ALaZpYdT.nxhjg.cn
http://ZSpT1xJr.nxhjg.cn
http://yNFDdIX3.nxhjg.cn
http://IuFSuLWN.nxhjg.cn
http://9wnoTB4Q.nxhjg.cn
http://sB3ksYBn.nxhjg.cn
http://fLGIx9bH.nxhjg.cn
http://7blkhYYk.nxhjg.cn
http://f92R7ncs.nxhjg.cn
http://ICx9cq4G.nxhjg.cn
http://8hbtGbAT.nxhjg.cn
http://G4T7W0Yy.nxhjg.cn
http://pF5cmJwq.nxhjg.cn
http://4qqRrJTH.nxhjg.cn
http://VaFhiHE7.nxhjg.cn
http://SKij8P2f.nxhjg.cn
http://ZqOQD5vw.nxhjg.cn
http://www.dtcms.com/wzjs/778035.html

相关文章:

  • 更新备案 网站 打开企业管理说白了是干嘛的
  • 网站的排版微信公众号制作图文
  • 福州电子商务网站网站规划与维护
  • 什么网站是做电机控制的如何自己做加盟网站
  • 网站历史权重查询为某公司或企业做的门户网站
  • 响应式网站栅格延边网站开发depawo
  • phpnow搭建本地网站网站转出
  • 企业网站建设套餐上海wordpress修改文字大小
  • 有哪些企业网站平台北京手机网站建设公司
  • 荥阳市城乡建设规划网站南昌做网站费用
  • 杭州互联网网站定制公司wordpress 路径文件大小
  • 如何用域名建网站黄村网站开发公司电话
  • 南京网站优化技术做网站公司 郑州
  • 聚云测网站怎么做的邢台信都区最新通告
  • 南昌网站建设哪家比较好wordpress数据库删不掉
  • 国内贸易平台谷歌优化公司
  • 17一起来做网站wordpress插件 flyzoo
  • wordpress 分享到qq空间吉利seo
  • 专业网站建设流程恋爱网页生成
  • 深圳龙华建设局官方网站广告代理平台
  • 韶关营销网站开发联系方式企业为什么要做账
  • 低价刷赞网站推广北京市建设工程信息网告知性备案
  • 公司的网站建设服务费建设工程交易平台
  • 做网站各个流程天坛整装体验馆地址
  • 网站改版竞品分析怎么做文字短链接生成器
  • 下陆区建设局网站苏州优化网站哪家好
  • 网站建设和seo讲师要求网站售后
  • 荥阳网站建设做网站注意设么
  • 广西柳州网站建设小程序公司营销型外贸网站广州
  • 抄袭别人网站单页导航html5源码