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

网站关键词分隔符做团购的网站

网站关键词分隔符,做团购的网站,wordpress 页面分级,南山电商网站建设一、背景介绍 最近的业务开发需求,想要实现echarts图表大屏滚动,小编首先采用vue-seamless-scroll进行实现,结果发现第二屏出现空白间隔,尝试了多种解决方案均不生效,最终选择换一个方案。 二、封装的ScrollList组件…

一、背景介绍

最近的业务开发需求,想要实现echarts图表大屏滚动,小编首先采用vue-seamless-scroll进行实现,结果发现第二屏出现空白间隔,尝试了多种解决方案均不生效,最终选择换一个方案。

二、封装的ScrollList组件

<template><div class="scrollContainer" :id="id" @mouseenter="monseenter" @mouseleave="mouseleave"><slot></slot></div>
</template><script>
export default {name: 'ScrollList',props: {id: String},data() {return {timer: null};},methods: {init() {this.setTimer();// this.$once代表只执行一次。如果组件是在keep-alive中包裹,则需要更换函数// 被keep-alive包裹住的组件有两个生命周期函数:activated和deactivatedthis.$once('hook:beforeDestroy', () => {this.removeTimer();});},removeTimer() {if (this.timer) {clearInterval(this.timer);this.timer = null;}},setTimer() {this.removeTimer();this.timer = setInterval(() => {// pixel height:include el and padding    read onlyconst scrollHeight = document.getElementById(this.id).scrollHeight;// visible area height:include el and padding  read onlyconst clientHeight = document.getElementById(this.id).clientHeight;const heightDifference = scrollHeight - clientHeight;// scroll height:readable and writabledocument.getElementById(this.id).scrollTop++;// when el scroll to topif (document.getElementById(this.id).scrollTop >= heightDifference - 1) {this.removeTimer();// make it go back to original location after one secondsetTimeout(() => {document.getElementById(this.id).scrollTop = 0;this.setTimer();}, 1000);}}, 44);},monseenter() {this.removeTimer();},mouseleave() {this.setTimer();}},mounted() {this.init();}
};
</script><style lang="scss" scoped>
.scrollContainer::-webkit-scrollbar {display: none;
}
.scrollContainer::scrollbar {display: none;
}
.scrollContainer {height: 100%;overflow: scroll;overflow-x: hidden;
}
</style>

三、使用ScrollList组件

<template><div><scrollList :id="'leftList'"><!-- todo 写需要循环滚动的代码 --></scrollList></div>
</template><script>import scrollList from '@/components/scrollList/index'export default {components: {scrollList}}
</script>
http://www.yayakq.cn/news/344228/

相关文章:

  • 学网站开发怎么样青岛网站建设方案书
  • 网站的常用技术有哪些百度seo推广价格
  • 网站建设app哪个好用wix怎么做网站
  • 怎么查询最新网站做网站有哪些费用
  • 做宣传的网站有哪些代理财务记账公司
  • dede 子网站利用ps做兼职的网站
  • 网站开发要懂英文吗简书 wordpress 搭建
  • 外贸网站 wordpress石碣东莞网站建设
  • 网站空间 .de资源网站优化排名软件
  • 淄博网站建设设计公司龙岗网站建设公司哪家口碑好
  • 网站素材模板旅游成立网站的意义
  • 做网站办公照片上海网站建设技术托管
  • 教育类手机网站模板下载网站建设属于会计哪个科目
  • 甘肃省建设局官方网站西安哪家公司制作响应式网站建设
  • 温州网站建设 seowordpress大学最新模板下载地址
  • 网站备案要关闭吗做电脑壁纸的网站
  • 常州公诚建设项目管理有限公司官方网站阿里云做网站步骤
  • 品牌型网站建设解决方案个人网页设计html加js代码
  • 商务网站建设实验什么叫seo
  • 网站程序结构wordpress的登录
  • 建设网站需要花钱吗亲子装网站建设
  • 市建设局网站的综合业务管理平台建设网站目的及功能定位
  • 中国万网网站建设过程北海市住房和城乡建设局网站
  • 上海网站关键词图片转视频在线制作
  • 申请网页空间的网站湖北高端网站建设价格
  • 女生适合做策划吗关键词营销seo
  • 做爰片免费观看网站网站建设类岗位杭州
  • 搜索引擎作弊网站有哪些求个网站知乎
  • 建设部人才交流中心网站网站网站建设哪家便宜
  • 建设银行车主卡网上交罚款网站网站页面设计培训班