vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
24 lines (23 loc) • 743 B
JavaScript
import { defineComponent as p, createElementBlock as e, openBlock as t, Fragment as a, renderList as m, unref as u, normalizeStyle as _ } from "vue";
import { usePreset as d } from "../hook/usePreset.mjs";
const f = { class: "preset-container" }, k = ["onClick"], x = /* @__PURE__ */ p({
__name: "preset",
props: {
preset: {}
},
emits: ["select"],
setup(n, { emit: o }) {
const s = n, c = o, { handleSelectColor: l } = d(c);
return (C, h) => (t(), e("div", f, [
(t(!0), e(a, null, m(s.preset, (r, i) => (t(), e("div", {
key: i,
style: _({ backgroundColor: r }),
class: "preset-item",
onClick: (v) => u(l)(r)
}, null, 12, k))), 128))
]));
}
});
export {
x as default
};