129 lines
3.2 KiB
JavaScript
129 lines
3.2 KiB
JavaScript
import { a as l, u as e } from "./use-route-126c4f06.js";
|
|
import {
|
|
H as a,
|
|
a5 as r,
|
|
I as i,
|
|
v as t,
|
|
a0 as n,
|
|
J as s,
|
|
K as o,
|
|
an as c,
|
|
ah as u,
|
|
P as d,
|
|
Q as v,
|
|
} from "./index-476be0bb.js";
|
|
const [b, f] = a("cell"),
|
|
g = {
|
|
tag: n("div"),
|
|
icon: String,
|
|
size: String,
|
|
title: s,
|
|
value: s,
|
|
label: s,
|
|
center: Boolean,
|
|
isLink: Boolean,
|
|
border: o,
|
|
required: Boolean,
|
|
iconPrefix: String,
|
|
valueClass: c,
|
|
labelClass: c,
|
|
titleClass: c,
|
|
titleStyle: null,
|
|
arrowDirection: String,
|
|
clickable: { type: Boolean, default: null },
|
|
};
|
|
const p = v(
|
|
i({
|
|
name: b,
|
|
props: r({}, g, l),
|
|
setup(l, { slots: a }) {
|
|
const r = e(),
|
|
i = () => {
|
|
if (a.label || u(l.label))
|
|
return t("div", { class: [f("label"), l.labelClass] }, [
|
|
a.label ? a.label() : l.label,
|
|
]);
|
|
},
|
|
n = () => {
|
|
var e;
|
|
if (a.title || u(l.title)) {
|
|
const r = null == (e = a.title) ? void 0 : e.call(a);
|
|
if (Array.isArray(r) && 0 === r.length) return;
|
|
return t(
|
|
"div",
|
|
{ class: [f("title"), l.titleClass], style: l.titleStyle },
|
|
[r || t("span", null, [l.title]), i()]
|
|
);
|
|
}
|
|
},
|
|
s = () => {
|
|
const e = a.value || a.default;
|
|
if (e || u(l.value))
|
|
return t("div", { class: [f("value"), l.valueClass] }, [
|
|
e ? e() : t("span", null, [l.value]),
|
|
]);
|
|
},
|
|
o = () => {
|
|
if (a["right-icon"]) return a["right-icon"]();
|
|
if (l.isLink) {
|
|
const e =
|
|
l.arrowDirection && "right" !== l.arrowDirection
|
|
? "arrow-".concat(l.arrowDirection)
|
|
: "arrow";
|
|
return t(d, { name: e, class: f("right-icon") }, null);
|
|
}
|
|
};
|
|
return () => {
|
|
var e;
|
|
const {
|
|
tag: i,
|
|
size: c,
|
|
center: u,
|
|
border: v,
|
|
isLink: b,
|
|
required: g,
|
|
} = l,
|
|
p = null != (e = l.clickable) ? e : b,
|
|
C = { center: u, required: g, clickable: p, borderless: !v };
|
|
return (
|
|
c && (C[c] = !!c),
|
|
t(
|
|
i,
|
|
{
|
|
class: f(C),
|
|
role: p ? "button" : void 0,
|
|
tabindex: p ? 0 : void 0,
|
|
onClick: r,
|
|
},
|
|
{
|
|
default: () => {
|
|
var e;
|
|
return [
|
|
a.icon
|
|
? a.icon()
|
|
: l.icon
|
|
? t(
|
|
d,
|
|
{
|
|
name: l.icon,
|
|
class: f("left-icon"),
|
|
classPrefix: l.iconPrefix,
|
|
},
|
|
null
|
|
)
|
|
: void 0,
|
|
n(),
|
|
s(),
|
|
o(),
|
|
null == (e = a.extra) ? void 0 : e.call(a),
|
|
];
|
|
},
|
|
}
|
|
)
|
|
);
|
|
};
|
|
},
|
|
})
|
|
);
|
|
export { p as C, g as c };
|