测试
This commit is contained in:
7
frontend/node_modules/element-plus/lib/components/space/index.d.ts
generated
vendored
Normal file
7
frontend/node_modules/element-plus/lib/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';
|
||||
17
frontend/node_modules/element-plus/lib/components/space/index.js
generated
vendored
Normal file
17
frontend/node_modules/element-plus/lib/components/space/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var space = require('./src/space.js');
|
||||
var item = require('./src/item.js');
|
||||
var useSpace = require('./src/use-space.js');
|
||||
var install = require('../../utils/vue/install.js');
|
||||
|
||||
const ElSpace = install.withInstall(space["default"]);
|
||||
|
||||
exports.spaceProps = space.spaceProps;
|
||||
exports.spaceItemProps = item.spaceItemProps;
|
||||
exports.useSpace = useSpace.useSpace;
|
||||
exports.ElSpace = ElSpace;
|
||||
exports["default"] = ElSpace;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/space/index.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/space/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","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":["withInstall","Space"],"mappings":";;;;;;;;;AAEY,MAAC,OAAO,GAAGA,mBAAW,CAACC,gBAAK;;;;;;;;"}
|
||||
30
frontend/node_modules/element-plus/lib/components/space/src/item.d.ts
generated
vendored
Normal file
30
frontend/node_modules/element-plus/lib/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;
|
||||
26
frontend/node_modules/element-plus/lib/components/space/src/item.js
generated
vendored
Normal file
26
frontend/node_modules/element-plus/lib/components/space/src/item.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var vue = require('vue');
|
||||
var runtime = require('../../../utils/vue/props/runtime.js');
|
||||
var index = require('../../../hooks/use-namespace/index.js');
|
||||
|
||||
const spaceItemProps = runtime.buildProps({
|
||||
prefixCls: {
|
||||
type: String
|
||||
}
|
||||
});
|
||||
const SpaceItem = vue.defineComponent({
|
||||
name: "ElSpaceItem",
|
||||
props: spaceItemProps,
|
||||
setup(props, { slots }) {
|
||||
const ns = index.useNamespace("space");
|
||||
const classes = vue.computed(() => `${props.prefixCls || ns.b()}__item`);
|
||||
return () => vue.h("div", { class: classes.value }, vue.renderSlot(slots, "default"));
|
||||
}
|
||||
});
|
||||
|
||||
exports["default"] = SpaceItem;
|
||||
exports.spaceItemProps = spaceItemProps;
|
||||
//# sourceMappingURL=item.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/space/src/item.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/space/src/item.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item.js","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":["buildProps","defineComponent","useNamespace","computed","h","renderSlot"],"mappings":";;;;;;;;AAGY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC,EAAE;AACE,MAAC,SAAS,GAAGC,mBAAe,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,GAAGC,kBAAY,CAAC,OAAO,CAAC,CAAC;AACrC,IAAI,MAAM,OAAO,GAAGC,YAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACzE,IAAI,OAAO,MAAMC,KAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAEC,cAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAClF,GAAG;AACH,CAAC;;;;;"}
|
||||
93
frontend/node_modules/element-plus/lib/components/space/src/space.d.ts
generated
vendored
Normal file
93
frontend/node_modules/element-plus/lib/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;
|
||||
136
frontend/node_modules/element-plus/lib/components/space/src/space.js
generated
vendored
Normal file
136
frontend/node_modules/element-plus/lib/components/space/src/space.js
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var vue = require('vue');
|
||||
var item = require('./item.js');
|
||||
var useSpace = require('./use-space.js');
|
||||
var vnode = require('../../../utils/vue/vnode.js');
|
||||
var runtime = require('../../../utils/vue/props/runtime.js');
|
||||
var types = require('../../../utils/types.js');
|
||||
var shared = require('@vue/shared');
|
||||
var size = require('../../../constants/size.js');
|
||||
|
||||
const spaceProps = runtime.buildProps({
|
||||
direction: {
|
||||
type: String,
|
||||
values: ["horizontal", "vertical"],
|
||||
default: "horizontal"
|
||||
},
|
||||
class: {
|
||||
type: runtime.definePropType([
|
||||
String,
|
||||
Object,
|
||||
Array
|
||||
]),
|
||||
default: ""
|
||||
},
|
||||
style: {
|
||||
type: runtime.definePropType([String, Array, Object]),
|
||||
default: ""
|
||||
},
|
||||
alignment: {
|
||||
type: runtime.definePropType(String),
|
||||
default: "center"
|
||||
},
|
||||
prefixCls: {
|
||||
type: String
|
||||
},
|
||||
spacer: {
|
||||
type: runtime.definePropType([Object, String, Number, Array]),
|
||||
default: null,
|
||||
validator: (val) => vue.isVNode(val) || types.isNumber(val) || shared.isString(val)
|
||||
},
|
||||
wrap: Boolean,
|
||||
fill: Boolean,
|
||||
fillRatio: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
size: {
|
||||
type: [String, Array, Number],
|
||||
values: size.componentSizes,
|
||||
validator: (val) => {
|
||||
return types.isNumber(val) || shared.isArray(val) && val.length === 2 && val.every(types.isNumber);
|
||||
}
|
||||
}
|
||||
});
|
||||
const Space = vue.defineComponent({
|
||||
name: "ElSpace",
|
||||
props: spaceProps,
|
||||
setup(props, { slots }) {
|
||||
const { classes, containerStyle, itemStyle } = useSpace.useSpace(props);
|
||||
function extractChildren(children, parentKey = "", extractedChildren = []) {
|
||||
const { prefixCls } = props;
|
||||
children.forEach((child, loopKey) => {
|
||||
if (vnode.isFragment(child)) {
|
||||
if (shared.isArray(child.children)) {
|
||||
child.children.forEach((nested, key) => {
|
||||
if (vnode.isFragment(nested) && shared.isArray(nested.children)) {
|
||||
extractChildren(nested.children, `${parentKey + key}-`, extractedChildren);
|
||||
} else {
|
||||
if (vue.isVNode(nested) && (nested == null ? void 0 : nested.type) === vue.Comment) {
|
||||
extractedChildren.push(nested);
|
||||
} else {
|
||||
extractedChildren.push(vue.createVNode(item["default"], {
|
||||
style: itemStyle.value,
|
||||
prefixCls,
|
||||
key: `nested-${parentKey + key}`
|
||||
}, {
|
||||
default: () => [nested]
|
||||
}, vnode.PatchFlags.PROPS | vnode.PatchFlags.STYLE, ["style", "prefixCls"]));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (vnode.isValidElementNode(child)) {
|
||||
extractedChildren.push(vue.createVNode(item["default"], {
|
||||
style: itemStyle.value,
|
||||
prefixCls,
|
||||
key: `LoopKey${parentKey + loopKey}`
|
||||
}, {
|
||||
default: () => [child]
|
||||
}, vnode.PatchFlags.PROPS | vnode.PatchFlags.STYLE, ["style", "prefixCls"]));
|
||||
}
|
||||
});
|
||||
return extractedChildren;
|
||||
}
|
||||
return () => {
|
||||
var _a;
|
||||
const { spacer, direction } = props;
|
||||
const children = vue.renderSlot(slots, "default", { key: 0 }, () => []);
|
||||
if (((_a = children.children) != null ? _a : []).length === 0)
|
||||
return null;
|
||||
if (shared.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(vue.createVNode("span", {
|
||||
style: [
|
||||
itemStyle.value,
|
||||
direction === "vertical" ? "width: 100%" : null
|
||||
],
|
||||
key: idx
|
||||
}, [
|
||||
vue.isVNode(spacer) ? spacer : vue.createTextVNode(spacer, vnode.PatchFlags.TEXT)
|
||||
], vnode.PatchFlags.STYLE));
|
||||
}
|
||||
return children2;
|
||||
}, []);
|
||||
}
|
||||
return vue.createVNode("div", {
|
||||
class: classes.value,
|
||||
style: containerStyle.value
|
||||
}, extractedChildren, vnode.PatchFlags.STYLE | vnode.PatchFlags.CLASS);
|
||||
}
|
||||
return children.children;
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
exports["default"] = Space;
|
||||
exports.spaceProps = spaceProps;
|
||||
//# sourceMappingURL=space.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/space/src/space.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/space/src/space.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
frontend/node_modules/element-plus/lib/components/space/src/use-space.d.ts
generated
vendored
Normal file
7
frontend/node_modules/element-plus/lib/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>;
|
||||
};
|
||||
68
frontend/node_modules/element-plus/lib/components/space/src/use-space.js
generated
vendored
Normal file
68
frontend/node_modules/element-plus/lib/components/space/src/use-space.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var vue = require('vue');
|
||||
var index = require('../../../hooks/use-namespace/index.js');
|
||||
var shared = require('@vue/shared');
|
||||
var types = require('../../../utils/types.js');
|
||||
|
||||
const SIZE_MAP = {
|
||||
small: 8,
|
||||
default: 12,
|
||||
large: 16
|
||||
};
|
||||
function useSpace(props) {
|
||||
const ns = index.useNamespace("space");
|
||||
const classes = vue.computed(() => [ns.b(), ns.m(props.direction), props.class]);
|
||||
const horizontalSize = vue.ref(0);
|
||||
const verticalSize = vue.ref(0);
|
||||
const containerStyle = vue.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 = vue.computed(() => {
|
||||
return props.fill ? { flexGrow: 1, minWidth: `${props.fillRatio}%` } : {};
|
||||
});
|
||||
vue.watchEffect(() => {
|
||||
const { size = "small", wrap, direction: dir, fill } = props;
|
||||
if (shared.isArray(size)) {
|
||||
const [h = 0, v = 0] = size;
|
||||
horizontalSize.value = h;
|
||||
verticalSize.value = v;
|
||||
} else {
|
||||
let val;
|
||||
if (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
|
||||
};
|
||||
}
|
||||
|
||||
exports.useSpace = useSpace;
|
||||
//# sourceMappingURL=use-space.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/space/src/use-space.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/space/src/use-space.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-space.js","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":["useNamespace","computed","ref","watchEffect","isArray","isNumber"],"mappings":"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"}
|
||||
2
frontend/node_modules/element-plus/lib/components/space/style/css.d.ts
generated
vendored
Normal file
2
frontend/node_modules/element-plus/lib/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';
|
||||
6
frontend/node_modules/element-plus/lib/components/space/style/css.js
generated
vendored
Normal file
6
frontend/node_modules/element-plus/lib/components/space/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
require('../../base/style/css.js');
|
||||
require('element-plus/theme-chalk/el-space.css');
|
||||
|
||||
//# sourceMappingURL=css.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/space/style/css.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/space/style/css.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
||||
2
frontend/node_modules/element-plus/lib/components/space/style/index.d.ts
generated
vendored
Normal file
2
frontend/node_modules/element-plus/lib/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';
|
||||
6
frontend/node_modules/element-plus/lib/components/space/style/index.js
generated
vendored
Normal file
6
frontend/node_modules/element-plus/lib/components/space/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
require('../../base/style/index.js');
|
||||
require('element-plus/theme-chalk/src/space.scss');
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/element-plus/lib/components/space/style/index.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/components/space/style/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
||||
Reference in New Issue
Block a user