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

北京一家专门做会所的网站竞价账户托管公司哪家好

北京一家专门做会所的网站,竞价账户托管公司哪家好,学科建设的网站,wordpress pot 汉化由于Vue3文档缺失#xff0c;示例10也是也跑不起来#xff0c;这边参考示例改动了一下。 改动的点主要是this指向、$children相关的问题 在Vue3中移除了$children可以使用$ref替代 参考文章#xff1a;计算坐标方法重写、文档示例 关键点#xff1a;计算中的子组件取值使用…由于Vue3文档缺失示例10也是也跑不起来这边参考示例改动了一下。 改动的点主要是this指向、$children相关的问题 在Vue3中移除了$children可以使用$ref替代 参考文章计算坐标方法重写、文档示例 关键点计算中的子组件取值使用ref绑定即可 对于循环的Dom树可以参考模板引用 完整代码 templatediv classuser-canvas dragenter.prevent dragover.preventdiv idcontent classw-full pb-16grid-layoutclassmin-h-screenrefgridlayout:layout.syncgridConfig.layout:col-num60:row-height30:is-draggabledraggable gridConfig.configType ! 2:is-resizableresizable gridConfig.configType ! 2:vertical-compactfalse:use-css-transformstrue!-- grid-item classh-full relative z-50 :x0 :y2 :w12 :h2 is1--!-- /grid-item--grid-itemrefgridItemRefsv-foritem in gridConfig.layoutclassh-full select-none relative overflow-hidden:staticitem.static:xitem.x:yitem.y:witem.w:hitem.h:iitem.i:minW8:minH2div{{item.key}}/div/grid-item/grid-layout/div/div/templateimport { ref, onUnmounted } from vue// refconst gridlayout ref(null)const gridItemRefs ref([])// 计算坐标用let mouseXY { x: null, y: null }let DragPos { x: null, y: null, w: 4, h: 4, i: null }const gridConfig {layout:[{x: 0,y: 3,w: 4,h: 12,i: 1,static: true,moved: false}]}const handleDrop (event) {event.preventDefault()// TODO}// 开始拖动const drag (e) {let parentRect document.getElementById(content).getBoundingClientRect()let mouseInGrid falseif (mouseXY.x parentRect.left mouseXY.x parentRect.right mouseXY.y parentRect.top mouseXY.y parentRect.bottom) {mouseInGrid true}if (mouseInGrid true gridConfig.layout.findIndex((item) item.i drop) -1) {gridConfig.layout.push({x: (gridConfig.layout.length * 2) % 12,y: gridConfig.layout.length 12, // puts it at the bottomw: gridConfig.dragType?.w || 4,h: gridConfig.dragType?.h || 4,i: drop})}let index gridConfig.layout.findIndex((item) item.i drop)if (index ! -1) {try {gridItemRefs.value[gridConfig.layout.length - 1].$refs.item.style.display none} catch {}let el gridItemRefs.value[index]// el.dragging { top: mouseXY.y - parentRect.top, left: mouseXY.x - parentRect.left }let new_pos calcXY(el, mouseXY.y - parentRect.top, mouseXY.x - parentRect.left, 1, 1)if (mouseInGrid true) {// 红色游标部分gridlayout.value.dragEvent(dragstart,drop,new_pos.x,new_pos.y,gridConfig.dragType?.h || 4,gridConfig.dragType?.w || 4)DragPos.i String(index)DragPos.x gridConfig.layout[index].xDragPos.y gridConfig.layout[index].y}if (mouseInGrid false) {gridlayout.value.dragEvent(dragend, drop, new_pos.x, new_pos.y, 1, 1)gridConfig.layout gridConfig.layout.filter((obj) obj.i ! drop)}}}// 释放拖动const dragend (e) {let parentRect document.getElementById(content).getBoundingClientRect()let mouseInGrid falseif (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, 1, 1)gridConfig.addGridItem(DragPos)gridConfig.layout gridConfig.layout.filter((obj) obj.i ! drop)}gridItemRefs.value[gridConfig.layout.length - 1].$refs.item.style.display none}// 计算坐标const calcXY (el, top, left, width, height) {const colWidth el.calcColWidth()let x Math.round((left - 10) / (colWidth 10))let y Math.round((top - 10) / (el.rowHeight 10))const _width width || el.innerWconst _height height || el.innerHx Math.max(Math.min(x, el.cols - _width), 0)y Math.max(Math.min(y, el.maxRows - _height), 0)return { x, y }}// 加载完成后监听鼠标事件onMounted(() {document.addEventListener(dragover,function (e) {mouseXY.x e.clientXmouseXY.y e.clientY},false)})// 销毁时关闭监听onUnmounted(() {document.removeEventListener(dragover,function (e) {mouseXY.x nullmouseXY.y null},false)})
http://www.zqtcl.cn/news/411106/

相关文章:

  • 表白网站在线制作软件合肥seo按天收费
  • 襄阳企业网站建设免费行情的软件入口下载
  • 对百度网站进行分析中国机械加工网18易0下6拉en
  • 一般做网站都在什么网做wordpress轮播图设置
  • 深圳装饰公司网站thinkphp 网站根目录地址
  • 购物网站建设资讯原创文章代写
  • 门票预订网站建设wordpress siren主题
  • 单位建设网站装修公司需要什么资质
  • 做做做网站做网站赚外快
  • 网站备案后应该做什么网站流量监测
  • 开发网站用什么语言做名片的网站叫什么来着
  • 织梦做网站好不好iis中的网站启动不了
  • 临汾住房与城乡建设厅网站迎访问中国建设银行网站_
  • 织梦做的网站首页幻灯片怎么不能显示北大青鸟网站建设课程
  • 做淘客的网站有哪些延安市住建建设网站
  • 南京林业大学实验与建设网站现在都用什么软件搜索附近的人
  • 建站系统wordpress下载亚马逊雨林十大恐怖生物
  • 凡科网做网站怎么样专业团队电影
  • 有什么有趣的网站移动网站排名怎么做
  • 深圳网站建设专家wordpress 4.5下载地址
  • 网站建设公司公司我我提供一个平台wordpress如何去版权信息
  • seo怎么给网站做外链受欢迎的网站建设教程
  • 网站建设使用多语言河南电商网站设计
  • 网站搭建有免费的吗网站地图生成代码
  • 建设公司网站要注意什么投资小利润高的小生意
  • 网站建设需要做哪些工作做胃镜需那好天津津门网站A
  • 做网站申请域名的流程辽宁省工程造价网
  • 网站系统维护一般多长时间金华高端网站设计
  • 做网站公司销售开场白企业网站规划与开发
  • 兰州新区建站不锈钢网站建设