(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6a5d7f71","chunk-7454c202"],{"0fd5":function(i,t,e){},c0d9:function(i,t,e){"use strict";e.r(t);e("fff0"),e("ea51"),e("0fd5");var n=e("8bc2");t["default"]={data:function(){return{visible:!1,index:null,style:{left:0,top:0},list:[]}},methods:{open:function(i,t){var e=this,n=i||{},c=n.pageX,s=n.pageY,l=t||{},o=l.list,d={left:c,top:s};o&&(this.list=o),this.visible=!0,this.index=null,this.$nextTick((function(){var i=document.body,t=i.clientHeight,n=i.clientWidth,l=e.$el.querySelector(".cl-context-menu-box"),o=l.clientHeight,a=l.clientWidth;s+o>t&&(d.top=t-o-5),c+a>n&&(d.left=n-a-5),e.style=d}))},close:function(){this.visible=!1,this.index=null},clickRow:function(i,t){var e=this;return this.index=t,!i.disabled&&(i.callback?i.callback(i,(function(){e.close()})):void(i.children?this.$set(i,"showChildren",!i.showChildren):this.close()))}},mounted:function(){var i=this;document.body.addEventListener("mousedown",(function(t){Object(n["contains"])(i.$el,t.target)||i.$el==t.target||i.close()})),window.onresize=function(){i.close()}},render:function(){var i=this,t=arguments[0],e=this.style,n=e.left,c=e.top,s=this.$scopedSlots.default,l=function e(n,c){return t("div",{class:["cl-context-menu-box",c>1&&"_append"]},[n.map((function(n,s){var l="".concat(c,"-").concat(s);return t("div",{class:{_ellipsis:n.ellipsis,_active:l===i.index,_disabled:n.disabled}},[n["prefix-icon"]&&t("i",{class:n["prefix-icon"]}),t("span",{on:{click:function(){i.clickRow(n,l)}}},[n.label]),n["suffix-icon"]&&t("i",{class:n["suffix-icon"]}),n.children&&n.showChildren&&e(n.children,c+1)])}))])};return this.visible&&t("div",{class:"cl-context-menu",style:{left:n+"px",top:c+"px"}},[s?s():l(this.list,1)])}}}}]);