1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d210b83"],{b8a8:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"components-container"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogTableVisible=!0}}},[e._v(" open a Drag Dialog ")]),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:e.dialogTableVisible,title:"Shipping address"},on:{"update:visible":function(t){e.dialogTableVisible=t},dragDialog:e.handleDrag}},[a("el-select",{ref:"select",attrs:{placeholder:"请选择"},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),a("el-table",{attrs:{data:e.gridData}},[a("el-table-column",{attrs:{property:"date",label:"Date",width:"150"}}),a("el-table-column",{attrs:{property:"name",label:"Name",width:"200"}}),a("el-table-column",{attrs:{property:"address",label:"Address"}})],1)],1)],1)},o=[],n=(a("99af"),a("caad"),a("ac1f"),a("2532"),a("5319"),{bind:function(e,t,a){var l=e.querySelector(".el-dialog__header"),o=e.querySelector(".el-dialog");l.style.cssText+=";cursor:move;",o.style.cssText+=";top:0px;";var n=function(){return window.document.currentStyle?function(e,t){return e.currentStyle[t]}:function(e,t){return getComputedStyle(e,!1)[t]}}();l.onmousedown=function(e){var t=e.clientX-l.offsetLeft,i=e.clientY-l.offsetTop,r=o.offsetWidth,d=o.offsetHeight,s=document.body.clientWidth,u=document.body.clientHeight,c=o.offsetLeft,f=s-o.offsetLeft-r,g=o.offsetTop,p=u-o.offsetTop-d,m=n(o,"left"),b=n(o,"top");m.includes("%")?(m=+document.body.clientWidth*(+m.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(m=+m.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(e){var l=e.clientX-t,n=e.clientY-i;-l>c?l=-c:l>f&&(l=f),-n>g?n=-g:n>p&&(n=p),o.style.cssText+=";left:".concat(l+m,"px;top:").concat(n+b,"px;"),a.child.$emit("dragDialog")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}}),i=function(e){e.directive("el-drag-dialog",n)};window.Vue&&(window["el-drag-dialog"]=n,Vue.use(i)),n.install=i;var r=n,d={name:"DragDialogDemo",directives:{elDragDialog:r},data:function(){return{dialogTableVisible:!1,options:[{value:"选项1",label:"黄金糕"},{value:"选项2",label:"双皮奶"},{value:"选项3",label:"蚵仔煎"},{value:"选项4",label:"龙须面"}],value:"",gridData:[{date:"2016-05-02",name:"John Smith",address:"No.1518, Jinshajiang Road, Putuo District"},{date:"2016-05-04",name:"John Smith",address:"No.1518, Jinshajiang Road, Putuo District"},{date:"2016-05-01",name:"John Smith",address:"No.1518, Jinshajiang Road, Putuo District"},{date:"2016-05-03",name:"John Smith",address:"No.1518, Jinshajiang Road, Putuo District"}]}},methods:{handleDrag:function(){this.$refs.select.blur()}}},s=d,u=a("2877"),c=Object(u["a"])(s,l,o,!1,null,null,null);t["default"]=c.exports}}]);
|