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

View File

@@ -0,0 +1,5 @@
import Icon from './src/icon.vue';
import type { SFCWithInstall } from 'element-plus/es/utils';
export declare const ElIcon: SFCWithInstall<typeof Icon>;
export default ElIcon;
export * from './src/icon';

View File

@@ -0,0 +1,8 @@
import Icon from './src/icon2.mjs';
export { iconProps } from './src/icon.mjs';
import { withInstall } from '../../utils/vue/install.mjs';
const ElIcon = withInstall(Icon);
export { ElIcon, ElIcon as default };
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/icon/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Icon from './src/icon.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElIcon: SFCWithInstall<typeof Icon> = withInstall(Icon)\nexport default ElIcon\n\nexport * from './src/icon'\n"],"names":[],"mappings":";;;;AAEY,MAAC,MAAM,GAAG,WAAW,CAAC,IAAI;;;;"}

View File

@@ -0,0 +1,19 @@
import type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue';
import type Icon from './icon.vue';
export declare const iconProps: {
readonly size: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly color: {
readonly type: import("vue").PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
};
export type IconProps = ExtractPropTypes<typeof iconProps>;
export type IconPropsPublic = __ExtractPublicPropTypes<typeof iconProps>;
export type IconInstance = InstanceType<typeof Icon> & unknown;

View File

@@ -0,0 +1,13 @@
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
const iconProps = buildProps({
size: {
type: definePropType([Number, String])
},
color: {
type: String
}
});
export { iconProps };
//# sourceMappingURL=icon.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"icon.mjs","sources":["../../../../../../packages/components/icon/src/icon.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Icon from './icon.vue'\n\nexport const iconProps = buildProps({\n /**\n * @description SVG icon size, size x size\n */\n size: {\n type: definePropType<number | string>([Number, String]),\n },\n /**\n * @description SVG tag's fill attribute\n */\n color: {\n type: String,\n },\n} as const)\nexport type IconProps = ExtractPropTypes<typeof iconProps>\nexport type IconPropsPublic = __ExtractPublicPropTypes<typeof iconProps>\nexport type IconInstance = InstanceType<typeof Icon> & unknown\n"],"names":[],"mappings":";;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}

View File

@@ -0,0 +1,37 @@
declare function __VLS_template(): {
default?(_: {}): any;
};
declare const __VLS_component: import("vue").DefineComponent<{
readonly size: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly color: {
readonly type: import("vue").PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
readonly size: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly color: {
readonly type: import("vue").PropType<string>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
}>>, {}>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};

View File

@@ -0,0 +1,40 @@
import { defineComponent, computed, openBlock, createElementBlock, mergeProps, unref, renderSlot } from 'vue';
import { iconProps } from './icon.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
import { isUndefined } from '../../../utils/types.mjs';
import { addUnit } from '../../../utils/dom/style.mjs';
const __default__ = defineComponent({
name: "ElIcon",
inheritAttrs: false
});
const _sfc_main = /* @__PURE__ */ defineComponent({
...__default__,
props: iconProps,
setup(__props) {
const props = __props;
const ns = useNamespace("icon");
const style = computed(() => {
const { size, color } = props;
if (!size && !color)
return {};
return {
fontSize: isUndefined(size) ? void 0 : addUnit(size),
"--color": color
};
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("i", mergeProps({
class: unref(ns).b(),
style: unref(style)
}, _ctx.$attrs), [
renderSlot(_ctx.$slots, "default")
], 16);
};
}
});
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "icon.vue"]]);
export { Icon as default };
//# sourceMappingURL=icon2.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"icon2.mjs","sources":["../../../../../../packages/components/icon/src/icon.vue"],"sourcesContent":["<template>\n <i :class=\"ns.b()\" :style=\"style\" v-bind=\"$attrs\">\n <slot />\n </i>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { addUnit, isUndefined } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { iconProps } from './icon'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElIcon',\n inheritAttrs: false,\n})\nconst props = defineProps(iconProps)\nconst ns = useNamespace('icon')\n\nconst style = computed<CSSProperties>(() => {\n const { size, color } = props\n if (!size && !color) return {}\n\n return {\n fontSize: isUndefined(size) ? undefined : addUnit(size),\n '--color': color,\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCAcc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAEA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,KAAA,GAAQ,SAAwB,MAAM;AAC1C,MAAM,MAAA,EAAE,IAAM,EAAA,KAAA,EAAU,GAAA,KAAA,CAAA;AACxB,MAAA,IAAI,CAAC,IAAA,IAAQ,CAAC,KAAA;AAEd,QAAO,OAAA,EAAA,CAAA;AAAA,MAAA;AACiD,QACtD,QAAW,EAAA,WAAA,CAAA,IAAA,CAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,IAAA,CAAA;AAAA,QACb,SAAA,EAAA,KAAA;AAAA,OACD,CAAA;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1 @@
import 'element-plus/es/components/base/style/css';

View File

@@ -0,0 +1,2 @@
import '../../base/style/css.mjs';
//# sourceMappingURL=css.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}

View File

@@ -0,0 +1 @@
import 'element-plus/es/components/base/style';

View File

@@ -0,0 +1,2 @@
import '../../base/style/index.mjs';
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}