| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166 |
- import { g as he, m as me, d as o, r as Re, cP as N, t as ve, c as x, cy as ze, u as B, i as ae, _ as w, o as fe, dW as E, bP as Ee, h as Le, dX as De, b3 as Ge, dY as We, P as L, bU as V, dZ as Y } from "./index2.js";
- import { defineComponent as y, createVNode as r, computed as G, isVNode as pe } from "vue";
- import { T as be } from "./index13.js";
- const _e = (e) => {
- const {
- antCls: t,
- componentCls: n,
- cardHeadHeight: a,
- cardPaddingBase: i,
- cardHeadTabsMarginBottom: l
- } = e;
- return o(o({
- display: "flex",
- justifyContent: "center",
- flexDirection: "column",
- minHeight: a,
- marginBottom: -1,
- padding: `0 ${i}px`,
- color: e.colorTextHeading,
- fontWeight: e.fontWeightStrong,
- fontSize: e.fontSizeLG,
- background: "transparent",
- borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,
- borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
- }, N()), {
- "&-wrapper": {
- width: "100%",
- display: "flex",
- alignItems: "center"
- },
- "&-title": o(o({
- display: "inline-block",
- flex: 1
- }, ve), {
- [`
- > ${n}-typography,
- > ${n}-typography-edit-content
- `]: {
- insetInlineStart: 0,
- marginTop: 0,
- marginBottom: 0
- }
- }),
- [`${t}-tabs-top`]: {
- clear: "both",
- marginBottom: l,
- color: e.colorText,
- fontWeight: "normal",
- fontSize: e.fontSize,
- "&-bar": {
- borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`
- }
- }
- });
- }, ke = (e) => {
- const {
- cardPaddingBase: t,
- colorBorderSecondary: n,
- cardShadow: a,
- lineWidth: i
- } = e;
- return {
- width: "33.33%",
- padding: t,
- border: 0,
- borderRadius: 0,
- boxShadow: `
- ${i}px 0 0 0 ${n},
- 0 ${i}px 0 0 ${n},
- ${i}px ${i}px 0 0 ${n},
- ${i}px 0 0 0 ${n} inset,
- 0 ${i}px 0 0 ${n} inset;
- `,
- transition: `all ${e.motionDurationMid}`,
- "&-hoverable:hover": {
- position: "relative",
- zIndex: 1,
- boxShadow: a
- }
- };
- }, Oe = (e) => {
- const {
- componentCls: t,
- iconCls: n,
- cardActionsLiMargin: a,
- cardActionsIconSize: i,
- colorBorderSecondary: l
- } = e;
- return o(o({
- margin: 0,
- padding: 0,
- listStyle: "none",
- background: e.colorBgContainer,
- borderTop: `${e.lineWidth}px ${e.lineType} ${l}`,
- display: "flex",
- borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `
- }, N()), {
- "& > li": {
- margin: a,
- color: e.colorTextDescription,
- textAlign: "center",
- "> span": {
- position: "relative",
- display: "block",
- minWidth: e.cardActionsIconSize * 2,
- fontSize: e.fontSize,
- lineHeight: e.lineHeight,
- cursor: "pointer",
- "&:hover": {
- color: e.colorPrimary,
- transition: `color ${e.motionDurationMid}`
- },
- [`a:not(${t}-btn), > ${n}`]: {
- display: "inline-block",
- width: "100%",
- color: e.colorTextDescription,
- lineHeight: `${e.fontSize * e.lineHeight}px`,
- transition: `color ${e.motionDurationMid}`,
- "&:hover": {
- color: e.colorPrimary
- }
- },
- [`> ${n}`]: {
- fontSize: i,
- lineHeight: `${i * e.lineHeight}px`
- }
- },
- "&:not(:last-child)": {
- borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${l}`
- }
- }
- });
- }, Ne = (e) => o(o({
- margin: `-${e.marginXXS}px 0`,
- display: "flex"
- }, N()), {
- "&-avatar": {
- paddingInlineEnd: e.padding
- },
- "&-detail": {
- overflow: "hidden",
- flex: 1,
- "> div:not(:last-child)": {
- marginBottom: e.marginXS
- }
- },
- "&-title": o({
- color: e.colorTextHeading,
- fontWeight: e.fontWeightStrong,
- fontSize: e.fontSizeLG
- }, ve),
- "&-description": {
- color: e.colorTextDescription
- }
- }), je = (e) => {
- const {
- componentCls: t,
- cardPaddingBase: n,
- colorFillAlter: a
- } = e;
- return {
- [`${t}-head`]: {
- padding: `0 ${n}px`,
- background: a,
- "&-title": {
- fontSize: e.fontSize
- }
- },
- [`${t}-body`]: {
- padding: `${e.padding}px ${n}px`
- }
- };
- }, qe = (e) => {
- const {
- componentCls: t
- } = e;
- return {
- overflow: "hidden",
- [`${t}-body`]: {
- userSelect: "none"
- }
- };
- }, Xe = (e) => {
- const {
- componentCls: t,
- cardShadow: n,
- cardHeadPadding: a,
- colorBorderSecondary: i,
- boxShadow: l,
- cardPaddingBase: d
- } = e;
- return {
- [t]: o(o({}, Re(e)), {
- position: "relative",
- background: e.colorBgContainer,
- borderRadius: e.borderRadiusLG,
- [`&:not(${t}-bordered)`]: {
- boxShadow: l
- },
- [`${t}-head`]: _e(e),
- [`${t}-extra`]: {
- // https://stackoverflow.com/a/22429853/3040605
- marginInlineStart: "auto",
- color: "",
- fontWeight: "normal",
- fontSize: e.fontSize
- },
- [`${t}-body`]: o({
- padding: d,
- borderRadius: ` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
- }, N()),
- [`${t}-grid`]: ke(e),
- [`${t}-cover`]: {
- "> *": {
- display: "block",
- width: "100%"
- },
- img: {
- borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
- }
- },
- [`${t}-actions`]: Oe(e),
- [`${t}-meta`]: Ne(e)
- }),
- [`${t}-bordered`]: {
- border: `${e.lineWidth}px ${e.lineType} ${i}`,
- [`${t}-cover`]: {
- marginTop: -1,
- marginInlineStart: -1,
- marginInlineEnd: -1
- }
- },
- [`${t}-hoverable`]: {
- cursor: "pointer",
- transition: `box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,
- "&:hover": {
- borderColor: "transparent",
- boxShadow: n
- }
- },
- [`${t}-contain-grid`]: {
- [`${t}-body`]: {
- display: "flex",
- flexWrap: "wrap"
- },
- [`&:not(${t}-loading) ${t}-body`]: {
- marginBlockStart: -e.lineWidth,
- marginInlineStart: -e.lineWidth,
- padding: 0
- }
- },
- [`${t}-contain-tabs`]: {
- [`> ${t}-head`]: {
- [`${t}-head-title, ${t}-extra`]: {
- paddingTop: a
- }
- }
- },
- [`${t}-type-inner`]: je(e),
- [`${t}-loading`]: qe(e),
- [`${t}-rtl`]: {
- direction: "rtl"
- }
- };
- }, Ke = (e) => {
- const {
- componentCls: t,
- cardPaddingSM: n,
- cardHeadHeightSM: a
- } = e;
- return {
- [`${t}-small`]: {
- [`> ${t}-head`]: {
- minHeight: a,
- padding: `0 ${n}px`,
- fontSize: e.fontSize,
- [`> ${t}-head-wrapper`]: {
- [`> ${t}-extra`]: {
- fontSize: e.fontSize
- }
- }
- },
- [`> ${t}-body`]: {
- padding: n
- }
- },
- [`${t}-small${t}-contain-tabs`]: {
- [`> ${t}-head`]: {
- [`${t}-head-title, ${t}-extra`]: {
- minHeight: a,
- paddingTop: 0,
- display: "flex",
- alignItems: "center"
- }
- }
- }
- };
- }, Fe = he("Card", (e) => {
- const t = me(e, {
- cardShadow: e.boxShadowCard,
- cardHeadHeight: e.fontSizeLG * e.lineHeightLG + e.padding * 2,
- cardHeadHeightSM: e.fontSize * e.lineHeight + e.paddingXS * 2,
- cardHeadPadding: e.padding,
- cardPaddingBase: e.paddingLG,
- cardHeadTabsMarginBottom: -e.padding - e.lineWidth,
- cardActionsLiMargin: `${e.paddingSM}px 0`,
- cardActionsIconSize: e.fontSize,
- cardPaddingSM: 12
- // Fixed padding.
- });
- return [
- // Style
- Xe(t),
- // Size
- Ke(t)
- ];
- }), Ue = () => ({
- prefixCls: String,
- width: {
- type: [Number, String]
- }
- }), oe = y({
- compatConfig: {
- MODE: 3
- },
- name: "SkeletonTitle",
- props: Ue(),
- setup(e) {
- return () => {
- const {
- prefixCls: t,
- width: n
- } = e, a = typeof n == "number" ? `${n}px` : n;
- return r("h3", {
- class: t,
- style: {
- width: a
- }
- }, null);
- };
- }
- }), Ve = () => ({
- prefixCls: String,
- width: {
- type: [Number, String, Array]
- },
- rows: Number
- }), Ye = y({
- compatConfig: {
- MODE: 3
- },
- name: "SkeletonParagraph",
- props: Ve(),
- setup(e) {
- const t = (n) => {
- const {
- width: a,
- rows: i = 2
- } = e;
- if (Array.isArray(a))
- return a[n];
- if (i - 1 === n)
- return a;
- };
- return () => {
- const {
- prefixCls: n,
- rows: a
- } = e, i = [...Array(a)].map((l, d) => {
- const g = t(d);
- return r("li", {
- key: d,
- style: {
- width: typeof g == "number" ? `${g}px` : g
- }
- }, null);
- });
- return r("ul", {
- class: n
- }, [i]);
- };
- }
- }), j = () => ({
- prefixCls: String,
- size: [String, Number],
- shape: String,
- active: {
- type: Boolean,
- default: void 0
- }
- }), W = (e) => {
- const {
- prefixCls: t,
- size: n,
- shape: a
- } = e, i = x({
- [`${t}-lg`]: n === "large",
- [`${t}-sm`]: n === "small"
- }), l = x({
- [`${t}-circle`]: a === "circle",
- [`${t}-square`]: a === "square",
- [`${t}-round`]: a === "round"
- }), d = typeof n == "number" ? {
- width: `${n}px`,
- height: `${n}px`,
- lineHeight: `${n}px`
- } : {};
- return r("span", {
- class: x(t, i, l),
- style: d
- }, null);
- };
- W.displayName = "SkeletonElement";
- const Ze = new ze("ant-skeleton-loading", {
- "0%": {
- transform: "translateX(-37.5%)"
- },
- "100%": {
- transform: "translateX(37.5%)"
- }
- }), q = (e) => ({
- height: e,
- lineHeight: `${e}px`
- }), I = (e) => o({
- width: e
- }, q(e)), Je = (e) => ({
- position: "relative",
- // fix https://github.com/ant-design/ant-design/issues/36444
- // https://monshin.github.io/202109/css/safari-border-radius-overflow-hidden/
- /* stylelint-disable-next-line property-no-vendor-prefix,value-no-vendor-prefix */
- zIndex: 0,
- overflow: "hidden",
- background: "transparent",
- "&::after": {
- position: "absolute",
- top: 0,
- insetInlineEnd: "-150%",
- bottom: 0,
- insetInlineStart: "-150%",
- background: e.skeletonLoadingBackground,
- animationName: Ze,
- animationDuration: e.skeletonLoadingMotionDuration,
- animationTimingFunction: "ease",
- animationIterationCount: "infinite",
- content: '""'
- }
- }), Z = (e) => o({
- width: e * 5,
- minWidth: e * 5
- }, q(e)), Qe = (e) => {
- const {
- skeletonAvatarCls: t,
- color: n,
- controlHeight: a,
- controlHeightLG: i,
- controlHeightSM: l
- } = e;
- return {
- [`${t}`]: o({
- display: "inline-block",
- verticalAlign: "top",
- background: n
- }, I(a)),
- [`${t}${t}-circle`]: {
- borderRadius: "50%"
- },
- [`${t}${t}-lg`]: o({}, I(i)),
- [`${t}${t}-sm`]: o({}, I(l))
- };
- }, et = (e) => {
- const {
- controlHeight: t,
- borderRadiusSM: n,
- skeletonInputCls: a,
- controlHeightLG: i,
- controlHeightSM: l,
- color: d
- } = e;
- return {
- [`${a}`]: o({
- display: "inline-block",
- verticalAlign: "top",
- background: d,
- borderRadius: n
- }, Z(t)),
- [`${a}-lg`]: o({}, Z(i)),
- [`${a}-sm`]: o({}, Z(l))
- };
- }, $e = (e) => o({
- width: e
- }, q(e)), tt = (e) => {
- const {
- skeletonImageCls: t,
- imageSizeBase: n,
- color: a,
- borderRadiusSM: i
- } = e;
- return {
- [`${t}`]: o(o({
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- verticalAlign: "top",
- background: a,
- borderRadius: i
- }, $e(n * 2)), {
- [`${t}-path`]: {
- fill: "#bfbfbf"
- },
- [`${t}-svg`]: o(o({}, $e(n)), {
- maxWidth: n * 4,
- maxHeight: n * 4
- }),
- [`${t}-svg${t}-svg-circle`]: {
- borderRadius: "50%"
- }
- }),
- [`${t}${t}-circle`]: {
- borderRadius: "50%"
- }
- };
- }, J = (e, t, n) => {
- const {
- skeletonButtonCls: a
- } = e;
- return {
- [`${n}${a}-circle`]: {
- width: t,
- minWidth: t,
- borderRadius: "50%"
- },
- [`${n}${a}-round`]: {
- borderRadius: t
- }
- };
- }, Q = (e) => o({
- width: e * 2,
- minWidth: e * 2
- }, q(e)), nt = (e) => {
- const {
- borderRadiusSM: t,
- skeletonButtonCls: n,
- controlHeight: a,
- controlHeightLG: i,
- controlHeightSM: l,
- color: d
- } = e;
- return o(o(o(o(o({
- [`${n}`]: o({
- display: "inline-block",
- verticalAlign: "top",
- background: d,
- borderRadius: t,
- width: a * 2,
- minWidth: a * 2
- }, Q(a))
- }, J(e, a, n)), {
- [`${n}-lg`]: o({}, Q(i))
- }), J(e, i, `${n}-lg`)), {
- [`${n}-sm`]: o({}, Q(l))
- }), J(e, l, `${n}-sm`));
- }, at = (e) => {
- const {
- componentCls: t,
- skeletonAvatarCls: n,
- skeletonTitleCls: a,
- skeletonParagraphCls: i,
- skeletonButtonCls: l,
- skeletonInputCls: d,
- skeletonImageCls: g,
- controlHeight: T,
- controlHeightLG: b,
- controlHeightSM: m,
- color: v,
- padding: p,
- marginSM: u,
- borderRadius: s,
- skeletonTitleHeight: h,
- skeletonBlockRadius: f,
- skeletonParagraphLineHeight: S,
- controlHeightXS: H,
- skeletonParagraphMarginTop: P
- } = e;
- return {
- [`${t}`]: {
- display: "table",
- width: "100%",
- [`${t}-header`]: {
- display: "table-cell",
- paddingInlineEnd: p,
- verticalAlign: "top",
- // Avatar
- [`${n}`]: o({
- display: "inline-block",
- verticalAlign: "top",
- background: v
- }, I(T)),
- [`${n}-circle`]: {
- borderRadius: "50%"
- },
- [`${n}-lg`]: o({}, I(b)),
- [`${n}-sm`]: o({}, I(m))
- },
- [`${t}-content`]: {
- display: "table-cell",
- width: "100%",
- verticalAlign: "top",
- // Title
- [`${a}`]: {
- width: "100%",
- height: h,
- background: v,
- borderRadius: f,
- [`+ ${i}`]: {
- marginBlockStart: m
- }
- },
- // paragraph
- [`${i}`]: {
- padding: 0,
- "> li": {
- width: "100%",
- height: S,
- listStyle: "none",
- background: v,
- borderRadius: f,
- "+ li": {
- marginBlockStart: H
- }
- }
- },
- [`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
- width: "61%"
- }
- },
- [`&-round ${t}-content`]: {
- [`${a}, ${i} > li`]: {
- borderRadius: s
- }
- }
- },
- [`${t}-with-avatar ${t}-content`]: {
- // Title
- [`${a}`]: {
- marginBlockStart: u,
- [`+ ${i}`]: {
- marginBlockStart: P
- }
- }
- },
- // Skeleton element
- [`${t}${t}-element`]: o(o(o(o({
- display: "inline-block",
- width: "auto"
- }, nt(e)), Qe(e)), et(e)), tt(e)),
- // Skeleton Block Button, Input
- [`${t}${t}-block`]: {
- width: "100%",
- [`${l}`]: {
- width: "100%"
- },
- [`${d}`]: {
- width: "100%"
- }
- },
- // With active animation
- [`${t}${t}-active`]: {
- [`
- ${a},
- ${i} > li,
- ${n},
- ${l},
- ${d},
- ${g}
- `]: o({}, Je(e))
- }
- };
- }, _ = he("Skeleton", (e) => {
- const {
- componentCls: t
- } = e, n = me(e, {
- skeletonAvatarCls: `${t}-avatar`,
- skeletonTitleCls: `${t}-title`,
- skeletonParagraphCls: `${t}-paragraph`,
- skeletonButtonCls: `${t}-button`,
- skeletonInputCls: `${t}-input`,
- skeletonImageCls: `${t}-image`,
- imageSizeBase: e.controlHeight * 1.5,
- skeletonTitleHeight: e.controlHeight / 2,
- skeletonBlockRadius: e.borderRadiusSM,
- skeletonParagraphLineHeight: e.controlHeight / 2,
- skeletonParagraphMarginTop: e.marginLG + e.marginXXS,
- borderRadius: 100,
- skeletonLoadingBackground: `linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,
- skeletonLoadingMotionDuration: "1.4s"
- });
- return [at(n)];
- }, (e) => {
- const {
- colorFillContent: t,
- colorFill: n
- } = e;
- return {
- color: t,
- colorGradientEnd: n
- };
- }), ot = () => ({
- active: {
- type: Boolean,
- default: void 0
- },
- loading: {
- type: Boolean,
- default: void 0
- },
- prefixCls: String,
- avatar: {
- type: [Boolean, Object],
- default: void 0
- },
- title: {
- type: [Boolean, Object],
- default: void 0
- },
- paragraph: {
- type: [Boolean, Object],
- default: void 0
- },
- round: {
- type: Boolean,
- default: void 0
- }
- });
- function ee(e) {
- return e && typeof e == "object" ? e : {};
- }
- function it(e, t) {
- return e && !t ? {
- size: "large",
- shape: "square"
- } : {
- size: "large",
- shape: "circle"
- };
- }
- function rt(e, t) {
- return !e && t ? {
- width: "38%"
- } : e && t ? {
- width: "50%"
- } : {};
- }
- function lt(e, t) {
- const n = {};
- return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
- }
- const $ = y({
- compatConfig: {
- MODE: 3
- },
- name: "ASkeleton",
- props: ae(ot(), {
- avatar: !1,
- title: !0,
- paragraph: !0
- }),
- setup(e, t) {
- let {
- slots: n
- } = t;
- const {
- prefixCls: a,
- direction: i
- } = B("skeleton", e), [l, d] = _(a);
- return () => {
- var g;
- const {
- loading: T,
- avatar: b,
- title: m,
- paragraph: v,
- active: p,
- round: u
- } = e, s = a.value;
- if (T || e.loading === void 0) {
- const h = !!b || b === "", f = !!m || m === "", S = !!v || v === "";
- let H;
- if (h) {
- const A = o(o({
- prefixCls: `${s}-avatar`
- }, it(f, S)), ee(b));
- H = r("div", {
- class: `${s}-header`
- }, [r(W, A, null)]);
- }
- let P;
- if (f || S) {
- let A;
- if (f) {
- const C = o(o({
- prefixCls: `${s}-title`
- }, rt(h, S)), ee(m));
- A = r(oe, C, null);
- }
- let M;
- if (S) {
- const C = o(o({
- prefixCls: `${s}-paragraph`
- }, lt(h, f)), ee(v));
- M = r(Ye, C, null);
- }
- P = r("div", {
- class: `${s}-content`
- }, [A, M]);
- }
- const k = x(s, {
- [`${s}-with-avatar`]: h,
- [`${s}-active`]: p,
- [`${s}-rtl`]: i.value === "rtl",
- [`${s}-round`]: u,
- [d.value]: !0
- });
- return l(r("div", {
- class: k
- }, [H, P]));
- }
- return (g = n.default) === null || g === void 0 ? void 0 : g.call(n);
- };
- }
- }), st = () => o(o({}, j()), {
- size: String,
- block: Boolean
- }), Se = y({
- compatConfig: {
- MODE: 3
- },
- name: "ASkeletonButton",
- props: ae(st(), {
- size: "default"
- }),
- setup(e) {
- const {
- prefixCls: t
- } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, {
- [`${t.value}-active`]: e.active,
- [`${t.value}-block`]: e.block
- }, a.value));
- return () => n(r("div", {
- class: i.value
- }, [r(W, w(w({}, e), {}, {
- prefixCls: `${t.value}-button`
- }), null)]));
- }
- }), ye = y({
- compatConfig: {
- MODE: 3
- },
- name: "ASkeletonInput",
- props: o(o({}, fe(j(), ["shape"])), {
- size: String,
- block: Boolean
- }),
- setup(e) {
- const {
- prefixCls: t
- } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, {
- [`${t.value}-active`]: e.active,
- [`${t.value}-block`]: e.block
- }, a.value));
- return () => n(r("div", {
- class: i.value
- }, [r(W, w(w({}, e), {}, {
- prefixCls: `${t.value}-input`
- }), null)]));
- }
- }), dt = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", Ce = y({
- compatConfig: {
- MODE: 3
- },
- name: "ASkeletonImage",
- props: fe(j(), ["size", "shape", "active"]),
- setup(e) {
- const {
- prefixCls: t
- } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, a.value));
- return () => n(r("div", {
- class: i.value
- }, [r("div", {
- class: `${t.value}-image`
- }, [r("svg", {
- viewBox: "0 0 1098 1024",
- xmlns: "http://www.w3.org/2000/svg",
- class: `${t.value}-image-svg`
- }, [r("path", {
- d: dt,
- class: `${t.value}-image-path`
- }, null)])])]));
- }
- }), ct = () => o(o({}, j()), {
- shape: String
- }), xe = y({
- compatConfig: {
- MODE: 3
- },
- name: "ASkeletonAvatar",
- props: ae(ct(), {
- size: "default",
- shape: "circle"
- }),
- setup(e) {
- const {
- prefixCls: t
- } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, {
- [`${t.value}-active`]: e.active
- }, a.value));
- return () => n(r("div", {
- class: i.value
- }, [r(W, w(w({}, e), {}, {
- prefixCls: `${t.value}-avatar`
- }), null)]));
- }
- });
- $.Button = Se;
- $.Avatar = xe;
- $.Input = ye;
- $.Image = Ce;
- $.Title = oe;
- $.install = function(e) {
- return e.component($.name, $), e.component($.Button.name, Se), e.component($.Avatar.name, xe), e.component($.Input.name, ye), e.component($.Image.name, Ce), e.component($.Title.name, oe), e;
- };
- const {
- TabPane: ut
- } = be, gt = () => ({
- prefixCls: String,
- title: L.any,
- extra: L.any,
- bordered: {
- type: Boolean,
- default: !0
- },
- bodyStyle: {
- type: Object,
- default: void 0
- },
- headStyle: {
- type: Object,
- default: void 0
- },
- loading: {
- type: Boolean,
- default: !1
- },
- hoverable: {
- type: Boolean,
- default: !1
- },
- type: {
- type: String
- },
- size: {
- type: String
- },
- actions: L.any,
- tabList: {
- type: Array
- },
- tabBarExtraContent: L.any,
- activeTabKey: String,
- defaultActiveTabKey: String,
- cover: L.any,
- onTabChange: {
- type: Function
- }
- }), D = y({
- compatConfig: {
- MODE: 3
- },
- name: "ACard",
- inheritAttrs: !1,
- props: gt(),
- slots: Object,
- setup(e, t) {
- let {
- slots: n,
- attrs: a
- } = t;
- const {
- prefixCls: i,
- direction: l,
- size: d
- } = B("card", e), [g, T] = Fe(i), b = (p) => p.map((s, h) => pe(s) && !We(s) || !pe(s) ? r("li", {
- style: {
- width: `${100 / p.length}%`
- },
- key: `action-${h}`
- }, [r("span", null, [s])]) : null), m = (p) => {
- var u;
- (u = e.onTabChange) === null || u === void 0 || u.call(e, p);
- }, v = function() {
- let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], u;
- return p.forEach((s) => {
- s && Ge(s.type) && s.type.__ANT_CARD_GRID && (u = !0);
- }), u;
- };
- return () => {
- var p, u, s, h, f, S;
- const {
- headStyle: H = {},
- bodyStyle: P = {},
- loading: k,
- bordered: A = !0,
- type: M,
- tabList: C,
- hoverable: we,
- activeTabKey: ie,
- defaultActiveTabKey: Be,
- tabBarExtraContent: re = E((p = n.tabBarExtraContent) === null || p === void 0 ? void 0 : p.call(n)),
- title: X = E((u = n.title) === null || u === void 0 ? void 0 : u.call(n)),
- extra: K = E((s = n.extra) === null || s === void 0 ? void 0 : s.call(n)),
- actions: F = E((h = n.actions) === null || h === void 0 ? void 0 : h.call(n)),
- cover: le = E((f = n.cover) === null || f === void 0 ? void 0 : f.call(n))
- } = e, R = Ee((S = n.default) === null || S === void 0 ? void 0 : S.call(n)), c = i.value, Te = {
- [`${c}`]: !0,
- [T.value]: !0,
- [`${c}-loading`]: k,
- [`${c}-bordered`]: A,
- [`${c}-hoverable`]: !!we,
- [`${c}-contain-grid`]: v(R),
- [`${c}-contain-tabs`]: C && C.length,
- [`${c}-${d.value}`]: d.value,
- [`${c}-type-${M}`]: !!M,
- [`${c}-rtl`]: l.value === "rtl"
- }, He = r($, {
- loading: !0,
- active: !0,
- paragraph: {
- rows: 4
- },
- title: !1
- }, {
- default: () => [R]
- }), se = ie !== void 0, Pe = {
- size: "large",
- [se ? "activeKey" : "defaultActiveKey"]: se ? ie : Be,
- onChange: m,
- class: `${c}-head-tabs`
- };
- let de;
- const ce = C && C.length ? r(be, Pe, {
- default: () => [C.map((z) => {
- const {
- tab: ue,
- slots: O
- } = z, ge = O == null ? void 0 : O.tab;
- Le(!O, "Card", "tabList slots is deprecated, Please use `customTab` instead.");
- let U = ue !== void 0 ? ue : n[ge] ? n[ge](z) : null;
- return U = De(n, "customTab", z, () => [U]), r(ut, {
- tab: U,
- key: z.key,
- disabled: z.disabled
- }, null);
- })],
- rightExtra: re ? () => re : null
- }) : null;
- (X || K || ce) && (de = r("div", {
- class: `${c}-head`,
- style: H
- }, [r("div", {
- class: `${c}-head-wrapper`
- }, [X && r("div", {
- class: `${c}-head-title`
- }, [X]), K && r("div", {
- class: `${c}-extra`
- }, [K])]), ce]));
- const Ae = le ? r("div", {
- class: `${c}-cover`
- }, [le]) : null, Ie = r("div", {
- class: `${c}-body`,
- style: P
- }, [k ? He : R]), Me = F && F.length ? r("ul", {
- class: `${c}-actions`
- }, [b(F)]) : null;
- return g(r("div", w(w({
- ref: "cardContainerRef"
- }, a), {}, {
- class: [Te, a.class]
- }), [de, Ae, R && R.length ? Ie : null, Me]));
- };
- }
- }), pt = () => ({
- prefixCls: String,
- title: Y(),
- description: Y(),
- avatar: Y()
- }), te = y({
- compatConfig: {
- MODE: 3
- },
- name: "ACardMeta",
- props: pt(),
- slots: Object,
- setup(e, t) {
- let {
- slots: n
- } = t;
- const {
- prefixCls: a
- } = B("card", e);
- return () => {
- const i = {
- [`${a.value}-meta`]: !0
- }, l = V(n, e, "avatar"), d = V(n, e, "title"), g = V(n, e, "description"), T = l ? r("div", {
- class: `${a.value}-meta-avatar`
- }, [l]) : null, b = d ? r("div", {
- class: `${a.value}-meta-title`
- }, [d]) : null, m = g ? r("div", {
- class: `${a.value}-meta-description`
- }, [g]) : null, v = b || m ? r("div", {
- class: `${a.value}-meta-detail`
- }, [b, m]) : null;
- return r("div", {
- class: i
- }, [T, v]);
- };
- }
- }), $t = () => ({
- prefixCls: String,
- hoverable: {
- type: Boolean,
- default: !0
- }
- }), ne = y({
- compatConfig: {
- MODE: 3
- },
- name: "ACardGrid",
- __ANT_CARD_GRID: !0,
- props: $t(),
- setup(e, t) {
- let {
- slots: n
- } = t;
- const {
- prefixCls: a
- } = B("card", e), i = G(() => ({
- [`${a.value}-grid`]: !0,
- [`${a.value}-grid-hoverable`]: e.hoverable
- }));
- return () => {
- var l;
- return r("div", {
- class: i.value
- }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)]);
- };
- }
- });
- D.Meta = te;
- D.Grid = ne;
- D.install = function(e) {
- return e.component(D.name, D), e.component(te.name, te), e.component(ne.name, ne), e;
- };
- export {
- D as C,
- $ as S,
- ne as _
- };
|