完全跑通1.0版本
This commit is contained in:
10
frontend/node_modules/element-plus/es/components/dialog/index.d.ts
generated
vendored
Normal file
10
frontend/node_modules/element-plus/es/components/dialog/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { SFCWithInstall } from "../../utils/vue/typescript.js";
|
||||
import { DialogBeforeCloseFn, DialogConfigContext, DialogEmits, DialogInstance, DialogProps, DialogPropsPublic, DialogTransition, dialogContextKey, dialogEmits, dialogProps, dialogPropsDefaults } from "./src/dialog.js";
|
||||
import _default from "./src/dialog.vue.js";
|
||||
import { useDialog } from "./src/use-dialog.js";
|
||||
import { DEFAULT_DIALOG_TRANSITION, DialogContext, dialogInjectionKey } from "./src/constants.js";
|
||||
|
||||
//#region ../../packages/components/dialog/index.d.ts
|
||||
declare const ElDialog: SFCWithInstall<typeof _default>;
|
||||
//#endregion
|
||||
export { DEFAULT_DIALOG_TRANSITION, DialogBeforeCloseFn, DialogConfigContext, DialogContext, DialogEmits, DialogInstance, DialogProps, DialogPropsPublic, DialogTransition, ElDialog, ElDialog as default, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dialogPropsDefaults, useDialog };
|
||||
11
frontend/node_modules/element-plus/es/components/dialog/index.mjs
generated
vendored
Normal file
11
frontend/node_modules/element-plus/es/components/dialog/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { withInstall } from "../../utils/vue/install.mjs";
|
||||
import { dialogContextKey, dialogEmits, dialogProps, dialogPropsDefaults } from "./src/dialog.mjs";
|
||||
import { DEFAULT_DIALOG_TRANSITION, dialogInjectionKey } from "./src/constants.mjs";
|
||||
import { useDialog } from "./src/use-dialog.mjs";
|
||||
import dialog_default from "./src/dialog2.mjs";
|
||||
//#region ../../packages/components/dialog/index.ts
|
||||
const ElDialog = withInstall(dialog_default);
|
||||
//#endregion
|
||||
export { DEFAULT_DIALOG_TRANSITION, ElDialog, ElDialog as default, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dialogPropsDefaults, useDialog };
|
||||
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["Dialog"],"sources":["../../../../../packages/components/dialog/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Dialog from './src/dialog.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElDialog: SFCWithInstall<typeof Dialog> = withInstall(Dialog)\nexport default ElDialog\n\nexport * from './src/use-dialog'\nexport * from './src/dialog'\nexport * from './src/constants'\n"],"mappings":";;;;;;AAKA,MAAa,WAA0C,YAAYA,eAAO"}
|
||||
16
frontend/node_modules/element-plus/es/components/dialog/src/constants.d.ts
generated
vendored
Normal file
16
frontend/node_modules/element-plus/es/components/dialog/src/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { UseNamespaceReturn } from "../../../hooks/use-namespace/index.js";
|
||||
import { CSSProperties, ComputedRef, InjectionKey, Ref } from "vue";
|
||||
|
||||
//#region ../../packages/components/dialog/src/constants.d.ts
|
||||
type DialogContext = {
|
||||
dialogRef: Ref<HTMLElement | undefined>;
|
||||
headerRef: Ref<HTMLElement | undefined>;
|
||||
bodyId: Ref<string>;
|
||||
ns: UseNamespaceReturn;
|
||||
rendered: Ref<boolean>;
|
||||
style: ComputedRef<CSSProperties>;
|
||||
};
|
||||
declare const dialogInjectionKey: InjectionKey<DialogContext>;
|
||||
declare const DEFAULT_DIALOG_TRANSITION = "dialog-fade";
|
||||
//#endregion
|
||||
export { DEFAULT_DIALOG_TRANSITION, DialogContext, dialogInjectionKey };
|
||||
7
frontend/node_modules/element-plus/es/components/dialog/src/constants.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/dialog/src/constants.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
//#region ../../packages/components/dialog/src/constants.ts
|
||||
const dialogInjectionKey = Symbol("dialogInjectionKey");
|
||||
const DEFAULT_DIALOG_TRANSITION = "dialog-fade";
|
||||
//#endregion
|
||||
export { DEFAULT_DIALOG_TRANSITION, dialogInjectionKey };
|
||||
|
||||
//# sourceMappingURL=constants.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/constants.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/constants.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../../../../packages/components/dialog/src/constants.ts"],"sourcesContent":["import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\n\nexport type DialogContext = {\n dialogRef: Ref<HTMLElement | undefined>\n headerRef: Ref<HTMLElement | undefined>\n bodyId: Ref<string>\n ns: UseNamespaceReturn\n rendered: Ref<boolean>\n style: ComputedRef<CSSProperties>\n}\n\nexport const dialogInjectionKey: InjectionKey<DialogContext> =\n Symbol('dialogInjectionKey')\n\nexport const DEFAULT_DIALOG_TRANSITION = 'dialog-fade'\n"],"mappings":";AAYA,MAAa,qBACX,OAAO,qBAAqB;AAE9B,MAAa,4BAA4B"}
|
||||
93
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.d.ts
generated
vendored
Normal file
93
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.d.ts
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
import { IconPropType } from "../../../utils/vue/icon.js";
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog-content.d.ts
|
||||
/**
|
||||
* @description dialog-content component props
|
||||
*/
|
||||
interface DialogContentProps {
|
||||
/**
|
||||
* @description whether to align the header and footer in center
|
||||
*/
|
||||
center?: boolean;
|
||||
/**
|
||||
* @description whether to align the dialog both horizontally and vertically
|
||||
*/
|
||||
alignCenter?: boolean;
|
||||
/**
|
||||
* @description custom close icon, default is Close
|
||||
*/
|
||||
closeIcon?: IconPropType;
|
||||
/**
|
||||
* @description enable dragging feature for Dialog
|
||||
*/
|
||||
draggable?: boolean;
|
||||
/**
|
||||
* @description draggable Dialog can overflow the viewport
|
||||
*/
|
||||
overflow?: boolean;
|
||||
/**
|
||||
* @description whether the Dialog takes up full screen
|
||||
*/
|
||||
fullscreen?: boolean;
|
||||
/**
|
||||
* @description custom class names for header wrapper
|
||||
*/
|
||||
headerClass?: string;
|
||||
/**
|
||||
* @description custom class names for body wrapper
|
||||
*/
|
||||
bodyClass?: string;
|
||||
/**
|
||||
* @description custom class names for footer wrapper
|
||||
*/
|
||||
footerClass?: string;
|
||||
/**
|
||||
* @description whether to show a close button
|
||||
*/
|
||||
showClose?: boolean;
|
||||
/**
|
||||
* @description title of Dialog. Can also be passed with a named slot (see the following table)
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* @description header's aria-level attribute
|
||||
*/
|
||||
ariaLevel?: string;
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `DialogContentProps` instead.
|
||||
*/
|
||||
declare const dialogContentProps: {
|
||||
readonly center: BooleanConstructor;
|
||||
readonly alignCenter: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly closeIcon: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly draggable: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly overflow: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly fullscreen: BooleanConstructor;
|
||||
readonly headerClass: StringConstructor;
|
||||
readonly bodyClass: StringConstructor;
|
||||
readonly footerClass: StringConstructor;
|
||||
readonly showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly ariaLevel: EpPropFinalized<StringConstructor, unknown, unknown, "2", boolean>;
|
||||
};
|
||||
declare const dialogContentEmits: {
|
||||
close: () => boolean;
|
||||
};
|
||||
declare const dialogContentPropsDefaults: {
|
||||
readonly alignCenter: undefined;
|
||||
readonly draggable: undefined;
|
||||
readonly overflow: undefined;
|
||||
readonly showClose: true;
|
||||
readonly title: "";
|
||||
readonly ariaLevel: "2";
|
||||
};
|
||||
//#endregion
|
||||
export { DialogContentProps, dialogContentEmits, dialogContentProps, dialogContentPropsDefaults };
|
||||
87
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.mjs
generated
vendored
Normal file
87
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.mjs
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
||||
import { iconPropType } from "../../../utils/vue/icon.mjs";
|
||||
//#region ../../packages/components/dialog/src/dialog-content.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `DialogContentProps` instead.
|
||||
*/
|
||||
const dialogContentProps = buildProps({
|
||||
/**
|
||||
* @description whether to align the header and footer in center
|
||||
*/
|
||||
center: Boolean,
|
||||
/**
|
||||
* @description whether to align the dialog both horizontally and vertically
|
||||
*/
|
||||
alignCenter: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description custom close icon, default is Close
|
||||
*/
|
||||
closeIcon: { type: iconPropType },
|
||||
/**
|
||||
* @description enable dragging feature for Dialog
|
||||
*/
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description draggable Dialog can overflow the viewport
|
||||
*/
|
||||
overflow: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description whether the Dialog takes up full screen
|
||||
*/
|
||||
fullscreen: Boolean,
|
||||
/**
|
||||
* @description custom class names for header wrapper
|
||||
*/
|
||||
headerClass: String,
|
||||
/**
|
||||
* @description custom class names for body wrapper
|
||||
*/
|
||||
bodyClass: String,
|
||||
/**
|
||||
* @description custom class names for footer wrapper
|
||||
*/
|
||||
footerClass: String,
|
||||
/**
|
||||
* @description whether to show a close button
|
||||
*/
|
||||
showClose: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description title of Dialog. Can also be passed with a named slot (see the following table)
|
||||
*/
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* @description header's aria-level attribute
|
||||
*/
|
||||
ariaLevel: {
|
||||
type: String,
|
||||
default: "2"
|
||||
}
|
||||
});
|
||||
const dialogContentEmits = { close: () => true };
|
||||
const dialogContentPropsDefaults = {
|
||||
alignCenter: void 0,
|
||||
draggable: void 0,
|
||||
overflow: void 0,
|
||||
showClose: true,
|
||||
title: "",
|
||||
ariaLevel: "2"
|
||||
};
|
||||
//#endregion
|
||||
export { dialogContentEmits, dialogContentProps, dialogContentPropsDefaults };
|
||||
|
||||
//# sourceMappingURL=dialog-content.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog-content.mjs","names":[],"sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { IconPropType } from '@element-plus/utils'\n\n/**\n * @description dialog-content component props\n */\nexport interface DialogContentProps {\n /**\n * @description whether to align the header and footer in center\n */\n center?: boolean\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter?: boolean\n /**\n * @description custom close icon, default is Close\n */\n closeIcon?: IconPropType\n /**\n * @description enable dragging feature for Dialog\n */\n draggable?: boolean\n /**\n * @description draggable Dialog can overflow the viewport\n */\n overflow?: boolean\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen?: boolean\n /**\n * @description custom class names for header wrapper\n */\n headerClass?: string\n /**\n * @description custom class names for body wrapper\n */\n bodyClass?: string\n /**\n * @description custom class names for footer wrapper\n */\n footerClass?: string\n /**\n * @description whether to show a close button\n */\n showClose?: boolean\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title?: string\n /**\n * @description header's aria-level attribute\n */\n ariaLevel?: string\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `DialogContentProps` instead.\n */\nexport const dialogContentProps = buildProps({\n /**\n * @description whether to align the header and footer in center\n */\n center: Boolean,\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description enable dragging feature for Dialog\n */\n draggable: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description draggable Dialog can overflow the viewport\n */\n overflow: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen: Boolean,\n /**\n * @description custom class names for header wrapper\n */\n headerClass: String,\n /**\n * @description custom class names for body wrapper\n */\n bodyClass: String,\n /**\n * @description custom class names for footer wrapper\n */\n footerClass: String,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description header's aria-level attribute\n */\n ariaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n\nexport const dialogContentPropsDefaults = {\n alignCenter: undefined,\n draggable: undefined,\n overflow: undefined,\n showClose: true,\n title: '',\n ariaLevel: '2',\n} as const\n"],"mappings":";;;;;;AA6DA,MAAa,qBAAqB,WAAW;;;;CAI3C,QAAQ;;;;CAIR,aAAa;EACX,MAAM;EACN,SAAS,KAAA;EACV;;;;CAID,WAAW,EACT,MAAM,cACP;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS,KAAA;EACV;;;;CAID,UAAU;EACR,MAAM;EACN,SAAS,KAAA;EACV;;;;CAID,YAAY;;;;CAIZ,aAAa;;;;CAIb,WAAW;;;;CAIX,aAAa;;;;CAIb,WAAW;EACT,MAAM;EACN,SAAS;EACV;;;;CAID,OAAO;EACL,MAAM;EACN,SAAS;EACV;;;;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;CACF,CAAU;AAEX,MAAa,qBAAqB,EAChC,aAAa,MACd;AAED,MAAa,6BAA6B;CACxC,aAAa,KAAA;CACb,WAAW,KAAA;CACX,UAAU,KAAA;CACV,WAAW;CACX,OAAO;CACP,WAAW;CACZ"}
|
||||
36
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.vue.d.ts
generated
vendored
Normal file
36
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import { DialogContentProps } from "./dialog-content.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog-content.vue.d.ts
|
||||
declare var __VLS_1: {}, __VLS_14: {}, __VLS_16: {};
|
||||
type __VLS_Slots = {} & {
|
||||
header?: (props: typeof __VLS_1) => any;
|
||||
} & {
|
||||
default?: (props: typeof __VLS_14) => any;
|
||||
} & {
|
||||
footer?: (props: typeof __VLS_16) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<DialogContentProps, {
|
||||
resetPosition: () => void;
|
||||
updatePosition: () => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
close: () => void;
|
||||
}, string, _$vue.PublicProps, Readonly<DialogContentProps> & Readonly<{
|
||||
onClose?: (() => any) | undefined;
|
||||
}>, {
|
||||
title: string;
|
||||
overflow: boolean;
|
||||
alignCenter: boolean;
|
||||
draggable: boolean;
|
||||
showClose: boolean;
|
||||
ariaLevel: string;
|
||||
}, {}, {}, {}, 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 };
|
||||
84
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
84
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
import { CloseComponents } from "../../../utils/vue/icon.mjs";
|
||||
import { composeRefs } from "../../../utils/vue/refs.mjs";
|
||||
import { useDraggable } from "../../../hooks/use-draggable/index.mjs";
|
||||
import { useLocale } from "../../../hooks/use-locale/index.mjs";
|
||||
import { ElIcon } from "../../icon/index.mjs";
|
||||
import { FOCUS_TRAP_INJECTION_KEY } from "../../focus-trap/src/tokens.mjs";
|
||||
import { dialogContentEmits, dialogContentProps } from "./dialog-content.mjs";
|
||||
import { dialogInjectionKey } from "./constants.mjs";
|
||||
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, normalizeClass, normalizeStyle, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
||||
//#region ../../packages/components/dialog/src/dialog-content.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = ["aria-level"];
|
||||
const _hoisted_2 = ["aria-label"];
|
||||
const _hoisted_3 = ["id"];
|
||||
var dialog_content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: "ElDialogContent",
|
||||
__name: "dialog-content",
|
||||
props: dialogContentProps,
|
||||
emits: dialogContentEmits,
|
||||
setup(__props, { expose: __expose }) {
|
||||
const { t } = useLocale();
|
||||
const { Close } = CloseComponents;
|
||||
const props = __props;
|
||||
const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey);
|
||||
const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY);
|
||||
const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
|
||||
const draggable = computed(() => !!props.draggable);
|
||||
const { resetPosition, updatePosition, isDragging } = useDraggable(dialogRef, headerRef, draggable, computed(() => !!props.overflow));
|
||||
const dialogKls = computed(() => [
|
||||
ns.b(),
|
||||
ns.is("fullscreen", props.fullscreen),
|
||||
ns.is("draggable", draggable.value),
|
||||
ns.is("dragging", isDragging.value),
|
||||
ns.is("align-center", !!props.alignCenter),
|
||||
{ [ns.m("center")]: props.center }
|
||||
]);
|
||||
__expose({
|
||||
resetPosition,
|
||||
updatePosition
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
ref: unref(composedDialogRef),
|
||||
class: normalizeClass(dialogKls.value),
|
||||
style: normalizeStyle(unref(style)),
|
||||
tabindex: "-1"
|
||||
}, [
|
||||
createElementVNode("header", {
|
||||
ref_key: "headerRef",
|
||||
ref: headerRef,
|
||||
class: normalizeClass([
|
||||
unref(ns).e("header"),
|
||||
__props.headerClass,
|
||||
{ "show-close": __props.showClose }
|
||||
])
|
||||
}, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("span", {
|
||||
role: "heading",
|
||||
"aria-level": __props.ariaLevel,
|
||||
class: normalizeClass(unref(ns).e("title"))
|
||||
}, toDisplayString(__props.title), 11, _hoisted_1)]), __props.showClose ? (openBlock(), createElementBlock("button", {
|
||||
key: 0,
|
||||
"aria-label": unref(t)("el.dialog.close"),
|
||||
class: normalizeClass(unref(ns).e("headerbtn")),
|
||||
type: "button",
|
||||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
||||
}, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
|
||||
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon || unref(Close))))]),
|
||||
_: 1
|
||||
}, 8, ["class"])], 10, _hoisted_2)) : createCommentVNode("v-if", true)], 2),
|
||||
createElementVNode("div", {
|
||||
id: unref(bodyId),
|
||||
class: normalizeClass([unref(ns).e("body"), __props.bodyClass])
|
||||
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_3),
|
||||
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
|
||||
key: 0,
|
||||
class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
|
||||
}, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
|
||||
], 6);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { dialog_content_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=dialog-content.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog-content.vue_vue_type_script_setup_true_lang.mjs","names":["$emit","$slots"],"sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div :ref=\"composedDialogRef\" :class=\"dialogKls\" :style=\"style\" tabindex=\"-1\">\n <header\n ref=\"headerRef\"\n :class=\"[ns.e('header'), headerClass, { 'show-close': showClose }]\"\n >\n <slot name=\"header\">\n <span role=\"heading\" :aria-level=\"ariaLevel\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"t('el.dialog.close')\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n @click=\"$emit('close')\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </el-icon>\n </button>\n </header>\n <div :id=\"bodyId\" :class=\"[ns.e('body'), bodyClass]\">\n <slot />\n </div>\n <footer v-if=\"$slots.footer\" :class=\"[ns.e('footer'), footerClass]\">\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { FOCUS_TRAP_INJECTION_KEY } from '@element-plus/components/focus-trap'\nimport { useDraggable, useLocale } from '@element-plus/hooks'\nimport { CloseComponents, composeRefs } from '@element-plus/utils'\nimport { dialogInjectionKey } from './constants'\nimport {\n dialogContentEmits,\n dialogContentPropsDefaults,\n} from './dialog-content'\n\nimport type { DialogContentProps } from './dialog-content'\n\nconst { t } = useLocale()\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'ElDialogContent' })\nconst props = withDefaults(\n defineProps<DialogContentProps>(),\n dialogContentPropsDefaults\n)\ndefineEmits(dialogContentEmits)\n\nconst { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey)!\nconst { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\nconst composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n\nconst draggable = computed(() => !!props.draggable)\nconst overflow = computed(() => !!props.overflow)\nconst { resetPosition, updatePosition, isDragging } = useDraggable(\n dialogRef,\n headerRef,\n draggable,\n overflow\n)\n\nconst dialogKls = computed(() => [\n ns.b(),\n ns.is('fullscreen', props.fullscreen),\n ns.is('draggable', draggable.value),\n ns.is('dragging', isDragging.value),\n ns.is('align-center', !!props.alignCenter),\n { [ns.m('center')]: props.center },\n])\n\ndefineExpose({\n resetPosition,\n updatePosition,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EA8CA,MAAM,EAAE,MAAM,WAAU;EACxB,MAAM,EAAE,UAAU;EAGlB,MAAM,QAAQ;EAMd,MAAM,EAAE,WAAW,WAAW,QAAQ,IAAI,UAAU,OAAO,mBAAmB;EAC9E,MAAM,EAAE,iBAAiB,OAAO,yBAAyB;EAEzD,MAAM,oBAAoB,YAAY,cAAc,UAAS;EAE7D,MAAM,YAAY,eAAe,CAAC,CAAC,MAAM,UAAS;EAElD,MAAM,EAAE,eAAe,gBAAgB,eAAe,aACpD,WACA,WACA,WAJe,eAAe,CAAC,CAAC,MAAM,SAK/B,CACT;EAEA,MAAM,YAAY,eAAe;GAC/B,GAAG,GAAG;GACN,GAAG,GAAG,cAAc,MAAM,WAAW;GACrC,GAAG,GAAG,aAAa,UAAU,MAAM;GACnC,GAAG,GAAG,YAAY,WAAW,MAAM;GACnC,GAAG,GAAG,gBAAgB,CAAC,CAAC,MAAM,YAAY;GAC1C,GAAG,GAAG,EAAE,SAAS,GAAG,MAAM,QAAQ;GACnC,CAAA;EAED,SAAa;GACX;GACA;GACD,CAAA;;uBAjFC,mBA4BM,OAAA;IA5BA,KAAK,MAAA,kBAAiB;IAAG,OAAK,eAAE,UAAA,MAAS;IAAG,OAAK,eAAE,MAAA,MAAK,CAAA;IAAE,UAAS;;IACvE,mBAoBS,UAAA;cAnBH;KAAJ,KAAI;KACH,OAAK,eAAA;MAAG,MAAA,GAAE,CAAC,EAAC,SAAA;MAAY,QAAA;MAAW,EAAA,cAAkB,QAAA,WAAS;MAAA,CAAA;QAE/D,WAIO,KAAA,QAAA,UAAA,EAAA,QAAA,CAHL,mBAEO,QAAA;KAFD,MAAK;KAAW,cAAY,QAAA;KAAY,OAAK,eAAE,MAAA,GAAE,CAAC,EAAC,QAAA,CAAA;uBACpD,QAAA,MAAK,EAAA,IAAA,WAAA,CAAA,CAAA,EAIJ,QAAA,aAAA,WAAA,EADR,mBAUS,UAAA;;KARN,cAAY,MAAA,EAAC,CAAA,kBAAA;KACb,OAAK,eAAE,MAAA,GAAE,CAAC,EAAC,YAAA,CAAA;KACZ,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,QAAA;QAEb,YAEU,MAAA,OAAA,EAAA,EAFA,OAAK,eAAE,MAAA,GAAE,CAAC,EAAC,QAAA,CAAA,EAAA,EAAA;4BACmB,EAAA,WAAA,EAAtC,YAAsC,wBAAtB,QAAA,aAAa,MAAA,MAAK,CAAA,CAAA,EAAA,CAAA;;;IAIxC,mBAEM,OAAA;KAFA,IAAI,MAAA,OAAM;KAAG,OAAK,eAAA,CAAG,MAAA,GAAE,CAAC,EAAC,OAAA,EAAU,QAAA,UAAS,CAAA;QAChD,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA;IAEIC,KAAAA,OAAO,UAAA,WAAA,EAArB,mBAES,UAAA;;KAFqB,OAAK,eAAA,CAAG,MAAA,GAAE,CAAC,EAAC,SAAA,EAAY,QAAA,YAAW,CAAA;QAC/D,WAAsB,KAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA"}
|
||||
7
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import dialog_content_vue_vue_type_script_setup_true_lang_default from "./dialog-content.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/dialog/src/dialog-content.vue
|
||||
var dialog_content_default = dialog_content_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { dialog_content_default as default };
|
||||
|
||||
//# sourceMappingURL=dialog-content2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog-content2.mjs","names":[],"sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div :ref=\"composedDialogRef\" :class=\"dialogKls\" :style=\"style\" tabindex=\"-1\">\n <header\n ref=\"headerRef\"\n :class=\"[ns.e('header'), headerClass, { 'show-close': showClose }]\"\n >\n <slot name=\"header\">\n <span role=\"heading\" :aria-level=\"ariaLevel\" :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"t('el.dialog.close')\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n @click=\"$emit('close')\"\n >\n <el-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </el-icon>\n </button>\n </header>\n <div :id=\"bodyId\" :class=\"[ns.e('body'), bodyClass]\">\n <slot />\n </div>\n <footer v-if=\"$slots.footer\" :class=\"[ns.e('footer'), footerClass]\">\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { FOCUS_TRAP_INJECTION_KEY } from '@element-plus/components/focus-trap'\nimport { useDraggable, useLocale } from '@element-plus/hooks'\nimport { CloseComponents, composeRefs } from '@element-plus/utils'\nimport { dialogInjectionKey } from './constants'\nimport {\n dialogContentEmits,\n dialogContentPropsDefaults,\n} from './dialog-content'\n\nimport type { DialogContentProps } from './dialog-content'\n\nconst { t } = useLocale()\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'ElDialogContent' })\nconst props = withDefaults(\n defineProps<DialogContentProps>(),\n dialogContentPropsDefaults\n)\ndefineEmits(dialogContentEmits)\n\nconst { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey)!\nconst { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\nconst composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n\nconst draggable = computed(() => !!props.draggable)\nconst overflow = computed(() => !!props.overflow)\nconst { resetPosition, updatePosition, isDragging } = useDraggable(\n dialogRef,\n headerRef,\n draggable,\n overflow\n)\n\nconst dialogKls = computed(() => [\n ns.b(),\n ns.is('fullscreen', props.fullscreen),\n ns.is('draggable', draggable.value),\n ns.is('dragging', isDragging.value),\n ns.is('align-center', !!props.alignCenter),\n { [ns.m('center')]: props.center },\n])\n\ndefineExpose({\n resetPosition,\n updatePosition,\n})\n</script>\n"],"mappings":""}
|
||||
193
frontend/node_modules/element-plus/es/components/dialog/src/dialog.d.ts
generated
vendored
Normal file
193
frontend/node_modules/element-plus/es/components/dialog/src/dialog.d.ts
generated
vendored
Normal file
@@ -0,0 +1,193 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { DialogContentProps } from "./dialog-content.js";
|
||||
import _default from "./dialog.vue.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPublicPropTypes, InjectionKey, TransitionProps } from "vue";
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog.d.ts
|
||||
type DoneFn = (cancel?: boolean) => void;
|
||||
type DialogBeforeCloseFn = (done: DoneFn) => void;
|
||||
type DialogTransition = string | TransitionProps;
|
||||
/**
|
||||
* @description dialog component props
|
||||
*/
|
||||
interface DialogProps extends DialogContentProps {
|
||||
/**
|
||||
* @description whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`
|
||||
*/
|
||||
appendToBody?: boolean;
|
||||
/**
|
||||
* @description which element the Dialog appends to
|
||||
*/
|
||||
appendTo?: string | HTMLElement;
|
||||
/**
|
||||
* @description callback before Dialog closes, and it will prevent Dialog from closing, use done to close the dialog
|
||||
*/
|
||||
beforeClose?: DialogBeforeCloseFn;
|
||||
/**
|
||||
* @description destroy elements in Dialog when closed
|
||||
*/
|
||||
destroyOnClose?: boolean;
|
||||
/**
|
||||
* @description whether the Dialog can be closed by clicking the mask
|
||||
*/
|
||||
closeOnClickModal?: boolean;
|
||||
/**
|
||||
* @description whether the Dialog can be closed by pressing ESC
|
||||
*/
|
||||
closeOnPressEscape?: boolean;
|
||||
/**
|
||||
* @description whether scroll of body is disabled while Dialog is displayed
|
||||
*/
|
||||
lockScroll?: boolean;
|
||||
/**
|
||||
* @description whether a mask is displayed
|
||||
*/
|
||||
modal?: boolean;
|
||||
/**
|
||||
* @description whether the mask is penetrable
|
||||
*/
|
||||
modalPenetrable?: boolean;
|
||||
/**
|
||||
* @description the Time(milliseconds) before open
|
||||
*/
|
||||
openDelay?: number;
|
||||
/**
|
||||
* @description the Time(milliseconds) before close
|
||||
*/
|
||||
closeDelay?: number;
|
||||
/**
|
||||
* @description value for `margin-top` of Dialog CSS, default is 15vh
|
||||
*/
|
||||
top?: string;
|
||||
/**
|
||||
* @description visibility of Dialog
|
||||
*/
|
||||
modelValue?: boolean;
|
||||
/**
|
||||
* @description custom class names for mask
|
||||
*/
|
||||
modalClass?: string;
|
||||
/**
|
||||
* @description width of Dialog, default is 50%
|
||||
*/
|
||||
width?: string | number;
|
||||
/**
|
||||
* @description same as z-index in native CSS, z-order of dialog
|
||||
*/
|
||||
zIndex?: number;
|
||||
/**
|
||||
* @description trap focus within dialog
|
||||
*/
|
||||
trapFocus?: boolean;
|
||||
/**
|
||||
* @description header's aria-level attribute
|
||||
*/
|
||||
headerAriaLevel?: string;
|
||||
/**
|
||||
* @description custom transition configuration for dialog animation, it can be a string (transition name) or an object with Vue transition props
|
||||
*/
|
||||
transition?: DialogTransition;
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `DialogProps` instead.
|
||||
*/
|
||||
declare const dialogProps: {
|
||||
readonly appendToBody: BooleanConstructor;
|
||||
readonly appendTo: EpPropFinalized<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown, "body", boolean>;
|
||||
readonly beforeClose: {
|
||||
readonly type: _$vue.PropType<DialogBeforeCloseFn>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly destroyOnClose: BooleanConstructor;
|
||||
readonly closeOnClickModal: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly closeOnPressEscape: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly lockScroll: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly modal: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly modalPenetrable: BooleanConstructor;
|
||||
readonly openDelay: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
||||
readonly closeDelay: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
||||
readonly top: {
|
||||
readonly type: _$vue.PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly modelValue: BooleanConstructor;
|
||||
readonly modalClass: StringConstructor;
|
||||
readonly headerClass: StringConstructor;
|
||||
readonly bodyClass: StringConstructor;
|
||||
readonly footerClass: StringConstructor;
|
||||
readonly width: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly zIndex: {
|
||||
readonly type: _$vue.PropType<number>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly trapFocus: BooleanConstructor;
|
||||
readonly headerAriaLevel: EpPropFinalized<StringConstructor, unknown, unknown, "2", boolean>;
|
||||
readonly transition: EpPropFinalized<(new (...args: any[]) => string | TransitionProps) | (() => DialogTransition) | (((new (...args: any[]) => string | TransitionProps) | (() => DialogTransition)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
readonly center: BooleanConstructor;
|
||||
readonly alignCenter: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly closeIcon: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly draggable: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly overflow: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
readonly fullscreen: BooleanConstructor;
|
||||
readonly showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly ariaLevel: EpPropFinalized<StringConstructor, unknown, unknown, "2", boolean>;
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `DialogProps` instead.
|
||||
*/
|
||||
type DialogPropsPublic = ExtractPublicPropTypes<typeof dialogProps>;
|
||||
declare const dialogEmits: {
|
||||
open: () => boolean;
|
||||
opened: () => boolean;
|
||||
close: () => boolean;
|
||||
closed: () => boolean;
|
||||
"update:modelValue": (value: boolean) => boolean;
|
||||
openAutoFocus: () => boolean;
|
||||
closeAutoFocus: () => boolean;
|
||||
};
|
||||
type DialogEmits = typeof dialogEmits;
|
||||
type DialogInstance = InstanceType<typeof _default> & unknown;
|
||||
interface DialogConfigContext {
|
||||
alignCenter?: boolean;
|
||||
draggable?: boolean;
|
||||
overflow?: boolean;
|
||||
transition?: DialogTransition;
|
||||
}
|
||||
declare const dialogContextKey: InjectionKey<DialogConfigContext>;
|
||||
declare const dialogPropsDefaults: {
|
||||
readonly appendTo: "body";
|
||||
readonly closeOnClickModal: true;
|
||||
readonly closeOnPressEscape: true;
|
||||
readonly lockScroll: true;
|
||||
readonly modal: true;
|
||||
readonly openDelay: 0;
|
||||
readonly closeDelay: 0;
|
||||
readonly headerAriaLevel: "2";
|
||||
readonly transition: undefined;
|
||||
readonly alignCenter: undefined;
|
||||
readonly draggable: undefined;
|
||||
readonly overflow: undefined;
|
||||
readonly showClose: true;
|
||||
readonly title: "";
|
||||
readonly ariaLevel: "2";
|
||||
};
|
||||
//#endregion
|
||||
export { DialogBeforeCloseFn, DialogConfigContext, DialogEmits, DialogInstance, DialogProps, DialogPropsPublic, DialogTransition, dialogContextKey, dialogEmits, dialogProps, dialogPropsDefaults };
|
||||
149
frontend/node_modules/element-plus/es/components/dialog/src/dialog.mjs
generated
vendored
Normal file
149
frontend/node_modules/element-plus/es/components/dialog/src/dialog.mjs
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
import { UPDATE_MODEL_EVENT } from "../../../constants/event.mjs";
|
||||
import { isBoolean } from "../../../utils/types.mjs";
|
||||
import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
|
||||
import { dialogContentProps, dialogContentPropsDefaults } from "./dialog-content.mjs";
|
||||
//#region ../../packages/components/dialog/src/dialog.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `DialogProps` instead.
|
||||
*/
|
||||
const dialogProps = buildProps({
|
||||
...dialogContentProps,
|
||||
/**
|
||||
* @description whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`
|
||||
*/
|
||||
appendToBody: Boolean,
|
||||
/**
|
||||
* @description which element the Dialog appends to
|
||||
*/
|
||||
appendTo: {
|
||||
type: definePropType([String, Object]),
|
||||
default: "body"
|
||||
},
|
||||
/**
|
||||
* @description callback before Dialog closes, and it will prevent Dialog from closing, use done to close the dialog
|
||||
*/
|
||||
beforeClose: { type: definePropType(Function) },
|
||||
/**
|
||||
* @description destroy elements in Dialog when closed
|
||||
*/
|
||||
destroyOnClose: Boolean,
|
||||
/**
|
||||
* @description whether the Dialog can be closed by clicking the mask
|
||||
*/
|
||||
closeOnClickModal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description whether the Dialog can be closed by pressing ESC
|
||||
*/
|
||||
closeOnPressEscape: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description whether scroll of body is disabled while Dialog is displayed
|
||||
*/
|
||||
lockScroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description whether a mask is displayed
|
||||
*/
|
||||
modal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description whether the mask is penetrable
|
||||
*/
|
||||
modalPenetrable: Boolean,
|
||||
/**
|
||||
* @description the Time(milliseconds) before open
|
||||
*/
|
||||
openDelay: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* @description the Time(milliseconds) before close
|
||||
*/
|
||||
closeDelay: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* @description value for `margin-top` of Dialog CSS, default is 15vh
|
||||
*/
|
||||
top: { type: String },
|
||||
/**
|
||||
* @description visibility of Dialog
|
||||
*/
|
||||
modelValue: Boolean,
|
||||
/**
|
||||
* @description custom class names for mask
|
||||
*/
|
||||
modalClass: String,
|
||||
/**
|
||||
* @description custom class names for header wrapper
|
||||
*/
|
||||
headerClass: String,
|
||||
/**
|
||||
* @description custom class names for body wrapper
|
||||
*/
|
||||
bodyClass: String,
|
||||
/**
|
||||
* @description custom class names for footer wrapper
|
||||
*/
|
||||
footerClass: String,
|
||||
/**
|
||||
* @description width of Dialog, default is 50%
|
||||
*/
|
||||
width: { type: [String, Number] },
|
||||
/**
|
||||
* @description same as z-index in native CSS, z-order of dialog
|
||||
*/
|
||||
zIndex: { type: Number },
|
||||
trapFocus: Boolean,
|
||||
/**
|
||||
* @description header's aria-level attribute
|
||||
*/
|
||||
headerAriaLevel: {
|
||||
type: String,
|
||||
default: "2"
|
||||
},
|
||||
/**
|
||||
* @description custom transition configuration for dialog animation, it can be a string (transition name) or an object with Vue transition props
|
||||
*/
|
||||
transition: {
|
||||
type: definePropType([String, Object]),
|
||||
default: void 0
|
||||
}
|
||||
});
|
||||
const dialogEmits = {
|
||||
open: () => true,
|
||||
opened: () => true,
|
||||
close: () => true,
|
||||
closed: () => true,
|
||||
[UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
|
||||
openAutoFocus: () => true,
|
||||
closeAutoFocus: () => true
|
||||
};
|
||||
const dialogContextKey = Symbol("dialogContextKey");
|
||||
const dialogPropsDefaults = {
|
||||
...dialogContentPropsDefaults,
|
||||
appendTo: "body",
|
||||
closeOnClickModal: true,
|
||||
closeOnPressEscape: true,
|
||||
lockScroll: true,
|
||||
modal: true,
|
||||
openDelay: 0,
|
||||
closeDelay: 0,
|
||||
headerAriaLevel: "2",
|
||||
transition: void 0
|
||||
};
|
||||
//#endregion
|
||||
export { dialogContextKey, dialogEmits, dialogProps, dialogPropsDefaults };
|
||||
|
||||
//# sourceMappingURL=dialog.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
65
frontend/node_modules/element-plus/es/components/dialog/src/dialog.vue.d.ts
generated
vendored
Normal file
65
frontend/node_modules/element-plus/es/components/dialog/src/dialog.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
import { DialogProps, DialogTransition } from "./dialog.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog.vue.d.ts
|
||||
declare var __VLS_43: {
|
||||
close: () => void;
|
||||
titleId: string;
|
||||
titleClass: string;
|
||||
}, __VLS_45: {}, __VLS_47: {}, __VLS_50: {};
|
||||
type __VLS_Slots = {} & {
|
||||
header?: (props: typeof __VLS_43) => any;
|
||||
} & {
|
||||
title?: (props: typeof __VLS_45) => any;
|
||||
} & {
|
||||
default?: (props: typeof __VLS_47) => any;
|
||||
} & {
|
||||
footer?: (props: typeof __VLS_50) => any;
|
||||
};
|
||||
declare const __VLS_base: _$vue.DefineComponent<DialogProps, {
|
||||
/** @description whether the dialog is visible */visible: _$vue.Ref<boolean, boolean>;
|
||||
dialogContentRef: _$vue.Ref<any, any>;
|
||||
resetPosition: () => void;
|
||||
handleClose: () => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
close: () => void;
|
||||
"update:modelValue": (value: boolean) => void;
|
||||
open: () => void;
|
||||
opened: () => void;
|
||||
closed: () => void;
|
||||
openAutoFocus: () => void;
|
||||
closeAutoFocus: () => void;
|
||||
}, string, _$vue.PublicProps, Readonly<DialogProps> & Readonly<{
|
||||
onClose?: (() => any) | undefined;
|
||||
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
||||
onOpen?: (() => any) | undefined;
|
||||
onOpened?: (() => any) | undefined;
|
||||
onClosed?: (() => any) | undefined;
|
||||
onOpenAutoFocus?: (() => any) | undefined;
|
||||
onCloseAutoFocus?: (() => any) | undefined;
|
||||
}>, {
|
||||
title: string;
|
||||
appendTo: string | HTMLElement;
|
||||
transition: DialogTransition;
|
||||
overflow: boolean;
|
||||
closeOnClickModal: boolean;
|
||||
closeOnPressEscape: boolean;
|
||||
lockScroll: boolean;
|
||||
modal: boolean;
|
||||
openDelay: number;
|
||||
closeDelay: number;
|
||||
headerAriaLevel: string;
|
||||
alignCenter: boolean;
|
||||
draggable: boolean;
|
||||
showClose: boolean;
|
||||
ariaLevel: string;
|
||||
}, {}, {}, {}, 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 };
|
||||
162
frontend/node_modules/element-plus/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
162
frontend/node_modules/element-plus/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
import { useDeprecated } from "../../../hooks/use-deprecated/index.mjs";
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { useSameTarget } from "../../../hooks/use-same-target/index.mjs";
|
||||
import focus_trap_default from "../../focus-trap/index.mjs";
|
||||
import { dialogEmits, dialogProps } from "./dialog.mjs";
|
||||
import { ElOverlay } from "../../overlay/index.mjs";
|
||||
import { dialogInjectionKey } from "./constants.mjs";
|
||||
import dialog_content_default from "./dialog-content2.mjs";
|
||||
import { useDialog } from "./use-dialog.mjs";
|
||||
import { Teleport, Transition, computed, createBlock, createCommentVNode, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, provide, ref, renderSlot, unref, useSlots, vShow, withCtx, withDirectives } from "vue";
|
||||
//#region ../../packages/components/dialog/src/dialog.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = [
|
||||
"aria-label",
|
||||
"aria-labelledby",
|
||||
"aria-describedby"
|
||||
];
|
||||
var dialog_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
||||
name: "ElDialog",
|
||||
inheritAttrs: false,
|
||||
__name: "dialog",
|
||||
props: dialogProps,
|
||||
emits: dialogEmits,
|
||||
setup(__props, { expose: __expose }) {
|
||||
const props = __props;
|
||||
const slots = useSlots();
|
||||
useDeprecated({
|
||||
scope: "el-dialog",
|
||||
from: "the title slot",
|
||||
replacement: "the header slot",
|
||||
version: "3.0.0",
|
||||
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
||||
}, computed(() => !!slots.title));
|
||||
const ns = useNamespace("dialog");
|
||||
const dialogRef = ref();
|
||||
const headerRef = ref();
|
||||
const dialogContentRef = ref();
|
||||
const { visible, titleId, bodyId, style, overlayDialogStyle, rendered, transitionConfig, zIndex, _draggable, _alignCenter, _overflow, penetrable, handleClose, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onCloseRequested, onFocusoutPrevented, bringToFront, closing } = useDialog(props, dialogRef);
|
||||
provide(dialogInjectionKey, {
|
||||
dialogRef,
|
||||
headerRef,
|
||||
bodyId,
|
||||
ns,
|
||||
rendered,
|
||||
style
|
||||
});
|
||||
const overlayEvent = useSameTarget(onModalClick);
|
||||
const resetPosition = () => {
|
||||
dialogContentRef.value?.resetPosition();
|
||||
};
|
||||
__expose({
|
||||
/** @description whether the dialog is visible */
|
||||
visible,
|
||||
dialogContentRef,
|
||||
resetPosition,
|
||||
handleClose
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createBlock(Teleport, {
|
||||
to: __props.appendTo,
|
||||
disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
|
||||
}, [createVNode(Transition, mergeProps(unref(transitionConfig), { persisted: "" }), {
|
||||
default: withCtx(() => [withDirectives(createVNode(unref(ElOverlay), {
|
||||
"custom-mask-event": "",
|
||||
mask: __props.modal,
|
||||
"overlay-class": [
|
||||
__props.modalClass ?? "",
|
||||
`${unref(ns).namespace.value}-modal-dialog`,
|
||||
unref(ns).is("penetrable", unref(penetrable))
|
||||
],
|
||||
"z-index": unref(zIndex)
|
||||
}, {
|
||||
default: withCtx(() => [createElementVNode("div", {
|
||||
role: "dialog",
|
||||
"aria-modal": "true",
|
||||
"aria-label": __props.title || void 0,
|
||||
"aria-labelledby": !__props.title ? unref(titleId) : void 0,
|
||||
"aria-describedby": unref(bodyId),
|
||||
class: normalizeClass([`${unref(ns).namespace.value}-overlay-dialog`, unref(ns).is("closing", unref(closing))]),
|
||||
style: normalizeStyle(unref(overlayDialogStyle)),
|
||||
onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)),
|
||||
onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)),
|
||||
onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args))
|
||||
}, [createVNode(unref(focus_trap_default), {
|
||||
loop: "",
|
||||
trapped: unref(visible),
|
||||
"focus-start-el": "container",
|
||||
onFocusAfterTrapped: unref(onOpenAutoFocus),
|
||||
onFocusAfterReleased: unref(onCloseAutoFocus),
|
||||
onFocusoutPrevented: unref(onFocusoutPrevented),
|
||||
onReleaseRequested: unref(onCloseRequested)
|
||||
}, {
|
||||
default: withCtx(() => [unref(rendered) ? (openBlock(), createBlock(dialog_content_default, mergeProps({
|
||||
key: 0,
|
||||
ref_key: "dialogContentRef",
|
||||
ref: dialogContentRef
|
||||
}, _ctx.$attrs, {
|
||||
center: __props.center,
|
||||
"align-center": unref(_alignCenter),
|
||||
"close-icon": __props.closeIcon,
|
||||
draggable: unref(_draggable),
|
||||
overflow: unref(_overflow),
|
||||
fullscreen: __props.fullscreen,
|
||||
"header-class": __props.headerClass,
|
||||
"body-class": __props.bodyClass,
|
||||
"footer-class": __props.footerClass,
|
||||
"show-close": __props.showClose,
|
||||
title: __props.title,
|
||||
"aria-level": __props.headerAriaLevel,
|
||||
onClose: unref(handleClose),
|
||||
onMousedown: unref(bringToFront)
|
||||
}), createSlots({
|
||||
header: withCtx(() => [!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
|
||||
key: 0,
|
||||
close: unref(handleClose),
|
||||
titleId: unref(titleId),
|
||||
titleClass: unref(ns).e("title")
|
||||
}) : renderSlot(_ctx.$slots, "title", { key: 1 })]),
|
||||
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
||||
_: 2
|
||||
}, [_ctx.$slots.footer ? {
|
||||
name: "footer",
|
||||
fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
|
||||
key: "0"
|
||||
} : void 0]), 1040, [
|
||||
"center",
|
||||
"align-center",
|
||||
"close-icon",
|
||||
"draggable",
|
||||
"overflow",
|
||||
"fullscreen",
|
||||
"header-class",
|
||||
"body-class",
|
||||
"footer-class",
|
||||
"show-close",
|
||||
"title",
|
||||
"aria-level",
|
||||
"onClose",
|
||||
"onMousedown"
|
||||
])) : createCommentVNode("v-if", true)]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"trapped",
|
||||
"onFocusAfterTrapped",
|
||||
"onFocusAfterReleased",
|
||||
"onFocusoutPrevented",
|
||||
"onReleaseRequested"
|
||||
])], 46, _hoisted_1)]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"mask",
|
||||
"overlay-class",
|
||||
"z-index"
|
||||
]), [[vShow, unref(visible)]])]),
|
||||
_: 3
|
||||
}, 16)], 8, ["to", "disabled"]);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { dialog_vue_vue_type_script_setup_true_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=dialog.vue_vue_type_script_setup_true_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
frontend/node_modules/element-plus/es/components/dialog/src/dialog2.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/dialog/src/dialog2.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import dialog_vue_vue_type_script_setup_true_lang_default from "./dialog.vue_vue_type_script_setup_true_lang.mjs";
|
||||
//#region ../../packages/components/dialog/src/dialog.vue
|
||||
var dialog_default = dialog_vue_vue_type_script_setup_true_lang_default;
|
||||
//#endregion
|
||||
export { dialog_default as default };
|
||||
|
||||
//# sourceMappingURL=dialog2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/dialog2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog2.mjs","names":[],"sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <teleport\n :to=\"appendTo\"\n :disabled=\"appendTo !== 'body' ? false : !appendToBody\"\n >\n <transition v-bind=\"transitionConfig\">\n <el-overlay\n v-show=\"visible\"\n custom-mask-event\n :mask=\"modal\"\n :overlay-class=\"[\n modalClass ?? '',\n `${ns.namespace.value}-modal-dialog`,\n ns.is('penetrable', penetrable),\n ]\"\n :z-index=\"zIndex\"\n >\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"title || undefined\"\n :aria-labelledby=\"!title ? titleId : undefined\"\n :aria-describedby=\"bodyId\"\n :class=\"[\n `${ns.namespace.value}-overlay-dialog`,\n ns.is('closing', closing),\n ]\"\n :style=\"overlayDialogStyle\"\n @click=\"overlayEvent.onClick\"\n @mousedown=\"overlayEvent.onMousedown\"\n @mouseup=\"overlayEvent.onMouseup\"\n >\n <el-focus-trap\n loop\n :trapped=\"visible\"\n focus-start-el=\"container\"\n @focus-after-trapped=\"onOpenAutoFocus\"\n @focus-after-released=\"onCloseAutoFocus\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onCloseRequested\"\n >\n <el-dialog-content\n v-if=\"rendered\"\n ref=\"dialogContentRef\"\n v-bind=\"$attrs\"\n :center=\"center\"\n :align-center=\"_alignCenter\"\n :close-icon=\"closeIcon\"\n :draggable=\"_draggable\"\n :overflow=\"_overflow\"\n :fullscreen=\"fullscreen\"\n :header-class=\"headerClass\"\n :body-class=\"bodyClass\"\n :footer-class=\"footerClass\"\n :show-close=\"showClose\"\n :title=\"title\"\n :aria-level=\"headerAriaLevel\"\n @close=\"handleClose\"\n @mousedown=\"bringToFront\"\n >\n <template #header>\n <slot\n v-if=\"!$slots.title\"\n name=\"header\"\n :close=\"handleClose\"\n :title-id=\"titleId\"\n :title-class=\"ns.e('title')\"\n />\n <slot v-else name=\"title\" />\n </template>\n <slot />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </el-dialog-content>\n </el-focus-trap>\n </div>\n </el-overlay>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, useSlots } from 'vue'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { useDeprecated, useNamespace, useSameTarget } from '@element-plus/hooks'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport ElDialogContent from './dialog-content.vue'\nimport { dialogInjectionKey } from './constants'\nimport { dialogEmits, dialogPropsDefaults } from './dialog'\nimport { useDialog } from './use-dialog'\n\nimport type { DialogProps } from './dialog'\n\ndefineOptions({\n name: 'ElDialog',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<DialogProps>(), dialogPropsDefaults)\ndefineEmits(dialogEmits)\nconst slots = useSlots()\n\nuseDeprecated(\n {\n scope: 'el-dialog',\n from: 'the title slot',\n replacement: 'the header slot',\n version: '3.0.0',\n ref: 'https://element-plus.org/en-US/component/dialog.html#slots',\n },\n computed(() => !!slots.title)\n)\n\nconst ns = useNamespace('dialog')\nconst dialogRef = ref<HTMLElement>()\nconst headerRef = ref<HTMLElement>()\nconst dialogContentRef = ref()\n\nconst {\n visible,\n titleId,\n bodyId,\n style,\n overlayDialogStyle,\n rendered,\n transitionConfig,\n zIndex,\n _draggable,\n _alignCenter,\n _overflow,\n penetrable,\n handleClose,\n onModalClick,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onCloseRequested,\n onFocusoutPrevented,\n bringToFront,\n closing,\n} = useDialog(props, dialogRef)\n\nprovide(dialogInjectionKey, {\n dialogRef,\n headerRef,\n bodyId,\n ns,\n rendered,\n style,\n})\n\nconst overlayEvent = useSameTarget(onModalClick)\n\nconst resetPosition = () => {\n dialogContentRef.value?.resetPosition()\n}\n\ndefineExpose({\n /** @description whether the dialog is visible */\n visible,\n dialogContentRef,\n resetPosition,\n handleClose,\n})\n</script>\n"],"mappings":""}
|
||||
40
frontend/node_modules/element-plus/es/components/dialog/src/use-dialog.d.ts
generated
vendored
Normal file
40
frontend/node_modules/element-plus/es/components/dialog/src/use-dialog.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { DialogProps } from "./dialog.js";
|
||||
import * as _$vue from "vue";
|
||||
import { CSSProperties, Ref, TransitionProps } from "vue";
|
||||
|
||||
//#region ../../packages/components/dialog/src/use-dialog.d.ts
|
||||
declare const useDialog: (props: DialogProps, targetRef: Ref<HTMLElement | undefined>) => {
|
||||
afterEnter: () => void;
|
||||
afterLeave: () => void;
|
||||
beforeLeave: () => void;
|
||||
handleClose: () => void;
|
||||
onModalClick: () => void;
|
||||
close: () => void;
|
||||
doClose: () => void;
|
||||
onOpenAutoFocus: () => void;
|
||||
onCloseAutoFocus: () => void;
|
||||
onCloseRequested: () => void;
|
||||
onFocusoutPrevented: (event: CustomEvent) => void;
|
||||
bringToFront: () => void;
|
||||
titleId: Ref<string, string>;
|
||||
bodyId: Ref<string, string>;
|
||||
closed: Ref<boolean, boolean>;
|
||||
style: _$vue.ComputedRef<CSSProperties>;
|
||||
overlayDialogStyle: _$vue.ComputedRef<CSSProperties>;
|
||||
rendered: Ref<boolean, boolean>;
|
||||
visible: Ref<boolean, boolean>;
|
||||
zIndex: Ref<number, number>;
|
||||
transitionConfig: _$vue.ComputedRef<TransitionProps | {
|
||||
name: string;
|
||||
onAfterEnter: () => void;
|
||||
onBeforeLeave: () => void;
|
||||
onAfterLeave: () => void;
|
||||
}>;
|
||||
_draggable: _$vue.ComputedRef<boolean>;
|
||||
_alignCenter: _$vue.ComputedRef<boolean>;
|
||||
_overflow: _$vue.ComputedRef<boolean>;
|
||||
closing: Ref<boolean, boolean>;
|
||||
penetrable: _$vue.ComputedRef<boolean | undefined>;
|
||||
};
|
||||
//#endregion
|
||||
export { useDialog };
|
||||
207
frontend/node_modules/element-plus/es/components/dialog/src/use-dialog.mjs
generated
vendored
Normal file
207
frontend/node_modules/element-plus/es/components/dialog/src/use-dialog.mjs
generated
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
import { UPDATE_MODEL_EVENT } from "../../../constants/event.mjs";
|
||||
import { isClient as isClient$1 } from "../../../utils/browser.mjs";
|
||||
import { isArray, isFunction, isObject } from "../../../utils/types.mjs";
|
||||
import { debugWarn } from "../../../utils/error.mjs";
|
||||
import { addUnit } from "../../../utils/dom/style.mjs";
|
||||
import "../../../hooks/use-namespace/index.mjs";
|
||||
import { useLockscreen } from "../../../hooks/use-lockscreen/index.mjs";
|
||||
import { useId } from "../../../hooks/use-id/index.mjs";
|
||||
import { useZIndex } from "../../../hooks/use-z-index/index.mjs";
|
||||
import { useGlobalConfig } from "../../config-provider/src/hooks/use-global-config.mjs";
|
||||
import { DEFAULT_DIALOG_TRANSITION } from "./constants.mjs";
|
||||
import { useTimeoutFn } from "@vueuse/core";
|
||||
import { computed, getCurrentInstance, nextTick, onMounted, ref, watch } from "vue";
|
||||
//#region ../../packages/components/dialog/src/use-dialog.ts
|
||||
const COMPONENT_NAME = "ElDialog";
|
||||
const useDialog = (props, targetRef) => {
|
||||
const emit = getCurrentInstance().emit;
|
||||
const { nextZIndex } = useZIndex();
|
||||
let lastPosition = "";
|
||||
const titleId = useId();
|
||||
const bodyId = useId();
|
||||
const visible = ref(false);
|
||||
const closed = ref(false);
|
||||
const rendered = ref(false);
|
||||
const zIndex = ref(props.zIndex ?? nextZIndex());
|
||||
const closing = ref(false);
|
||||
let openTimer = void 0;
|
||||
let closeTimer = void 0;
|
||||
const config = useGlobalConfig();
|
||||
const namespace = computed(() => config.value?.namespace ?? "el");
|
||||
const globalConfig = computed(() => config.value?.dialog);
|
||||
const style = computed(() => {
|
||||
const style = {};
|
||||
const varPrefix = `--${namespace.value}-dialog`;
|
||||
if (!props.fullscreen) {
|
||||
if (props.top) style[`${varPrefix}-margin-top`] = props.top;
|
||||
const width = addUnit(props.width);
|
||||
if (width) style[`${varPrefix}-width`] = width;
|
||||
}
|
||||
return style;
|
||||
});
|
||||
const _draggable = computed(() => (props.draggable ?? globalConfig.value?.draggable ?? false) && !props.fullscreen);
|
||||
const _alignCenter = computed(() => props.alignCenter ?? globalConfig.value?.alignCenter ?? false);
|
||||
const _overflow = computed(() => props.overflow ?? globalConfig.value?.overflow ?? false);
|
||||
const penetrable = computed(() => props.modalPenetrable && !props.modal && !props.fullscreen);
|
||||
const overlayDialogStyle = computed(() => {
|
||||
if (_alignCenter.value) return { display: "flex" };
|
||||
return {};
|
||||
});
|
||||
const transitionConfig = computed(() => {
|
||||
const transition = props.transition ?? globalConfig.value?.transition ?? "dialog-fade";
|
||||
const baseConfig = {
|
||||
name: transition,
|
||||
onAfterEnter: afterEnter,
|
||||
onBeforeLeave: beforeLeave,
|
||||
onAfterLeave: afterLeave
|
||||
};
|
||||
if (isObject(transition)) {
|
||||
const config = { ...transition };
|
||||
const _mergeHook = (userHook, defaultHook) => {
|
||||
return (el) => {
|
||||
if (isArray(userHook)) userHook.forEach((fn) => {
|
||||
if (isFunction(fn)) fn(el);
|
||||
});
|
||||
else if (isFunction(userHook)) userHook(el);
|
||||
defaultHook();
|
||||
};
|
||||
};
|
||||
config.onAfterEnter = _mergeHook(config.onAfterEnter, afterEnter);
|
||||
config.onBeforeLeave = _mergeHook(config.onBeforeLeave, beforeLeave);
|
||||
config.onAfterLeave = _mergeHook(config.onAfterLeave, afterLeave);
|
||||
if (!config.name) {
|
||||
config.name = DEFAULT_DIALOG_TRANSITION;
|
||||
debugWarn(COMPONENT_NAME, `transition.name is missing when using object syntax, fallback to '${DEFAULT_DIALOG_TRANSITION}'`);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
return baseConfig;
|
||||
});
|
||||
function afterEnter() {
|
||||
emit("opened");
|
||||
}
|
||||
function afterLeave() {
|
||||
emit("closed");
|
||||
emit(UPDATE_MODEL_EVENT, false);
|
||||
if (props.destroyOnClose) rendered.value = false;
|
||||
closing.value = false;
|
||||
}
|
||||
function beforeLeave() {
|
||||
closing.value = true;
|
||||
emit("close");
|
||||
}
|
||||
function open() {
|
||||
closeTimer?.();
|
||||
openTimer?.();
|
||||
if (props.openDelay && props.openDelay > 0) ({stop: openTimer} = useTimeoutFn(() => doOpen(), props.openDelay));
|
||||
else doOpen();
|
||||
}
|
||||
function close() {
|
||||
openTimer?.();
|
||||
closeTimer?.();
|
||||
if (props.closeDelay && props.closeDelay > 0) ({stop: closeTimer} = useTimeoutFn(() => doClose(), props.closeDelay));
|
||||
else doClose();
|
||||
}
|
||||
function handleClose() {
|
||||
function hide(shouldCancel) {
|
||||
if (shouldCancel) return;
|
||||
closed.value = true;
|
||||
visible.value = false;
|
||||
}
|
||||
if (props.beforeClose) props.beforeClose(hide);
|
||||
else close();
|
||||
}
|
||||
function onModalClick() {
|
||||
if (props.closeOnClickModal) handleClose();
|
||||
}
|
||||
function doOpen() {
|
||||
if (!isClient$1) return;
|
||||
visible.value = true;
|
||||
}
|
||||
function doClose() {
|
||||
visible.value = false;
|
||||
}
|
||||
function onOpenAutoFocus() {
|
||||
emit("openAutoFocus");
|
||||
}
|
||||
function onCloseAutoFocus() {
|
||||
emit("closeAutoFocus");
|
||||
}
|
||||
function onFocusoutPrevented(event) {
|
||||
if (event.detail?.focusReason === "pointer") event.preventDefault();
|
||||
}
|
||||
if (props.lockScroll) useLockscreen(visible);
|
||||
function onCloseRequested() {
|
||||
if (props.closeOnPressEscape) handleClose();
|
||||
}
|
||||
function bringToFront() {
|
||||
if (!visible.value || !penetrable.value || props.zIndex !== void 0) return;
|
||||
zIndex.value = nextZIndex();
|
||||
}
|
||||
watch(() => props.zIndex, () => {
|
||||
zIndex.value = props.zIndex ?? nextZIndex();
|
||||
});
|
||||
watch(() => props.modelValue, (val) => {
|
||||
if (val) {
|
||||
closed.value = false;
|
||||
closing.value = false;
|
||||
open();
|
||||
rendered.value = true;
|
||||
zIndex.value = props.zIndex ?? nextZIndex();
|
||||
nextTick(() => {
|
||||
emit("open");
|
||||
if (targetRef.value) {
|
||||
targetRef.value.parentElement.scrollTop = 0;
|
||||
targetRef.value.parentElement.scrollLeft = 0;
|
||||
targetRef.value.scrollTop = 0;
|
||||
}
|
||||
});
|
||||
} else if (visible.value) close();
|
||||
});
|
||||
watch(() => props.fullscreen, (val) => {
|
||||
if (!targetRef.value) return;
|
||||
if (val) {
|
||||
lastPosition = targetRef.value.style.transform;
|
||||
targetRef.value.style.transform = "";
|
||||
} else targetRef.value.style.transform = lastPosition;
|
||||
});
|
||||
onMounted(() => {
|
||||
if (props.modelValue) {
|
||||
visible.value = true;
|
||||
rendered.value = true;
|
||||
open();
|
||||
}
|
||||
});
|
||||
return {
|
||||
afterEnter,
|
||||
afterLeave,
|
||||
beforeLeave,
|
||||
handleClose,
|
||||
onModalClick,
|
||||
close,
|
||||
doClose,
|
||||
onOpenAutoFocus,
|
||||
onCloseAutoFocus,
|
||||
onCloseRequested,
|
||||
onFocusoutPrevented,
|
||||
bringToFront,
|
||||
titleId,
|
||||
bodyId,
|
||||
closed,
|
||||
style,
|
||||
overlayDialogStyle,
|
||||
rendered,
|
||||
visible,
|
||||
zIndex,
|
||||
transitionConfig,
|
||||
_draggable,
|
||||
_alignCenter,
|
||||
_overflow,
|
||||
closing,
|
||||
penetrable
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { useDialog };
|
||||
|
||||
//# sourceMappingURL=use-dialog.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/dialog/src/use-dialog.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/dialog/src/use-dialog.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
frontend/node_modules/element-plus/es/components/dialog/style/css.mjs
generated
vendored
Normal file
3
frontend/node_modules/element-plus/es/components/dialog/style/css.mjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import "../../base/style/css.mjs";
|
||||
import "../../overlay/style/css.mjs";
|
||||
import "element-plus/theme-chalk/el-dialog.css";
|
||||
3
frontend/node_modules/element-plus/es/components/dialog/style/index.mjs
generated
vendored
Normal file
3
frontend/node_modules/element-plus/es/components/dialog/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import "../../base/style/index.mjs";
|
||||
import "../../overlay/style/index.mjs";
|
||||
import "element-plus/theme-chalk/src/dialog.scss";
|
||||
Reference in New Issue
Block a user