webpackJsonp([10],{"47pT":function(t,n,e){var i=e("6Kff");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);e("rjj0")("433b5cb8",i,!0)},"4DLR":function(t,n,e){var i=e("FgQX");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);e("rjj0")("5eeae556",i,!0)},"6Kff":function(t,n,e){(t.exports=e("FZ+f")(!1)).push([t.i,"\nhtml,body{\r\n width: 100%;\r\n height: 100%;\r\n /*overflow: hidden;*/\r\n margin: 0;\r\n padding: 0;\n}\n#test {\r\n font-family: 'Avenir', Helvetica, Arial, sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n text-align: center;\r\n color: #2c3e50;\r\n margin: 0 ;\r\n padding: 0;\r\n width: 100%;\r\n height: 200%;\n}\nh1, h2 {\r\n font-weight: normal;\n}\n.li-6 .easy-cm-ul li{\r\n background-color: #df5000;\r\n color: #ffffff;\n}\n.li-6 .easy-cm-ul li div:hover{\r\n background-color: #ffffff!important;\r\n color: #df5000!important;\n}\n.demo-ul{\r\n width: 100%;\r\n padding: 10px;\r\n list-style: none;\r\n text-align: center;\n}\n.demo-ul>li{\r\n width: 80px;\r\n font-size: 14px;\r\n height: 80px;\r\n line-height: 80px;\r\n margin: 20px;\r\n background-color: #ccc;\r\n float: left;\r\n color: #ffffff;\n}\r\n",""])},FgQX:function(t,n,e){(t.exports=e("FZ+f")(!1)).push([t.i,"\n.icon[data-v-210f51a8] {\n width: 0.9em; height: 0.9em;\n vertical-align: -0.15em;\n fill: currentColor;\n overflow: hidden;\n position: absolute;\n right: 0%;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n.cm-container[data-v-210f51a8] {\n position: fixed;\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n z-index: 9999;\n}\n.cm-ul[data-v-210f51a8] {\n width: 100%;\n padding: 0;\n margin: 0;\n list-style: none;\n -webkit-box-shadow: 0 0 1px #666;\n box-shadow: 0 0 1px #666;\n background-color: #ffffff;\n color: #2e2e2e;\n}\n.cm-ul li[data-v-210f51a8] {\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n text-align: left;\n position: relative;\n cursor: pointer;\n}\n.cm-ul li:hover>ul[data-v-210f51a8]{\n display: block;\n}\n.cm-ul li div[data-v-210f51a8]{\n display: inline-block;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 0 0.8em;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n position: relative;\n}\n.cm-ul li i[data-v-210f51a8] {\n display: inline-block;\n width: 1em;\n font-size: 1.3em;\n text-align: center;\n}\n.cm-ul li div[data-v-210f51a8]:hover{\n background-color: #666666;\n color: #fff;\n}\n.cm-ul-2[data-v-210f51a8],.cm-ul-3[data-v-210f51a8] {\n position: absolute;\n top: 0;\n display: none;\n z-index: 10000;\n}\n.cm-left svg[data-v-210f51a8]{\n -webkit-transform: translateY(-50%) rotate(180deg) ;\n transform: translateY(-50%) rotate(180deg) ;\n left: 0;\n}\n.cm-underline li div[data-v-210f51a8]:after{\n content: '';\n width: 90%;\n position: absolute;\n left: 5%;\n top: 0;\n height: 1px;\n background-color: #cccccc;\n z-index: 10001;\n}\n.cm-underline li div[data-v-210f51a8]:hover:after,.cm-underline>li:first-child>div[data-v-210f51a8]:after{\n display: none;\n}\n",""])},MPj3:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={name:"easy-Cm",data:function(){return{show:!1,axis:{x:0,y:0}}},props:{tag:{},list:{required:!0},underline:{default:!1},arrow:{default:!1},border:{default:!0},itemWidth:{default:140},itemHeight:{default:36},itemSize:{default:14},offset:{default:function(){return{x:6,y:2}}},borderWidth:{default:6}},mounted:function(){var t=this;this.$root.$on("easyAxis",function(n){n.tag===t.tag&&(t.show=!0,t.axis=n)}),document.addEventListener("click",function(){t.show=!1},!0)},watch:{axis:function(){if(this.border){var t=document.body.offsetWidth,n=document.body.offsetHeight;this.axis.x+this.offset.x+this.itemWidth>=t&&(this.axis.x=t-this.itemWidth-this.borderWidth-this.offset.x),this.axis.y+this.offset.y+this.itemHeight*this.list.length>=n&&(this.axis.y=n-this.itemHeight*this.list.length-this.borderWidth-this.offset.y)}}},computed:{axisComputed:function(){return{top:this.axis.y+this.offset.y+"px",left:this.axis.x+this.offset.x+"px"}},liStyle:function(){return{width:this.itemWidth+"px",height:this.itemHeight+"px",lineHeight:this.itemHeight+"px",fontSize:this.itemSize+"px"}},firstLeft:function(){var t=document.body.offsetWidth;return this.axis.x+2*this.itemWidth>=t},secondLeft:function(){var t=document.body.offsetWidth;return this.axis.x+3*this.itemWidth>=t}},methods:{secondBorderCheck:function(t){var n=document.body.offsetWidth,e=document.body.offsetHeight,i=this.axis.y+(t+this.list[t].children.length)*this.itemHeight;return{left:this.axis.x+2*this.itemWidth>=n?"-100%":"100%",top:e>=i?0:-(this.list[t].children.length-1)*this.itemHeight+"px"}},thirdBorderCheck:function(t,n){var e=document.body.offsetWidth,i=document.body.offsetHeight,o=this.axis.y+this.list[t].children[n].children.length*this.itemHeight+(t+n)*this.itemHeight+parseInt(this.secondBorderCheck(t).top);return{left:this.axis.x+3*this.itemWidth>=e?"-100%":"100%",top:o>i?-(this.list[t].children[n].children.length-1)*this.itemHeight+"px":0}},callback:function(t){this.$emit("ecmcb",t)}}},o={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.show?e("div",{staticClass:"cm-container",style:t.axisComputed},[e("svg",{staticStyle:{position:"absolute",width:"0px",height:"0px",overflow:"hidden"},attrs:{"aria-hidden":"true"}},[e("symbol",{attrs:{id:"icon-youjiantou",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"}})])]),t._v(" "),e("ul",{staticClass:"cm-ul cm-ul-1 easy-cm-ul",class:t.underline?"cm-underline":""},t._l(t.list,function(n,i){return e("li",{style:t.liStyle},[e("div",{class:t.firstLeft?"cm-left":"",on:{click:function(e){e.stopPropagation(),t.callback([n.index])}}},[e("i",{class:n.icon}),t._v(" "),e("span",[t._v(t._s(n.text))]),t._v(" "),t.arrow&&n.children&&n.children.length>0?e("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[e("use",{attrs:{"xlink:href":"#icon-youjiantou"}})]):t._e()]),t._v(" "),n.children&&n.children.length>0?e("ul",{staticClass:"cm-ul cm-ul-2 easy-cm-ul",class:t.underline?"cm-underline":"",style:t.secondBorderCheck(i)},t._l(n.children,function(n,o){return e("li",{style:t.liStyle},[e("div",{class:t.secondLeft?"cm-left":"",on:{click:function(n){n.stopPropagation(),t.callback([i,o])}}},[e("i",{class:n.icon}),t._v(" "),e("span",[t._v(t._s(n.text))]),t._v(" "),t.arrow&&n.children&&n.children.length>0?e("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[e("use",{attrs:{"xlink:href":"#icon-youjiantou"}})]):t._e()]),t._v(" "),n.children&&n.children.length>0?e("ul",{staticClass:"cm-ul cm-ul-3 easy-cm-ul",class:t.underline?"cm-underline":"",style:t.thirdBorderCheck(i,o)},t._l(n.children,function(n,r){return e("li",{style:t.liStyle},[e("div",{on:{click:function(n){n.stopPropagation(),t.callback([i,o,r])}}},[e("i",{class:n.icon}),t._v(" "),e("span",[t._v(t._s(n.text))])])])})):t._e()])})):t._e()])}))]):t._e()},staticRenderFns:[]};var r={name:"study-list",components:{easyCm:e("VU/8")(i,o,!1,function(t){e("4DLR")},"data-v-210f51a8",null).exports},data:{cmList:[{text:"Play Now",icon:"iconfont icon-bofang"},{text:"Play Next",icon:"iconfont icon-xiayishou"},{text:"More",children:[{text:"Download",children:[]},{text:"Report"},{text:"Other",icon:"iconfont icon-bofang",children:[{text:"Other-1"},{text:"Other-2"},{text:"Other-3"}]}]}]},methods:{test:function(t){switch(t[0]){case 0:alert("立即播放");break;case 1:alert("下一首播放");break;default:alert("其他的")}}}},s={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{attrs:{id:"test"}},[e("h3",[t._v("在小方块上右击展示")]),t._v(" "),e("h4",[t._v("调整网页宽高查看边界检测")]),t._v(" "),e("ul",{staticClass:"demo-ul"},[e("li",{staticStyle:{"background-color":"#509992"},on:{contextmenu:function(n){t.$easycm(n,t.$root,1)}}},[e("easy-cm",{attrs:{list:[{text:"Hello "},{text:"World "}],tag:1}}),t._v("\n 最简\n ")],1),t._v(" "),e("li",{staticStyle:{"background-color":"#dd8896"},on:{contextmenu:function(n){t.$easycm(n,t.$root,2)}}},[e("easy-cm",{attrs:{list:[{text:"Hello "},{text:"World "}],underline:!0,tag:2}}),t._v("\n 下划线\n ")],1),t._v(" "),e("li",{staticStyle:{"background-color":"#ddc663"},on:{contextmenu:function(n){t.$easycm(n,t.$root,3)}}},[e("easy-cm",{attrs:{list:[{text:"Hello "},{text:"More",children:[{text:"Boen"},{text:"World"}]}],underline:!0,arrow:!0,tag:3}}),t._v("\n 子层箭头\n ")],1),t._v(" "),e("li",{staticStyle:{"background-color":"#d4b4dd"},on:{contextmenu:function(n){t.$easycm(n,t.$root,4)}}},[e("easy-cm",{attrs:{list:[{text:"Play Now",icon:"iconfont icon-bofang"},{text:"Play Next",icon:"iconfont icon-xiayishou"}],underline:!0,arrow:!0,tag:4}}),t._v("\n 字体图标\n ")],1),t._v(" "),e("li",{staticStyle:{"background-color":"#a5dd68"},on:{contextmenu:function(n){t.$easycm(n,t.$root,5)}}},[e("easy-cm",{attrs:{list:t.cmList,underline:!0,arrow:!0,tag:5}}),t._v("\n 多层菜单\n ")],1),t._v(" "),e("li",{staticStyle:{"background-color":"#80a0ff"},on:{contextmenu:function(n){t.$easycm(n,t.$root,8)}}},[e("easy-cm",{attrs:{list:t.cmList,underline:!0,arrow:!0,tag:8,offset:{x:20,y:20}}}),t._v("\n 触发点偏移\n ")],1),t._v(" "),e("li",{staticStyle:{"background-color":"#ffb4d2"},on:{contextmenu:function(n){t.$easycm(n,t.$root,9)}}},[e("easy-cm",{attrs:{list:t.cmList,underline:!0,arrow:!0,tag:9,"item-width":200,"item-height":50}}),t._v("\n 选项宽高\n ")],1),t._v(" "),e("li",{staticClass:"li-6",staticStyle:{"background-color":"#ffaa5d"},on:{contextmenu:function(n){t.$easycm(n,t.$root,6)}}},[e("easy-cm",{attrs:{list:t.cmList,underline:!0,arrow:!0,tag:6}}),t._v("\n 自定义样式\n ")],1),t._v(" "),e("li",{staticStyle:{"background-color":"#58c0dd"},on:{contextmenu:function(n){t.$easycm(n,t.$root,7)}}},[e("easy-cm",{attrs:{list:t.cmList,underline:!0,arrow:!0,tag:7},on:{ecmcb:t.test}}),t._v("\n 回调函数\n ")],1)])])},staticRenderFns:[]};var a=e("VU/8")(r,s,!1,function(t){e("47pT")},null,null);n.default=a.exports}});