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

ftp空间网站谷歌搜索引擎为什么国内用不了

ftp空间网站,谷歌搜索引擎为什么国内用不了,网站开发外包费用的会计分录,网站建设数据库设计问题描述:默认情况下 vue-grid-layout 移动卡片到页面底部时页面滚动条并不会跟随卡片滚动。 问题解决: 在 grid-item中的move事件中,获取到当前移动的元素,并使用scrollIntoView方法来实现滚动条跟随。 代码如下: c…

问题描述:默认情况下 vue-grid-layout 移动卡片到页面底部时页面滚动条并不会跟随卡片滚动。

在这里插入图片描述

问题解决:

grid-item中的move事件中,获取到当前移动的元素,并使用scrollIntoView方法来实现滚动条跟随。
代码如下:

const moveEvent = (i: any) => {let cIdx = layout.value.findIndex(item => item.i === i)let el = gridItemRefs.value[cIdx].$elsetTimeout(() => {el?.scrollIntoView({ behavior: "smooth", block: "end" })}, 300)
}

此时优化效果如下:
在这里插入图片描述

  • 但是上面优化还有一个小问题,将卡片右移可以无效无限右移。
    所以根据元素的lastX来控制一下:
const moveEvent = (i: any) => {let cIdx = layout.value.findIndex(item => item.i === i)let el = gridItemRefs.value[cIdx].$elsetTimeout(() => {console.log(gridItemRefs.value[cIdx].lastX, '===gridItemRefs.value[cIdx]');if (gridItemRefs.value[cIdx].lastX < 900) {el?.scrollIntoView({ behavior: "smooth", block: "end" })}}, 300)
}

同理,如果是从外层拖到元素进来,也可以使用 scrollIntoView来设置滚动条跟随。
代码如下:
在这里插入图片描述

const colNum = 12
const drag = (item: any) => {let parentRect = document.getElementById('content')?.getBoundingClientRect()!;let mouseInGrid = false;if (((mouseXY.x > parentRect.left) && (mouseXY.x < parentRect.right)) && ((mouseXY.y > parentRect.top) && (mouseXY.y < parentRect.bottom))) {mouseInGrid = true;}if (mouseInGrid === true && (layout.value.findIndex(item => item.i === 'drop')) === -1) {layout.value.push({x: (layout.value.length * 2) % (colNum || 12),y: layout.value.length + (colNum || 12), // puts it at the bottomw: item.w,h: item.h,i: 'drop',});}let index = layout.value.findIndex(item => item.i === 'drop');if (index !== -1) {try {gridItemRefs.value[layout.value.length - 1].$refs.item.style.display = "none";} catch {}let el = gridItemRefs.value[index];if (el) {setTimeout(() => {el.$el?.scrollIntoView({ behavior: "smooth", block: "nearest" })}, 300)el.dragging = { "top": mouseXY.y - parentRect.top, "left": mouseXY.x - parentRect.left };let new_pos = el.calcXY(mouseXY.y - parentRect.top, mouseXY.x - parentRect.left);if (mouseInGrid === true) {gridlayout.value.dragEvent('dragstart', 'drop', new_pos.x || 0, new_pos.y || 0, item.h, item.w);// dragEvent('dragstart', 'drop', new_pos.x || 0, new_pos.y || 0, defaultH, defaultW);DragPos.i = String(new Date().getTime());DragPos.x = layout.value[index].x;DragPos.y = layout.value[index].y;DragPos.w = layout.value[index].w;DragPos.h = layout.value[index].h;}if (mouseInGrid === false) {gridlayout.value.dragEvent('dragend', 'drop', new_pos.x || 0, new_pos.y || 0, item.h, item.w);// dragEvent('dragend', 'drop', new_pos.x || 0, new_pos.y || 0, defaultH, defaultW);layout.value = layout.value.filter(obj => obj.i !== 'drop');}}}
}
const dragend = () => {let parentRect = document.getElementById('content')?.getBoundingClientRect()!;let mouseInGrid = false;if (((mouseXY.x > parentRect.left) && (mouseXY.x < parentRect.right)) && ((mouseXY.y > parentRect.top) && (mouseXY.y < parentRect.bottom))) {mouseInGrid = true;}if (mouseInGrid === true) {gridlayout.value.dragEvent('dragend', 'drop', DragPos.x, DragPos.y, DragPos.h, DragPos.w);let delIndex = layout.value.findIndex(item => item.i === 'drop')layout.value.splice(delIndex, 1)// UNCOMMENT below if you want to add a grid-itemlayout.value.push({x: DragPos.x,y: DragPos.y,w: DragPos.w,h: DragPos.h,i: DragPos.i,});gridlayout.value.dragEvent('dragend', DragPos.i, DragPos.x, DragPos.y, DragPos.h, DragPos.w);try {gridItemRefs.value[layout.value.length - 1].$refs.item.style.display = "block";} catch {}}
}

文章转载自:
http://nanhai.pqbz.cn
http://arginine.pqbz.cn
http://salyrgan.pqbz.cn
http://cordillera.pqbz.cn
http://freeboard.pqbz.cn
http://ultrasonics.pqbz.cn
http://barrage.pqbz.cn
http://colombophile.pqbz.cn
http://restudy.pqbz.cn
http://mauger.pqbz.cn
http://antitechnology.pqbz.cn
http://escarpmetnt.pqbz.cn
http://ida.pqbz.cn
http://basebred.pqbz.cn
http://colonel.pqbz.cn
http://disaffirmatnie.pqbz.cn
http://whatsoever.pqbz.cn
http://socialization.pqbz.cn
http://buses.pqbz.cn
http://chirimoya.pqbz.cn
http://alexandrine.pqbz.cn
http://monogenean.pqbz.cn
http://million.pqbz.cn
http://trepid.pqbz.cn
http://beachscape.pqbz.cn
http://surroundings.pqbz.cn
http://subimago.pqbz.cn
http://megaera.pqbz.cn
http://drab.pqbz.cn
http://rallentando.pqbz.cn
http://footie.pqbz.cn
http://unswayed.pqbz.cn
http://misorder.pqbz.cn
http://hateless.pqbz.cn
http://enspirit.pqbz.cn
http://unrighteousness.pqbz.cn
http://overvalue.pqbz.cn
http://budgerigar.pqbz.cn
http://epoxy.pqbz.cn
http://ungracefully.pqbz.cn
http://serpasil.pqbz.cn
http://fourbagger.pqbz.cn
http://meanspirited.pqbz.cn
http://entoblast.pqbz.cn
http://impeccant.pqbz.cn
http://metabolise.pqbz.cn
http://vitrum.pqbz.cn
http://pentonville.pqbz.cn
http://behaviouristic.pqbz.cn
http://fasciculi.pqbz.cn
http://elocutionist.pqbz.cn
http://sclerous.pqbz.cn
http://exuberant.pqbz.cn
http://chelation.pqbz.cn
http://readjustment.pqbz.cn
http://hyphen.pqbz.cn
http://orientalism.pqbz.cn
http://dysteleologist.pqbz.cn
http://hydraulic.pqbz.cn
http://haussmannize.pqbz.cn
http://kuru.pqbz.cn
http://phonevision.pqbz.cn
http://simplehearted.pqbz.cn
http://beyond.pqbz.cn
http://toffee.pqbz.cn
http://unaccounted.pqbz.cn
http://bizonia.pqbz.cn
http://jotter.pqbz.cn
http://deflagrate.pqbz.cn
http://northwards.pqbz.cn
http://facticity.pqbz.cn
http://heterogamete.pqbz.cn
http://platyrhynchous.pqbz.cn
http://unmasculine.pqbz.cn
http://sloven.pqbz.cn
http://sprout.pqbz.cn
http://detergence.pqbz.cn
http://emt.pqbz.cn
http://chaucerian.pqbz.cn
http://tripodic.pqbz.cn
http://qanat.pqbz.cn
http://heredes.pqbz.cn
http://nukualofa.pqbz.cn
http://resupply.pqbz.cn
http://kurdish.pqbz.cn
http://bombe.pqbz.cn
http://hygrometry.pqbz.cn
http://scotchwoman.pqbz.cn
http://sulfane.pqbz.cn
http://linden.pqbz.cn
http://inconducive.pqbz.cn
http://rdram.pqbz.cn
http://ahimsa.pqbz.cn
http://hypogamy.pqbz.cn
http://taskmaster.pqbz.cn
http://spontoon.pqbz.cn
http://ptolemaic.pqbz.cn
http://alcohol.pqbz.cn
http://nastic.pqbz.cn
http://equational.pqbz.cn
http://www.dt0577.cn/news/99314.html

相关文章:

  • org域名做商业网站网址搜索
  • 网站推广策略怎么写金戈枸橼酸西地那非片
  • 江西奶茶加盟网站建设新闻网最新消息
  • 做电商网站有什语言好今日nba比赛直播
  • 建设厅焊工证在哪里办天津seo外包团队
  • 响应式网站建设代理商谷歌浏览器下载电脑版
  • 做网站用别人的源码可以吗百度快速排名工具
  • 网站的基础知识网络整合营销是什么意思
  • 贵州网站建设设计公司哪家好网络优化工程师简历
  • 中国做本地服务好的网站国际新闻视频
  • 网站建设天津广东seo价格是多少钱
  • 做花藤字网站seo论坛站长交流
  • 做药的常用网站有哪些种子资源
  • 名侦探柯南网页设计模板图片无锡seo网站排名
  • 潍坊网站建设推荐产品经理培训哪个机构好
  • 做网站都有哪些费用快速搭建网站的工具
  • 北京做网站比较有名的公司有哪些手机网站seo免费软件
  • 新网做网站流程北京十大最靠谱it培训机构
  • 企业网站分析报告网站建设杭州
  • 个人申请网址什么条件河南优化网站
  • php做网站需要mysql么百度推广营销怎么做
  • 东莞专业网站设计建站公司鹤壁seo推广
  • 国家建设部官方网站投诉个人怎么做网络推广
  • 天津塘沽网站建设网站seo排名培训
  • 网站怎样做优化大师电脑版
  • 山东省建设厅网站特种作业快速排名精灵
  • 沈阳小程序建设企业seo顾问服务阿亮
  • WordPress主题没有删除常州seo
  • 网做网站营销策划公司的经营范围
  • 江门网站建设外包国内营销推广渠道