iis服务器助手广告广告
返回顶部
首页 > 资讯 > 精选 >vue怎么实现探探滑动堆叠组件
  • 142
分享到

vue怎么实现探探滑动堆叠组件

2023-07-04 15:07:05 142人浏览 泡泡鱼
摘要

这篇文章主要讲解了“Vue怎么实现探探滑动堆叠组件”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“vue怎么实现探探滑动堆叠组件”吧!一. 功能分析简单使用下探探会发现,堆叠滑动的功能很简单,

这篇文章主要讲解了“Vue怎么实现探探滑动堆叠组件”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“vue怎么实现探探滑动堆叠组件”吧!

一. 功能分析

简单使用下探探会发现,堆叠滑动的功能很简单,用一张图概括就是:

vue怎么实现探探滑动堆叠组件 

简单归纳下里面包含的基本功能点:

  • 图片的堆叠

  • 图片第一张的滑动

  • 条件成功后的滑出,条件失败后的回弹

  • 滑出后下一张图片堆叠到顶部

  • 体验优化

  • 根据触摸点的不同,滑动时首图有不同角度偏移

  • 偏移面积判定是否成功滑出

二. 具体实现

有了归纳好的功能点,我们实现组件的思路会更清晰

1. 堆叠效果

堆叠图片效果在网上有大量的实例,实现的方法大同小异,主要通过在父层设定perspective 及perspective-origin ,来实现子层的透视,子层设定好translate3D Z轴数值即可模拟出堆叠效果,具体代码如下

// 图片堆叠dom <!--opacity: 0 隐藏我们不想看到的stack-item层级--> <!--z-index: -1 调整stack-item层级"--><ul class="stack"> <li class="stack-item" ><img src="1.png" alt="01"></li> <li class="stack-item" ><img src="2.png" alt="02"></li> <li class="stack-item" ><img src="3.png" alt="03"></li> <li class="stack-item" ><img src="4.png" alt="04"></li> <li class="stack-item" ><img src="5.png" alt="05"></li></ul><style>.stack { width: 100%; height: 100%; position: relative; perspective: 1000px; //子元素视距 perspective-origin: 50% 150%; //子元素透视位置 -WEBkit-perspective: 1000px; -webkit-perspective-origin: 50% 150%; margin: 0; padding: 0; } .stack-item{ background: #fff; height: 100%; width: 100%; border-radius: 4px; text-align: center; overflow: hidden; } .stack-item img { width: 100%; display: block; pointer-events: none; }</style>

上面只是一组静态代码,我们希望得到的是vue组件,所以需要先建立一个组件模板stack.vue,在模板中我们可以使用v-for,遍历出stack节点,使用:style 来修改各个item的style,代码如下

<template> <ul class="stack">  <li class="stack-item" v-for="(item, index) in pages" :>  <img :src="item.src">  </li> </ul></template><script>export default { props: { // pages数据包含基础的图片数据 pages: {  type: Array,  default: [] } }, data () { return {  // basicdata数据包含组件基本数据  basicdata: {  currentPage: 0 // 默认首图的序列  },  // temporaryData数据包含组件临时数据  temporaryData: {  opacity: 1, // 记录opacity  zIndex: 10, // 记录zIndex  visible: 3 // 记录默认显示堆叠数visible  } } }, methods: { // 遍历样式 transfORM (index) {  if (index >= this.basicdata.currentPage) {  let style = {}  let visible = this.temporaryData.visible  let perIndex = index - this.basicdata.currentPage  // visible可见数量前滑块的样式  if (index <= this.basicdata.currentPage + visible - 1) {   style['opacity'] = '1'   style['transform'] = 'translate3D(0,0,' + -1 * perIndex * 60 + 'px' + ')'   style['zIndex'] = visible - index + this.basicdata.currentPage   style['transitionTimingFunction'] = 'ease'   style['transitionDuration'] = 300 + 'ms'  } else {   style['zIndex'] = '-1'   style['transform'] = 'translate3D(0,0,' + -1 * visible * 60 + 'px' + ')'  }  return style  } } }}</script>

关键点

:style 可以绑定对象的同时,也可以绑定数组和函数,这在遍历的时候很有用
最基本的dom结构已经构建完毕,下一步是让首张图片“动”起来

2. 图片滑动

图片滑动效果,在很多场景中都有出现,其原理无非是监听touchs事件,得到位移,再通过translate3D改变目标位移,因此我们要实现的步骤如下

  • 对stack进行touchs事件的绑定

  • 监听并储存手势位置变化的数值

  • 改变首图CSS属性中translate3D的x,y值

#### 具体实现

在vue框架中,不建议直接操作节点,而是通过指令v-on对元素进行绑定,因此我们将绑定都写在v-for遍历里,通过index进行判断其是否是首图,再使用:style修改首页的样式,具体代码如下:

<template> <ul class="stack">  <li class="stack-item" v-for="(item, index) in pages"  :  @touchstart.stop.capture="touchstart"  @touchmove.stop.capture="touchmove"  @touchend.stop.capture="touchend"  @mousedown.stop.capture="touchstart"  @mouseup.stop.capture="touchend"  @mousemove.stop.capture="touchmove">  <img :src="item.src">  </li> </ul></template><script>export default { props: { // pages数据包含基础的图片数据 pages: {  type: Array,  default: [] } }, data () { return {  // basicdata数据包含组件基本数据  basicdata: {  start: {}, // 记录起始位置  end: {}, // 记录终点位置  currentPage: 0 // 默认首图的序列  },  // temporaryData数据包含组件临时数据  temporaryData: {  poswidth: '', // 记录位移  posheight: '', // 记录位移  tracking: false // 是否在滑动,防止多次操作,影响体验  } } }, methods: { touchstart (e) {  if (this.temporaryData.tracking) {  return  }  // 是否为touch  if (e.type === 'touchstart') {  if (e.touches.length > 1) {   this.temporaryData.tracking = false   return  } else {   // 记录起始位置   this.basicdata.start.t = new Date().getTime()   this.basicdata.start.x = e.targetTouches[0].clientX   this.basicdata.start.y = e.targetTouches[0].clientY   this.basicdata.end.x = e.targetTouches[0].clientX   this.basicdata.end.y = e.targetTouches[0].clientY  }  // pc操作  } else {  this.basicdata.start.t = new Date().getTime()  this.basicdata.start.x = e.clientX  this.basicdata.start.y = e.clientY  this.basicdata.end.x = e.clientX  this.basicdata.end.y = e.clientY  }  this.temporaryData.tracking = true }, touchmove (e) {  // 记录滑动位置  if (this.temporaryData.tracking && !this.temporaryData.animation) {  if (e.type === 'touchmove') {   this.basicdata.end.x = e.targetTouches[0].clientX   this.basicdata.end.y = e.targetTouches[0].clientY  } else {   this.basicdata.end.x = e.clientX   this.basicdata.end.y = e.clientY  }  // 计算滑动值  this.temporaryData.poswidth = this.basicdata.end.x - this.basicdata.start.x  this.temporaryData.posheight = this.basicdata.end.y - this.basicdata.start.y  } }, touchend (e) {  this.temporaryData.tracking = false  // 滑动结束,触发判断 }, // 非首页样式切换 transform (index) {  if (index > this.basicdata.currentPage) {  let style = {}  let visible = 3  let perIndex = index - this.basicdata.currentPage  // visible可见数量前滑块的样式  if (index <= this.basicdata.currentPage + visible - 1) {   style['opacity'] = '1'   style['transform'] = 'translate3D(0,0,' + -1 * perIndex * 60 + 'px' + ')'   style['zIndex'] = visible - index + this.basicdata.currentPage   style['transitionTimingFunction'] = 'ease'   style['transitionDuration'] = 300 + 'ms'  } else {   style['zIndex'] = '-1'   style['transform'] = 'translate3D(0,0,' + -1 * visible * 60 + 'px' + ')'  }  return style  } }, // 首页样式切换 transformIndex (index) {  // 处理3D效果  if (index === this.basicdata.currentPage) {  let style = {}  style['transform'] = 'translate3D(' + this.temporaryData.poswidth + 'px' + ',' + this.temporaryData.posheight + 'px' + ',0px)'  style['opacity'] = 1  style['zIndex'] = 10  return style  } } }}</script>

3. 条件成功后的滑出,条件失败后的回弹

条件的触发判断是在touchend/mouseup后进行,在这里我们先用简单的条件进行判定,同时给予首图弹出及回弹的效果,代码如下

<template> <ul class="stack">  <li class="stack-item" v-for="(item, index) in pages"  :  @touchmove.stop.capture="touchmove"  @touchstart.stop.capture="touchstart"  @touchend.stop.capture="touchend"  @mousedown.stop.capture="touchstart"  @mouseup.stop.capture="touchend"  @mousemove.stop.capture="touchmove">  <img :src="item.src">  </li> </ul></template><script>export default { props: {  // pages数据包含基础的图片数据 pages: {  type: Array,  default: [] } }, data () { return {  // basicdata数据包含组件基本数据  basicdata: {  start: {}, // 记录起始位置  end: {}, // 记录终点位置  currentPage: 0 // 默认首图的序列  },  // temporaryData数据包含组件临时数据  temporaryData: {  poswidth: '', // 记录位移  posheight: '', // 记录位移  tracking: false, // 是否在滑动,防止多次操作,影响体验  animation: false, // 首图是否启用动画效果,默认为否  opacity: 1 // 记录首图透明度  } } }, methods: { touchstart (e) {  if (this.temporaryData.tracking) {  return  }  // 是否为touch  if (e.type === 'touchstart') {  if (e.touches.length > 1) {   this.temporaryData.tracking = false   return  } else {   // 记录起始位置   this.basicdata.start.t = new Date().getTime()   this.basicdata.start.x = e.targetTouches[0].clientX   this.basicdata.start.y = e.targetTouches[0].clientY   this.basicdata.end.x = e.targetTouches[0].clientX   this.basicdata.end.y = e.targetTouches[0].clientY  }  // pc操作  } else {  this.basicdata.start.t = new Date().getTime()  this.basicdata.start.x = e.clientX  this.basicdata.start.y = e.clientY  this.basicdata.end.x = e.clientX  this.basicdata.end.y = e.clientY  }  this.temporaryData.tracking = true  this.temporaryData.animation = false }, touchmove (e) {  // 记录滑动位置  if (this.temporaryData.tracking && !this.temporaryData.animation) {  if (e.type === 'touchmove') {   this.basicdata.end.x = e.targetTouches[0].clientX   this.basicdata.end.y = e.targetTouches[0].clientY  } else {   this.basicdata.end.x = e.clientX   this.basicdata.end.y = e.clientY  }  // 计算滑动值  this.temporaryData.poswidth = this.basicdata.end.x - this.basicdata.start.x  this.temporaryData.posheight = this.basicdata.end.y - this.basicdata.start.y  } }, touchend (e) {  this.temporaryData.tracking = false  this.temporaryData.animation = true  // 滑动结束,触发判断  // 简单判断滑动宽度超出100像素时触发滑出  if (Math.abs(this.temporaryData.poswidth) >= 100) {  // 最终位移简单设定为x轴200像素的偏移  let ratio = Math.abs(this.temporaryData.posheight / this.temporaryData.poswidth)  this.temporaryData.poswidth = this.temporaryData.poswidth >= 0 ? this.temporaryData.poswidth + 200 : this.temporaryData.poswidth - 200  this.temporaryData.posheight = this.temporaryData.posheight >= 0 ? Math.abs(this.temporaryData.poswidth * ratio) : -Math.abs(this.temporaryData.poswidth * ratio)  this.temporaryData.opacity = 0  // 不满足条件则滑入  } else {  this.temporaryData.poswidth = 0  this.temporaryData.posheight = 0  } }, // 非首页样式切换 transform (index) {  if (index > this.basicdata.currentPage) {  let style = {}  let visible = 3  let perIndex = index - this.basicdata.currentPage  // visible可见数量前滑块的样式  if (index <= this.basicdata.currentPage + visible - 1) {   style['opacity'] = '1'   style['transform'] = 'translate3D(0,0,' + -1 * perIndex * 60 + 'px' + ')'   style['zIndex'] = visible - index + this.basicdata.currentPage   style['transitionTimingFunction'] = 'ease'   style['transitionDuration'] = 300 + 'ms'  } else {   style['zIndex'] = '-1'   style['transform'] = 'translate3D(0,0,' + -1 * visible * 60 + 'px' + ')'  }  return style  } }, // 首页样式切换 transformIndex (index) {  // 处理3D效果  if (index === this.basicdata.currentPage) {  let style = {}  style['transform'] = 'translate3D(' + this.temporaryData.poswidth + 'px' + ',' + this.temporaryData.posheight + 'px' + ',0px)'  style['opacity'] = this.temporaryData.opacity  style['zIndex'] = 10  if (this.temporaryData.animation) {   style['transitionTimingFunction'] = 'ease'   style['transitionDuration'] = 300 + 'ms'  }  return style  } } }}</script>

4. 滑出后下一张图片堆叠到顶部

重新堆叠是组件最后一个功能,同时也是最重要和复杂的功能。在我们的代码里,stack-item的排序依赖绑定:style的transformIndex和transform函数,函数里判定的条件是currentPage,那是不是改变currentPage,让其+1,即可完成重新堆叠呢?

答案没有那么简单,因为我们滑出是动画效果,会进行300ms的时间,而currentPage变化引起的重排,会立即变化,打断动画的进行。因此我们需要先修改transform函数的排序条件,后改变currentPage。

#### 具体实现

  • 修改transform函数排序条件

  • 让currentPage+1

  • 添加onTransitionEnd事件,在滑出结束后,重新放置stack列表中

代码如下:

<template> <ul class="stack">  <li class="stack-item" v-for="(item, index) in pages"  :  @touchmove.stop.capture="touchmove"  @touchstart.stop.capture="touchstart"  @touchend.stop.capture="touchend"  @mousedown.stop.capture="touchstart"  @mouseup.stop.capture="touchend"  @mousemove.stop.capture="touchmove"  @webkit-transition-end="onTransitionEnd"  @transitionend="onTransitionEnd"  >  <img :src="item.src">  </li> </ul></template><script>export default { props: { // pages数据包含基础的图片数据 pages: {  type: Array,  default: [] } }, data () { return {  // basicdata数据包含组件基本数据  basicdata: {  start: {}, // 记录起始位置  end: {}, // 记录终点位置  currentPage: 0 // 默认首图的序列  },  // temporaryData数据包含组件临时数据  temporaryData: {  poswidth: '', // 记录位移  posheight: '', // 记录位移  lastPosWidth: '', // 记录上次最终位移  lastPosHeight: '', // 记录上次最终位移  tracking: false, // 是否在滑动,防止多次操作,影响体验  animation: false, // 首图是否启用动画效果,默认为否  opacity: 1, // 记录首图透明度  swipe: false // onTransition判定条件  } } }, methods: { touchstart (e) {  if (this.temporaryData.tracking) {  return  }  // 是否为touch  if (e.type === 'touchstart') {  if (e.touches.length > 1) {   this.temporaryData.tracking = false   return  } else {   // 记录起始位置   this.basicdata.start.t = new Date().getTime()   this.basicdata.start.x = e.targetTouches[0].clientX   this.basicdata.start.y = e.targetTouches[0].clientY   this.basicdata.end.x = e.targetTouches[0].clientX   this.basicdata.end.y = e.targetTouches[0].clientY  }  // pc操作  } else {  this.basicdata.start.t = new Date().getTime()  this.basicdata.start.x = e.clientX  this.basicdata.start.y = e.clientY  this.basicdata.end.x = e.clientX  this.basicdata.end.y = e.clientY  }  this.temporaryData.tracking = true  this.temporaryData.animation = false }, touchmove (e) {  // 记录滑动位置  if (this.temporaryData.tracking && !this.temporaryData.animation) {  if (e.type === 'touchmove') {   this.basicdata.end.x = e.targetTouches[0].clientX   this.basicdata.end.y = e.targetTouches[0].clientY  } else {   this.basicdata.end.x = e.clientX   this.basicdata.end.y = e.clientY  }  // 计算滑动值  this.temporaryData.poswidth = this.basicdata.end.x - this.basicdata.start.x  this.temporaryData.posheight = this.basicdata.end.y - this.basicdata.start.y  } }, touchend (e) {  this.temporaryData.tracking = false  this.temporaryData.animation = true  // 滑动结束,触发判断  // 简单判断滑动宽度超出100像素时触发滑出  if (Math.abs(this.temporaryData.poswidth) >= 100) {  // 最终位移简单设定为x轴200像素的偏移  let ratio = Math.abs(this.temporaryData.posheight / this.temporaryData.poswidth)  this.temporaryData.poswidth = this.temporaryData.poswidth >= 0 ? this.temporaryData.poswidth + 200 : this.temporaryData.poswidth - 200  this.temporaryData.posheight = this.temporaryData.posheight >= 0 ? Math.abs(this.temporaryData.poswidth * ratio) : -Math.abs(this.temporaryData.poswidth * ratio)  this.temporaryData.opacity = 0  this.temporaryData.swipe = true  // 记录最终滑动距离  this.temporaryData.lastPosWidth = this.temporaryData.poswidth  this.temporaryData.lastPosHeight = this.temporaryData.posheight  // currentPage+1 引发排序变化  this.basicdata.currentPage += 1  // currentPage切换,整体dom进行变化,把第一层滑动置零  this.$nextTick(() => {   this.temporaryData.poswidth = 0   this.temporaryData.posheight = 0   this.temporaryData.opacity = 1  })  // 不满足条件则滑入  } else {  this.temporaryData.poswidth = 0  this.temporaryData.posheight = 0  this.temporaryData.swipe = false  } }, onTransitionEnd (index) {  // dom发生变化后,正在执行的动画滑动序列已经变为上一层  if (this.temporaryData.swipe && index === this.basicdata.currentPage - 1) {  this.temporaryData.animation = true  this.temporaryData.lastPosWidth = 0  this.temporaryData.lastPosHeight = 0  this.temporaryData.swipe = false  } }, // 非首页样式切换 transform (index) {  if (index > this.basicdata.currentPage) {  let style = {}  let visible = 3  let perIndex = index - this.basicdata.currentPage  // visible可见数量前滑块的样式  if (index <= this.basicdata.currentPage + visible - 1) {   style['opacity'] = '1'   style['transform'] = 'translate3D(0,0,' + -1 * perIndex * 60 + 'px' + ')'   style['zIndex'] = visible - index + this.basicdata.currentPage   style['transitionTimingFunction'] = 'ease'   style['transitionDuration'] = 300 + 'ms'  } else {   style['zIndex'] = '-1'   style['transform'] = 'translate3D(0,0,' + -1 * visible * 60 + 'px' + ')'  }  return style  // 已滑动模块释放后  } else if (index === this.basicdata.currentPage - 1) {  let style = {}  // 继续执行动画  style['transform'] = 'translate3D(' + this.temporaryData.lastPosWidth + 'px' + ',' + this.temporaryData.lastPosHeight + 'px' + ',0px)'  style['opacity'] = '0'  style['zIndex'] = '-1'  style['transitionTimingFunction'] = 'ease'  style['transitionDuration'] = 300 + 'ms'  return style  } }, // 首页样式切换 transformIndex (index) {  // 处理3D效果  if (index === this.basicdata.currentPage) {  let style = {}  style['transform'] = 'translate3D(' + this.temporaryData.poswidth + 'px' + ',' + this.temporaryData.posheight + 'px' + ',0px)'  style['opacity'] = this.temporaryData.opacity  style['zIndex'] = 10  if (this.temporaryData.animation) {   style['transitionTimingFunction'] = 'ease'   style['transitionDuration'] = 300 + 'ms'  }  return style  } } }}</script>

效果

vue怎么实现探探滑动堆叠组件 

堆叠滑动效果已经出来了,但是探探在体验上,还增加了触碰角度偏移,以及判定滑出面积比例

角度偏移的原理,是在用户每次进行touch时,记录用户触碰位置,计算出最大的偏移角度,在滑动出现位移时,线性增加角度以至最大的偏移角度。

使用在stack中具体要做的是:

  • touchmove中计算出所需角度和方向

  • touchend及onTransitionEnd中将角度至零

判定滑出面积比例,主要通过偏移量计算出偏移面积,从而得到面积比例,完成判断。

Vue的优点

Vue具体轻量级框架、简单易学、双向数据绑定、组件化、数据和结构的分离、虚拟DOM、运行速度快等优势,Vue中页面使用的是局部刷新,不用每次跳转页面都要请求所有数据和dom,可以大大提升访问速度和用户体验。

感谢各位的阅读,以上就是“vue怎么实现探探滑动堆叠组件”的内容了,经过本文的学习后,相信大家对vue怎么实现探探滑动堆叠组件这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!

--结束END--

本文标题: vue怎么实现探探滑动堆叠组件

本文链接: https://www.lsjlt.com/news/346018.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • vue怎么实现探探滑动堆叠组件
    这篇文章主要讲解了“vue怎么实现探探滑动堆叠组件”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“vue怎么实现探探滑动堆叠组件”吧!一. 功能分析简单使用下探探会发现,堆叠滑动的功能很简单,...
    99+
    2023-07-04
  • Android实现探探图片滑动效果
    之前一段时间,在朋友的推荐下,玩了探探这一款软件,初玩的时候,就发现,这款软件与一般的社交软件如陌陌之类的大相径庭,让我耳目一新,特别是探探里关于图片滑动操作让人觉得非常新鲜。所以在下通过网上之前的前辈的经历加上自己的理解,也来涉涉水。下面...
    99+
    2023-05-31
    android 图片滑动 roi
  • vue怎么实现左右滑动选择日期组件
    今天小编给大家分享一下vue怎么实现左右滑动选择日期组件的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。效果图:1、安装day...
    99+
    2023-06-29
  • vue怎么实现垂直无限滑动日历组件
    这篇文章主要介绍“vue怎么实现垂直无限滑动日历组件”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“vue怎么实现垂直无限滑动日历组件”文章能帮助大家解决问题。效果组件verticalCalendar...
    99+
    2023-06-30
  • jquery插件怎么实现堆叠式菜单
    这篇文章主要介绍jquery插件怎么实现堆叠式菜单,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!jquery是什么jquery是一个简洁而快速的JavaScript库,它具有独特的链式语法和短小清晰的多功能接口、高效...
    99+
    2023-06-14
  • vue实现垂直无限滑动日历组件
    用vue做了一个垂直无限滑动日历,在这里记录一下实现。 效果 组件 verticalCalendar.vue <template>   <div ref="con...
    99+
    2024-04-02
  • vue中怎么实现一个拖拽进度条滑动组件
    这期内容当中小编将会给大家带来有关vue中怎么实现一个拖拽进度条滑动组件,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。调用组件如下:<slider :mi...
    99+
    2024-04-02
  • Vue无限滑动周选择日期的组件怎么实现
    今天小编给大家分享一下Vue无限滑动周选择日期的组件怎么实现的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。思路根据用户传入日...
    99+
    2023-07-04
  • echarts柱状堆叠图怎么实现
    本文小编为大家详细介绍“echarts柱状堆叠图怎么实现”,内容详细,步骤清晰,细节处理妥当,希望这篇“echarts柱状堆叠图怎么实现”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。问题描述: &nbs...
    99+
    2023-07-05
  • python+opencv怎么实现堆叠图片
    这篇文章主要讲解了“python+opencv怎么实现堆叠图片”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“python+opencv怎么实现堆叠图片”吧!代码如下:# impor...
    99+
    2023-06-30
  • vue+antd实现折叠与展开组件
    最近在写前台页面,遇到一个需求,如下:点击头部标题,如果有内容,则展开,否则不展开,其实就是展开与折叠的组件。效果图如下: 由于其它地方也需要实现这种功能,所以,需要封装成一个组件...
    99+
    2024-04-02
  • Vue可左右滑动按钮组组件怎么用
    这篇文章将为大家详细讲解有关Vue可左右滑动按钮组组件怎么用,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。具体内容如下左右两箭头控制按钮组左右移动,双击到最左或最右边,功能比较简单。如下所示<tem...
    99+
    2023-06-29
  • 怎么使用Vue插件实现滑动验证码
    这篇“怎么使用Vue插件实现滑动验证码”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“怎么使用Vue插件实现滑动验证码”文章吧...
    99+
    2023-07-04
  • vue怎么实现滑动验证条
    这篇文章主要介绍“vue怎么实现滑动验证条”,在日常操作中,相信很多人在vue怎么实现滑动验证条问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”vue怎么实现滑动验证条”的疑惑有所帮助!接下来,请跟着小编一起来...
    99+
    2023-06-29
  • vue怎么实现仿qq左滑置顶删除组件
    这篇文章主要讲解了“vue怎么实现仿qq左滑置顶删除组件”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“vue怎么实现仿qq左滑置顶删除组件”吧!效果图:HTML代码:主要的html代码:&l...
    99+
    2023-07-04
  • Android深入探究自定义View之嵌套滑动的实现
    本文主要探讨以下几个问题: 嵌套滑动设计目的 嵌套滑动的实现 嵌套滑动与事件分发机制 嵌套滑动设计目的 不知道大家有没有注意过淘宝APP首页的二级联动,滑...
    99+
    2024-04-02
  • vue怎么实现滑动解锁功能
    本文小编为大家详细介绍“vue怎么实现滑动解锁功能”,内容详细,步骤清晰,细节处理妥当,希望这篇“vue怎么实现滑动解锁功能”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。效果如下话不多说,直接上代码;<te...
    99+
    2023-06-29
  • vue怎么实现界面滑动效果
    本文小编为大家详细介绍“vue怎么实现界面滑动效果”,内容详细,步骤清晰,细节处理妥当,希望这篇“vue怎么实现界面滑动效果”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。项目需求...
    99+
    2024-04-02
  • Vue怎么实现双向滑动输入条
    这篇“Vue怎么实现双向滑动输入条”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Vue怎么实现双向滑动输入条”文章吧。效果图...
    99+
    2023-06-29
  • vue2.0如何实现移动端滑动事件vue-touch
    这篇文章主要介绍vue2.0如何实现移动端滑动事件vue-touch,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!Vue-touch的使用有时候我们不止需要有返回键,也要有手势滑动切...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作