| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import { computed as y, ref as i, onMounted as g, resolveComponent as r, openBlock as t, createElementBlock as c, normalizeStyle as u, createElementVNode as n, createBlock as d, toDisplayString as C, createCommentVNode as S, withDirectives as k, renderSlot as h, vShow as w } from "vue";
- import { n as x } from "./index2.js";
- const I = ["id"], b = { class: "epxand" }, B = /* @__PURE__ */ Object.assign({ name: "CollapsesItem" }, {
- __name: "SCollapsesItem",
- props: {
- title: {
- type: String,
- default: ""
- },
- column: {
- type: [Number, String],
- default: 1
- },
- // 本分组项被放进 grid 容器时(如外层多列布局),full 让它独占一整行
- full: {
- type: Boolean,
- default: !1
- }
- },
- setup(l) {
- const o = l, m = y(() => o.full ? { gridColumn: "1 / -1" } : {}), e = i(!0), s = i(1);
- function p() {
- return window.$utils.uuid();
- }
- return g(() => {
- s.value = o.column > 4 ? 4 : o.column;
- }), (f, a) => {
- const v = r("caret-down-outlined"), _ = r("caret-right-outlined");
- return t(), c("div", {
- class: "s-collapses-item",
- style: u(m.value)
- }, [
- l.title ? (t(), c("div", {
- key: 0,
- class: "s-collapses-item-title s-theme-border",
- onClick: a[0] || (a[0] = ($) => e.value = !e.value),
- id: p()
- }, [
- n("div", b, [
- e.value ? (t(), d(v, { key: 0 })) : (t(), d(_, { key: 1 }))
- ]),
- n("div", null, C(l.title), 1)
- ], 8, I)) : S("", !0),
- k(n("div", {
- class: "s-collapses-item-content",
- style: u({
- display: "grid",
- gridTemplateColumns: `repeat(${s.value}, 1fr)`,
- gap: "20px"
- })
- }, [
- h(f.$slots, "default", {}, void 0, !0)
- ], 4), [
- [w, e.value]
- ])
- ], 4);
- };
- }
- }), N = /* @__PURE__ */ x(B, [["__scopeId", "data-v-858feb6e"]]);
- export {
- N as default
- };
|