mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
2 lines
3.3 KiB
JavaScript
2 lines
3.3 KiB
JavaScript
import{d as C,cW as x,cX as j,r as s,ah as V,c as m,f as T,j as h,k as r,e as u,g as c,m as g,x as I,y as X,i as O,n as $,h as b,t as A,F as E,z as F,a3 as N,X as Y}from"./index-BAaep8yZ.js";const W=["bounce","flash","pulse","rubberBand","shakeX","headShake","swing","tada","wobble","jello","heartBeat","backInDown","backInLeft","backInRight","backInUp","backOutDown","backOutLeft","backOutRight","backOutUp","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp","bounceOut","bounceOutDown","bounceOutLeft","bounceOutRight","bounceOutUp","fadeIn","fadeInDown","fadeInDownBig","fadeInLeft","fadeInLeftBig","fadeInRight","fadeInRightBig","fadeInUp","fadeInUpBig","fadeInTopLeft","fadeInTopRight","fadeInBottomLeft","fadeInBottomRight","fadeOut","fadeOutDown","fadeOutDownBig","fadeOutLeft","fadeOutLeftBig","fadeOutRight","fadeOutRightBig","fadeOutUp","fadeOutUpBig","fadeOutTopLeft","fadeOutTopRight","fadeOutBottomRight","fadeOutBottomLeft","flip","flipInX","flipInY","flipOutX","flipOutY","lightSpeedInRight","lightSpeedInLeft","lightSpeedOutRight","lightSpeedOutLeft","rotateIn","rotateInDownLeft","rotateInDownRight","rotateInUpLeft","rotateInUpRight","rotateOut","rotateOutDownLeft","rotateOutDownRight","rotateOutUpLeft","rotateOutUpRight","hinge","jackInTheBox","rollIn","rollOut","zoomIn","zoomInDown","zoomInLeft","zoomInRight","zoomInUp","zoomOut","zoomOutDown","zoomOutLeft","zoomOutRight","zoomOutUp","slideInDown","slideInLeft","slideInRight","slideInUp","slideOutDown","slideOutLeft","slideOutRight","slideOutUp"],q={class:"w-[280px]"},G={class:"flex flex-wrap justify-around mb-1"},H=["onMouseenter","onClick"],J=C({name:"ReAnimateSelector",__name:"index",props:x({placeholder:{type:String,default:"请选择动画"}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(d){const v=d,a=j(d,"modelValue"),f=s(),n=s(W),w=V(n),_=m(()=>["mt-1","flex","border","w-[130px]","h-[100px]","items-center","cursor-pointer","transition-all","justify-center","border-[#e5e7eb]","hover:text-primary","hover:duration-[700ms]"]),L=m(()=>e=>a.value===e?{borderColor:"var(--el-color-primary)",color:"var(--el-color-primary)"}:"");function R(e){a.value=e}function k(){a.value=""}function B(e){f.value=e,n.value=w.value.filter(o=>o.includes(e))}const t=s({});function y(e){var o;t.value[e]=(o=t.value[e])!=null&&o.loading?Object.assign({},t.value[e],{loading:!1}):Object.assign({},t.value[e],{loading:!0})}function D(){t.value={}}return(e,o)=>{const U=r("el-empty"),z=r("el-scrollbar"),S=r("el-select");return u(),T(S,{clearable:"",filterable:"",placeholder:v.placeholder,"popper-class":"pure-animate-popper","model-value":a.value,"filter-method":B,onClear:k},{empty:h(()=>[c("div",q,[g(z,{noresize:"",height:"212px","view-style":{overflow:"hidden"},class:"border-t border-[#e5e7eb]"},{default:h(()=>[c("ul",G,[(u(!0),I(E,null,X(n.value,(l,i)=>{var p;return u(),I("li",{key:i,class:O(_.value),style:$(L.value(l)),onMouseenter:b(M=>y(i),["prevent"]),onMouseleave:b(D,["prevent"]),onClick:M=>R(l)},[c("h4",{class:O([`animate__animated animate__${(p=t.value[i])!=null&&p.loading?l+" animate__infinite":""} `])},A(l),3)],46,H)}),128))]),F(g(U,{description:`${f.value} 动画不存在`,"image-size":60},null,8,["description"]),[[N,n.value.length===0]])]),_:1})])]),_:1},8,["placeholder","model-value"])}}}),P=Y(J);export{P as R};
|