vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
41 lines (40 loc) • 1.34 kB
JavaScript
import { defineComponent as _, useSlots as y, createElementBlock as a, openBlock as t, normalizeStyle as k, normalizeClass as v, unref as r, renderSlot as x, Fragment as S, renderList as C, createBlock as h, withCtx as g, createTextVNode as z, toDisplayString as B } from "vue";
import I from "./item.vue.mjs";
import { useStep as V } from "./hook/useStep.mjs";
const F = /* @__PURE__ */ _({
name: "Step",
__name: "index",
props: {
modelValue: { default: 1 },
steps: { default: () => [] },
direction: { default: "horizontal" },
icon: { default: "Icon1925311" },
activeIcon: { default: "Icon1722502" },
activeColor: { default: "var(--app-success)" },
ingColor: { default: "var(--app-theme)" }
},
emits: ["update:modelValue"],
setup(n, { expose: s, emit: l }) {
const e = n, c = l, p = y(), { styles: i, next: u, prev: d } = V(e, c);
return s({
next: u,
prev: d
}), (m, $) => (t(), a("div", {
class: v(["app-step", e.direction]),
style: k(r(i))
}, [
r(p).default ? x(m.$slots, "default", { key: 0 }) : (t(!0), a(S, { key: 1 }, C(e.steps, (o, f) => (t(), h(I, {
key: f,
name: o
}, {
default: g(() => [
z(B(o), 1)
]),
_: 2
}, 1032, ["name"]))), 128))
], 6));
}
});
export {
F as default
};