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

俄罗斯网站制作网站权重等级

俄罗斯网站制作,网站权重等级,昆山企业网站建设公司,傻瓜一键自助建站系统前言 因为公司业务开发需要拖拽功能。 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.tj-hxxt.cn/news/91124.html

相关文章:

  • 网站空间不续费设计网站排行榜前十名
  • 做赌博网站常用的网络推广的方法有哪些
  • 动态网站建设优缺点国际站seo优化是什么意思
  • 网站设计需要什么软件成都网络推广外包公司哪家好
  • 深圳哪里网站制作新冠疫苗接种最新消息
  • 抖音代运营合同模板免费seo推广教程seo推广技巧
  • 做网站别名解析的目的是什么aso优化技巧
  • 公司内部自己做抽奖网站武汉网络关键词排名
  • 网页制作与设计ppt梅州seo
  • 中国建设委员会网站上网络推广外包公司排名
  • 网站怎么做百度快照百度推广怎么开户
  • 苏州建设网站制作专业的网站优化公司排名
  • 顺德网站建设公司有哪些杭州百度开户
  • 上海注册公司代理电话厦门seo招聘
  • 昆山建设企业网站sem公司
  • 做标书网站seo网站关键词排名优化公司
  • 搜房网网站跳出率今日热点新闻事件及评论
  • 做门窗的建网站怎么赚钱百度app官网
  • 网站群建设方案seo优化对网店的推广的作用为
  • wordpress 主题转换google搜索排名优化
  • 网站设计做微信发现界面输入关键词搜索
  • 做国际贸易如何建网站网站快速收录
  • 福州金山网站建设百度链接提交收录入口
  • 企业如何做好网站的seo优化线上卖护肤品营销方法
  • 上海啥情况简述seo和sem的区别与联系
  • 东莞网站优化如何站长工具收录
  • 南京网站建设小程序开发 雷仁网络营销型网站建设步骤
  • 单独做网站要学程序设计吗营销型网站有哪些
  • 接做网站私活推广宣传方式有哪些
  • 典当行 网站百度推广人联系方式