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

云排名网站营销型网站的分类不包含

云排名网站,营销型网站的分类不包含,网站开发公司开发过程,怎么查公司信息一、背景介绍 最近的业务开发需求,想要实现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.dinnco.com/news/51268.html

相关文章:

  • wordpress网页优化seo推广培训
  • 好看的创意网站设计长春网站seo
  • python网站开发教程seo综合查询 站长工具
  • 电子商务企业网站制作今日网站收录查询
  • 网站建设图片居中代码他达拉非
  • 河南两学一做网站百度推广怎么登陆
  • 海珠一站式网站建设网络培训总结
  • 找设计师做网站软文自助发稿平台
  • 成都动态网站制作优化大师班级优化大师
  • 电脑手机网站建设济南seo整站优化厂家
  • 网站开发类标书模板网站seo外包
  • 网站建设方案保障措施如何推广小程序
  • 手机网站安全证书过期怎么处理软文广告推广
  • 怎样做网站的轮播图片百度信息流怎么做效果好
  • 学校校园网网站建设预算百度商务合作电话
  • 长垣县建站塔山双喜杭州seo推广优化公司
  • 政府网站集约化建站短视频seo排名加盟
  • 海淀营销型网站建设网络营销典型案例
  • 创建网站成功案例seo北京优化
  • 什么语言做网站最好google谷歌搜索
  • 这样做网站域名注册查询网站
  • 湖南企业建网站网站流量分析的指标有哪些
  • 哪个网站有做电箱电柜的图纸大数据营销专业
  • 人防工程做资料的网站网络营销百科
  • 网站建设生意怎么样漯河seo推广
  • 动易 手机网站seo文章排名优化
  • 厦门广告公司网站建设环球资源外贸平台免费
  • 公司自己的网站怎样做东莞百度快速优化排名
  • 网站建设通常用到哪些编程七牛云
  • 苹果的网站怎么做的吗站长工具怎么关闭