You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.1 KiB
1 lines
2.1 KiB
import{d as b,s as d,t as c,c as f,B as v,p as S,o,b as n,n as g,F as m,r as p,k as x,K as h,g as _}from"./index-bVOhw2NF.js";const k=b({name:"EsScrollNumber",components:{},props:{options:{type:Object,default:()=>({})},datasets:{type:[String,Boolean,Number],default:""},eventData:{type:[String,Boolean,Number],default:""}},emits:["updateValue","update:eventData"],setup(t,{emit:l}){const s=d([]),a=d(0),u=[1,2,3,4,5,6,7,8,9,0];c(()=>t.datasets,e=>{e?(l("update:eventData",e),l("updateValue",e),s.value=e.toString().split(""),a.value+=1):(s.value=t.options.initialValue.toString().split(""),a.value+=1)},{immediate:!0}),c(()=>t.options.initialValue,e=>{e&&(s.value=e.toString().split(""),a.value+=1)});const r=f(()=>({"font-size":`${t.options.fontSize}px`,height:`${t.options.digitHeight}px`,"line-height":`${t.options.digitHeight}px`,"font-weight":`${t.options.fontWeight}`,color:`${t.options.fontColor}`})),i=f(()=>e=>e!=="."?{width:`${t.options.digitWidth}px`,border:`${t.options.borderWidth}px solid ${t.options.borderColor}`,"box-shadow":`${t.options.boxShadow}`,"margin-right":`${t.options.numberSpacing}px`,"border-radius":`${t.options.borderRadius}px`,"background-color":`${t.options.numberBgColor}`,overflow:"hidden","font-family":`${t.options.fontFamily}`}:{"margin-right":`${t.options.numberSpacing}px`,width:`${t.options.digitWidth}px`});return{...v(t.options),numValue:s,compKey:a,numberList:u,getStyle:r,getBoxStyle:i}}}),B={class:"flex items-center justify-center"},C={key:1,class:"count-flop-content"},z={key:2,class:"count-flop-content"},D={key:0,class:"count-flop-unit"};function N(t,l,s,a,u,r){return o(),n("div",B,[(o(),n("div",{key:t.compKey,class:"count-flop",style:g(t.getStyle)},[(o(!0),n(m,null,p(t.numValue,(i,e)=>(o(),n("div",{key:e,style:g(t.getBoxStyle(i))},[i!=="."&&i!=="-"?(o(),n("div",{key:0,class:x(["count-flop-content",[`rolling_${i}`]])},[(o(!0),n(m,null,p(t.numberList,(y,$)=>(o(),n("div",{key:$,class:"count-flop-num"},h(y),1))),128))],2)):i==="-"?(o(),n("div",C," - ")):(o(),n("div",z," . "))],4))),128)),t.suffix?(o(),n("div",D,h(t.suffix),1)):_("",!0)],4))])}const w=S(k,[["render",N],["__scopeId","data-v-c4720b8f"]]);export{w as default};
|