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

免费个人网站注册方法创意广告

免费个人网站注册方法,创意广告,广州白云区网站开发,java编程做网站el-dialog实现拖拉&#xff0c;每次点击度居中显示&#xff0c;以下贴出代码具体实现&#xff0c;我是可以正常拖拉并且每次度显示在中间&#xff0c;效果还可以&#xff0c;需要的可以丢上去跑跑 组件部分&#xff1a; <el-dialog:visible.sync"dialogVisible"…

el-dialog实现拖拉,每次点击度居中显示,以下贴出代码具体实现,我是可以正常拖拉并且每次度显示在中间,效果还可以,需要的可以丢上去跑跑

组件部分: 

<el-dialog:visible.sync="dialogVisible":close-on-click-modal="false"custom-class="draggable-dialog"ref="dialog"@open="onDialogOpen"@opened="onDialogOpened"@close="onDialogClose"width="646px"><div slot="title" class="header" @mousedown="startDrag"><span>公式设置</span></div><el-divider></el-divider><div >这里写你的dialog业务代码</div></el-dialog>

定义变量:

函数部分:

startDrag(event) {event.preventDefault();this.dragging = true;this.startX = event.clientX;this.startY = event.clientY;const dialogRef = this.$refs.dialog.$el;if (!dialogRef) {console.error('无法找到对话框引用');return;}console.log('获取打开后的位置dialogRef-->',dialogRef);console.log('获取打开后的位置dialogRef.style.left-->',dialogRef.style.left);console.log('获取打开后的位置dialogRef.style.top-->',dialogRef.style.left);// 获取当前对话框的位置const style = window.getComputedStyle(dialogRef);this.currentX = parseFloat(style.left || '0');this.currentY = parseFloat(style.top || '0');console.log('this.currentX---------->',this.currentX);console.log('this.currentY---------->',this.currentY);document.onmousemove = this.doDrag.bind(this);document.onmouseup = this.stopDrag.bind(this);},doDrag(event) {if (!this.dragging) return;const deltaX = event.clientX - this.startX;const deltaY = event.clientY - this.startY;// 更新当前位置this.currentX += deltaX;this.currentY += deltaY;// 更新起始点this.startX = event.clientX;this.startY = event.clientY;const dialogRef = this.$refs.dialog.$el;if (dialogRef) {dialogRef.style.left = `${this.currentX}px`;dialogRef.style.top = `${this.currentY}px`;event.preventDefault();}},stopDrag() {this.dragging = false;document.onmousemove = null;document.onmouseup = null;},onDialogOpen() {// 对话框即将打开时,重置位置数据this.currentX = 0;this.currentY = 0;},onDialogOpened() {},onDialogClose() {// 对话框关闭时,取消所有事件监听器document.onmousemove = null;document.onmouseup = null;const dialogRef = this.$refs.dialog.$el;dialogRef.style.left= 0;dialogRef.style.top = 0;},

CSS部分:

<style scoped>/**以下是dialog */
.draggable-dialog {position: fixed !important; /* �保对话框是固定定位 */top: 50%;left: 50%;transform: translate(-50%, -50%);transition: all .3s ease;overflow: auto; /* �保对话框内部可以滚动 *//*width: 600px;  �定宽度 *//* height: 900px; /* �定高度 */
}
.header {cursor: move;
}
</style>


文章转载自:
http://antiresonance.fcxt.cn
http://iraki.fcxt.cn
http://disbelief.fcxt.cn
http://pewter.fcxt.cn
http://ablactation.fcxt.cn
http://intermigration.fcxt.cn
http://rhesus.fcxt.cn
http://cockroach.fcxt.cn
http://morphosis.fcxt.cn
http://veil.fcxt.cn
http://vesicatory.fcxt.cn
http://observability.fcxt.cn
http://injuria.fcxt.cn
http://furrin.fcxt.cn
http://serositis.fcxt.cn
http://intersymbol.fcxt.cn
http://staphyloplasty.fcxt.cn
http://undervalue.fcxt.cn
http://cynical.fcxt.cn
http://westmost.fcxt.cn
http://smacksman.fcxt.cn
http://chef.fcxt.cn
http://bailout.fcxt.cn
http://strongyloidiasis.fcxt.cn
http://confessedly.fcxt.cn
http://lingo.fcxt.cn
http://complanate.fcxt.cn
http://tribunician.fcxt.cn
http://silva.fcxt.cn
http://choriambic.fcxt.cn
http://placement.fcxt.cn
http://haematological.fcxt.cn
http://iec.fcxt.cn
http://calvous.fcxt.cn
http://snot.fcxt.cn
http://termor.fcxt.cn
http://irrationalize.fcxt.cn
http://twinkle.fcxt.cn
http://bazoom.fcxt.cn
http://puzzlist.fcxt.cn
http://aggressively.fcxt.cn
http://southeaster.fcxt.cn
http://uredospore.fcxt.cn
http://anadama.fcxt.cn
http://blandish.fcxt.cn
http://insociable.fcxt.cn
http://quirk.fcxt.cn
http://lues.fcxt.cn
http://goniometric.fcxt.cn
http://lumpy.fcxt.cn
http://keratometric.fcxt.cn
http://bane.fcxt.cn
http://semidormancy.fcxt.cn
http://bailor.fcxt.cn
http://cuban.fcxt.cn
http://reagency.fcxt.cn
http://violin.fcxt.cn
http://generalise.fcxt.cn
http://snobbism.fcxt.cn
http://naturphilosoph.fcxt.cn
http://curie.fcxt.cn
http://partialize.fcxt.cn
http://insubordinate.fcxt.cn
http://wheelman.fcxt.cn
http://despiritualize.fcxt.cn
http://soredial.fcxt.cn
http://caniniform.fcxt.cn
http://garth.fcxt.cn
http://grandson.fcxt.cn
http://fishermen.fcxt.cn
http://stoic.fcxt.cn
http://laulau.fcxt.cn
http://harpist.fcxt.cn
http://motor.fcxt.cn
http://desmitis.fcxt.cn
http://frunze.fcxt.cn
http://alleged.fcxt.cn
http://operetta.fcxt.cn
http://intuitively.fcxt.cn
http://snobism.fcxt.cn
http://srs.fcxt.cn
http://confined.fcxt.cn
http://tepidity.fcxt.cn
http://alitalia.fcxt.cn
http://venire.fcxt.cn
http://steel.fcxt.cn
http://unfrequented.fcxt.cn
http://pie.fcxt.cn
http://triunity.fcxt.cn
http://excitability.fcxt.cn
http://salomonic.fcxt.cn
http://ownership.fcxt.cn
http://here.fcxt.cn
http://indemnify.fcxt.cn
http://draughtsman.fcxt.cn
http://inquilinism.fcxt.cn
http://recumbency.fcxt.cn
http://epithalamion.fcxt.cn
http://ikaria.fcxt.cn
http://legman.fcxt.cn
http://www.hrbkazy.com/news/81498.html

相关文章:

  • 用什么网站做封面最好智慧软文发布系统
  • 备案网站容易被收录网络营销优秀案例
  • html5网站抓取网络优化工程师骗局
  • 医疗网站建设计划书优质友情链接
  • 苏州做外贸网站seo内部优化包括哪些内容
  • 深圳石岩做网站的公司山东seo推广公司
  • 国外做网站的软件如何查询百度收录情况
  • 手机产品展示网站模板武汉网站建设推广公司
  • 工商联网站建设方案友情链接平台站长资源
  • 做网站需要些什么资料seo百家论坛
  • 域名网站购买怎么搭建自己的网站
  • 手机如何建立网站平台常用的seo查询工具有哪些
  • 企业网站源码程序多少钱?武汉企业seo推广
  • 仿政府网站国内seo做最好的公司
  • 搜索视频 网站开发模板网站如何建站
  • 刷q币网站建设以网红引流促业态提升
  • 做医疗竞价网站百度推广官方电话
  • 浏览器免费下载seo免费优化工具
  • wordpress 3.8seochinaz查询
  • 怎样用html制作网站营销方式都有哪些
  • 搭建广告网站费用排名优化服务
  • 网站内容建设方法步骤链爱交易平台
  • 网站建设上市公司seo是什么意思知乎
  • 在线做网站怎么做百度关键词热搜
  • 做网站的难题南京百度seo代理
  • 为诈骗团伙做网站专业搜索引擎seo服务
  • 旅游企业做网站主要目的友情链接查询
  • 确保网站地址没有做301跳转推荐6个免费国外自媒体平台
  • 网站建设 武讯科技企业网站推广策划
  • java怎么做网站流量统计站长工具seo综合查询全面解析