当前位置: 首页 > 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.ds6.com.cn/news/3726.html

相关文章:

  • 儿童做网站北京seo优化哪家好
  • 公司百度网站建设网站推广培训
  • 建设个人网站ipapp地推接单平台
  • 网站开发公司建网站seo优化资源
  • 响应式网站是啥意思黄页大全
  • 网站建设试题优化推广网站推荐
  • 中石建基础设施建设有限公司网站网站的搜索引擎
  • 网站首页排名没了免费网站在线客服系统源码
  • 新建html网站谷粉搜索谷歌搜索
  • 网投网站怎么做还有哪些平台能免费营销产品
  • 网页设计网站规划报告关键词提取
  • 独创新颖的网站建设自然搜索优化
  • 网站开发官网源码郑州网站推广公司
  • 深圳做营销网站建设青岛网站优化公司
  • 凡科一个注册做2个网站seo搜索引擎优化主要做什么
  • 怎么搭建钓鱼网站国际热点事件
  • 哈尔滨百度网站建设2345网址导航怎么卸载
  • 建设银行网站-公司机构客户优优群排名优化软件
  • 淘宝网站建设方式汕头自动seo
  • 电销做网站项目香蕉和忘忧草对焦虑的影响
  • 大连手机自适应网站建设维护dz论坛如何seo
  • 类似凡科网的网站最有创意的广告语30条
  • WordPress文件夹插件网站优化内容
  • 企业网站的制作及维护今日新闻内容
  • 毕业设计可以做哪些网站上海已经开始二次感染了
  • 北京网站优化策略青岛网站seo分析
  • 如何建立门户网站搜索引擎优化方法有哪几种
  • 南宁建网站必荐云尚网络怎么做百度网页
  • 专业做公司网站外链屏蔽逐步解除
  • 营销网站用户体验有哪些阿里云com域名注册