完全跑通1.0版本
This commit is contained in:
14
frontend/node_modules/element-plus/es/components/button/index.d.ts
generated
vendored
Normal file
14
frontend/node_modules/element-plus/es/components/button/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { SFCWithInstall } from "../../utils/vue/typescript.js";
|
||||
import { ButtonConfigContext, ButtonEmits, ButtonNativeType, ButtonProps, ButtonPropsPublic, ButtonType, buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from "./src/button.js";
|
||||
import _default from "./src/button.vue.js";
|
||||
import _default$1 from "./src/button-group.vue.js";
|
||||
import { ButtonGroupContext, buttonGroupContextKey } from "./src/constants.js";
|
||||
import { ButtonGroupInstance, ButtonInstance } from "./src/instance.js";
|
||||
|
||||
//#region ../../packages/components/button/index.d.ts
|
||||
declare const ElButton: SFCWithInstall<typeof _default> & {
|
||||
ButtonGroup: typeof _default$1;
|
||||
};
|
||||
declare const ElButtonGroup: SFCWithInstall<typeof _default$1>;
|
||||
//#endregion
|
||||
export { ButtonConfigContext, ButtonEmits, ButtonGroupContext, type ButtonGroupInstance, type ButtonInstance, ButtonNativeType, ButtonProps, ButtonPropsPublic, ButtonType, ElButton, ElButton as default, ElButtonGroup, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes };
|
||||
12
frontend/node_modules/element-plus/es/components/button/index.mjs
generated
vendored
Normal file
12
frontend/node_modules/element-plus/es/components/button/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { withInstall, withNoopInstall } from "../../utils/vue/install.mjs";
|
||||
import { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from "./src/button.mjs";
|
||||
import { buttonGroupContextKey } from "./src/constants.mjs";
|
||||
import button_default from "./src/button2.mjs";
|
||||
import button_group_default from "./src/button-group2.mjs";
|
||||
//#region ../../packages/components/button/index.ts
|
||||
const ElButton = withInstall(button_default, { ButtonGroup: button_group_default });
|
||||
const ElButtonGroup = withNoopInstall(button_group_default);
|
||||
//#endregion
|
||||
export { ElButton, ElButton as default, ElButtonGroup, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes };
|
||||
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["Button","ButtonGroup"],"sources":["../../../../../packages/components/button/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Button from './src/button.vue'\nimport ButtonGroup from './src/button-group.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElButton: SFCWithInstall<typeof Button> & {\n ButtonGroup: typeof ButtonGroup\n} = withInstall(Button, {\n ButtonGroup,\n})\nexport const ElButtonGroup: SFCWithInstall<typeof ButtonGroup> =\n withNoopInstall(ButtonGroup)\nexport default ElButton\n\nexport * from './src/button'\nexport * from './src/constants'\nexport type { ButtonInstance, ButtonGroupInstance } from './src/instance'\n"],"mappings":";;;;;;AAMA,MAAa,WAET,YAAYA,gBAAQ,EACtB,aAAA,sBACD,CAAC;AACF,MAAa,gBACX,gBAAgBC,qBAAY"}
|
||||
9
frontend/node_modules/element-plus/es/components/button/src/button-custom.d.ts
generated
vendored
Normal file
9
frontend/node_modules/element-plus/es/components/button/src/button-custom.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { ButtonProps } from "./button.js";
|
||||
import * as _$vue from "vue";
|
||||
import { TinyColor } from "@ctrl/tinycolor";
|
||||
|
||||
//#region ../../packages/components/button/src/button-custom.d.ts
|
||||
declare function darken(color: TinyColor, amount?: number): string;
|
||||
declare function useButtonCustomStyle(props: ButtonProps): _$vue.ComputedRef<Record<string, string>>;
|
||||
//#endregion
|
||||
export { darken, useButtonCustomStyle };
|
||||
81
frontend/node_modules/element-plus/es/components/button/src/button-custom.mjs
generated
vendored
Normal file
81
frontend/node_modules/element-plus/es/components/button/src/button-custom.mjs
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { useFormDisabled } from "../../form/src/hooks/use-form-common-props.mjs";
|
||||
import { computed } from "vue";
|
||||
import { TinyColor } from "@ctrl/tinycolor";
|
||||
//#region ../../packages/components/button/src/button-custom.ts
|
||||
function darken(color, amount = 20) {
|
||||
return color.mix("#141414", amount).toString();
|
||||
}
|
||||
function useButtonCustomStyle(props) {
|
||||
const _disabled = useFormDisabled();
|
||||
const ns = useNamespace("button");
|
||||
return computed(() => {
|
||||
let styles = {};
|
||||
let buttonColor = props.color;
|
||||
if (buttonColor) {
|
||||
const match = buttonColor.match(/var\((.*?)\)/);
|
||||
if (match) buttonColor = window.getComputedStyle(window.document.documentElement).getPropertyValue(match[1]);
|
||||
const color = new TinyColor(buttonColor);
|
||||
const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
|
||||
if (props.plain) {
|
||||
styles = ns.cssVarBlock({
|
||||
"bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
|
||||
"text-color": buttonColor,
|
||||
"border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
|
||||
"hover-text-color": `var(${ns.cssVarName("color-white")})`,
|
||||
"hover-bg-color": buttonColor,
|
||||
"hover-border-color": buttonColor,
|
||||
"active-bg-color": activeBgColor,
|
||||
"active-text-color": `var(${ns.cssVarName("color-white")})`,
|
||||
"active-border-color": activeBgColor
|
||||
});
|
||||
if (_disabled.value) {
|
||||
styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
|
||||
styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
|
||||
styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
|
||||
}
|
||||
} else if (props.link || props.text) {
|
||||
const hoverColor = props.dark ? darken(color, 30) : color.tint(30).toString();
|
||||
styles = ns.cssVarBlock({
|
||||
"text-color": buttonColor,
|
||||
"hover-text-color": hoverColor,
|
||||
"active-text-color": activeBgColor
|
||||
});
|
||||
if (props.link) {
|
||||
styles[ns.cssVarBlockName("hover-link-text-color")] = hoverColor;
|
||||
styles[ns.cssVarBlockName("active-color")] = activeBgColor;
|
||||
}
|
||||
if (_disabled.value) {
|
||||
const disabledColor = props.dark ? darken(color, 50) : color.tint(50).toString();
|
||||
styles[ns.cssVarBlockName("disabled-bg-color")] = "transparent";
|
||||
styles[ns.cssVarBlockName("disabled-text-color")] = disabledColor;
|
||||
styles[ns.cssVarBlockName("disabled-border-color")] = "transparent";
|
||||
}
|
||||
} else {
|
||||
const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
|
||||
const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
|
||||
styles = ns.cssVarBlock({
|
||||
"bg-color": buttonColor,
|
||||
"text-color": textColor,
|
||||
"border-color": buttonColor,
|
||||
"hover-bg-color": hoverBgColor,
|
||||
"hover-text-color": textColor,
|
||||
"hover-border-color": hoverBgColor,
|
||||
"active-bg-color": activeBgColor,
|
||||
"active-border-color": activeBgColor
|
||||
});
|
||||
if (_disabled.value) {
|
||||
const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
|
||||
styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
|
||||
styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
|
||||
styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
return styles;
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
export { darken, useButtonCustomStyle };
|
||||
|
||||
//# sourceMappingURL=button-custom.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/button-custom.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/button-custom.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
52
frontend/node_modules/element-plus/es/components/button/src/button-group.d.ts
generated
vendored
Normal file
52
frontend/node_modules/element-plus/es/components/button/src/button-group.d.ts
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { ButtonProps } from "./button.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/button/src/button-group.d.ts
|
||||
interface ButtonGroupProps {
|
||||
/**
|
||||
* @description control the size of buttons in this button-group
|
||||
*/
|
||||
size?: ButtonProps['size'];
|
||||
/**
|
||||
* @description control the type of buttons in this button-group
|
||||
*/
|
||||
type?: ButtonProps['type'];
|
||||
/**
|
||||
* @description display direction
|
||||
*/
|
||||
direction?: 'horizontal' | 'vertical';
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `ButtonGroupProps` instead.
|
||||
*/
|
||||
declare const buttonGroupProps: {
|
||||
/**
|
||||
* @description control the size of buttons in this button-group
|
||||
*/
|
||||
readonly size: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
/**
|
||||
* @description control the type of buttons in this button-group
|
||||
*/
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", unknown, "", boolean>;
|
||||
/**
|
||||
* @description display direction
|
||||
*/
|
||||
readonly direction: {
|
||||
readonly type: _$vue.PropType<"horizontal" | "vertical">;
|
||||
readonly values: readonly ["horizontal", "vertical"];
|
||||
readonly default: "horizontal";
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `ButtonGroupProps` instead.
|
||||
*/
|
||||
type ButtonGroupPropsPublic = ExtractPublicPropTypes<typeof buttonGroupProps>;
|
||||
//#endregion
|
||||
export { ButtonGroupProps, ButtonGroupPropsPublic, buttonGroupProps };
|
||||
28
frontend/node_modules/element-plus/es/components/button/src/button-group.mjs
generated
vendored
Normal file
28
frontend/node_modules/element-plus/es/components/button/src/button-group.mjs
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { definePropType } from "../../../utils/vue/props/runtime.mjs";
|
||||
import { buttonProps } from "./button.mjs";
|
||||
//#region ../../packages/components/button/src/button-group.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `ButtonGroupProps` instead.
|
||||
*/
|
||||
const buttonGroupProps = {
|
||||
/**
|
||||
* @description control the size of buttons in this button-group
|
||||
*/
|
||||
size: buttonProps.size,
|
||||
/**
|
||||
* @description control the type of buttons in this button-group
|
||||
*/
|
||||
type: buttonProps.type,
|
||||
/**
|
||||
* @description display direction
|
||||
*/
|
||||
direction: {
|
||||
type: definePropType(String),
|
||||
values: ["horizontal", "vertical"],
|
||||
default: "horizontal"
|
||||
}
|
||||
};
|
||||
//#endregion
|
||||
export { buttonGroupProps };
|
||||
|
||||
//# sourceMappingURL=button-group.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/button-group.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/button-group.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"button-group.mjs","names":[],"sources":["../../../../../../packages/components/button/src/button-group.ts"],"sourcesContent":["import { definePropType } from '@element-plus/utils'\nimport { buttonProps } from './button'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { ButtonProps } from './button'\n\nexport interface ButtonGroupProps {\n /**\n * @description control the size of buttons in this button-group\n */\n size?: ButtonProps['size']\n /**\n * @description control the type of buttons in this button-group\n */\n type?: ButtonProps['type']\n /**\n * @description display direction\n */\n direction?: 'horizontal' | 'vertical'\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `ButtonGroupProps` instead.\n */\nexport const buttonGroupProps = {\n /**\n * @description control the size of buttons in this button-group\n */\n size: buttonProps.size,\n /**\n * @description control the type of buttons in this button-group\n */\n type: buttonProps.type,\n /**\n * @description display direction\n */\n direction: {\n type: definePropType<'horizontal' | 'vertical'>(String),\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n} as const\n\n/**\n * @deprecated Removed after 3.0.0, Use `ButtonGroupProps` instead.\n */\nexport type ButtonGroupPropsPublic = ExtractPublicPropTypes<\n typeof buttonGroupProps\n>\n"],"mappings":";;;;;;AAwBA,MAAa,mBAAmB;;;;CAI9B,MAAM,YAAY;;;;CAIlB,MAAM,YAAY;;;;CAIlB,WAAW;EACT,MAAM,eAA0C,OAAO;EACvD,QAAQ,CAAC,cAAc,WAAW;EAClC,SAAS;EACV;CACF"}
|
||||
21
frontend/node_modules/element-plus/es/components/button/src/button-group.vue.d.ts
generated
vendored
Normal file
21
frontend/node_modules/element-plus/es/components/button/src/button-group.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { ButtonGroupProps } from "./button-group.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/button/src/button-group.vue.d.ts
|
||||
declare var __VLS_1: {};
|
||||
type __VLS_Slots = {} & {
|
||||
default?: (props: typeof __VLS_1) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<ButtonGroupProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
||||
type: "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger";
|
||||
direction: "horizontal" | "vertical";
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
25
frontend/node_modules/element-plus/es/components/button/src/button-group.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
25
frontend/node_modules/element-plus/es/components/button/src/button-group.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { buttonGroupContextKey } from "./constants.mjs";
|
||||
import { buttonGroupProps } from "./button-group.mjs";
|
||||
import { createElementBlock, defineComponent, normalizeClass, openBlock, provide, reactive, renderSlot, toRef, unref } from "vue";
|
||||
//#region ../../packages/components/button/src/button-group.vue?vue&type=script&setup=true&lang.ts
|
||||
var button_group_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: "ElButtonGroup",
|
||||
__name: "button-group",
|
||||
props: buttonGroupProps,
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
provide(buttonGroupContextKey, reactive({
|
||||
size: toRef(props, "size"),
|
||||
type: toRef(props, "type")
|
||||
}));
|
||||
const ns = useNamespace("button");
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("group"), unref(ns).bm("group", props.direction)]) }, [renderSlot(_ctx.$slots, "default")], 2);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { button_group_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=button-group.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/button-group.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/button-group.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"button-group.vue_vue_type_script_setup_true_lang.mjs","names":[],"sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b('group'), ns.bm('group', props.direction)]\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { provide, reactive, toRef } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { ButtonGroupProps } from './button-group'\n\ndefineOptions({\n name: 'ElButtonGroup',\n})\nconst props = withDefaults(defineProps<ButtonGroupProps>(), {\n direction: 'horizontal',\n type: '',\n})\nprovide(\n buttonGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n type: toRef(props, 'type'),\n })\n)\nconst ns = useNamespace('button')\n</script>\n"],"mappings":";;;;;;;;;;EAgBA,MAAM,QAAQ;EAId,QACE,uBACA,SAAS;GACP,MAAM,MAAM,OAAO,OAAO;GAC1B,MAAM,MAAM,OAAO,OAAO;GAC3B,CAAA,CACH;EACA,MAAM,KAAK,aAAa,SAAQ;;uBA1B9B,mBAEM,OAAA,EAFA,OAAK,eAAA,CAAG,MAAA,GAAE,CAAC,EAAC,QAAA,EAAW,MAAA,GAAE,CAAC,GAAE,SAAU,MAAM,UAAS,CAAA,CAAA,EAAA,EAAA,CACzD,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA"}
|
||||
7
frontend/node_modules/element-plus/es/components/button/src/button-group2.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/button/src/button-group2.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import button_group_vue_vue_type_script_setup_true_lang_default from "./button-group.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/button/src/button-group.vue
|
||||
var button_group_default = button_group_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { button_group_default as default };
|
||||
|
||||
//# sourceMappingURL=button-group2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/button-group2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/button-group2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"button-group2.mjs","names":[],"sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b('group'), ns.bm('group', props.direction)]\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { provide, reactive, toRef } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { ButtonGroupProps } from './button-group'\n\ndefineOptions({\n name: 'ElButtonGroup',\n})\nconst props = withDefaults(defineProps<ButtonGroupProps>(), {\n direction: 'horizontal',\n type: '',\n})\nprovide(\n buttonGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n type: toRef(props, 'type'),\n })\n)\nconst ns = useNamespace('button')\n</script>\n"],"mappings":""}
|
||||
141
frontend/node_modules/element-plus/es/components/button/src/button.d.ts
generated
vendored
Normal file
141
frontend/node_modules/element-plus/es/components/button/src/button.d.ts
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
import { IconPropType } from "../../../utils/vue/icon.js";
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { ComponentSize } from "../../../constants/size.js";
|
||||
import * as _$vue from "vue";
|
||||
import { Component, ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/button/src/button.d.ts
|
||||
declare const buttonTypes: readonly ["default", "primary", "success", "warning", "info", "danger", "text", ""];
|
||||
declare const buttonNativeTypes: readonly ["button", "submit", "reset"];
|
||||
type ButtonType = (typeof buttonTypes)[number];
|
||||
type ButtonNativeType = (typeof buttonNativeTypes)[number];
|
||||
interface ButtonProps {
|
||||
/**
|
||||
* @description button size
|
||||
*/
|
||||
size?: ComponentSize;
|
||||
/**
|
||||
* @description disable the button
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* @description button type
|
||||
*/
|
||||
type?: ButtonType;
|
||||
/**
|
||||
* @description icon component
|
||||
*/
|
||||
icon?: IconPropType;
|
||||
/**
|
||||
* @description native button type
|
||||
*/
|
||||
nativeType?: ButtonNativeType;
|
||||
/**
|
||||
* @description determine whether it's loading
|
||||
*/
|
||||
loading?: boolean;
|
||||
/**
|
||||
* @description customize loading icon component
|
||||
*/
|
||||
loadingIcon?: IconPropType;
|
||||
/**
|
||||
* @description determine whether it's a plain button
|
||||
*/
|
||||
plain?: boolean;
|
||||
/**
|
||||
* @description determine whether it's a text button
|
||||
*/
|
||||
text?: boolean;
|
||||
/**
|
||||
* @description determine whether it's a link button
|
||||
*/
|
||||
link?: boolean;
|
||||
/**
|
||||
* @description determine whether the text button background color is always on
|
||||
*/
|
||||
bg?: boolean;
|
||||
/**
|
||||
* @description native button autofocus
|
||||
*/
|
||||
autofocus?: boolean;
|
||||
/**
|
||||
* @description determine whether it's a round button
|
||||
*/
|
||||
round?: boolean;
|
||||
/**
|
||||
* @description determine whether it's a circle button
|
||||
*/
|
||||
circle?: boolean;
|
||||
/**
|
||||
* @description determine whether it's a dashed button
|
||||
*/
|
||||
dashed?: boolean;
|
||||
/**
|
||||
* @description custom button color, automatically calculate `hover` and `active` color
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
* @description dark mode, which automatically converts `color` to dark mode colors
|
||||
*/
|
||||
dark?: boolean;
|
||||
/**
|
||||
* @description automatically insert a space between two chinese characters
|
||||
*/
|
||||
autoInsertSpace?: boolean;
|
||||
/**
|
||||
* @description custom element tag
|
||||
*/
|
||||
tag?: string | Component;
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `ButtonProps` instead.
|
||||
*/
|
||||
declare const buttonProps: {
|
||||
readonly size: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly type: EpPropFinalized<StringConstructor, "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", unknown, "", boolean>;
|
||||
readonly icon: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly nativeType: EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
||||
readonly loading: BooleanConstructor;
|
||||
readonly loadingIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly plain: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly text: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly link: BooleanConstructor;
|
||||
readonly bg: BooleanConstructor;
|
||||
readonly autofocus: BooleanConstructor;
|
||||
readonly round: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly circle: BooleanConstructor;
|
||||
readonly dashed: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly color: StringConstructor;
|
||||
readonly dark: BooleanConstructor;
|
||||
readonly autoInsertSpace: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly tag: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, "button", boolean>;
|
||||
};
|
||||
declare const buttonEmits: {
|
||||
click: (evt: MouseEvent) => boolean;
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `ButtonProps` instead.
|
||||
*/
|
||||
type ButtonPropsPublic = ExtractPublicPropTypes<typeof buttonProps>;
|
||||
type ButtonEmits = typeof buttonEmits;
|
||||
interface ButtonConfigContext {
|
||||
type?: ButtonProps['type'];
|
||||
plain?: ButtonProps['plain'];
|
||||
text?: ButtonProps['text'];
|
||||
round?: ButtonProps['round'];
|
||||
dashed?: ButtonProps['dashed'];
|
||||
autoInsertSpace?: ButtonProps['autoInsertSpace'];
|
||||
}
|
||||
//#endregion
|
||||
export { ButtonConfigContext, ButtonEmits, ButtonNativeType, ButtonProps, ButtonPropsPublic, ButtonType, buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };
|
||||
138
frontend/node_modules/element-plus/es/components/button/src/button.mjs
generated
vendored
Normal file
138
frontend/node_modules/element-plus/es/components/button/src/button.mjs
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
|
||||
import { iconPropType } from "../../../utils/vue/icon.mjs";
|
||||
import { useSizeProp } from "../../../hooks/use-size/index.mjs";
|
||||
import { Loading } from "@element-plus/icons-vue";
|
||||
//#region ../../packages/components/button/src/button.ts
|
||||
const buttonTypes = [
|
||||
"default",
|
||||
"primary",
|
||||
"success",
|
||||
"warning",
|
||||
"info",
|
||||
"danger",
|
||||
"text",
|
||||
""
|
||||
];
|
||||
const buttonNativeTypes = [
|
||||
"button",
|
||||
"submit",
|
||||
"reset"
|
||||
];
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `ButtonProps` instead.
|
||||
*/
|
||||
const buttonProps = buildProps({
|
||||
/**
|
||||
* @description button size
|
||||
*/
|
||||
size: useSizeProp,
|
||||
/**
|
||||
* @description disable the button
|
||||
*/
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description button type
|
||||
*/
|
||||
type: {
|
||||
type: String,
|
||||
values: buttonTypes,
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* @description icon component
|
||||
*/
|
||||
icon: { type: iconPropType },
|
||||
/**
|
||||
* @description native button type
|
||||
*/
|
||||
nativeType: {
|
||||
type: String,
|
||||
values: buttonNativeTypes,
|
||||
default: "button"
|
||||
},
|
||||
/**
|
||||
* @description determine whether it's loading
|
||||
*/
|
||||
loading: Boolean,
|
||||
/**
|
||||
* @description customize loading icon component
|
||||
*/
|
||||
loadingIcon: {
|
||||
type: iconPropType,
|
||||
default: () => Loading
|
||||
},
|
||||
/**
|
||||
* @description determine whether it's a plain button
|
||||
*/
|
||||
plain: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description determine whether it's a text button
|
||||
*/
|
||||
text: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description determine whether it's a link button
|
||||
*/
|
||||
link: Boolean,
|
||||
/**
|
||||
* @description determine whether the text button background color is always on
|
||||
*/
|
||||
bg: Boolean,
|
||||
/**
|
||||
* @description native button autofocus
|
||||
*/
|
||||
autofocus: Boolean,
|
||||
/**
|
||||
* @description determine whether it's a round button
|
||||
*/
|
||||
round: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description determine whether it's a circle button
|
||||
*/
|
||||
circle: Boolean,
|
||||
/**
|
||||
* @description determine whether it's a dashed button
|
||||
*/
|
||||
dashed: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description custom button color, automatically calculate `hover` and `active` color
|
||||
*/
|
||||
color: String,
|
||||
/**
|
||||
* @description dark mode, which automatically converts `color` to dark mode colors
|
||||
*/
|
||||
dark: Boolean,
|
||||
/**
|
||||
* @description automatically insert a space between two chinese characters
|
||||
*/
|
||||
autoInsertSpace: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description custom element tag
|
||||
*/
|
||||
tag: {
|
||||
type: definePropType([String, Object]),
|
||||
default: "button"
|
||||
}
|
||||
});
|
||||
const buttonEmits = { click: (evt) => evt instanceof MouseEvent };
|
||||
//#endregion
|
||||
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };
|
||||
|
||||
//# sourceMappingURL=button.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/button.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/button.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
44
frontend/node_modules/element-plus/es/components/button/src/button.vue.d.ts
generated
vendored
Normal file
44
frontend/node_modules/element-plus/es/components/button/src/button.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { IconPropType } from "../../../utils/vue/icon.js";
|
||||
import { ButtonNativeType, ButtonProps, ButtonType } from "./button.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/button/src/button.vue.d.ts
|
||||
declare var __VLS_11: {}, __VLS_35: {}, __VLS_37: {};
|
||||
type __VLS_Slots = {} & {
|
||||
loading?: (props: typeof __VLS_11) => any;
|
||||
} & {
|
||||
icon?: (props: typeof __VLS_35) => any;
|
||||
} & {
|
||||
default?: (props: typeof __VLS_37) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<ButtonProps, {
|
||||
/** @description button html element */ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>; /** @description button size */
|
||||
size: _$vue.ComputedRef<"" | "default" | "small" | "large">; /** @description button type */
|
||||
type: _$vue.ComputedRef<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">; /** @description button disabled */
|
||||
disabled: _$vue.ComputedRef<boolean>; /** @description whether adding space */
|
||||
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
click: (evt: MouseEvent) => void;
|
||||
}, string, _$vue.PublicProps, Readonly<ButtonProps> & Readonly<{
|
||||
onClick?: ((evt: MouseEvent) => any) | undefined;
|
||||
}>, {
|
||||
tag: string | _$vue.Component;
|
||||
type: ButtonType;
|
||||
disabled: boolean;
|
||||
text: boolean;
|
||||
round: boolean;
|
||||
dashed: boolean;
|
||||
plain: boolean;
|
||||
nativeType: ButtonNativeType;
|
||||
loadingIcon: IconPropType;
|
||||
autoInsertSpace: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
79
frontend/node_modules/element-plus/es/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
79
frontend/node_modules/element-plus/es/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { ElIcon } from "../../icon/index.mjs";
|
||||
import { buttonEmits, buttonProps } from "./button.mjs";
|
||||
import { useButton } from "./use-button.mjs";
|
||||
import { useButtonCustomStyle } from "./button-custom.mjs";
|
||||
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
|
||||
//#region ../../packages/components/button/src/button.vue?vue&type=script&setup=true&lang.ts
|
||||
var button_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: "ElButton",
|
||||
__name: "button",
|
||||
props: buttonProps,
|
||||
emits: buttonEmits,
|
||||
setup(__props, { expose: __expose, emit: __emit }) {
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const buttonStyle = useButtonCustomStyle(props);
|
||||
const ns = useNamespace("button");
|
||||
const { _ref, _size, _type, _disabled, _props, _plain, _round, _text, _dashed, shouldAddSpace, handleClick } = useButton(props, emit);
|
||||
const buttonKls = computed(() => [
|
||||
ns.b(),
|
||||
ns.m(_type.value),
|
||||
ns.m(_size.value),
|
||||
ns.is("disabled", _disabled.value),
|
||||
ns.is("loading", props.loading),
|
||||
ns.is("plain", _plain.value),
|
||||
ns.is("round", _round.value),
|
||||
ns.is("circle", props.circle),
|
||||
ns.is("text", _text.value),
|
||||
ns.is("dashed", _dashed.value),
|
||||
ns.is("link", props.link),
|
||||
ns.is("has-bg", props.bg)
|
||||
]);
|
||||
__expose({
|
||||
/** @description button html element */
|
||||
ref: _ref,
|
||||
/** @description button size */
|
||||
size: _size,
|
||||
/** @description button type */
|
||||
type: _type,
|
||||
/** @description button disabled */
|
||||
disabled: _disabled,
|
||||
/** @description whether adding space */
|
||||
shouldAddSpace
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({
|
||||
ref_key: "_ref",
|
||||
ref: _ref
|
||||
}, unref(_props), {
|
||||
class: buttonKls.value,
|
||||
style: unref(buttonStyle),
|
||||
onClick: unref(handleClick)
|
||||
}), {
|
||||
default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
|
||||
key: 1,
|
||||
class: normalizeClass(unref(ns).is("loading"))
|
||||
}, {
|
||||
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.loadingIcon)))]),
|
||||
_: 1
|
||||
}, 8, ["class"]))], 64)) : __props.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
||||
default: withCtx(() => [__props.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })]),
|
||||
_: 3
|
||||
})) : createCommentVNode("v-if", true), _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
||||
key: 2,
|
||||
class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
|
||||
}, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)]),
|
||||
_: 3
|
||||
}, 16, [
|
||||
"class",
|
||||
"style",
|
||||
"onClick"
|
||||
]);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { button_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=button.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"button.vue_vue_type_script_setup_true_lang.mjs","names":["$slots"],"sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"_ref\"\n v-bind=\"_props\"\n :class=\"buttonKls\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\" />\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon || $slots.icon\">\n <component :is=\"icon\" v-if=\"icon\" />\n <slot v-else name=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot />\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, markRaw } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Loading } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useButton } from './use-button'\nimport { buttonEmits } from './button'\nimport { useButtonCustomStyle } from './button-custom'\n\nimport type { ButtonProps } from './button'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n disabled: undefined,\n type: '',\n nativeType: 'button',\n loadingIcon: markRaw(Loading),\n plain: undefined,\n text: undefined,\n round: undefined,\n dashed: undefined,\n autoInsertSpace: undefined,\n tag: 'button',\n})\n\nconst emit = defineEmits(buttonEmits)\n\nconst buttonStyle = useButtonCustomStyle(props)\nconst ns = useNamespace('button')\nconst {\n _ref,\n _size,\n _type,\n _disabled,\n _props,\n _plain,\n _round,\n _text,\n _dashed,\n shouldAddSpace,\n handleClick,\n} = useButton(props, emit)\nconst buttonKls = computed(() => [\n ns.b(),\n ns.m(_type.value),\n ns.m(_size.value),\n ns.is('disabled', _disabled.value),\n ns.is('loading', props.loading),\n ns.is('plain', _plain.value),\n ns.is('round', _round.value),\n ns.is('circle', props.circle),\n ns.is('text', _text.value),\n ns.is('dashed', _dashed.value),\n ns.is('link', props.link),\n ns.is('has-bg', props.bg),\n])\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAad,MAAM,OAAO;EAEb,MAAM,cAAc,qBAAqB,MAAK;EAC9C,MAAM,KAAK,aAAa,SAAQ;EAChC,MAAM,EACJ,MACA,OACA,OACA,WACA,QACA,QACA,QACA,OACA,SACA,gBACA,gBACE,UAAU,OAAO,KAAI;EACzB,MAAM,YAAY,eAAe;GAC/B,GAAG,GAAG;GACN,GAAG,EAAE,MAAM,MAAM;GACjB,GAAG,EAAE,MAAM,MAAM;GACjB,GAAG,GAAG,YAAY,UAAU,MAAM;GAClC,GAAG,GAAG,WAAW,MAAM,QAAQ;GAC/B,GAAG,GAAG,SAAS,OAAO,MAAM;GAC5B,GAAG,GAAG,SAAS,OAAO,MAAM;GAC5B,GAAG,GAAG,UAAU,MAAM,OAAO;GAC7B,GAAG,GAAG,QAAQ,MAAM,MAAM;GAC1B,GAAG,GAAG,UAAU,QAAQ,MAAM;GAC9B,GAAG,GAAG,QAAQ,MAAM,KAAK;GACzB,GAAG,GAAG,UAAU,MAAM,GAAG;GAC1B,CAAA;EAED,SAAa;;GAEX,KAAK;;GAEL,MAAM;;GAEN,MAAM;;GAEN,UAAU;;GAEV;GACD,CAAA;;uBAlGC,YAwBY,wBAvBL,QAAA,IAAG,EADV,WAwBY;aAtBN;IAAJ,KAAI;MACI,MAAA,OAAM,EAAA;IACb,OAAO,UAAA;IACP,OAAO,MAAA,YAAW;IAClB,SAAO,MAAA,YAAA;;2BAOG,CALK,QAAA,WAAA,WAAA,EAAhB,mBAKW,UAAA,EAAA,KAAA,GAAA,EAAA,CAJGA,KAAAA,OAAO,UAAnB,WAA6C,KAAA,QAAA,WAAA,EAAA,KAAA,GAAA,CAAA,IAAA,WAAA,EAC7C,YAEU,MAAA,OAAA,EAAA;;KAFO,OAAK,eAAE,MAAA,GAAE,CAAC,GAAE,UAAA,CAAA;;4BACI,EAAA,WAAA,EAA/B,YAA+B,wBAAf,QAAA,YAAW,CAAA,EAAA,CAAA;;+BAGX,QAAA,QAAQA,KAAAA,OAAO,QAAA,WAAA,EAAnC,YAGU,MAAA,OAAA,EAAA,EAAA,KAAA,GAAA,EAAA;4BAF4B,CAAR,QAAA,QAAA,WAAA,EAA5B,YAAoC,wBAApB,QAAA,KAAI,EAAA,EAAA,KAAA,GAAA,CAAA,IACpB,WAA2B,KAAA,QAAA,QAAA,EAAA,KAAA,GAAA,CAAA,CAAA,CAAA;;4CAGrBA,KAAAA,OAAO,WAAA,WAAA,EADf,mBAKO,QAAA;;KAHJ,OAAK,eAAA,GAAK,MAAA,GAAE,CAAC,GAAE,QAAA,SAAA,GAAqB,MAAA,eAAc,EAAA,CAAA;QAEnD,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA,CAAA,CAAA"}
|
||||
7
frontend/node_modules/element-plus/es/components/button/src/button2.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/button/src/button2.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import button_vue_vue_type_script_setup_true_lang_default from "./button.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/button/src/button.vue
|
||||
var button_default = button_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { button_default as default };
|
||||
|
||||
//# sourceMappingURL=button2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/button2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/button2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"button2.mjs","names":[],"sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"_ref\"\n v-bind=\"_props\"\n :class=\"buttonKls\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\" />\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon || $slots.icon\">\n <component :is=\"icon\" v-if=\"icon\" />\n <slot v-else name=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot />\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, markRaw } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Loading } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useButton } from './use-button'\nimport { buttonEmits } from './button'\nimport { useButtonCustomStyle } from './button-custom'\n\nimport type { ButtonProps } from './button'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n disabled: undefined,\n type: '',\n nativeType: 'button',\n loadingIcon: markRaw(Loading),\n plain: undefined,\n text: undefined,\n round: undefined,\n dashed: undefined,\n autoInsertSpace: undefined,\n tag: 'button',\n})\n\nconst emit = defineEmits(buttonEmits)\n\nconst buttonStyle = useButtonCustomStyle(props)\nconst ns = useNamespace('button')\nconst {\n _ref,\n _size,\n _type,\n _disabled,\n _props,\n _plain,\n _round,\n _text,\n _dashed,\n shouldAddSpace,\n handleClick,\n} = useButton(props, emit)\nconst buttonKls = computed(() => [\n ns.b(),\n ns.m(_type.value),\n ns.m(_size.value),\n ns.is('disabled', _disabled.value),\n ns.is('loading', props.loading),\n ns.is('plain', _plain.value),\n ns.is('round', _round.value),\n ns.is('circle', props.circle),\n ns.is('text', _text.value),\n ns.is('dashed', _dashed.value),\n ns.is('link', props.link),\n ns.is('has-bg', props.bg),\n])\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"mappings":""}
|
||||
11
frontend/node_modules/element-plus/es/components/button/src/constants.d.ts
generated
vendored
Normal file
11
frontend/node_modules/element-plus/es/components/button/src/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { ButtonProps } from "./button.js";
|
||||
import { InjectionKey } from "vue";
|
||||
|
||||
//#region ../../packages/components/button/src/constants.d.ts
|
||||
interface ButtonGroupContext {
|
||||
size?: ButtonProps['size'];
|
||||
type?: ButtonProps['type'];
|
||||
}
|
||||
declare const buttonGroupContextKey: InjectionKey<ButtonGroupContext>;
|
||||
//#endregion
|
||||
export { ButtonGroupContext, buttonGroupContextKey };
|
||||
6
frontend/node_modules/element-plus/es/components/button/src/constants.mjs
generated
vendored
Normal file
6
frontend/node_modules/element-plus/es/components/button/src/constants.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
//#region ../../packages/components/button/src/constants.ts
|
||||
const buttonGroupContextKey = Symbol("buttonGroupContextKey");
|
||||
//#endregion
|
||||
export { buttonGroupContextKey };
|
||||
|
||||
//# sourceMappingURL=constants.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/constants.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/constants.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../../../../packages/components/button/src/constants.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { ButtonProps } from './button'\n\nexport interface ButtonGroupContext {\n size?: ButtonProps['size']\n type?: ButtonProps['type']\n}\n\nexport const buttonGroupContextKey: InjectionKey<ButtonGroupContext> = Symbol(\n 'buttonGroupContextKey'\n)\n"],"mappings":";AAQA,MAAa,wBAA0D,OACrE,wBACD"}
|
||||
8
frontend/node_modules/element-plus/es/components/button/src/instance.d.ts
generated
vendored
Normal file
8
frontend/node_modules/element-plus/es/components/button/src/instance.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import _default from "./button.vue.js";
|
||||
import _default$1 from "./button-group.vue.js";
|
||||
|
||||
//#region ../../packages/components/button/src/instance.d.ts
|
||||
type ButtonInstance = InstanceType<typeof _default> & unknown;
|
||||
type ButtonGroupInstance = InstanceType<typeof _default$1> & unknown;
|
||||
//#endregion
|
||||
export { ButtonGroupInstance, ButtonInstance };
|
||||
0
frontend/node_modules/element-plus/es/components/button/src/instance.mjs
generated
vendored
Normal file
0
frontend/node_modules/element-plus/es/components/button/src/instance.mjs
generated
vendored
Normal file
30
frontend/node_modules/element-plus/es/components/button/src/use-button.d.ts
generated
vendored
Normal file
30
frontend/node_modules/element-plus/es/components/button/src/use-button.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { ButtonEmits, ButtonProps } from "./button.js";
|
||||
import * as _$vue from "vue";
|
||||
import { SetupContext } from "vue";
|
||||
|
||||
//#region ../../packages/components/button/src/use-button.d.ts
|
||||
declare const useButton: (props: ButtonProps, emit: SetupContext<ButtonEmits>["emit"]) => {
|
||||
_disabled: _$vue.ComputedRef<boolean>;
|
||||
_size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
||||
_type: _$vue.ComputedRef<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
||||
_ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
||||
_props: _$vue.ComputedRef<{
|
||||
ariaDisabled: boolean | undefined;
|
||||
disabled: boolean | undefined;
|
||||
autofocus: boolean | undefined;
|
||||
type: "button" | "reset" | "submit" | undefined;
|
||||
} | {
|
||||
ariaDisabled?: undefined;
|
||||
disabled?: undefined;
|
||||
autofocus?: undefined;
|
||||
type?: undefined;
|
||||
}>;
|
||||
_plain: _$vue.ComputedRef<boolean>;
|
||||
_round: _$vue.ComputedRef<boolean>;
|
||||
_text: _$vue.ComputedRef<boolean>;
|
||||
_dashed: _$vue.ComputedRef<boolean>;
|
||||
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
||||
handleClick: (evt: MouseEvent) => void;
|
||||
};
|
||||
//#endregion
|
||||
export { useButton };
|
||||
74
frontend/node_modules/element-plus/es/components/button/src/use-button.mjs
generated
vendored
Normal file
74
frontend/node_modules/element-plus/es/components/button/src/use-button.mjs
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import { useDeprecated } from "../../../hooks/use-deprecated/index.mjs";
|
||||
import { useFormDisabled, useFormSize } from "../../form/src/hooks/use-form-common-props.mjs";
|
||||
import { useFormItem } from "../../form/src/hooks/use-form-item.mjs";
|
||||
import { useGlobalConfig } from "../../config-provider/src/hooks/use-global-config.mjs";
|
||||
import { buttonGroupContextKey } from "./constants.mjs";
|
||||
import { Text, computed, inject, ref, useSlots } from "vue";
|
||||
//#region ../../packages/components/button/src/use-button.ts
|
||||
const useButton = (props, emit) => {
|
||||
useDeprecated({
|
||||
from: "type.text",
|
||||
replacement: "link",
|
||||
version: "3.0.0",
|
||||
scope: "props",
|
||||
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
||||
}, computed(() => props.type === "text"));
|
||||
const buttonGroupContext = inject(buttonGroupContextKey, void 0);
|
||||
const globalConfig = useGlobalConfig("button");
|
||||
const { form } = useFormItem();
|
||||
const _size = useFormSize(computed(() => buttonGroupContext?.size));
|
||||
const _disabled = useFormDisabled();
|
||||
const _ref = ref();
|
||||
const slots = useSlots();
|
||||
const _type = computed(() => props.type || buttonGroupContext?.type || globalConfig.value?.type || "");
|
||||
const autoInsertSpace = computed(() => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false);
|
||||
const _plain = computed(() => props.plain ?? globalConfig.value?.plain ?? false);
|
||||
const _round = computed(() => props.round ?? globalConfig.value?.round ?? false);
|
||||
const _text = computed(() => props.text ?? globalConfig.value?.text ?? false);
|
||||
const _dashed = computed(() => props.dashed ?? globalConfig.value?.dashed ?? false);
|
||||
const _props = computed(() => {
|
||||
if (props.tag === "button") return {
|
||||
ariaDisabled: _disabled.value || props.loading,
|
||||
disabled: _disabled.value || props.loading,
|
||||
autofocus: props.autofocus,
|
||||
type: props.nativeType
|
||||
};
|
||||
return {};
|
||||
});
|
||||
const shouldAddSpace = computed(() => {
|
||||
const defaultSlot = slots.default?.();
|
||||
if (autoInsertSpace.value && defaultSlot?.length === 1) {
|
||||
const slot = defaultSlot[0];
|
||||
if (slot?.type === Text) {
|
||||
const text = slot.children;
|
||||
return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
const handleClick = (evt) => {
|
||||
if (_disabled.value || props.loading) {
|
||||
evt.stopPropagation();
|
||||
return;
|
||||
}
|
||||
if (props.nativeType === "reset") form?.resetFields();
|
||||
emit("click", evt);
|
||||
};
|
||||
return {
|
||||
_disabled,
|
||||
_size,
|
||||
_type,
|
||||
_ref,
|
||||
_props,
|
||||
_plain,
|
||||
_round,
|
||||
_text,
|
||||
_dashed,
|
||||
shouldAddSpace,
|
||||
handleClick
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { useButton };
|
||||
|
||||
//# sourceMappingURL=use-button.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/button/src/use-button.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/button/src/use-button.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-button.mjs","names":[],"sources":["../../../../../../packages/components/button/src/use-button.ts"],"sourcesContent":["import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext<ButtonEmits>['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref<HTMLButtonElement>()\n const slots = useSlots()\n\n const _type = computed(\n () =>\n props.type || buttonGroupContext?.type || globalConfig.value?.type || ''\n )\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n const _plain = computed(\n () => props.plain ?? globalConfig.value?.plain ?? false\n )\n const _round = computed(\n () => props.round ?? globalConfig.value?.round ?? false\n )\n const _text = computed(() => props.text ?? globalConfig.value?.text ?? false)\n const _dashed = computed(\n () => props.dashed ?? globalConfig.value?.dashed ?? false\n )\n\n const _props = computed(() => {\n if (props.tag === 'button') {\n return {\n ariaDisabled: _disabled.value || props.loading,\n disabled: _disabled.value || props.loading,\n autofocus: props.autofocus,\n type: props.nativeType,\n }\n }\n return {}\n })\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (_disabled.value || props.loading) {\n evt.stopPropagation()\n return\n }\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n _props,\n _plain,\n _round,\n _text,\n _dashed,\n shouldAddSpace,\n handleClick,\n }\n}\n"],"mappings":";;;;;;;AAaA,MAAa,aACX,OACA,SACG;CACH,cACE;EACE,MAAM;EACN,aAAa;EACb,SAAS;EACT,OAAO;EACP,KAAK;EACN,EACD,eAAe,MAAM,SAAS,OAAO,CACtC;CAED,MAAM,qBAAqB,OAAO,uBAAuB,KAAA,EAAU;CACnE,MAAM,eAAe,gBAAgB,SAAS;CAC9C,MAAM,EAAE,SAAS,aAAa;CAC9B,MAAM,QAAQ,YAAY,eAAe,oBAAoB,KAAK,CAAC;CACnE,MAAM,YAAY,iBAAiB;CACnC,MAAM,OAAO,KAAwB;CACrC,MAAM,QAAQ,UAAU;CAExB,MAAM,QAAQ,eAEV,MAAM,QAAQ,oBAAoB,QAAQ,aAAa,OAAO,QAAQ,GACzE;CACD,MAAM,kBAAkB,eAChB,MAAM,mBAAmB,aAAa,OAAO,mBAAmB,MACvE;CACD,MAAM,SAAS,eACP,MAAM,SAAS,aAAa,OAAO,SAAS,MACnD;CACD,MAAM,SAAS,eACP,MAAM,SAAS,aAAa,OAAO,SAAS,MACnD;CACD,MAAM,QAAQ,eAAe,MAAM,QAAQ,aAAa,OAAO,QAAQ,MAAM;CAC7E,MAAM,UAAU,eACR,MAAM,UAAU,aAAa,OAAO,UAAU,MACrD;CAED,MAAM,SAAS,eAAe;EAC5B,IAAI,MAAM,QAAQ,UAChB,OAAO;GACL,cAAc,UAAU,SAAS,MAAM;GACvC,UAAU,UAAU,SAAS,MAAM;GACnC,WAAW,MAAM;GACjB,MAAM,MAAM;GACb;EAEH,OAAO,EAAE;GACT;CAGF,MAAM,iBAAiB,eAAe;EACpC,MAAM,cAAc,MAAM,WAAW;EACrC,IAAI,gBAAgB,SAAS,aAAa,WAAW,GAAG;GACtD,MAAM,OAAO,YAAY;GACzB,IAAI,MAAM,SAAS,MAAM;IACvB,MAAM,OAAO,KAAK;IAClB,OAAO,8BAA8B,KAAK,KAAK,MAAM,CAAC;;;EAG1D,OAAO;GACP;CAEF,MAAM,eAAe,QAAoB;EACvC,IAAI,UAAU,SAAS,MAAM,SAAS;GACpC,IAAI,iBAAiB;GACrB;;EAEF,IAAI,MAAM,eAAe,SACvB,MAAM,aAAa;EAErB,KAAK,SAAS,IAAI;;CAGpB,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
|
||||
2
frontend/node_modules/element-plus/es/components/button/style/css.mjs
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/components/button/style/css.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import "../../base/style/css.mjs";
|
||||
import "element-plus/theme-chalk/el-button.css";
|
||||
2
frontend/node_modules/element-plus/es/components/button/style/index.mjs
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/components/button/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import "../../base/style/index.mjs";
|
||||
import "element-plus/theme-chalk/src/button.scss";
|
||||
Reference in New Issue
Block a user