UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

38 lines (37 loc) 1.14 kB
import { defineComponent as l, createElementBlock as p, openBlock as c, withModifiers as m, normalizeStyle as s, unref as e, createElementVNode as f, createBlock as d, createCommentVNode as u } from "vue"; import { useBackTop as k } from "./hook/useBackTop.mjs"; import { Icon as h } from "@vuux/icons"; const b = { class: "back-top-icon" }, y = /* @__PURE__ */ l({ name: "BackTop", __name: "index", props: { height: { default: 200 }, bottom: { default: 30 }, right: { default: 30 }, icon: { default: "Icon2569559" } }, setup(i) { const o = i, { visible: r, handleClick: t } = k(o); return (_, n) => (c(), p("div", { style: s({ right: o.right + "px", bottom: o.bottom + "px", opacity: e(r) ? 1 : 0 }), class: "app-back-top", onClick: n[0] || (n[0] = m( //@ts-ignore (...a) => e(t) && e(t)(...a), ["stop"] )) }, [ f("div", b, [ o.icon ? (c(), d(e(h), { key: 0, name: o.icon, size: 20, color: "#fff" }, null, 8, ["name"])) : u("", !0) ]) ], 4)); } }); export { y as default };