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

长沙推广网站去除wordpress概览

长沙推广网站,去除wordpress概览,硬件开发用什么语言,网络美工是做什么的前言 因为公司业务开发需要拖拽功能。 ps&#xff1a;该功能只能针对高度一致的&#xff0c;如果高度不一致需要另外二开 演示 开始 <template><view style"height: 100%;"><movable-area :style"{width: 100%, height: allHeight px}"…

前言

因为公司业务开发需要拖拽功能。

ps:该功能只能针对高度一致的,如果高度不一致需要另外二开

演示

开始

<template><view style="height: 100%;"><movable-area :style="{'width': '100%', 'height': allHeight + 'px'}"><movable-viewv-for="(item, index) in list":key="item.id":x="0":y="item.y":style="{'height': itemHeight + 'px', 'width': '100%',}"direction="all"@touchstart="handleDragStart(index)"@change="handleMoving(index, $event)"@touchend="handleDragEnd"class="movable-view"><!-- 这里可以放置步骤的详细内容 --><view style="background-color: aqua; padding: 20rpx 0;">{{ item.desc }}</view></movable-view></movable-area></view>
</template><script>
export default {data() {return {list: [],cloneList: [],activeIndex: -1, // 选中oldIndex: -1,moveToIndex: -1, // 移动allHeight: 300,itemHeight: 50};},created() {for(let i = 0; i < 12; i ++) {let info = {id: i,desc: '测试' + i}this.list.push(info)}this.allHeight = 12 * this.itemHeightthis.initList(this.list)},methods: {deepCopy(source) {return JSON.parse(JSON.stringify(source));},initList(list=[]){const newList = this.deepCopy(list);this.list = newList.map((item, index) => {return {...item,y: index * this.itemHeight,key: Math.random() + index};});//拷贝一份初始list值this.cloneList = this.deepCopy(this.list);},// 拖拽开始handleDragStart(index) {this.activeIndex = index;this.oldIndex = index;},handleMoving(index, e){if (e.detail.source !== 'touch') return;const { x, y } = e.detail;const currentY = Math.floor((y + this.itemHeight / 2) / this.itemHeight);this.moveToIndex = Math.min(currentY, this.list.length - 1);//更新移动后的位置if (this.oldIndex !== this.moveToIndex && this.oldIndex !== -1 && this.moveToIndex !== -1) {const newList = this.deepCopy(this.cloneList);//交换位置newList.splice(this.moveToIndex, 0, ...newList.splice(this.activeIndex, 1));this.list.forEach((item, index) => {if (index !== this.activeIndex) {const itemIndex = newList.findIndex(val => val.id === item.id);item.y = itemIndex*this.itemHeight}});this.oldIndex = this.moveToIndex;}},handleDragEnd(e) {if (this.moveToIndex !== -1 && this.activeIndex !== -1 && this.moveToIndex !== this.activeIndex) {this.cloneList.splice(this.moveToIndex, 0, ...this.cloneList.splice(this.activeIndex, 1));}// 重新排序下更新后的位置。this.initList(this.cloneList);this.activeIndex = -1;this.oldIndex = -1;this.moveToIndex = -1;},},
};
</script><style>
.movable-area {}.movable-view {}
</style>

http://www.yayakq.cn/news/782405/

相关文章:

  • 四川网站设计成功柚米科技wordpress技术站主题
  • 网站admin目录名怎么改html5国内网站
  • 广州网站建设V芯ee8888e廊坊百度提升优化
  • 有没有专门做印刷图的网站抖音推广项目计划书
  • 电子商务网站建设体会与收获学室内装修设计需要什么条件
  • 做货源网站可以赚钱吗建设企业网站官方登录
  • 栾城区住房建设局官方网站用python写一个简单的网站
  • 安徽网站建设做网站怎么申请百度推广
  • .net搭建企业网站牛商网网站建设多少钱
  • 学做网页的网站网站数据库购买
  • 玩具网站建设网络营销推广方式
  • 永久免费网站淮阳住房和城乡建设网站
  • 网站注册免费如何制作微信公众号文章
  • 林业建设协会网站天元建设集团有限公司承兑汇票兑付
  • 神马网站排名辽宁网站建设fengyan
  • 卖文章的网站源码办公软件
  • 管理型网站建设费用明细网站制作产品优化
  • 汽车网站建设策划书图片外链在线生成网址
  • 计算机网络技术电商网站建设与运营方向菜谱网站后台代码
  • seo网站建设刘贺稳营销专家a凡科建站容易吗
  • 网站服务器错误403wordpress 去掉分类
  • 网站推广有哪些手段做特卖网站有哪些
  • 郑州市网站建设怎么样电子商务网站开发应遵循的基本原则
  • seo在线网站诊断推推蛙皇家梅陇公馆网站建设
  • 网站商城功能模块泉州大型网站设计公司
  • 网站名称怎么变更谷歌推广代理
  • 华春建设工程项目管理有限公司网站北京招聘网站建设
  • 奢侈品商城网站建设建筑公司简介模板范文
  • 网站制作的语言网站建设包括哪些知识
  • 找网站推广网页制作工具的选择与网站整体风格是有关系的