测试
This commit is contained in:
7
frontend/node_modules/element-plus/es/components/space/index.d.ts
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/space/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import Space from './src/space';
|
||||
import type { SFCWithInstall } from 'element-plus/es/utils';
|
||||
export declare const ElSpace: SFCWithInstall<typeof Space>;
|
||||
export default ElSpace;
|
||||
export * from './src/space';
|
||||
export * from './src/item';
|
||||
export * from './src/use-space';
|
||||
10
frontend/node_modules/element-plus/es/components/space/index.mjs
generated
vendored
Normal file
10
frontend/node_modules/element-plus/es/components/space/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import Space from './src/space.mjs';
|
||||
export { spaceProps } from './src/space.mjs';
|
||||
export { spaceItemProps } from './src/item.mjs';
|
||||
export { useSpace } from './src/use-space.mjs';
|
||||
import { withInstall } from '../../utils/vue/install.mjs';
|
||||
|
||||
const ElSpace = withInstall(Space);
|
||||
|
||||
export { ElSpace, ElSpace as default };
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/space/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/space/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","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"],"names":[],"mappings":";;;;;;AAEY,MAAC,OAAO,GAAG,WAAW,CAAC,KAAK;;;;"}
|
||||
30
frontend/node_modules/element-plus/es/components/space/src/item.d.ts
generated
vendored
Normal file
30
frontend/node_modules/element-plus/es/components/space/src/item.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue';
|
||||
export declare const spaceItemProps: {
|
||||
readonly prefixCls: {
|
||||
readonly type: import("vue").PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
};
|
||||
export type SpaceItemProps = ExtractPropTypes<typeof spaceItemProps>;
|
||||
export type SpaceItemPropsPublic = __ExtractPublicPropTypes<typeof spaceItemProps>;
|
||||
declare const SpaceItem: import("vue").DefineComponent<{
|
||||
readonly prefixCls: {
|
||||
readonly type: import("vue").PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
||||
readonly prefixCls: {
|
||||
readonly type: import("vue").PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
}>>, {}>;
|
||||
export type SpaceItemInstance = InstanceType<typeof SpaceItem> & unknown;
|
||||
export default SpaceItem;
|
||||
21
frontend/node_modules/element-plus/es/components/space/src/item.mjs
generated
vendored
Normal file
21
frontend/node_modules/element-plus/es/components/space/src/item.mjs
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defineComponent, computed, h, renderSlot } from 'vue';
|
||||
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
||||
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
||||
|
||||
const spaceItemProps = buildProps({
|
||||
prefixCls: {
|
||||
type: String
|
||||
}
|
||||
});
|
||||
const SpaceItem = defineComponent({
|
||||
name: "ElSpaceItem",
|
||||
props: spaceItemProps,
|
||||
setup(props, { slots }) {
|
||||
const ns = useNamespace("space");
|
||||
const classes = computed(() => `${props.prefixCls || ns.b()}__item`);
|
||||
return () => h("div", { class: classes.value }, renderSlot(slots, "default"));
|
||||
}
|
||||
});
|
||||
|
||||
export { SpaceItem as default, spaceItemProps };
|
||||
//# sourceMappingURL=item.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/space/src/item.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/space/src/item.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item.mjs","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<\n typeof spaceItemProps\n>\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"],"names":[],"mappings":";;;;AAGY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC,EAAE;AACE,MAAC,SAAS,GAAG,eAAe,CAAC;AAClC,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAE,cAAc;AACvB,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAI,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACzE,IAAI,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAClF,GAAG;AACH,CAAC;;;;"}
|
||||
93
frontend/node_modules/element-plus/es/components/space/src/space.d.ts
generated
vendored
Normal file
93
frontend/node_modules/element-plus/es/components/space/src/space.d.ts
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
import type { ExtractPropTypes, StyleValue, VNode, VNodeChild, __ExtractPublicPropTypes } from 'vue';
|
||||
import type { Arrayable } from 'element-plus/es/utils';
|
||||
export declare const spaceProps: {
|
||||
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
|
||||
readonly class: import("element-plus/es/utils").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>>))[], unknown, unknown, "", boolean>;
|
||||
readonly style: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown, "", boolean>;
|
||||
readonly alignment: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | ((new (...args: any[]) => string) | (() => string))[], unknown, unknown, "center", boolean>;
|
||||
readonly prefixCls: {
|
||||
readonly type: import("vue").PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly spacer: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | ((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild))[], unknown, string | number | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>, null, boolean>;
|
||||
readonly wrap: BooleanConstructor;
|
||||
readonly fill: BooleanConstructor;
|
||||
readonly fillRatio: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 100, boolean>;
|
||||
readonly size: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, ArrayConstructor, NumberConstructor], "" | "small" | "default" | "large", number | [number, number]>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
};
|
||||
export type SpaceProps = ExtractPropTypes<typeof spaceProps>;
|
||||
export type SpacePropsPublic = __ExtractPublicPropTypes<typeof spaceProps>;
|
||||
declare const Space: import("vue").DefineComponent<{
|
||||
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
|
||||
readonly class: import("element-plus/es/utils").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>>))[], unknown, unknown, "", boolean>;
|
||||
readonly style: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown, "", boolean>;
|
||||
readonly alignment: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | ((new (...args: any[]) => string) | (() => string))[], unknown, unknown, "center", boolean>;
|
||||
readonly prefixCls: {
|
||||
readonly type: import("vue").PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly spacer: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | ((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild))[], unknown, string | number | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>, null, boolean>;
|
||||
readonly wrap: BooleanConstructor;
|
||||
readonly fill: BooleanConstructor;
|
||||
readonly fillRatio: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 100, boolean>;
|
||||
readonly size: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, ArrayConstructor, NumberConstructor], "" | "small" | "default" | "large", number | [number, number]>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
}, () => string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}> | {
|
||||
[name: string]: unknown;
|
||||
$stable?: boolean;
|
||||
} | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
||||
readonly direction: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
|
||||
readonly class: import("element-plus/es/utils").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>>))[], unknown, unknown, "", boolean>;
|
||||
readonly style: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown, "", boolean>;
|
||||
readonly alignment: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | ((new (...args: any[]) => string) | (() => string))[], unknown, unknown, "center", boolean>;
|
||||
readonly prefixCls: {
|
||||
readonly type: import("vue").PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly spacer: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | ((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild))[], unknown, string | number | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>, null, boolean>;
|
||||
readonly wrap: BooleanConstructor;
|
||||
readonly fill: BooleanConstructor;
|
||||
readonly fillRatio: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 100, boolean>;
|
||||
readonly size: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, ArrayConstructor, NumberConstructor], "" | "small" | "default" | "large", number | [number, number]>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
}>>, {
|
||||
readonly style: StyleValue;
|
||||
readonly spacer: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild) | ((new (...args: any[]) => VNodeChild & {}) | (() => VNodeChild))[], unknown, string | number | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>>;
|
||||
readonly fill: boolean;
|
||||
readonly direction: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
|
||||
readonly wrap: boolean;
|
||||
readonly class: import("element-plus/es/utils").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>>))[], unknown, unknown>;
|
||||
readonly alignment: string;
|
||||
readonly fillRatio: number;
|
||||
}>;
|
||||
export type SpaceInstance = InstanceType<typeof Space> & unknown;
|
||||
export default Space;
|
||||
131
frontend/node_modules/element-plus/es/components/space/src/space.mjs
generated
vendored
Normal file
131
frontend/node_modules/element-plus/es/components/space/src/space.mjs
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
import { isVNode, defineComponent, renderSlot, createVNode, createTextVNode, Comment } from 'vue';
|
||||
import SpaceItem from './item.mjs';
|
||||
import { useSpace } from './use-space.mjs';
|
||||
import { PatchFlags, isFragment, isValidElementNode } from '../../../utils/vue/vnode.mjs';
|
||||
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
||||
import { isNumber } from '../../../utils/types.mjs';
|
||||
import { isString, isArray } from '@vue/shared';
|
||||
import { componentSizes } from '../../../constants/size.mjs';
|
||||
|
||||
const spaceProps = buildProps({
|
||||
direction: {
|
||||
type: String,
|
||||
values: ["horizontal", "vertical"],
|
||||
default: "horizontal"
|
||||
},
|
||||
class: {
|
||||
type: definePropType([
|
||||
String,
|
||||
Object,
|
||||
Array
|
||||
]),
|
||||
default: ""
|
||||
},
|
||||
style: {
|
||||
type: definePropType([String, Array, Object]),
|
||||
default: ""
|
||||
},
|
||||
alignment: {
|
||||
type: definePropType(String),
|
||||
default: "center"
|
||||
},
|
||||
prefixCls: {
|
||||
type: String
|
||||
},
|
||||
spacer: {
|
||||
type: definePropType([Object, String, Number, Array]),
|
||||
default: null,
|
||||
validator: (val) => isVNode(val) || isNumber(val) || isString(val)
|
||||
},
|
||||
wrap: Boolean,
|
||||
fill: Boolean,
|
||||
fillRatio: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
size: {
|
||||
type: [String, Array, Number],
|
||||
values: componentSizes,
|
||||
validator: (val) => {
|
||||
return isNumber(val) || isArray(val) && val.length === 2 && val.every(isNumber);
|
||||
}
|
||||
}
|
||||
});
|
||||
const Space = defineComponent({
|
||||
name: "ElSpace",
|
||||
props: spaceProps,
|
||||
setup(props, { slots }) {
|
||||
const { classes, containerStyle, itemStyle } = useSpace(props);
|
||||
function extractChildren(children, parentKey = "", extractedChildren = []) {
|
||||
const { prefixCls } = props;
|
||||
children.forEach((child, loopKey) => {
|
||||
if (isFragment(child)) {
|
||||
if (isArray(child.children)) {
|
||||
child.children.forEach((nested, key) => {
|
||||
if (isFragment(nested) && isArray(nested.children)) {
|
||||
extractChildren(nested.children, `${parentKey + key}-`, extractedChildren);
|
||||
} else {
|
||||
if (isVNode(nested) && (nested == null ? void 0 : nested.type) === Comment) {
|
||||
extractedChildren.push(nested);
|
||||
} else {
|
||||
extractedChildren.push(createVNode(SpaceItem, {
|
||||
style: itemStyle.value,
|
||||
prefixCls,
|
||||
key: `nested-${parentKey + key}`
|
||||
}, {
|
||||
default: () => [nested]
|
||||
}, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (isValidElementNode(child)) {
|
||||
extractedChildren.push(createVNode(SpaceItem, {
|
||||
style: itemStyle.value,
|
||||
prefixCls,
|
||||
key: `LoopKey${parentKey + loopKey}`
|
||||
}, {
|
||||
default: () => [child]
|
||||
}, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
|
||||
}
|
||||
});
|
||||
return extractedChildren;
|
||||
}
|
||||
return () => {
|
||||
var _a;
|
||||
const { spacer, direction } = props;
|
||||
const children = renderSlot(slots, "default", { key: 0 }, () => []);
|
||||
if (((_a = children.children) != null ? _a : []).length === 0)
|
||||
return null;
|
||||
if (isArray(children.children)) {
|
||||
let extractedChildren = extractChildren(children.children);
|
||||
if (spacer) {
|
||||
const len = extractedChildren.length - 1;
|
||||
extractedChildren = extractedChildren.reduce((acc, child, idx) => {
|
||||
const children2 = [...acc, child];
|
||||
if (idx !== len) {
|
||||
children2.push(createVNode("span", {
|
||||
style: [
|
||||
itemStyle.value,
|
||||
direction === "vertical" ? "width: 100%" : null
|
||||
],
|
||||
key: idx
|
||||
}, [
|
||||
isVNode(spacer) ? spacer : createTextVNode(spacer, PatchFlags.TEXT)
|
||||
], PatchFlags.STYLE));
|
||||
}
|
||||
return children2;
|
||||
}, []);
|
||||
}
|
||||
return createVNode("div", {
|
||||
class: classes.value,
|
||||
style: containerStyle.value
|
||||
}, extractedChildren, PatchFlags.STYLE | PatchFlags.CLASS);
|
||||
}
|
||||
return children.children;
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export { Space as default, spaceProps };
|
||||
//# sourceMappingURL=space.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/space/src/space.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/space/src/space.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
frontend/node_modules/element-plus/es/components/space/src/use-space.d.ts
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/space/src/use-space.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { SpaceProps } from './space';
|
||||
import type { StyleValue } from 'vue';
|
||||
export declare function useSpace(props: SpaceProps): {
|
||||
classes: import("vue").ComputedRef<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => import("element-plus/es/utils").Arrayable<string | Record<string, boolean>>) | ((new (...args: any[]) => string | Record<string, boolean> | (string | Record<string, boolean>)[]) | (() => import("element-plus/es/utils").Arrayable<string | Record<string, boolean>>))[], unknown, unknown>[]>;
|
||||
containerStyle: import("vue").ComputedRef<StyleValue>;
|
||||
itemStyle: import("vue").ComputedRef<StyleValue>;
|
||||
};
|
||||
64
frontend/node_modules/element-plus/es/components/space/src/use-space.mjs
generated
vendored
Normal file
64
frontend/node_modules/element-plus/es/components/space/src/use-space.mjs
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
import { computed, ref, watchEffect } from 'vue';
|
||||
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
||||
import { isArray } from '@vue/shared';
|
||||
import { isNumber } from '../../../utils/types.mjs';
|
||||
|
||||
const SIZE_MAP = {
|
||||
small: 8,
|
||||
default: 12,
|
||||
large: 16
|
||||
};
|
||||
function useSpace(props) {
|
||||
const ns = useNamespace("space");
|
||||
const classes = computed(() => [ns.b(), ns.m(props.direction), props.class]);
|
||||
const horizontalSize = ref(0);
|
||||
const verticalSize = ref(0);
|
||||
const containerStyle = computed(() => {
|
||||
const wrapKls = props.wrap || props.fill ? { flexWrap: "wrap" } : {};
|
||||
const alignment = {
|
||||
alignItems: props.alignment
|
||||
};
|
||||
const gap = {
|
||||
rowGap: `${verticalSize.value}px`,
|
||||
columnGap: `${horizontalSize.value}px`
|
||||
};
|
||||
return [wrapKls, alignment, gap, props.style];
|
||||
});
|
||||
const itemStyle = computed(() => {
|
||||
return props.fill ? { flexGrow: 1, minWidth: `${props.fillRatio}%` } : {};
|
||||
});
|
||||
watchEffect(() => {
|
||||
const { size = "small", wrap, direction: dir, fill } = props;
|
||||
if (isArray(size)) {
|
||||
const [h = 0, v = 0] = size;
|
||||
horizontalSize.value = h;
|
||||
verticalSize.value = v;
|
||||
} else {
|
||||
let val;
|
||||
if (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
|
||||
};
|
||||
}
|
||||
|
||||
export { useSpace };
|
||||
//# sourceMappingURL=use-space.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/space/src/use-space.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/space/src/use-space.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-space.mjs","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"],"names":[],"mappings":"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"}
|
||||
2
frontend/node_modules/element-plus/es/components/space/style/css.d.ts
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/components/space/style/css.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import 'element-plus/es/components/base/style/css';
|
||||
import 'element-plus/theme-chalk/el-space.css';
|
||||
3
frontend/node_modules/element-plus/es/components/space/style/css.mjs
generated
vendored
Normal file
3
frontend/node_modules/element-plus/es/components/space/style/css.mjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import '../../base/style/css.mjs';
|
||||
import 'element-plus/theme-chalk/el-space.css';
|
||||
//# sourceMappingURL=css.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/space/style/css.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/space/style/css.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
2
frontend/node_modules/element-plus/es/components/space/style/index.d.ts
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/components/space/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import 'element-plus/es/components/base/style';
|
||||
import 'element-plus/theme-chalk/src/space.scss';
|
||||
3
frontend/node_modules/element-plus/es/components/space/style/index.mjs
generated
vendored
Normal file
3
frontend/node_modules/element-plus/es/components/space/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import '../../base/style/index.mjs';
|
||||
import 'element-plus/theme-chalk/src/space.scss';
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/space/style/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/space/style/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
Reference in New Issue
Block a user