This commit is contained in:
2025-09-19 14:25:20 +08:00
parent 269893a435
commit fbf3f77229
24949 changed files with 2839404 additions and 0 deletions

21
node_modules/element-plus/es/hooks/use-size/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import type { InjectionKey, Ref } from 'vue';
import type { ComponentSize } from 'element-plus/es/constants';
export declare const useSizeProp: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
export declare const useSizeProps: {
size: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
};
export interface SizeContext {
size: Ref<ComponentSize>;
}
export declare const SIZE_INJECTION_KEY: InjectionKey<SizeContext>;
export declare const useGlobalSize: () => import("vue").ComputedRef<"" | "small" | "default" | "large">;

22
node_modules/element-plus/es/hooks/use-size/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,22 @@
import { computed, unref, inject } from 'vue';
import { buildProp } from '../../utils/vue/props/runtime.mjs';
import { componentSizes } from '../../constants/size.mjs';
const useSizeProp = buildProp({
type: String,
values: componentSizes,
required: false
});
const useSizeProps = {
size: useSizeProp
};
const SIZE_INJECTION_KEY = Symbol("size");
const useGlobalSize = () => {
const injectedSize = inject(SIZE_INJECTION_KEY, {});
return computed(() => {
return unref(injectedSize.size) || "";
});
};
export { SIZE_INJECTION_KEY, useGlobalSize, useSizeProp, useSizeProps };
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-size/index.ts"],"sourcesContent":["import { computed, inject, unref } from 'vue'\nimport { buildProp } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { InjectionKey, Ref } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\n\nexport const useSizeProp = buildProp({\n type: String,\n values: componentSizes,\n required: false,\n} as const)\n\nexport const useSizeProps = {\n size: useSizeProp,\n}\n\nexport interface SizeContext {\n size: Ref<ComponentSize>\n}\n\nexport const SIZE_INJECTION_KEY: InjectionKey<SizeContext> = Symbol('size')\n\nexport const useGlobalSize = () => {\n const injectedSize = inject(SIZE_INJECTION_KEY, {} as SizeContext)\n\n return computed<ComponentSize>(() => {\n return unref(injectedSize.size) || ''\n })\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,WAAW,GAAG,SAAS,CAAC;AACrC,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,cAAc;AACxB,EAAE,QAAQ,EAAE,KAAK;AACjB,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE;AACrC,MAAC,aAAa,GAAG,MAAM;AACnC,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AACtD,EAAE,OAAO,QAAQ,CAAC,MAAM;AACxB,IAAI,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAC1C,GAAG,CAAC,CAAC;AACL;;;;"}