UNPKG

st-common-ui-vue3

Version:

小尾巴通用 Vue3 UI 组件库

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