返回顶部
首页 > 资讯 > 移动开发 >uniapp左滑列表删除
  • 888
分享到

uniapp左滑列表删除

uni-appuniapp左滑列表删除 2023-10-12 18:10:58 888人浏览 安东尼
摘要

目录 效果index.vuedelSlideLeft.vuedelRightIconfont.css参考插件最后 效果 index.Vue 使用页面 引入封装的页面delSlideL

目录

效果

请添加图片描述

index.Vue

使用页面
引入封装的页面delSlideLeft.vue

<template><view class=""><view v-for="(item, index) in busOrderList" :key="index" :data-index="index"><delSlideLeft :item="item" :data_transit="{ index: index, item: item }" @delItem="delItem"><view class="editItem">列表展示内容view>delSlideLeft>view>view>template><script>// 引入封装的页面import delSlideLeft from "@/components/delSlideLeft.vue";export default {components: {delSlideLeft}}script><style>style>

delSlideLeft.vue

引入delRightIconfont.CSS组件

<template><view><view class="box-slideLeft"><view class="touch-item touch-slideLeft" @touchstart="touchS" @touchmove="touchM" @touchend="touchE":style="item_show.txtStyle"><slot />view><view class="touch-item del-box-touch-slideLeft cf-shuCenter" @click="delItem(item_show)">删除view>view>view>template><script>export default {components: {},props: {data_transit: {type: Object,default () {return {};}},//可不传参item: {type: Object,default () {return {};}}},computed: {},data() {return {item_show: {},delBtnWidth: 60, //删除按钮宽度单位(rpx)startX: ''};},created: function() {//专门处理检查对象中,某字段是否存在的,如果存在返回 true 不存在返回 falselet that = this;let item = that.item;if (!item.hasOwnProperty('txtStyle')) {this.$set(this.item, 'txtStyle', ''); //不需要初始化了}this.item_show = this.item;},watch: {item(e) {this.item_show = e;}},methods: {//点击删除按钮事件delItem: function(e) {let that = this;let data = {item: e,data: that.data_transit};this.$emit('delItem', data);},touchS: function(e) {let that = this;if (e.touches.length == 1) {//设置触摸起始点水平方向位置this.startX = e.touches[0].clientX;}},touchM: function(e) {let that = this;if (e.touches.length == 1) {//手指移动时水平方向位置var moveX = e.touches[0].clientX;//手指起始点位置与移动期间的差值var disX = this.startX - moveX;var delBtnWidth = this.delBtnWidth;var txtStyle = '';if (disX == 0 || disX < 0) {//如果移动距离小于等于0,说明向右滑动,文本层位置不变txtStyle = 'left:0px';} else if (disX > 0) {//移动距离大于0,文本层left值等于手指移动距离txtStyle = 'left:-' + disX + 'px';if (disX >= delBtnWidth) {//控制手指移动距离最大值为删除按钮的宽度txtStyle = 'left:-' + delBtnWidth + 'px';}}//获取手指触摸的是哪一项that.item_show.txtStyle = txtStyle;}},touchE: function(e) {let that = this;if (e.changedTouches.length == 1) {//手指移动结束后水平位置var endX = e.changedTouches[0].clientX;//触摸开始与结束,手指移动的距离var disX = this.startX - endX;var delBtnWidth = this.delBtnWidth;//如果距离小于删除按钮的1/2,不显示删除按钮var txtStyle = disX > delBtnWidth / 2 ? 'left:-' + delBtnWidth + 'px' : 'left:0px';//获取手指触摸的是哪一项that.item_show.txtStyle = txtStyle;}}}};script><style lang="scss">@import '/common/delRightIconfont.css'; //便于有删除图标.box-slideLeft {view {box-sizing: border-box;}position: relative;overflow: hidden;.touch-item {position: absolute;top: 4rpx;padding: 10px 10px 10px;background-color: #ffffff;// border-radius: 10px;overflow: hidden;}// 左边内容区域.touch-slideLeft {position: relative;// width: 100%;z-index: 5;transition: left 0.2s ease-in-out;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 714rpx;height: 265rpx;// margin: 28rpx;box-sizing: border-box;border: 1rpx solid red;margin: 28rpx auto;border-radius: 16rpx;}// 右边删除按钮.del-box-touch-slideLeft {right: 20rpx;float: left;top: 30rpx;width: 59px;height: 82%;line-height: 101px;background-color: #F02B34;border-radius: 16rpx;color: #FFFFFF;font-size: 28rpx;text-align: center;font-family: Microsoft YaHei-Regular, Microsoft YaHei;}.icon-shanchu {font-size: 44upx;}.cf-shuCenter {display: flex;flex-direction: column;justify-content: center;align-items: center;margin-top: 2rpx;}}style>

delRightIconfont.css

引入delRightIconfont.css组件

@font-face {font-family: "iconfont";  src: url('//at.alicdn.com/t/font_1948714_o615zwc843k.eot?t=1616746789802');   src: url('//at.alicdn.com/t/font_1948714_o615zwc843k.eot?t=1616746789802#iefix') fORMat('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MWguAlNi0pdfgxiLyQPsynfpdaOG4OZuI1gPWaF6zYpSOt0YOI/7ZRxPXb/8BCERi9YIOT7f+AvQG+PKNucJMgt9oJNVhXtyDnWBhRMwzuHmPNYw1YiDdTWb+X3FoVgPOqBBDWK0XUzsql9WK9ONNF9Wg8XV62/VsBI6ERmcwWb9h/z5tDpfHlxVV0w3Tsh3X84MwipM0y4uyqpu264dxmpd124/zup/3+w00RhwiKtM216doiQ76vkTLHVraCjsP5XWILEfIl4u5DmKpxCWxzfUQ4RRsmCwAhUp4oTypPgRXD6I0yyAsM5glF+Wq4R6UhYXlpbg421qULlhStro5mA1PkSnoPaDFfTViA5dHljD3iz2hfg42fyotO6F8xGixb5dyEaLgc9ZtVGPuJHJCAl/OPaaUdUhh64deHxW0wUMJuM8CTaKsmiKkWB/V+4ZPc1D0IW6BHmzVXOIB1NpnrmocxJIeIyqsEUn9wdQBJVjUCaHsrEtbVXdcN4Uo7GUvIWwUOtFVCjjzuiod8vg9bdJwY+lRehJWheW+c5wSuBHTSpd3leUjrTCJoW4SbiFPSKBexcP9KDr2xkETeVZPxPlM6RMe4ZjmV6V12+s9VzCf+CH3QhVSuIrcgEbaUCQDSuEqUVzIiTMAAA==') format('woff2'),  url('//at.alicdn.com/t/font_1948714_o615zwc843k.woff?t=1616746789802') format('woff'),  url('//at.alicdn.com/t/font_1948714_o615zwc843k.ttf?t=1616746789802') format('truetype'),   url('//at.alicdn.com/t/font_1948714_o615zwc843k.svg?t=1616746789802#iconfont') format('svg'); } .iconfont {  font-family: "iconfont" !important;  font-size: 16px;  font-style: normal;  -WEBkit-font-smoothing: antialiased;  -moz-osx-font-smoothing: grayscale;} .icon-tishi:before {  content: "\e61b";} .icon-tishi1:before {  content: "\e65e";} .icon-zhanshi:before {  content: "\e6b3";} .icon-biaoqiankuozhan_shouye-321:before {  content: "\ebb2";} .icon-guanbi3:before {  content: "\e606";} .icon-guanbi1:before {  content: "\e61a";} .icon-shezhi1:before {  content: "\e617";} .icon-gengduo2:before {  content: "\e736";} .icon-guanbi:before {  content: "\e613";} .icon-xiaoxi1:before {  content: "\e616";} .icon-sousuo1:before {  content: "\e66d";} .icon-shanchu:before {  content: "\e615";} .icon-more:before {  content: "\e60a";} .icon-shang3:before {  content: "\e689";} .icon-xia:before {  content: "\e65b";} .icon-kaiguan3:before {  content: "\e6da";} .icon-kaiguan4:before {  content: "\e6db";} .icon-xuanzhong:before {  content: "\e607";} .icon-weixuan:before {  content: "\e65d";} .icon-time:before {  content: "\e619";} .icon-you:before {  content: "\e600";} .icon-shuazi:before {  content: "\e62a";} .icon-shuazi1:before {  content: "\e610";} .icon-baocun-tianchong:before {  content: "\e82b";} .icon-chehui:before {  content: "\e66b";} .icon-bianji-cuxiantiao-fill:before {  content: "\e69e";} .icon-qingkong:before {  content: "\e629";} .icon-yanse:before {  content: "\e886";} .icon-beiwanglushili:before {  content: "\e612";} .icon-shijian:before {  content: "\e631";} .icon-icon-eye-open:before {  content: "\e60c";} .icon-icon-eye-close:before {  content: "\e60f";} .icon-icon-1:before {  content: "\e6e0";} .icon-jisuan:before {  content: "\e643";} .icon-tongji1:before {  content: "\e61d";} .icon-shezhi:before {  content: "\e654";} .icon-xiugai:before {  content: "\e698";} .icon-liebiao:before {  content: "\e611";} .icon-add:before {  content: "\e604";} .icon-shenghuofuwu:before {  content: "\e681";} .icon-jingqu:before {  content: "\e61e";} .icon-dianhua:before {  content: "\e76a";} .icon-xiaoxi:before {  content: "\e79c";} .icon-zhoumomanmanzuo:before {  content: "\e7d5";} .icon-sousuo:before {  content: "\e62c";} .icon-collection-b:before {  content: "\e60d";} .icon-daohangdizhi:before {  content: "\e65f";} .icon-like-line:before {  content: "\e634";} .icon-like-s:before {  content: "\e635";} .icon-tubiaozhizuo-:before {  content: "\e605";} .icon-shoucang:before {  content: "\e6a7";} .icon-ziyuan1:before {  content: "\e618";} .icon-back:before {  content: "\e602";} .icon-wode1:before {  content: "\e658";} .icon-fs-funding:before {  content: "\e60e";} .icon-home:before {  content: "\e63f";} .icon-gupiao:before {  content: "\e614";} .icon-xiangzuo:before {  content: "\e6b0";} .icon-xiangyou:before {  content: "\e65a";}

参考

大佬

插件

uniapp插件市场也有
地址

最后

感觉文章好的话记得点个心心和关注和收藏,有错的地方麻烦指正一下,如果需要转载,请标明出处,多谢!!!

来源地址:https://blog.csdn.net/m0_49714202/article/details/133794495

--结束END--

本文标题: uniapp左滑列表删除

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

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

猜你喜欢
  • uniapp左滑列表删除
    目录 效果index.vuedelSlideLeft.vuedelRightIconfont.css参考插件最后 效果 index.vue 使用页面 引入封装的页面delSlideL...
    99+
    2023-10-12
    uni-app uniapp左滑列表删除
  • Android仿QQ列表左滑删除操作
    最近学习了如何做一个像QQ的左滑RecyclerView的item显示选项的,主要是用到Scroller 我们首先新建一个自己的RecyclerView 定义好一些要用的的变量...
    99+
    2022-06-06
    Android
  • Android自定义view实现列表内左滑删除Item
    目录前言需求运行效果编写代码主要问题动态生成TextView将TextView对齐到当前容器右端滑动出界问题滑动开始判定后续订正前言 上一篇文章自定义了一个左滑删除的Recycler...
    99+
    2023-02-09
    Android列表内左滑删除Item Android自定义view左滑删除Item
  • uniapp开发小程序-显示左滑删除效果
    一、效果图: 二、代码实现: 文件名:{{item.name}}打印页数:{{item.pages}}选规格export default {data() {return {myorderList: ...
    99+
    2023-09-08
    uni-app 小程序 数学建模
  • 微信小程序实现列表项左滑删除效果
    本文实例为大家分享了微信小程序实现列表项左滑删除效果的具体代码,供大家参考,具体内容如下 效果 图片 WXML <view class="container">...
    99+
    2024-04-02
  • 微信小程序uniapp实现左滑删除效果(完整代码)
    微信小程序uniapp实现左滑删除效果 实现效果 1,列表中侧滑删除 2,删除不同时存在 3,上下滑动与侧滑删除不影响 在本页面引入组件并使用 (文件在文章的最下方附上) 在需要...
    99+
    2024-04-02
  • Android仿微信列表滑动删除 如何实现滑动列表SwipeListView
    接上一篇,本篇主要讲如何实现滑动列表SwipeListView。 上篇完成了滑动控件SwipeItemView,这个控件是一个自定义的ViewGroup,作为列表的一个ite...
    99+
    2022-06-06
    列表 Android
  • Android仿QQ列表滑动删除操作
    这篇山寨一个新版QQ的列表滑动删除,上篇有说到QQ的滑动删除,推测原理就是ListView本身每个item存在一个Button,只不过普通的状态下隐藏掉了,检测到向左的滑动事件...
    99+
    2022-06-06
    Android
  • 如何用javascript实现左滑删除
    这篇文章主要讲解了“如何用javascript实现左滑删除”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“如何用javascript实现左滑删除”吧! ...
    99+
    2024-04-02
  • Android Recyclerview实现左滑删除功能
    本文实例为大家分享了Android Recyclerview实现左滑删除的具体代码,供大家参考,具体内容如下 1.先创建一个工具类 SlideRecyclerView public...
    99+
    2024-04-02
  • vue2如何实现左滑删除功能
    这篇文章主要介绍vue2如何实现左滑删除功能,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!左滑删除,很多UI框架里有,比如Mint-UI, Muse-UI等,一开始我们就是用的这两个...
    99+
    2024-04-02
  • Android 实现左滑出现删除选项
    滑动删除的部分主要包含两个部分, 一个是内容区域(用于放置正常显示的view),另一个是操作区域(用于放置删除按钮)。默认情况下,操作区域是不显示的,内容区域的大小是填充整个容 器,操作区域始终位于内容区域的右面。当开始滑动的时候,整个容器...
    99+
    2023-05-31
    android 左滑 删除
  • vue怎么实现左滑删除功能
    本篇内容介绍了“vue怎么实现左滑删除功能”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!左滑删除,很多UI框架里有,比如Mint-UI, M...
    99+
    2023-07-04
  • uniapp怎么实现侧滑删除功能
    近年来,移动应用程序的用户体验已经成为了设计师和开发者越来越重视的领域。使用流畅、易于操作的界面成为应用程序赢得用户青睐的关键所在。侧滑删除作为用户体验的一部分,可以使应用程序的操作更加方便,使用户更快速地找到需要的内容,因此在各种应用程序...
    99+
    2023-05-14
  • Android仿微信列表滑动删除之可滑动控件(一)
    这次是列表滑动删除的第三波,仿微信的列表滑动删除。先上个效果图:   前面的文章里面说过开源框架SwipeListView的实现原理是每个列表item中包...
    99+
    2022-06-06
    列表 Android
  • Android仿QQ左滑删除置顶ListView操作
    最近闲来无事,于是研究了一下qq的左滑删除效果,尝试着实现了一下,先上效果图: 大致思路原理: - 通过设置margin实现菜单的显示与隐藏 - 监听onTouchEve...
    99+
    2022-06-06
    listview Android
  • Android仿微信对话列表滑动删除效果
    微信对话列表滑动删除效果很不错的,借鉴了github上SwipeListView(项目地址:https://github.com/likebamboo/SwipeListVie...
    99+
    2022-06-06
    列表 Android
  • Android实现ListView左右滑动删除和编辑
    有时候,为了实现项目中的需求,完成设计好的用户交互体验,不的不把这些View重新改造成自己想要的效果。 Android原生的ListView是不支持左右滑动的,但是看到微信电话...
    99+
    2022-06-06
    listview Android
  • Android高仿微信对话列表滑动删除效果
    前言  用过微信的都知道,微信对话列表滑动删除效果是很不错的,这个效果我们也可以有。思路其实很简单,弄个ListView,然后里面的每个item做成一个可以滑动的自...
    99+
    2022-06-06
    仿微信 列表 Android
  • 使用vue怎么实现左滑编辑与删除
    使用vue怎么实现左滑编辑与删除?相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。安装   vue-touch npm insta...
    99+
    2023-06-15
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作