UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

47 lines (46 loc) 1.5 kB
import { defineComponent as f, createElementBlock as a, openBlock as i, normalizeClass as u, createElementVNode as r, createVNode as d, unref as e, renderSlot as m, normalizeStyle as C, createTextVNode as _, toDisplayString as y, withCtx as h, createCommentVNode as k } from "vue"; import { CollapseTransition as v } from "../../CollapseTransition/index.mjs"; import { useCollapseItem as I } from "./hook/useCollapseItem.mjs"; import { Icon as N } from "@vuux/icons"; const S = { key: 0 }, V = { class: "collapse-content" }, g = /* @__PURE__ */ f({ name: "CollapseItem", __name: "item", props: { id: {}, title: {}, disabled: { type: Boolean } }, setup(p) { const t = p, { isExpanded: o, handleShowHandle: l } = I(t); return (s, n) => (i(), a("div", { class: u(["collapse-item", { "is-disabled": t.disabled }]) }, [ r("div", { class: "collapse-title", onClick: n[0] || (n[0] = //@ts-ignore (...c) => e(l) && e(l)(...c)) }, [ d(e(N), { name: "Icon6657361", style: C({ transform: e(o) ? "rotate(90deg)" : "" }) }, null, 8, ["style"]), m(s.$slots, "title", {}, () => [ _(y(t.title), 1) ]) ]), d(e(v), null, { default: h(() => [ e(o) ? (i(), a("div", S, [ r("div", V, [ m(s.$slots, "default") ]) ])) : k("", !0) ]), _: 3 }) ], 2)); } }); export { g as default };