UNPKG

st-common-ui-vue3

Version:

小尾巴通用 Vue3 UI 组件库

36 lines (35 loc) 1.25 kB
import { defineComponent as s, openBlock as l, createElementBlock as n, normalizeStyle as a, unref as t, Fragment as p, renderList as m, toDisplayString as u } from "vue"; import * as i from "../../node_modules/.pnpm/st-common-ui-utils@0.1.1/node_modules/st-common-ui-utils/es/utils/el-size-util.js"; import { horizontalAlignFlexMap as d, verticalAlignFlexMap as f } from "../../enums/text-align-enums.js"; const z = /* @__PURE__ */ s({ name: "StGhostTextHover", __name: "StGhostTextHover", props: { content: {}, horizontalAlign: { default: "left" }, verticalAlign: { default: "top" }, speed: { default: 1e3 }, delay: { default: 100 } }, setup(g) { return (e, c) => (l(), n("div", { class: "st-ghost-text", style: a({ justifyContent: t(d)[e.horizontalAlign], alignItems: t(f)[e.verticalAlign] }) }, [ (l(!0), n(p, null, m(e.content, (r, o) => (l(), n("span", { key: o, class: "st-ghost-text__letter", style: a({ transitionDuration: t(i).elSizePreHandler(e.speed, "ms"), transitionDelay: t(i).elSizePreHandler(o * e.delay, "ms") }) }, u(r === " " ? " " : r), 5))), 128)) ], 4)); } }); export { z as default };