UNPKG

st-common-ui-vue3

Version:

小尾巴通用 Vue3 UI 组件库

2 lines (1 loc) 2.03 kB
"use strict";const t=require("vue"),s=require("../StClickParticleBombContainer/StClickParticleBombContainer.vue.js");;/* empty css */const o=require("../../node_modules/.pnpm/st-common-ui-utils@0.1.1/node_modules/st-common-ui-utils/es/utils/el-size-util.js"),i=require("../../node_modules/.pnpm/st-common-core@0.1.1/node_modules/st-common-core/es/num/utils/random-num-util.js"),u=t.defineComponent({name:"StClickBubbleParticleContainer",__name:"StClickBubbleParticleContainer",props:{width:{default:"100%"},height:{default:"100%"},particleCount:{default:50},particleMaxSize:{default:20},particleMinSize:{default:5},offsetInitial:{default:20},offsetEnd:{default:200},particleColor:{default:"#0a87ff"},particleColorRandom:{type:Boolean,default:!1},evenEmpty:{type:Boolean,default:!0},particleZIndex:{default:"initial"},speed:{default:1e3},click:{type:Boolean,default:!0},move:{type:Boolean,default:!1}},setup(c){const l=c,d=(e,n)=>{const r=i.randomInt_n_m(l.particleMinSize,l.particleMaxSize)+"px";e.style.width=r,e.style.height=r;const a=l.particleColorRandom?`rgb(${i.randomInt_0_n(255)}, ${i.randomInt_0_n(255)}, ${i.randomInt_0_n(255)})`:l.particleColor;l.evenEmpty?(e.style.background=n%2===0?"transparent":a,e.style.border=n%2===0?`1px solid ${a}`:"none"):e.style.background=a};return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"st-click-bubble-particle-container",style:t.normalizeStyle({width:t.unref(o).elSizePreHandler(e.width),height:t.unref(o).elSizePreHandler(e.height)})},[t.createVNode(t.unref(s),{"particle-count":e.particleCount,"offset-initial":e.offsetInitial,"offset-end":e.offsetEnd,"set-particle-style-handler":d,"particle-z-index":e.particleZIndex,speed:e.speed,"click-particle-bomb":e.click,"move-particle-bomb":e.move},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["particle-count","offset-initial","offset-end","particle-z-index","speed","click-particle-bomb","move-particle-bomb"])],4))}});module.exports=u;