@persagy2/meri-design
Version:
fork from meri-design and extend it.
7 lines • 22.1 kB
JavaScript
/*!
* @@persagy2/meri-design v1.4.9-extend.2
* (c) 2019-2020 xiongshuang
* Released under the MIT License.
* 2022-12-07 10:31:52
*/
var t,e;t=this,e=function(t){return function(){"use strict";var e={1952:function(t,e,n){var i=n(5064);e.Z={name:"Checkbox",props:{checked:{type:String,default:"uncheck"},disabled:{type:Boolean,default:!1},stopPropagation:{type:Boolean,default:!1}},methods:{TextEllipsis:i.Z,handleChange:function(t){var e,n=this.disabled,i=this.checked;if(this.stopPropagation&&t.stopPropagation(),!n){var o=this.$el.dataset,s="";s="checked"===i?"uncheck":"checked",null!==(e=this._events)&&void 0!==e&&e.change?this.$emit("change",s,o):this.$emit("update:checked",s)}}}}},9361:function(t,e,n){n.d(e,{s:function(){return i},x:function(){return o}});var i=function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("g",{attrs:{transform:"translate(-1.000000, -1.000000)","fill-rule":"nonzero"}},[t("path",{staticClass:"svg-fill-grey-400",attrs:{d:"M8,1 C4.134375,1 1,4.134375 1,8 C1,11.865625 4.134375,15 8,15 C11.865625,15 15,11.865625 15,8 C15,4.134375 11.865625,1 8,1 Z M10.784375,9.6375 C11.040625,9.89375 11.040625,10.309375 10.784375,10.565625 C10.528125,10.821875 10.1125,10.821875 9.85625,10.565625 L8,8.709375 L6.14375,10.565625 C5.8875,10.821875 5.471875,10.821875 5.215625,10.565625 C4.959375,10.309375 4.959375,9.89375 5.215625,9.6375 L7.071875,7.78125 L5.215625,5.925 C4.959375,5.66875 4.959375,5.253125 5.215625,4.996875 C5.471875,4.740625 5.8875,4.740625 6.14375,4.996875 L8,6.853125 L9.85625,4.996875 C10.1125,4.740625 10.528125,4.740625 10.784375,4.996875 C11.040625,5.253125 11.040625,5.66875 10.784375,5.925 L8.928125,7.78125 L10.784375,9.6375 L10.784375,9.6375 Z"}})])])},o=[]},8437:function(t,e,n){n.d(e,{s:function(){return i},x:function(){return o}});var i=function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"\r\n M8.3904344,6.48804301\r\n L11.350122,10.1876525\r\n C11.5226268,10.4032834 11.4876661,10.7179296 11.2720351,10.8904344\r\n C11.1833786,10.9613596 11.0732233,11 10.9596876,11\r\n L5.04031242,11\r\n C4.76417005,11 4.54031242,10.7761424 4.54031242,10.5\r\n C4.54031242,10.3864643 4.5789528,10.276309 4.64987802,10.1876525\r\n L7.6095656,6.48804301\r\n C7.78207037,6.27241204 8.09671656,6.23745135 8.31234752,6.40995612\r\n C8.34117988,6.43302201 8.36736852,6.45921065 8.3904344,6.48804301\r\n Z",transform:"translate(0, -0.5)"}})])},o=[]},8349:function(t,e,n){n.d(e,{s:function(){return i},x:function(){return o}});var i=function(){var t=this,e=t._self._c;return e("div",{class:["p-checkbox",t.disabled&&"p-checkbox-disabled"],on:{click:t.handleChange}},[e("i",{class:["p-checkbox-box","p-checkbox-"+t.checked]}),t._v(" "),Object.keys(t.$slots).length?e("span",{staticClass:"p-checkbox-text",on:{mouseenter:t.TextEllipsis}},[t._t("default")],2):t._e()])},o=[]},6875:function(t,e,n){var i=n(3931);i.Z.install=function(t){return t.component(i.Z.name,i.Z)},e.default=i.Z},7488:function(t,e,n){n.d(e,{default:function(){return h}});var i=n(2205),o=n.n(i),s=n(3114),r=n(5171),a={name:"PopoverTip",props:{parent:{type:Object,default:function(){return{}}},show:{type:Boolean,default:!1},content:{type:String,default:""},position:{type:Boolean,default:!0},split:{type:Boolean,default:!0}},computed:{contentArr:function(){var t=this;return this.content.split("、").map((function(e,n){return{id:"content-".concat(n),text:e,scroll:e.length>32?t.getScrollWidth(e):0}}))}},methods:{getScrollWidth:function(t){var e=document.createElement("div");e.innerText=t,e.style.position="absolute",e.style.left="0",e.style.bottom="0",e.style.zIndex="-100",e.style.display="inline-block",e.style.height="0",e.style.opacity="0",e.style.overflow="hidden",e.style.whiteSpace="nowrap",e.style.fontSize="14px",document.body.appendChild(e);var n=e.scrollWidth;return(0,s.Z)()?e.removeNode(!0):e.remove(),n>452?n-452:0},popoverTipHandle:function(t){this.$emit("tipHandle",t)},contentEnter:function(){this.split||(this.show=!1)}}},c=(0,n(1900).Z)(a,(function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:t.position?"selectDownUpExtend":"selectDownUpExtendTop"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],class:["p-popover-tip",t.split?"p-popover-tip-split":"p-popover-tip-words",t.position?"p-popover-tip-bottom":"p-popover-tip-top"],on:{wheel:function(t){t.stopPropagation()},mouseenter:function(e){return t.popoverTipHandle("enter")},mouseleave:function(e){return t.popoverTipHandle("leave")}}},[e("section",{staticClass:"p-popover-tip-content",on:{mouseenter:t.contentEnter}},[t.split?t._l(t.contentArr,(function(n){return e("article",{key:n.id,class:["p-popover-tip-content-item",n.scroll&&"p-popover-tip-content-item-before"]},[e("span",{staticClass:"p-popover-tip-item-text",style:n.scroll&&{transform:"translateX(".concat(-n.scroll,"px)")}},[t._v(t._s(n.text))])])})):[e("article",{staticClass:"p-popover-tip-content-words"},[t._v(t._s(t.content))])]],2),t._v(" "),e("section",{staticClass:"p-popover-tip-triangle"})])])}),[],!1,null,null,null).exports,l=n(4597),p=o().extend(c),u=null,d=function(t){var e=t.propsData;if(e.content){var n=t.tag,i=t.countTag,o=document.body;return(u=(u=new p({propsData:e})).$mount()).tag=n,u.countTag=i,u.dom=o,o.appendChild(u.$el),u}};d.remove=r.Z,d.resetPosition=function(t){if(t.content){var e=window,n=e.innerWidth,i=e.pageXOffset,o=t.tag,r=t.countTag,a=t.dom,c=o.getBoundingClientRect(),p=c.left,u=c.width,d=r.getBoundingClientRect(),h=d.left,f=d.width;if(!(n<=h+f/2||n<=f||h<0)){var v=function(t){var e=t.content,n=t.split,i=e.split("、"),o=document.body,r=document.createElement("div");r.className="p-popover-tip",r.style.left="0",r.style.bottom="0",r.style.opacity="0",r.style.zIndex="-100";var a='<section class="p-popover-tip-content">';n?i.forEach((function(t){a+='<article class="p-popover-tip-content-item"><span class="p-popover-tip-item-text">'.concat(t,"</span></article>")})):a+='<article class="p-popover-tip-content-words">'.concat(e,"</article>"),a+="</section>",r.innerHTML=a,o.appendChild(r);var c=r.getBoundingClientRect(),p=c.width,u=c.height;return(0,s.Z)()?r.removeNode(!0):r.remove(),{width:p,height:u,scrollWidth:(0,l.Z)()}}(t),m=v.width,g=v.height,x=v.scrollWidth,y=function(t,e,n){var i,o=e.clientHeight,s=window.pageYOffset,r=t.getBoundingClientRect(),a=r.top,c=r.height,l=!0,p=a-8;return p>=n?(i=p-n+s,l=!1):i=o-(a+c+8)>=n?a+c+8+s:o-n+s,{Y:i,P:l}}(o,a,g),S=y.Y,w=y.P;t.position=w,t.$el.style.top="".concat(S,"px");var b,C=t.$el.lastChild,T=0;if(m===n)i>0&&(T=0),b=h+f/2-6;else{if(0===p)T=0;else{var _=h+f/2,D=m/2;T=_<D?0:m<=u?m<=n-p?_-D:n-m:_>=D?n-_<=D?n-m-x:_-D:0}b=h-T+f/2-6}t.$el.style.left="".concat(T+i,"px"),C.style.left="".concat(b,"px"),t.show=!0}}};var h=d},3350:function(t,e){e.Z=function(t,e,n,i,o){var s,r,a=e.clientHeight,c=e.clientWidth,l=window,p=l.pageYOffset,u=l.pageXOffset,d=t.getBoundingClientRect(),h=d.top,f=d.left,v=d.height,m=d.width,g=!0;a-(h+v+8)>=n?s=h+v+8+p:h-8>=n?(s=h-n-8+p,g=!1):s=a-n+p;var x=c-f-m,y=x+m;return r=c<=i?u:f>0?y>=i?f+u:f+m>=i?f+m-i+u+(x>0?0:x):(c-i)/2+u:u,o&&y>=i&&(r=r-i+m),{X:r,Y:s,P:g}}},4597:function(t,e,n){var i=n(3114);e.Z=function(){var t=document.createElement("div");t.style.cssText="position:absolute;top:-1000px;width:100px;height:100px;overflow:hidden;opacity:0;";var e=document.body.appendChild(t).clientWidth;t.style.overflowY="scroll";var n=t.clientWidth;(0,i.Z)()?t.removeNode(!0):t.remove();var o=e-n;return o<6?6:o}},3114:function(t,e){e.Z=function(){return!!window.ActiveXObject||"ActiveXObject"in window}},5171:function(t,e){e.Z=function(t){if(t&&!t._isDestroyed){t.$destroy();var e=t.$el;e&&e.parentNode.removeChild(e)}}},5064:function(t,e){e.Z=function(t){var e=t.target,n=e.clientWidth,i=e.scrollWidth;e.title=i>n?e.innerText:""}},7021:function(){},5747:function(t,e,n){var i=n(9361),o=(0,n(1900).Z)({},i.s,i.x,!1,null,null,null);e.Z=o.exports},7375:function(t,e,n){var i=n(8437),o=(0,n(1900).Z)({},i.s,i.x,!1,null,null,null);e.Z=o.exports},3931:function(t,e,n){var i=n(872),o=n(5242),s=(n(6921),(0,n(1900).Z)(o.Z,i.s,i.x,!1,null,null,null));e.Z=s.exports},5242:function(t,e,n){var i=n(1952);e.Z=i.Z},872:function(t,e,n){n.d(e,{s:function(){return i.s},x:function(){return i.x}});var i=n(8349)},6921:function(t,e,n){n(7021)},1900:function(t,e,n){function i(t,e,n,i,o,s,r,a){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),r?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var p=l.render;l.render=function(t,e){return c.call(e),p(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:l}}n.d(e,{Z:function(){return i}})},2205:function(e){e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var s=n[t]={exports:{}};return e[t](s,s.exports,i),s.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){i.r(o),i.d(o,{default:function(){return T}});var t=i(1900),e=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M551.36 878.912a73.6 73.6 0 0 1-35.264-8.768l-96.96-53.504a73.216 73.216 0 0 1-38.208-64.448V445.248a14.656 14.656 0 0 0-5.824-11.776L151.04 254.72l-2.944-2.88a71.68 71.68 0 0 1-13.952-79.168 72 72 0 0 1 66.816-43.968h603.712c29.376 0 55.808 16.896 67.52 43.968 11.776 27.136 6.656 57.152-13.184 79.168l-2.944 2.88-226.24 180.992a14.656 14.656 0 0 0-5.12 11.712v358.272c0 40.448-32.896 73.216-73.408 73.216zM189.248 210.752l222.528 177.28c17.664 13.824 27.968 34.88 27.904 57.216v306.944a14.656 14.656 0 0 0 7.36 13.184l96.96 52.736a14.72 14.72 0 0 0 22.016-13.184V447.424a73.152 73.152 0 0 1 27.2-57.152l223.232-179.456a14.656 14.656 0 0 0-11.712-23.488H200.96a14.72 14.72 0 0 0-11.776 23.488z"}})])}),[],!1,null,null,null).exports,n=i(7375),s=i(2205),r=i.n(s),a=i(3350),c=i(5171),l=i(5747),p=i(5064),u=i(6875),d={name:"DropBox",components:{ClearSvg:l.Z,Checkbox:u.default},props:{data:{type:Array,default:function(){return[]}},selectedId:{type:String,default:""},placeholder:{type:String,default:"请输入"},status:{type:String,default:"single"},icon:{type:String,default:"screen"}},data:function(){return{position:!0,dropBoxStatus:!1,activeClose:!0,activeConfirm:!1,searchText:"",dropDataHistory:[],dropData:[],confirmClicked:!1}},watch:{data:{handler:function(t){this.setDropData(JSON.parse(JSON.stringify(t)))},deep:!0,immediate:!0},searchText:function(t,e){var n=this;if(t!==e)if(t){this.timer&&clearTimeout(this.timer);var i=this.data;this.timer=setTimeout((function(){n.setDropData(JSON.parse(JSON.stringify(i)),t)}),300)}else this.dropData=[]},dropBoxStatus:function(t){var e=this;t&&this.$nextTick((function(){e.$el.focus()}))}},methods:{TextEllipsis:p.Z,clearText:function(){var t=this.status,e=this.dropDataHistory,n=this.dropData;this.searchText="",this.dropData=[],t.includes("Search")&&(t.includes("single")?this.$emit("change","",{}):this.activeConfirm=JSON.stringify(e)!==JSON.stringify(n))},setDropData:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this,i=this.status,o={filter:function(){return e?t.filter((function(t){return t.name.includes(e)?t:null})):[]},single:function(){n.dropData=t},multiple:function(){n.dropData=t.map((function(t){return t.checked=t.checked||"uncheck",t.disabled=t.disabled||!1,t}))},singleSearch:function(){n.dropData=this.filter()},multipleSearch:function(){n.dropData=this.filter().map((function(t){return t.checked=t.checked||"uncheck",t.disabled=t.disabled||!1,t}))}};o[i](),this.dropDataHistory=JSON.parse(JSON.stringify(n.dropData))},itemClick:function(t){this.$emit("change",t.id,t)},checkboxChange:function(t,e){var n=e.i,i=this.dropData.map((function(e,i){return Number(n)===i&&(e.checked=t),e}));this.dropData=i,this.activeConfirm=JSON.stringify(this.dropDataHistory)!==JSON.stringify(i)},blurHandle:function(){this.activeClose&&this.cancel()},dropBoxEnter:function(){this.activeClose=!1},dropBoxLeave:function(){this.activeClose=!0,this.$el.focus()},cancel:function(){var t=this,e=this.status,n=this.confirmClicked,i=this.dropDataHistory;e.includes("multiple")&&(this.dropData=JSON.parse(JSON.stringify(i))),this.activeConfirm=!1,e.includes("Search")&&!n&&setTimeout((function(){t.clearText()}),300),this.$emit("cancel",!1)},confirm:function(){var t=this;if(this.activeConfirm){var e=this.dropData,n=[],i=[];e.forEach((function(t){"checked"===t.checked&&(n.push(t),i.push(t.id))})),setTimeout((function(){t.dropDataHistory=JSON.parse(JSON.stringify(t.dropData))}),300),this.$emit("change",i.toString(),n),this.activeConfirm=!1,this.confirmClicked=!0}}},beforeDestroy:function(){this.timer&&clearTimeout(this.timer)}},h=d,f=(0,t.Z)(h,(function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:t.position?"selectDownUpExtend":"selectDownUpExtendTop"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.dropBoxStatus,expression:"dropBoxStatus"}],class:["p-drop-box",t.status.includes("multiple")?"p-drop-box-multiple".concat(t.status.includes("Search")?"-search":""):"p-drop-box-single".concat(t.status.includes("Search")?"-search":"")],attrs:{tabindex:"-1"},on:{blur:t.blurHandle,mouseenter:t.dropBoxEnter,mouseleave:t.dropBoxLeave}},[t.status.includes("Search")?e("div",{staticClass:"p-drop-box-search"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.searchText,expression:"searchText"}],staticClass:"p-drop-box-input",attrs:{type:"text",placeholder:t.placeholder},domProps:{value:t.searchText},on:{input:function(e){e.target.composing||(t.searchText=e.target.value)}}}),t._v(" "),e("i",{directives:[{name:"show",rawName:"v-show",value:!!t.searchText,expression:"!!searchText"}],staticClass:"p-drop-box-input-clear",on:{click:t.clearText}},[e("ClearSvg")],1)]):t._e(),t._v(" "),e("div",{staticClass:"p-drop-box-list"},[t._l(t.dropData,(function(n,i){return[e("div",{key:"item-".concat(n.id,"-").concat(i),class:["p-drop-box-item",t.status.includes("multiple")&&"p-drop-box-item-checkbox",t.status.includes("single")&&t.selectedId===n.id&&"p-drop-box-item-selected"]},[t.status.includes("multiple")?e("Checkbox",{attrs:{checked:n.checked,disabled:n.disabled,"data-i":i},on:{change:t.checkboxChange}},[t._v(t._s(n.name))]):e("section",{staticClass:"p-drop-box-text",on:{mouseenter:t.TextEllipsis,click:function(e){return e.stopPropagation(),t.itemClick(n)}}},[t._v(t._s(n.name))])],1)]}))],2),t._v(" "),t.status.includes("multiple")?[e("div",{class:["p-drop-box-handle",t.dropData.length>5&&"p-drop-box-handle-shadow"]},[e("section",{staticClass:"p-drop-box-btn p-drop-box-cancel",on:{click:t.cancel}},[t._v("取消")]),t._v(" "),e("section",{class:["p-drop-box-btn",t.activeConfirm?"p-drop-box-confirm":"p-drop-box-disabled"],on:{click:t.confirm}},[t._v("确定")])])]:t._e()],2)])}),[],!1,null,null,null).exports,v=r().extend(f),m=null,g=function(t){var e=t.tag,n=t.propsData,i=document.body;return(m=(m=new v({propsData:n})).$mount()).tag=e,m.dom=i,i.appendChild(m.$el),m};g.remove=c.Z,g.resetPosition=function(t){var e=t.status,n=t.data,i=g.getWidth(e,void 0===n?[]:n),o=e.includes("multiple")?250:208,s=(0,a.Z)(t.tag,t.dom,o,i),r=s.X,c=s.Y,l=s.P;t.position=l,t.$el.style.top="".concat(c,"px"),t.$el.style.left="".concat(r,"px")},g.getWidth=function(t,e){var n=document.body,i=document.createElement("div");i.className="p-drop-box",i.style.padding="0",i.style.border="0",i.style.height="0",i.style.zIndex="-100";var o='<div class="p-drop-box-list">';e.forEach((function(t){o+='<article class="p-drop-box-item"><section class="p-drop-box-text">'.concat(t.name,"</section></article>")})),o+="<div>",i.innerHTML=o,n.appendChild(i);var s=i.getBoundingClientRect().width;return n.removeChild(i),t.includes("single")?s:s+20};var x=g,y=i(7488),S={name:"SelectScreen",components:{FilterSvg:e,TriangleSvg:n.Z},inject:["tableLayoutMain"],props:{data:{type:Array,default:function(){return[]}},status:{type:String,default:"single"},selectedId:{type:String,default:""},selectName:{type:String,default:""},icon:{type:String,default:"screen"}},data:function(){return{dropBoxStatus:!1,dropData:[],singleName:"全部",choiceId:"",selectedData:[]}},computed:{selectedName:function(){var t=this.status,e=this.singleName,n=this.selectedData;if(t.includes("single"))return e;var i=[];return n.forEach((function(t){i.push(t.name)})),i.toString().replace(/,/g,"、")},activeSvg:function(){var t=this.data,e=this.status,n=this.selectedId,i=this.selectedData;if("triangle"!==this.icon){if(e.includes("single")){var o=t[0].id;return n&&n!==(void 0===o?"":o)}return!!e.includes("multiple")&&i.length>0}}},watch:{data:{handler:function(t){this.setInit(this.selectedId,JSON.parse(JSON.stringify(t)))},deep:!0},selectedId:function(t,e){t!==e&&t!==this.choiceId&&this.setInit(t,JSON.parse(JSON.stringify(this.data)))}},mounted:function(){this.setInit(this.selectedId,JSON.parse(JSON.stringify(this.data)))},methods:{setInit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.status;if(this.choiceId=t,n.includes("single")){var i=e.find((function(e){return e.id===t}))||{},o=i.name,s=void 0===o?"":o;this.singleName=s}else this.selectedData=e.filter((function(t){return"checked"===t.checked?t:null}));this.dropData=e},listenScroll:function(){this.dropBoxStatus&&this.setDropdownStatus(!1)},openDropBox:function(){var t=this;if(this.popoverTip&&(this.popoverTip.show=!1),this.dropBoxStatus)this.setDropdownStatus(!1);else if(this.dropPanel)this.setDropdownStatus(!0);else{var e=this.dropData,n=this.status,i=this.selectedId,o=this.selectName,s=this.$refs.selectScreen,r=this.icon;this.dropPanel=x({tag:s,propsData:{parent:this,data:e,status:n,selectedId:i,selectName:o,icon:r}}).$on("change",(function(e,n){t.dropChange(e,n),t.setDropdownStatus(!1)})).$on("cancel",(function(e){t.setDropdownStatus(e)})),this.dropPanel.$nextTick((function(){t.setDropdownStatus(!0),t.popoverTip&&(t.popoverTip.show=!1)}));var a=this.tableLayoutMain.$refs.tableLayoutMain;a&&a.addEventListener("scroll",this.listenScroll,!1),window.addEventListener("scroll",this.listenScroll,!1),this.$once("hook:beforeDestroy",(function(){t.setDropdownStatus(!1),x.remove(t.dropPanel),a&&a.removeEventListener("scroll",t.listenScroll),window.removeEventListener("scroll",t.listenScroll)}))}},dropChange:function(t,e){var n=this.status,i=this.icon;this.choiceId=t,this.dropPanel&&(this.dropPanel.selectedId=t),n.includes("single")?this.singleName=e.name:this.selectedData=e,this.$emit("change",i,t,e)},setDropdownStatus:function(t){this.dropBoxStatus=t,this.dropPanel&&(this.dropPanel.dropBoxStatus=t,t&&x.resetPosition(this.dropPanel))},popoverTipEnter:function(){var t=this,e=this.dropBoxStatus,n=this.selectedName;!e&&n&&(this.popoverTip?this.timer?this.clearTimer():this.timerEnter=setTimeout((function(){t.dropBoxStatus||(t.popoverTip.content=n,y.default.resetPosition(t.popoverTip),clearTimeout(t.timerEnter),t.timerEnter=null)}),300):this.timerEnter=setTimeout((function(){var e=t.$refs.refTrigger;t.popoverTip=(0,y.default)({tag:e,countTag:e,propsData:{content:n}}).$on("popoverTipHandle",(function(e){"enter"===e?t.clearTimer():t.setTimer()})),t.popoverTip.$nextTick((function(){t.dropBoxStatus||y.default.resetPosition(t.popoverTip)})),clearTimeout(t.timerEnter),t.timerEnter=null}),300))},setTimer:function(){var t=this;this.timer=setTimeout((function(){t.popoverTip.show=!1,t.clearTimer()}),300)},clearTimer:function(){clearTimeout(this.timer),this.timer=null},mouseLeave:function(){this.timerEnter?clearTimeout(this.timerEnter):this.popoverTip&&this.setTimer()}},beforeDestroy:function(){this.popoverTip&&y.default.remove(this.popoverTip)}},w=S,b=(0,t.Z)(w,(function(){var t=this,e=t._self._c;return e("div",{ref:"selectScreen",class:["p-select-screen",t.dropBoxStatus&&"p-select-screen-none"],on:{click:function(e){return e.stopPropagation(),t.openDropBox.apply(null,arguments)}}},[["triangle"===t.icon?e("i",{ref:"refTrigger",class:["p-select-screen-svg",!t.dropBoxStatus&&"p-select-triangle-open",t.activeSvg&&"p-select-screen-svg-active"],on:{mouseenter:t.popoverTipEnter,mouseleave:t.mouseLeave}},[e("TriangleSvg")],1):e("i",{ref:"refTrigger",class:["p-select-screen-svg",t.activeSvg&&"p-select-screen-svg-active"],on:{mouseenter:t.popoverTipEnter,mouseleave:t.mouseLeave}},[e("FilterSvg")],1)],t._v(" "),t.dropBoxStatus?e("div",{staticClass:"p-select-screen-shade",on:{click:function(t){t.stopPropagation()}}}):t._e()],2)}),[],!1,null,null,null),C=b.exports;C.install=function(t){return t.component(C.name,C)};var T=C}(),o}()},"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("SelectScreen",["vue"],e):"object"==typeof exports?exports.SelectScreen=e(require("vue")):t.SelectScreen=e(t.Vue);