UNPKG

visop

Version:

A simple CLI for scaffolding visible operation projects.

1 lines 2.48 kB
webpackJsonp([57],{Yx9s:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={bind:function(e,t){var o=e.querySelector(".el-dialog__header"),a=e.querySelector(".el-dialog");o.style.cssText+=";cursor:move;",a.style.cssText+=";top:0px;";var n=window.document.currentStyle?function(e,t){return e.currentStyle[t]}:function(e,t){return getComputedStyle(e,!1)[t]};o.onmousedown=function(e){var t=e.clientX-o.offsetLeft,i=e.clientY-o.offsetTop,l=a.offsetWidth,d=a.offsetHeight,r=document.body.clientWidth,s=document.body.clientHeight,u=a.offsetLeft,c=r-a.offsetLeft-l,m=a.offsetTop,f=s-a.offsetTop-d,g=n(a,"left"),p=n(a,"top");g.includes("%")?(g=+document.body.clientWidth*(+g.replace(/\%/g,"")/100),p=+document.body.clientHeight*(+p.replace(/\%/g,"")/100)):(g=+g.replace(/\px/g,""),p=+p.replace(/\px/g,"")),document.onmousemove=function(e){var o=e.clientX-t,n=e.clientY-i;-o>u?o=-u:o>c&&(o=c),-n>m?n=-m:n>f&&(n=f),a.style.cssText+=";left:"+(o+g)+"px;top:"+(n+p)+"px;"},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}},n=function(e){e.directive("el-drag-dialog",a)};window.Vue&&(window["el-drag-dialog"]=a,Vue.use(n)),a.install=n;var i={name:"dragDialog-demo",directives:{elDragDialog:a},data:function(){return{dialogTableVisible:!1,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"}]}}},l={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"components-container"},[o("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogTableVisible=!0}}},[e._v("open a Drag Dialog")]),e._v(" "),o("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{title:"Shipping address",visible:e.dialogTableVisible},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[o("el-table",{attrs:{data:e.gridData}},[o("el-table-column",{attrs:{property:"date",label:"Date",width:"150"}}),e._v(" "),o("el-table-column",{attrs:{property:"name",label:"Name",width:"200"}}),e._v(" "),o("el-table-column",{attrs:{property:"address",label:"Address"}})],1)],1)],1)},staticRenderFns:[]},d=o("VU/8")(i,l,!1,null,null,null);t.default=d.exports}});