完全跑通1.0版本

This commit is contained in:
2026-05-26 12:56:03 +08:00
parent 2ece5174a7
commit 93c714a93b
11557 changed files with 1648225 additions and 36 deletions

View File

@@ -0,0 +1,9 @@
import { SFCWithInstall } from "../../utils/vue/typescript.js";
import Space, { SpaceInstance, SpaceProps, SpacePropsPublic, spaceProps } from "./src/space.js";
import { SpaceItemInstance, SpaceItemProps, SpaceItemPropsPublic, spaceItemProps } from "./src/item.js";
import { useSpace } from "./src/use-space.js";
//#region ../../packages/components/space/index.d.ts
declare const ElSpace: SFCWithInstall<typeof Space>;
//#endregion
export { ElSpace, ElSpace as default, SpaceInstance, SpaceItemInstance, SpaceItemProps, SpaceItemPropsPublic, SpaceProps, SpacePropsPublic, spaceItemProps, spaceProps, useSpace };

View File

@@ -0,0 +1,18 @@
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
const require_install = require("../../utils/vue/install.js");
const require_item = require("./src/item.js");
const require_use_space = require("./src/use-space.js");
const require_space = require("./src/space.js");
//#region ../../packages/components/space/index.ts
const ElSpace = require_install.withInstall(require_space.default);
//#endregion
exports.ElSpace = ElSpace;
exports.default = ElSpace;
exports.spaceItemProps = require_item.spaceItemProps;
exports.spaceProps = require_space.spaceProps;
exports.useSpace = require_use_space.useSpace;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["withInstall","Space"],"sources":["../../../../../packages/components/space/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Space from './src/space'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElSpace: SFCWithInstall<typeof Space> = withInstall(Space)\nexport default ElSpace\n\nexport * from './src/space'\nexport * from './src/item'\nexport * from './src/use-space'\n"],"mappings":";;;;;;;;;AAKA,MAAa,UAAwCA,gBAAAA,YAAYC,cAAAA,QAAM"}

View File

@@ -0,0 +1,34 @@
import * as _$vue from "vue";
import { ExtractPropTypes, ExtractPublicPropTypes } from "vue";
//#region ../../packages/components/space/src/item.d.ts
declare const spaceItemProps: {
readonly prefixCls: {
readonly type: _$vue.PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
};
type SpaceItemProps = ExtractPropTypes<typeof spaceItemProps>;
type SpaceItemPropsPublic = ExtractPublicPropTypes<typeof spaceItemProps>;
declare const SpaceItem: _$vue.DefineComponent<ExtractPropTypes<{
readonly prefixCls: {
readonly type: _$vue.PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
}>, () => _$vue.VNode<_$vue.RendererNode, _$vue.RendererElement, {
[key: string]: any;
}>, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ExtractPropTypes<{
readonly prefixCls: {
readonly type: _$vue.PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
}>> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
type SpaceItemInstance = InstanceType<typeof SpaceItem> & unknown;
//#endregion
export { SpaceItemInstance, SpaceItemProps, SpaceItemPropsPublic, SpaceItem as default, spaceItemProps };

View File

@@ -0,0 +1,24 @@
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
require("../../../_virtual/_rolldown/runtime.js");
const require_runtime$1 = require("../../../utils/vue/props/runtime.js");
const require_index = require("../../../hooks/use-namespace/index.js");
let vue = require("vue");
//#region ../../packages/components/space/src/item.ts
const spaceItemProps = require_runtime$1.buildProps({ prefixCls: { type: String } });
const SpaceItem = (0, vue.defineComponent)({
name: "ElSpaceItem",
props: spaceItemProps,
setup(props, { slots }) {
const ns = require_index.useNamespace("space");
const classes = (0, vue.computed)(() => `${props.prefixCls || ns.b()}__item`);
return () => (0, vue.h)("div", { class: classes.value }, (0, vue.renderSlot)(slots, "default"));
}
});
//#endregion
exports.default = SpaceItem;
exports.spaceItemProps = spaceItemProps;
//# sourceMappingURL=item.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"item.js","names":["buildProps","useNamespace"],"sources":["../../../../../../packages/components/space/src/item.ts"],"sourcesContent":["import { computed, defineComponent, h, renderSlot } from 'vue'\nimport { buildProps } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const spaceItemProps = buildProps({\n prefixCls: {\n type: String,\n },\n} as const)\nexport type SpaceItemProps = ExtractPropTypes<typeof spaceItemProps>\nexport type SpaceItemPropsPublic = ExtractPublicPropTypes<typeof spaceItemProps>\n\nconst SpaceItem = defineComponent({\n name: 'ElSpaceItem',\n\n props: spaceItemProps,\n\n setup(props, { slots }) {\n const ns = useNamespace('space')\n\n const classes = computed(() => `${props.prefixCls || ns.b()}__item`)\n\n return () =>\n h('div', { class: classes.value }, renderSlot(slots, 'default'))\n },\n})\nexport type SpaceItemInstance = InstanceType<typeof SpaceItem> & unknown\n\nexport default SpaceItem\n"],"mappings":";;;;;;;;;AAMA,MAAa,iBAAiBA,kBAAAA,WAAW,EACvC,WAAW,EACT,MAAM,QACP,EACF,CAAU;AAIX,MAAM,aAAA,GAAA,IAAA,iBAA4B;CAChC,MAAM;CAEN,OAAO;CAEP,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,KAAKC,cAAAA,aAAa,QAAQ;EAEhC,MAAM,WAAA,GAAA,IAAA,gBAAyB,GAAG,MAAM,aAAa,GAAG,GAAG,CAAC,QAAQ;EAEpE,cAAA,GAAA,IAAA,GACI,OAAO,EAAE,OAAO,QAAQ,OAAO,GAAA,GAAA,IAAA,YAAa,OAAO,UAAU,CAAC;;CAErE,CAAC"}

View File

@@ -0,0 +1,99 @@
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
import { Arrayable } from "../../../utils/typescript.js";
import * as _$vue from "vue";
import { ExtractPropTypes, ExtractPublicPropTypes, StyleValue, VNode, VNodeChild } from "vue";
import * as _$csstype from "csstype";
//#region ../../packages/components/space/src/space.d.ts
declare const spaceProps: {
readonly direction: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
readonly class: EpPropFinalized<(new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>) | (((new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>)) | null)[], unknown, unknown, "", boolean>;
readonly style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, "", boolean>;
readonly alignment: EpPropFinalized<(new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined) | (((new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined)) | null)[], unknown, unknown, "center", boolean>;
readonly prefixCls: {
readonly type: _$vue.PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly spacer: EpPropFinalized<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | (((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild)) | null)[], unknown, string | number | VNode<_$vue.RendererNode, _$vue.RendererElement, {
[key: string]: any;
}>, null, boolean>;
readonly wrap: BooleanConstructor;
readonly fill: BooleanConstructor;
readonly fillRatio: EpPropFinalized<NumberConstructor, unknown, unknown, 100, boolean>;
readonly size: {
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, ArrayConstructor, NumberConstructor], "" | "default" | "small" | "large", number | [number, number]>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
};
type SpaceProps = ExtractPropTypes<typeof spaceProps>;
type SpacePropsPublic = ExtractPublicPropTypes<typeof spaceProps>;
declare const Space: _$vue.DefineComponent<ExtractPropTypes<{
readonly direction: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
readonly class: EpPropFinalized<(new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>) | (((new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>)) | null)[], unknown, unknown, "", boolean>;
readonly style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, "", boolean>;
readonly alignment: EpPropFinalized<(new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined) | (((new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined)) | null)[], unknown, unknown, "center", boolean>;
readonly prefixCls: {
readonly type: _$vue.PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly spacer: EpPropFinalized<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | (((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild)) | null)[], unknown, string | number | VNode<_$vue.RendererNode, _$vue.RendererElement, {
[key: string]: any;
}>, null, boolean>;
readonly wrap: BooleanConstructor;
readonly fill: BooleanConstructor;
readonly fillRatio: EpPropFinalized<NumberConstructor, unknown, unknown, 100, boolean>;
readonly size: {
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, ArrayConstructor, NumberConstructor], "" | "default" | "small" | "large", number | [number, number]>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
}>, () => string | VNode<_$vue.RendererNode, _$vue.RendererElement, {
[key: string]: any;
}> | {
[name: string]: unknown;
$stable?: boolean;
} | null, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ExtractPropTypes<{
readonly direction: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
readonly class: EpPropFinalized<(new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>) | (((new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>)) | null)[], unknown, unknown, "", boolean>;
readonly style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, "", boolean>;
readonly alignment: EpPropFinalized<(new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined) | (((new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined)) | null)[], unknown, unknown, "center", boolean>;
readonly prefixCls: {
readonly type: _$vue.PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly spacer: EpPropFinalized<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | (((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild)) | null)[], unknown, string | number | VNode<_$vue.RendererNode, _$vue.RendererElement, {
[key: string]: any;
}>, null, boolean>;
readonly wrap: BooleanConstructor;
readonly fill: BooleanConstructor;
readonly fillRatio: EpPropFinalized<NumberConstructor, unknown, unknown, 100, boolean>;
readonly size: {
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, ArrayConstructor, NumberConstructor], "" | "default" | "small" | "large", number | [number, number]>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
}>> & Readonly<{}>, {
readonly fill: boolean;
readonly direction: EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
readonly style: StyleValue;
readonly wrap: boolean;
readonly class: EpPropMergeType<(new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>) | (((new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>)) | null)[], unknown, unknown>;
readonly alignment: EpPropMergeType<(new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined) | (((new (...args: any[]) => string) | (() => _$csstype.Property.AlignItems | undefined)) | null)[], unknown, unknown>;
readonly spacer: EpPropMergeType<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | (((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild)) | null)[], unknown, string | number | VNode<_$vue.RendererNode, _$vue.RendererElement, {
[key: string]: any;
}>>;
readonly fillRatio: number;
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
type SpaceInstance = InstanceType<typeof Space> & unknown;
//#endregion
export { SpaceInstance, SpaceProps, SpacePropsPublic, Space as default, spaceProps };

View File

@@ -0,0 +1,157 @@
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
require("../../../_virtual/_rolldown/runtime.js");
const require_size = require("../../../constants/size.js");
const require_types = require("../../../utils/types.js");
const require_runtime$1 = require("../../../utils/vue/props/runtime.js");
const require_vnode = require("../../../utils/vue/vnode.js");
const require_item = require("./item.js");
const require_use_space = require("./use-space.js");
let vue = require("vue");
let _vue_shared = require("@vue/shared");
//#region ../../packages/components/space/src/space.ts
const spaceProps = require_runtime$1.buildProps({
/**
* @description Placement direction
*/
direction: {
type: String,
values: ["horizontal", "vertical"],
default: "horizontal"
},
/**
* @description Classname
*/
class: {
type: require_runtime$1.definePropType([
String,
Object,
Array
]),
default: ""
},
/**
* @description Extra style rules
*/
style: {
type: require_runtime$1.definePropType([
String,
Array,
Object,
Boolean
]),
default: ""
},
/**
* @description Controls the alignment of items
*/
alignment: {
type: require_runtime$1.definePropType(String),
default: "center"
},
/**
* @description Prefix for space-items
*/
prefixCls: { type: String },
/**
* @description Spacer
*/
spacer: {
type: require_runtime$1.definePropType([
Object,
String,
Number,
Array
]),
default: null,
validator: (val) => (0, vue.isVNode)(val) || require_types.isNumber(val) || (0, _vue_shared.isString)(val)
},
/**
* @description Auto wrapping
*/
wrap: Boolean,
/**
* @description Whether to fill the container
*/
fill: Boolean,
/**
* @description Ratio of fill
*/
fillRatio: {
type: Number,
default: 100
},
/**
* @description Spacing size
*/
size: {
type: [
String,
Array,
Number
],
values: require_size.componentSizes,
validator: (val) => {
return require_types.isNumber(val) || (0, _vue_shared.isArray)(val) && val.length === 2 && val.every(require_types.isNumber);
}
}
});
const Space = (0, vue.defineComponent)({
name: "ElSpace",
props: spaceProps,
setup(props, { slots }) {
const { classes, containerStyle, itemStyle } = require_use_space.useSpace(props);
function extractChildren(children, parentKey = "", extractedChildren = []) {
const { prefixCls } = props;
children.forEach((child, loopKey) => {
if (require_vnode.isFragment(child)) {
if ((0, _vue_shared.isArray)(child.children)) child.children.forEach((nested, key) => {
if (require_vnode.isFragment(nested) && (0, _vue_shared.isArray)(nested.children)) extractChildren(nested.children, `${parentKey + key}-`, extractedChildren);
else if ((0, vue.isVNode)(nested) && nested?.type === vue.Comment) extractedChildren.push(nested);
else extractedChildren.push((0, vue.createVNode)(require_item.default, {
style: itemStyle.value,
prefixCls,
key: `nested-${parentKey + key}`
}, { default: () => [nested] }, 12, ["style", "prefixCls"]));
});
} else if (require_vnode.isValidElementNode(child)) extractedChildren.push((0, vue.createVNode)(require_item.default, {
style: itemStyle.value,
prefixCls,
key: `LoopKey${parentKey + loopKey}`
}, { default: () => [child] }, 12, ["style", "prefixCls"]));
});
return extractedChildren;
}
return () => {
const { spacer, direction } = props;
const children = (0, vue.renderSlot)(slots, "default", { key: 0 }, () => []);
if ((children.children ?? []).length === 0) return null;
if ((0, _vue_shared.isArray)(children.children)) {
let extractedChildren = extractChildren(children.children);
if (spacer) {
const len = extractedChildren.length - 1;
extractedChildren = extractedChildren.reduce((acc, child, idx) => {
const children = [...acc, child];
if (idx !== len) children.push((0, vue.createVNode)("span", {
style: [itemStyle.value, direction === "vertical" ? "width: 100%" : null],
key: idx
}, [(0, vue.isVNode)(spacer) ? spacer : (0, vue.createTextVNode)(spacer, 1)], 4));
return children;
}, []);
}
return (0, vue.createVNode)("div", {
class: classes.value,
style: containerStyle.value
}, extractedChildren, 6);
}
return children.children;
};
}
});
//#endregion
exports.default = Space;
exports.spaceProps = spaceProps;
//# sourceMappingURL=space.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,14 @@
import { EpPropMergeType } from "../../../utils/vue/props/types.js";
import { Arrayable } from "../../../utils/typescript.js";
import { SpaceProps } from "./space.js";
import * as _$vue from "vue";
import { StyleValue } from "vue";
//#region ../../packages/components/space/src/use-space.d.ts
declare function useSpace(props: SpaceProps): {
classes: _$vue.ComputedRef<EpPropMergeType<(new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>) | (((new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => Arrayable<string | Record<string, boolean>>)) | null)[], unknown, unknown>[]>;
containerStyle: _$vue.ComputedRef<StyleValue>;
itemStyle: _$vue.ComputedRef<StyleValue>;
};
//#endregion
export { useSpace };

View File

@@ -0,0 +1,68 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../_virtual/_rolldown/runtime.js");
const require_types = require("../../../utils/types.js");
const require_index = require("../../../hooks/use-namespace/index.js");
let vue = require("vue");
let _vue_shared = require("@vue/shared");
//#region ../../packages/components/space/src/use-space.ts
const SIZE_MAP = {
small: 8,
default: 12,
large: 16
};
function useSpace(props) {
const ns = require_index.useNamespace("space");
const classes = (0, vue.computed)(() => [
ns.b(),
ns.m(props.direction),
props.class
]);
const horizontalSize = (0, vue.ref)(0);
const verticalSize = (0, vue.ref)(0);
const containerStyle = (0, vue.computed)(() => {
return [
props.wrap || props.fill ? { flexWrap: "wrap" } : {},
{ alignItems: props.alignment },
{
rowGap: `${verticalSize.value}px`,
columnGap: `${horizontalSize.value}px`
},
props.style
];
});
const itemStyle = (0, vue.computed)(() => {
return props.fill ? {
flexGrow: 1,
minWidth: `${props.fillRatio}%`
} : {};
});
(0, vue.watchEffect)(() => {
const { size = "small", wrap, direction: dir, fill } = props;
if ((0, _vue_shared.isArray)(size)) {
const [h = 0, v = 0] = size;
horizontalSize.value = h;
verticalSize.value = v;
} else {
let val;
if (require_types.isNumber(size)) val = size;
else val = SIZE_MAP[size || "small"] || SIZE_MAP.small;
if ((wrap || fill) && dir === "horizontal") horizontalSize.value = verticalSize.value = val;
else if (dir === "horizontal") {
horizontalSize.value = val;
verticalSize.value = 0;
} else {
verticalSize.value = val;
horizontalSize.value = 0;
}
}
});
return {
classes,
containerStyle,
itemStyle
};
}
//#endregion
exports.useSpace = useSpace;
//# sourceMappingURL=use-space.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"use-space.js","names":["useNamespace","isNumber"],"sources":["../../../../../../packages/components/space/src/use-space.ts"],"sourcesContent":["import { computed, ref, watchEffect } from 'vue'\nimport { isArray, isNumber } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport type { SpaceProps } from './space'\nimport type { CSSProperties, StyleValue } from 'vue'\n\nconst SIZE_MAP = {\n small: 8,\n default: 12,\n large: 16,\n} as const\n\nexport function useSpace(props: SpaceProps) {\n const ns = useNamespace('space')\n\n const classes = computed(() => [ns.b(), ns.m(props.direction), props.class])\n\n const horizontalSize = ref(0)\n const verticalSize = ref(0)\n\n const containerStyle = computed<StyleValue>(() => {\n const wrapKls: CSSProperties =\n props.wrap || props.fill ? { flexWrap: 'wrap' } : {}\n const alignment: CSSProperties = {\n alignItems: props.alignment,\n }\n const gap: CSSProperties = {\n rowGap: `${verticalSize.value}px`,\n columnGap: `${horizontalSize.value}px`,\n }\n return [wrapKls, alignment, gap, props.style]\n })\n\n const itemStyle = computed<StyleValue>(() => {\n return props.fill ? { flexGrow: 1, minWidth: `${props.fillRatio}%` } : {}\n })\n\n watchEffect(() => {\n const { size = 'small', wrap, direction: dir, fill } = props\n\n // when the specified size have been given\n if (isArray(size)) {\n const [h = 0, v = 0] = size\n horizontalSize.value = h\n verticalSize.value = v\n } else {\n let val: number\n if (isNumber(size)) {\n val = size\n } else {\n val = SIZE_MAP[size || 'small'] || SIZE_MAP.small\n }\n\n if ((wrap || fill) && dir === 'horizontal') {\n horizontalSize.value = verticalSize.value = val\n } else {\n if (dir === 'horizontal') {\n horizontalSize.value = val\n verticalSize.value = 0\n } else {\n verticalSize.value = val\n horizontalSize.value = 0\n }\n }\n }\n })\n\n return {\n classes,\n containerStyle,\n itemStyle,\n }\n}\n"],"mappings":";;;;;;;AAOA,MAAM,WAAW;CACf,OAAO;CACP,SAAS;CACT,OAAO;CACR;AAED,SAAgB,SAAS,OAAmB;CAC1C,MAAM,KAAKA,cAAAA,aAAa,QAAQ;CAEhC,MAAM,WAAA,GAAA,IAAA,gBAAyB;EAAC,GAAG,GAAG;EAAE,GAAG,EAAE,MAAM,UAAU;EAAE,MAAM;EAAM,CAAC;CAE5E,MAAM,kBAAA,GAAA,IAAA,KAAqB,EAAE;CAC7B,MAAM,gBAAA,GAAA,IAAA,KAAmB,EAAE;CAE3B,MAAM,kBAAA,GAAA,IAAA,gBAA4C;EAUhD,OAAO;GARL,MAAM,QAAQ,MAAM,OAAO,EAAE,UAAU,QAAQ,GAAG,EAAE;GAQrC,EANf,YAAY,MAAM,WAMM;GAAE;IAH1B,QAAQ,GAAG,aAAa,MAAM;IAC9B,WAAW,GAAG,eAAe,MAAM;IAEN;GAAE,MAAM;GAAM;GAC7C;CAEF,MAAM,aAAA,GAAA,IAAA,gBAAuC;EAC3C,OAAO,MAAM,OAAO;GAAE,UAAU;GAAG,UAAU,GAAG,MAAM,UAAU;GAAI,GAAG,EAAE;GACzE;CAEF,CAAA,GAAA,IAAA,mBAAkB;EAChB,MAAM,EAAE,OAAO,SAAS,MAAM,WAAW,KAAK,SAAS;EAGvD,KAAA,GAAA,YAAA,SAAY,KAAK,EAAE;GACjB,MAAM,CAAC,IAAI,GAAG,IAAI,KAAK;GACvB,eAAe,QAAQ;GACvB,aAAa,QAAQ;SAChB;GACL,IAAI;GACJ,IAAIC,cAAAA,SAAS,KAAK,EAChB,MAAM;QAEN,MAAM,SAAS,QAAQ,YAAY,SAAS;GAG9C,KAAK,QAAQ,SAAS,QAAQ,cAC5B,eAAe,QAAQ,aAAa,QAAQ;QAE5C,IAAI,QAAQ,cAAc;IACxB,eAAe,QAAQ;IACvB,aAAa,QAAQ;UAChB;IACL,aAAa,QAAQ;IACrB,eAAe,QAAQ;;;GAI7B;CAEF,OAAO;EACL;EACA;EACA;EACD"}

View File

@@ -0,0 +1,3 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../base/style/css.js");
require("element-plus/theme-chalk/el-space.css");

View File

@@ -0,0 +1,3 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../base/style/index.js");
require("element-plus/theme-chalk/src/space.scss");