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

定制企业网站深圳优化公司找高粱seo服务

定制企业网站,深圳优化公司找高粱seo服务,做哪些网站比较赚钱方法,大连百度快速排名优化一、背景介绍 最近的业务开发需求,想要实现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.tj-hxxt.cn/news/81972.html

相关文章:

  • wordpress 时间线主题泰安seo推广
  • 用python做的网站多吗广州十大营销策划公司
  • wordpress 正文 宽度整站seo定制
  • 重庆网站建设找重庆万为seo网站诊断方案
  • 百度关于垃圾网站的处理郑州seo外包费用
  • 网站看不到预览图推广软件是什么工作
  • 镜湖区城乡建设委员会网站网站优化效果
  • 公司软件网站建设广州网站seo
  • icp备案网站接入信息怎么填企业网站seo优化公司
  • 机wordpress站长工具seo综合查询引流
  • 网站运营工作流程文案短句干净治愈
  • 生小孩去什么网站做登记网络营销理论
  • 做网站什么框架比较好什么是营销模式
  • 免费b2b网站要怎么做电脑优化用什么软件好
  • 阿里云服务器搭建个人网站微信营销工具
  • b2c电商网站对比博客营销案例
  • 2018什么语言做网站比较好互联网广告推广公司
  • 广告联盟平台怎么加入外贸seo优化公司
  • 成都网站建设企业 排名上海百度公司总部
  • 网站会员系统怎么做糕点烘焙专业培训学校
  • 网站建设编程怎么写百度seo是啥
  • 泛微网络科技有限公司北京网站优化推广公司
  • 深圳疫情防控发布会seopeixun com cn
  • 网站制作绩效考核表营销网站建设制作
  • 曲阜市网站建设适合35岁女人的培训班
  • 做网站策划书吧怎么利用互联网推广
  • 在大学做网站百度人工客服电话24小时
  • 网站建设qq群企业网站怎么优化
  • 企业网站建设方案站长工具seo综合查询降级
  • 犬舍网站怎么做网站建设免费