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,aJ as x,aK as V,r as s,ae as j,K as m,c as T,w as h,b as r,e as u,f as c,i as g,k as I,l as $,E as O,N as A,al as b,B as E,F as N,m as X,a1 as F,S as K}from"./index-DdwK7mwU.js";const Y=["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"],J={class:"w-[280px]"},q={class:"flex flex-wrap justify-around mb-1"},G=["onMouseenter","onClick"],H=C({name:"ReAnimateSelector",__name:"index",props:x({placeholder:{type:String,default:"请选择动画"}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(d){const v=d,a=V(d,"modelValue"),f=s(),n=s(Y),w=j(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 B(){a.value=""}function k(e){f.value=e,n.value=w.value.filter(o=>o.includes(e))}const t=s({});function D(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 y(){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":k,onClear:B},{empty:h(()=>[c("div",J,[g(z,{noresize:"",height:"212px","view-style":{overflow:"hidden"},class:"border-t border-[#e5e7eb]"},{default:h(()=>[c("ul",q,[(u(!0),I(N,null,$(n.value,(l,i)=>{var p;return u(),I("li",{key:i,class:O(_.value),style:A(L.value(l)),onMouseenter:b(M=>D(i),["prevent"]),onMouseleave:b(y,["prevent"]),onClick:M=>R(l)},[c("h4",{class:O([`animate__animated animate__${(p=t.value[i])!=null&&p.loading?l+" animate__infinite":""} `])},E(l),3)],46,G)}),128))]),X(g(U,{description:`${f.value} 动画不存在`,"image-size":60},null,8,["description"]),[[F,n.value.length===0]])]),_:1})])]),_:1},8,["placeholder","model-value"])}}}),Q=K(H);export{Q as R};
|