UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

47 lines (46 loc) 1.33 kB
import { defineComponent as k, useTemplateRef as t, createElementBlock as v, openBlock as y, withModifiers as w, unref as e, createElementVNode as n, normalizeStyle as p } from "vue"; import { useAlpha as _ } from "../hook/useAlpha.mjs"; const M = /* @__PURE__ */ k({ __name: "alpha", props: { width: {}, hue: {}, sat: {}, val: {}, alpha: {} }, emits: ["update:alpha"], setup(u, { expose: i, emit: d }) { const c = u, h = d, r = t("alphaEl"), l = t("alphaCursorEl"), { alphaBgColor: m, cursorColor: f, setSizePoses: C, setCursor: E, onMousedown: o } = _(c, r, l, h); return i({ setSizePoses: C, setCursor: E }), (g, s) => (y(), v("div", { ref_key: "alphaEl", ref: r, class: "alpha-slider", onMousedown: s[0] || (s[0] = //@ts-ignore (...a) => e(o) && e(o)(...a)), onTouchstartPassiveCapture: s[1] || (s[1] = w( //@ts-ignore (...a) => e(o) && e(o)(...a), ["stop"] )) }, [ n("div", { class: "alpha-slider-content", style: p({ background: e(m) }) }, [ n("div", { ref_key: "alphaCursorEl", ref: l, class: "slider-cursor", style: p({ background: e(f) }) }, null, 4) ], 4) ], 544)); } }); export { M as default };