使用VUE重构项目
This commit is contained in:
11
frontend/admin/node_modules/element-plus/lib/components/dialog/index.d.ts
generated
vendored
Normal file
11
frontend/admin/node_modules/element-plus/lib/components/dialog/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { SFCWithInstall } from "../../utils/vue/typescript.js";
|
||||
import "../../utils/index.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 };
|
||||
21
frontend/admin/node_modules/element-plus/lib/components/dialog/index.js
generated
vendored
Normal file
21
frontend/admin/node_modules/element-plus/lib/components/dialog/index.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_install = require('../../utils/vue/install.js');
|
||||
const require_dialog = require('./src/dialog.js');
|
||||
const require_constants = require('./src/constants.js');
|
||||
const require_use_dialog = require('./src/use-dialog.js');
|
||||
const require_dialog$1 = require('./src/dialog2.js');
|
||||
|
||||
//#region ../../packages/components/dialog/index.ts
|
||||
const ElDialog = require_install.withInstall(require_dialog$1.default);
|
||||
|
||||
//#endregion
|
||||
exports.DEFAULT_DIALOG_TRANSITION = require_constants.DEFAULT_DIALOG_TRANSITION;
|
||||
exports.ElDialog = ElDialog;
|
||||
exports.default = ElDialog;
|
||||
exports.dialogContextKey = require_dialog.dialogContextKey;
|
||||
exports.dialogEmits = require_dialog.dialogEmits;
|
||||
exports.dialogInjectionKey = require_constants.dialogInjectionKey;
|
||||
exports.dialogProps = require_dialog.dialogProps;
|
||||
exports.dialogPropsDefaults = require_dialog.dialogPropsDefaults;
|
||||
exports.useDialog = require_use_dialog.useDialog;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/index.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","names":["withInstall","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,WAA0CA,4BAAYC,yBAAO"}
|
||||
17
frontend/admin/node_modules/element-plus/lib/components/dialog/src/constants.d.ts
generated
vendored
Normal file
17
frontend/admin/node_modules/element-plus/lib/components/dialog/src/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { UseNamespaceReturn } from "../../../hooks/use-namespace/index.js";
|
||||
import "../../../hooks/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 };
|
||||
10
frontend/admin/node_modules/element-plus/lib/components/dialog/src/constants.js
generated
vendored
Normal file
10
frontend/admin/node_modules/element-plus/lib/components/dialog/src/constants.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
//#region ../../packages/components/dialog/src/constants.ts
|
||||
const dialogInjectionKey = Symbol("dialogInjectionKey");
|
||||
const DEFAULT_DIALOG_TRANSITION = "dialog-fade";
|
||||
|
||||
//#endregion
|
||||
exports.DEFAULT_DIALOG_TRANSITION = DEFAULT_DIALOG_TRANSITION;
|
||||
exports.dialogInjectionKey = dialogInjectionKey;
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/constants.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/constants.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","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"}
|
||||
60
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.d.ts
generated
vendored
Normal file
60
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.d.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import { IconPropType } from "../../../utils/vue/icon.js";
|
||||
import "../../../utils/index.js";
|
||||
import "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;
|
||||
}
|
||||
//#endregion
|
||||
export { DialogContentProps };
|
||||
55
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.js
generated
vendored
Normal file
55
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../utils/vue/props/runtime.js');
|
||||
const require_icon = require('../../../utils/vue/icon.js');
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog-content.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `DialogContentProps` instead.
|
||||
*/
|
||||
const dialogContentProps = require_runtime.buildProps({
|
||||
center: Boolean,
|
||||
alignCenter: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
closeIcon: { type: require_icon.iconPropType },
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
overflow: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
fullscreen: Boolean,
|
||||
headerClass: String,
|
||||
bodyClass: String,
|
||||
footerClass: String,
|
||||
showClose: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
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
|
||||
exports.dialogContentEmits = dialogContentEmits;
|
||||
exports.dialogContentProps = dialogContentProps;
|
||||
exports.dialogContentPropsDefaults = dialogContentPropsDefaults;
|
||||
//# sourceMappingURL=dialog-content.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog-content.js","names":["buildProps","iconPropType"],"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,qBAAqBA,2BAAW;CAI3C,QAAQ;CAIR,aAAa;EACX,MAAM;EACN,SAAS;EACV;CAID,WAAW,EACT,MAAMC,2BACP;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;CAID,UAAU;EACR,MAAM;EACN,SAAS;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;CACb,WAAW;CACX,UAAU;CACV,WAAW;CACX,OAAO;CACP,WAAW;CACZ"}
|
||||
86
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
86
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
||||
const require_icon = require('../../../utils/vue/icon.js');
|
||||
const require_refs = require('../../../utils/vue/refs.js');
|
||||
const require_index = require('../../../hooks/use-draggable/index.js');
|
||||
const require_index$1 = require('../../../hooks/use-locale/index.js');
|
||||
const require_index$2 = require('../../icon/index.js');
|
||||
const require_tokens = require('../../focus-trap/src/tokens.js');
|
||||
const require_dialog_content = require('./dialog-content.js');
|
||||
const require_constants = require('./constants.js');
|
||||
let vue = require("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__ */ (0, vue.defineComponent)({
|
||||
name: "ElDialogContent",
|
||||
__name: "dialog-content",
|
||||
props: require_dialog_content.dialogContentProps,
|
||||
emits: require_dialog_content.dialogContentEmits,
|
||||
setup(__props, { expose: __expose }) {
|
||||
const { t } = require_index$1.useLocale();
|
||||
const { Close } = require_icon.CloseComponents;
|
||||
const props = __props;
|
||||
const { dialogRef, headerRef, bodyId, ns, style } = (0, vue.inject)(require_constants.dialogInjectionKey);
|
||||
const { focusTrapRef } = (0, vue.inject)(require_tokens.FOCUS_TRAP_INJECTION_KEY);
|
||||
const composedDialogRef = require_refs.composeRefs(focusTrapRef, dialogRef);
|
||||
const draggable = (0, vue.computed)(() => !!props.draggable);
|
||||
const { resetPosition, updatePosition, isDragging } = require_index.useDraggable(dialogRef, headerRef, draggable, (0, vue.computed)(() => !!props.overflow));
|
||||
const dialogKls = (0, vue.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 (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
||||
ref: (0, vue.unref)(composedDialogRef),
|
||||
class: (0, vue.normalizeClass)(dialogKls.value),
|
||||
style: (0, vue.normalizeStyle)((0, vue.unref)(style)),
|
||||
tabindex: "-1"
|
||||
}, [
|
||||
(0, vue.createElementVNode)("header", {
|
||||
ref_key: "headerRef",
|
||||
ref: headerRef,
|
||||
class: (0, vue.normalizeClass)([
|
||||
(0, vue.unref)(ns).e("header"),
|
||||
__props.headerClass,
|
||||
{ "show-close": __props.showClose }
|
||||
])
|
||||
}, [(0, vue.renderSlot)(_ctx.$slots, "header", {}, () => [(0, vue.createElementVNode)("span", {
|
||||
role: "heading",
|
||||
"aria-level": __props.ariaLevel,
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("title"))
|
||||
}, (0, vue.toDisplayString)(__props.title), 11, _hoisted_1)]), __props.showClose ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
||||
key: 0,
|
||||
"aria-label": (0, vue.unref)(t)("el.dialog.close"),
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("headerbtn")),
|
||||
type: "button",
|
||||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
||||
}, [(0, vue.createVNode)((0, vue.unref)(require_index$2.ElIcon), { class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("close")) }, {
|
||||
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.closeIcon || (0, vue.unref)(Close))))]),
|
||||
_: 1
|
||||
}, 8, ["class"])], 10, _hoisted_2)) : (0, vue.createCommentVNode)("v-if", true)], 2),
|
||||
(0, vue.createElementVNode)("div", {
|
||||
id: (0, vue.unref)(bodyId),
|
||||
class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("body"), __props.bodyClass])
|
||||
}, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_3),
|
||||
_ctx.$slots.footer ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("footer", {
|
||||
key: 0,
|
||||
class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("footer"), __props.footerClass])
|
||||
}, [(0, vue.renderSlot)(_ctx.$slots, "footer")], 2)) : (0, vue.createCommentVNode)("v-if", true)
|
||||
], 6);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = dialog_content_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=dialog-content.vue_vue_type_script_setup_true_lang.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog-content.vue_vue_type_script_setup_true_lang.js","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,2BAAU;EACxB,MAAM,EAAE,UAAU;EAGlB,MAAM,QAAQ;EAMd,MAAM,EAAE,WAAW,WAAW,QAAQ,IAAI,0BAAiB,qCAAmB;EAC9E,MAAM,EAAE,iCAAwB,wCAAyB;EAEzD,MAAM,oBAAoB,yBAAY,cAAc,UAAS;EAE7D,MAAM,oCAA2B,CAAC,CAAC,MAAM,UAAS;EAElD,MAAM,EAAE,eAAe,gBAAgB,eAAe,2BACpD,WACA,WACA,mCAJ8B,CAAC,CAAC,MAAM,SAAQ,CAMhD;EAEA,MAAM,oCAA2B;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;AAED,WAAa;GACX;GACA;GACD,CAAA;;4DArDO,OAAA;IA5BA,oBAAK,kBAAiB;IAAG,+BAAO,UAAA,MAAS;IAAG,8CAAO,MAAK,CAAA;IAAE,UAAS;;gCAqB9D,UAAA;cAnBH;KAAJ,KAAI;KACH,+BAAK;qBAAG,GAAE,CAAC,EAAC,SAAA;MAAY,QAAA;MAAW,EAAA,cAAkB,QAAA,WAAS;MAAA,CAAA;4BAMxD,KAAA,QAAA,UAAA,EAAA,QAAA,6BADE,QAAA;KAFD,MAAK;KAAW,cAAY,QAAA;KAAY,8CAAO,GAAE,CAAC,EAAC,QAAA,CAAA;gCACpD,QAAA,MAAK,EAAA,IAAA,WAAA,IAIJ,QAAA,+DASC,UAAA;;KARN,6BAAY,EAAC,CAAA,kBAAA;KACb,8CAAO,GAAE,CAAC,EAAC,YAAA,CAAA;KACZ,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,QAAA;4CAIH,uBAAA,EAAA,EAFA,8CAAO,GAAE,CAAC,EAAC,QAAA,CAAA;qCACmB,8EAAtB,QAAA,4BAAa,MAAK,CAAA,CAAA;;;gCAMlC,OAAA;KAFA,mBAAI,OAAM;KAAG,+BAAK,gBAAG,GAAE,CAAC,EAAC,OAAA,EAAU,QAAA,UAAS,CAAA;4BACxC,KAAA,QAAA,UAAA;IAEIC,KAAAA,OAAO,4DAEZ,UAAA;;KAFqB,+BAAK,gBAAG,GAAE,CAAC,EAAC,SAAA,EAAY,QAAA,YAAW,CAAA;4BACzC,KAAA,QAAA,SAAA"}
|
||||
9
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content2.js
generated
vendored
Normal file
9
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content2.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_dialog_content_vue_vue_type_script_setup_true_lang = require('./dialog-content.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog-content.vue
|
||||
var dialog_content_default = require_dialog_content_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = dialog_content_default;
|
||||
//# sourceMappingURL=dialog-content2.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content2.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog-content2.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog-content2.js","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":""}
|
||||
194
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.d.ts
generated
vendored
Normal file
194
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.d.ts
generated
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import "../../../utils/index.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) | (() => EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>) | (((new (...args: any[]) => string | HTMLElement) | (() => EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>)) | 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 };
|
||||
92
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.js
generated
vendored
Normal file
92
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_event = require('../../../constants/event.js');
|
||||
const require_types = require('../../../utils/types.js');
|
||||
const require_runtime = require('../../../utils/vue/props/runtime.js');
|
||||
const require_teleport = require('../../teleport/src/teleport.js');
|
||||
const require_dialog_content = require('./dialog-content.js');
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `DialogProps` instead.
|
||||
*/
|
||||
const dialogProps = require_runtime.buildProps({
|
||||
...require_dialog_content.dialogContentProps,
|
||||
appendToBody: Boolean,
|
||||
appendTo: {
|
||||
type: require_teleport.teleportProps.to.type,
|
||||
default: "body"
|
||||
},
|
||||
beforeClose: { type: require_runtime.definePropType(Function) },
|
||||
destroyOnClose: Boolean,
|
||||
closeOnClickModal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
closeOnPressEscape: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
lockScroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
modal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
modalPenetrable: Boolean,
|
||||
openDelay: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
closeDelay: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
top: { type: String },
|
||||
modelValue: Boolean,
|
||||
modalClass: String,
|
||||
headerClass: String,
|
||||
bodyClass: String,
|
||||
footerClass: String,
|
||||
width: { type: [String, Number] },
|
||||
zIndex: { type: Number },
|
||||
trapFocus: Boolean,
|
||||
headerAriaLevel: {
|
||||
type: String,
|
||||
default: "2"
|
||||
},
|
||||
transition: {
|
||||
type: require_runtime.definePropType([String, Object]),
|
||||
default: void 0
|
||||
}
|
||||
});
|
||||
const dialogEmits = {
|
||||
open: () => true,
|
||||
opened: () => true,
|
||||
close: () => true,
|
||||
closed: () => true,
|
||||
[require_event.UPDATE_MODEL_EVENT]: (value) => require_types.isBoolean(value),
|
||||
openAutoFocus: () => true,
|
||||
closeAutoFocus: () => true
|
||||
};
|
||||
const dialogContextKey = Symbol("dialogContextKey");
|
||||
const dialogPropsDefaults = {
|
||||
...require_dialog_content.dialogContentPropsDefaults,
|
||||
appendTo: "body",
|
||||
closeOnClickModal: true,
|
||||
closeOnPressEscape: true,
|
||||
lockScroll: true,
|
||||
modal: true,
|
||||
openDelay: 0,
|
||||
closeDelay: 0,
|
||||
headerAriaLevel: "2",
|
||||
transition: void 0
|
||||
};
|
||||
|
||||
//#endregion
|
||||
exports.dialogContextKey = dialogContextKey;
|
||||
exports.dialogEmits = dialogEmits;
|
||||
exports.dialogProps = dialogProps;
|
||||
exports.dialogPropsDefaults = dialogPropsDefaults;
|
||||
//# sourceMappingURL=dialog.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
65
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.vue.d.ts
generated
vendored
Normal file
65
frontend/admin/node_modules/element-plus/lib/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;
|
||||
}>, {
|
||||
appendTo: string | HTMLElement;
|
||||
title: string;
|
||||
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 };
|
||||
167
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
167
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.js
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
||||
const require_index = require('../../teleport/index.js');
|
||||
const require_index$1 = require('../../../hooks/use-deprecated/index.js');
|
||||
const require_index$2 = require('../../../hooks/use-namespace/index.js');
|
||||
const require_index$3 = require('../../../hooks/use-same-target/index.js');
|
||||
const require_index$4 = require('../../focus-trap/index.js');
|
||||
const require_dialog = require('./dialog.js');
|
||||
const require_index$5 = require('../../overlay/index.js');
|
||||
const require_constants = require('./constants.js');
|
||||
const require_dialog_content = require('./dialog-content2.js');
|
||||
const require_use_dialog = require('./use-dialog.js');
|
||||
let vue = require("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__ */ (0, vue.defineComponent)({
|
||||
name: "ElDialog",
|
||||
inheritAttrs: false,
|
||||
__name: "dialog",
|
||||
props: require_dialog.dialogProps,
|
||||
emits: require_dialog.dialogEmits,
|
||||
setup(__props, { expose: __expose }) {
|
||||
const props = __props;
|
||||
const slots = (0, vue.useSlots)();
|
||||
require_index$1.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"
|
||||
}, (0, vue.computed)(() => !!slots.title));
|
||||
const ns = require_index$2.useNamespace("dialog");
|
||||
const dialogRef = (0, vue.ref)();
|
||||
const headerRef = (0, vue.ref)();
|
||||
const dialogContentRef = (0, vue.ref)();
|
||||
const { visible, titleId, bodyId, style, overlayDialogStyle, rendered, transitionConfig, zIndex, _draggable, _alignCenter, _overflow, penetrable, handleClose, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onCloseRequested, onFocusoutPrevented, bringToFront, closing } = require_use_dialog.useDialog(props, dialogRef);
|
||||
(0, vue.provide)(require_constants.dialogInjectionKey, {
|
||||
dialogRef,
|
||||
headerRef,
|
||||
bodyId,
|
||||
ns,
|
||||
rendered,
|
||||
style
|
||||
});
|
||||
const overlayEvent = require_index$3.useSameTarget(onModalClick);
|
||||
const resetPosition = () => {
|
||||
dialogContentRef.value?.resetPosition();
|
||||
};
|
||||
__expose({
|
||||
visible,
|
||||
dialogContentRef,
|
||||
resetPosition,
|
||||
handleClose
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index.ElTeleport), {
|
||||
to: __props.appendTo,
|
||||
disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
|
||||
}, {
|
||||
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(vue.Transition, (0, vue.mergeProps)((0, vue.unref)(transitionConfig), { persisted: "" }), {
|
||||
default: (0, vue.withCtx)(() => [(0, vue.withDirectives)((0, vue.createVNode)((0, vue.unref)(require_index$5.ElOverlay), {
|
||||
"custom-mask-event": "",
|
||||
mask: __props.modal,
|
||||
"overlay-class": [
|
||||
__props.modalClass ?? "",
|
||||
`${(0, vue.unref)(ns).namespace.value}-modal-dialog`,
|
||||
(0, vue.unref)(ns).is("penetrable", (0, vue.unref)(penetrable))
|
||||
],
|
||||
"z-index": (0, vue.unref)(zIndex)
|
||||
}, {
|
||||
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", {
|
||||
role: "dialog",
|
||||
"aria-modal": "true",
|
||||
"aria-label": __props.title || void 0,
|
||||
"aria-labelledby": !__props.title ? (0, vue.unref)(titleId) : void 0,
|
||||
"aria-describedby": (0, vue.unref)(bodyId),
|
||||
class: (0, vue.normalizeClass)([`${(0, vue.unref)(ns).namespace.value}-overlay-dialog`, (0, vue.unref)(ns).is("closing", (0, vue.unref)(closing))]),
|
||||
style: (0, vue.normalizeStyle)((0, vue.unref)(overlayDialogStyle)),
|
||||
onClick: _cache[0] || (_cache[0] = (...args) => (0, vue.unref)(overlayEvent).onClick && (0, vue.unref)(overlayEvent).onClick(...args)),
|
||||
onMousedown: _cache[1] || (_cache[1] = (...args) => (0, vue.unref)(overlayEvent).onMousedown && (0, vue.unref)(overlayEvent).onMousedown(...args)),
|
||||
onMouseup: _cache[2] || (_cache[2] = (...args) => (0, vue.unref)(overlayEvent).onMouseup && (0, vue.unref)(overlayEvent).onMouseup(...args))
|
||||
}, [(0, vue.createVNode)((0, vue.unref)(require_index$4.default), {
|
||||
loop: "",
|
||||
trapped: (0, vue.unref)(visible),
|
||||
"focus-start-el": "container",
|
||||
onFocusAfterTrapped: (0, vue.unref)(onOpenAutoFocus),
|
||||
onFocusAfterReleased: (0, vue.unref)(onCloseAutoFocus),
|
||||
onFocusoutPrevented: (0, vue.unref)(onFocusoutPrevented),
|
||||
onReleaseRequested: (0, vue.unref)(onCloseRequested)
|
||||
}, {
|
||||
default: (0, vue.withCtx)(() => [(0, vue.unref)(rendered) ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_dialog_content.default, (0, vue.mergeProps)({
|
||||
key: 0,
|
||||
ref_key: "dialogContentRef",
|
||||
ref: dialogContentRef
|
||||
}, _ctx.$attrs, {
|
||||
center: __props.center,
|
||||
"align-center": (0, vue.unref)(_alignCenter),
|
||||
"close-icon": __props.closeIcon,
|
||||
draggable: (0, vue.unref)(_draggable),
|
||||
overflow: (0, vue.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: (0, vue.unref)(handleClose),
|
||||
onMousedown: (0, vue.unref)(bringToFront)
|
||||
}), (0, vue.createSlots)({
|
||||
header: (0, vue.withCtx)(() => [!_ctx.$slots.title ? (0, vue.renderSlot)(_ctx.$slots, "header", {
|
||||
key: 0,
|
||||
close: (0, vue.unref)(handleClose),
|
||||
titleId: (0, vue.unref)(titleId),
|
||||
titleClass: (0, vue.unref)(ns).e("title")
|
||||
}) : (0, vue.renderSlot)(_ctx.$slots, "title", { key: 1 })]),
|
||||
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
||||
_: 2
|
||||
}, [_ctx.$slots.footer ? {
|
||||
name: "footer",
|
||||
fn: (0, vue.withCtx)(() => [(0, vue.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"
|
||||
])) : (0, vue.createCommentVNode)("v-if", true)]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"trapped",
|
||||
"onFocusAfterTrapped",
|
||||
"onFocusAfterReleased",
|
||||
"onFocusoutPrevented",
|
||||
"onReleaseRequested"
|
||||
])], 46, _hoisted_1)]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"mask",
|
||||
"overlay-class",
|
||||
"z-index"
|
||||
]), [[vue.vShow, (0, vue.unref)(visible)]])]),
|
||||
_: 3
|
||||
}, 16)]),
|
||||
_: 3
|
||||
}, 8, ["to", "disabled"]);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = dialog_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=dialog.vue_vue_type_script_setup_true_lang.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
9
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog2.js
generated
vendored
Normal file
9
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog2.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_dialog_vue_vue_type_script_setup_true_lang = require('./dialog.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/dialog/src/dialog.vue
|
||||
var dialog_default = require_dialog_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = dialog_default;
|
||||
//# sourceMappingURL=dialog2.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog2.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/dialog2.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog2.js","names":[],"sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <el-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 </el-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 ElTeleport from '@element-plus/components/teleport'\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/admin/node_modules/element-plus/lib/components/dialog/src/use-dialog.d.ts
generated
vendored
Normal file
40
frontend/admin/node_modules/element-plus/lib/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 };
|
||||
209
frontend/admin/node_modules/element-plus/lib/components/dialog/src/use-dialog.js
generated
vendored
Normal file
209
frontend/admin/node_modules/element-plus/lib/components/dialog/src/use-dialog.js
generated
vendored
Normal file
@@ -0,0 +1,209 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
||||
const require_event = require('../../../constants/event.js');
|
||||
const require_error = require('../../../utils/error.js');
|
||||
const require_style = require('../../../utils/dom/style.js');
|
||||
const require_index = require('../../../hooks/use-namespace/index.js');
|
||||
const require_index$1 = require('../../../hooks/use-lockscreen/index.js');
|
||||
const require_index$2 = require('../../../hooks/use-id/index.js');
|
||||
const require_index$3 = require('../../../hooks/use-z-index/index.js');
|
||||
const require_use_global_config = require('../../config-provider/src/hooks/use-global-config.js');
|
||||
const require_constants = require('./constants.js');
|
||||
let _vueuse_core = require("@vueuse/core");
|
||||
let vue = require("vue");
|
||||
let _vue_shared = require("@vue/shared");
|
||||
|
||||
//#region ../../packages/components/dialog/src/use-dialog.ts
|
||||
const COMPONENT_NAME = "ElDialog";
|
||||
const useDialog = (props, targetRef) => {
|
||||
const emit = (0, vue.getCurrentInstance)().emit;
|
||||
const { nextZIndex } = require_index$3.useZIndex();
|
||||
let lastPosition = "";
|
||||
const titleId = require_index$2.useId();
|
||||
const bodyId = require_index$2.useId();
|
||||
const visible = (0, vue.ref)(false);
|
||||
const closed = (0, vue.ref)(false);
|
||||
const rendered = (0, vue.ref)(false);
|
||||
const zIndex = (0, vue.ref)(props.zIndex ?? nextZIndex());
|
||||
const closing = (0, vue.ref)(false);
|
||||
let openTimer = void 0;
|
||||
let closeTimer = void 0;
|
||||
const config = require_use_global_config.useGlobalConfig();
|
||||
const namespace = (0, vue.computed)(() => config.value?.namespace ?? require_index.defaultNamespace);
|
||||
const globalConfig = (0, vue.computed)(() => config.value?.dialog);
|
||||
const style = (0, vue.computed)(() => {
|
||||
const style = {};
|
||||
const varPrefix = `--${namespace.value}-dialog`;
|
||||
if (!props.fullscreen) {
|
||||
if (props.top) style[`${varPrefix}-margin-top`] = props.top;
|
||||
const width = require_style.addUnit(props.width);
|
||||
if (width) style[`${varPrefix}-width`] = width;
|
||||
}
|
||||
return style;
|
||||
});
|
||||
const _draggable = (0, vue.computed)(() => (props.draggable ?? globalConfig.value?.draggable ?? false) && !props.fullscreen);
|
||||
const _alignCenter = (0, vue.computed)(() => props.alignCenter ?? globalConfig.value?.alignCenter ?? false);
|
||||
const _overflow = (0, vue.computed)(() => props.overflow ?? globalConfig.value?.overflow ?? false);
|
||||
const penetrable = (0, vue.computed)(() => props.modalPenetrable && !props.modal && !props.fullscreen);
|
||||
const overlayDialogStyle = (0, vue.computed)(() => {
|
||||
if (_alignCenter.value) return { display: "flex" };
|
||||
return {};
|
||||
});
|
||||
const transitionConfig = (0, vue.computed)(() => {
|
||||
const transition = props.transition ?? globalConfig.value?.transition ?? require_constants.DEFAULT_DIALOG_TRANSITION;
|
||||
const baseConfig = {
|
||||
name: transition,
|
||||
onAfterEnter: afterEnter,
|
||||
onBeforeLeave: beforeLeave,
|
||||
onAfterLeave: afterLeave
|
||||
};
|
||||
if ((0, _vue_shared.isObject)(transition)) {
|
||||
const config = { ...transition };
|
||||
const _mergeHook = (userHook, defaultHook) => {
|
||||
return (el) => {
|
||||
if ((0, _vue_shared.isArray)(userHook)) userHook.forEach((fn) => {
|
||||
if ((0, _vue_shared.isFunction)(fn)) fn(el);
|
||||
});
|
||||
else if ((0, _vue_shared.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 = require_constants.DEFAULT_DIALOG_TRANSITION;
|
||||
require_error.debugWarn(COMPONENT_NAME, `transition.name is missing when using object syntax, fallback to '${require_constants.DEFAULT_DIALOG_TRANSITION}'`);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
return baseConfig;
|
||||
});
|
||||
function afterEnter() {
|
||||
emit("opened");
|
||||
}
|
||||
function afterLeave() {
|
||||
emit("closed");
|
||||
emit(require_event.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} = (0, _vueuse_core.useTimeoutFn)(() => doOpen(), props.openDelay));
|
||||
else doOpen();
|
||||
}
|
||||
function close() {
|
||||
openTimer?.();
|
||||
closeTimer?.();
|
||||
if (props.closeDelay && props.closeDelay > 0) ({stop: closeTimer} = (0, _vueuse_core.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 (!_vueuse_core.isClient) 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) require_index$1.useLockscreen(visible);
|
||||
function onCloseRequested() {
|
||||
if (props.closeOnPressEscape) handleClose();
|
||||
}
|
||||
function bringToFront() {
|
||||
if (!visible.value || !penetrable.value || props.zIndex !== void 0) return;
|
||||
zIndex.value = nextZIndex();
|
||||
}
|
||||
(0, vue.watch)(() => props.zIndex, () => {
|
||||
zIndex.value = props.zIndex ?? nextZIndex();
|
||||
});
|
||||
(0, vue.watch)(() => props.modelValue, (val) => {
|
||||
if (val) {
|
||||
closed.value = false;
|
||||
closing.value = false;
|
||||
open();
|
||||
rendered.value = true;
|
||||
zIndex.value = props.zIndex ?? nextZIndex();
|
||||
(0, vue.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();
|
||||
});
|
||||
(0, vue.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;
|
||||
});
|
||||
(0, vue.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
|
||||
exports.useDialog = useDialog;
|
||||
//# sourceMappingURL=use-dialog.js.map
|
||||
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/use-dialog.js.map
generated
vendored
Normal file
1
frontend/admin/node_modules/element-plus/lib/components/dialog/src/use-dialog.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
frontend/admin/node_modules/element-plus/lib/components/dialog/style/css.js
generated
vendored
Normal file
4
frontend/admin/node_modules/element-plus/lib/components/dialog/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
require('../../base/style/css.js');
|
||||
require('../../overlay/style/css.js');
|
||||
require("element-plus/theme-chalk/el-dialog.css");
|
||||
4
frontend/admin/node_modules/element-plus/lib/components/dialog/style/index.js
generated
vendored
Normal file
4
frontend/admin/node_modules/element-plus/lib/components/dialog/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
require('../../base/style/index.js');
|
||||
require('../../overlay/style/index.js');
|
||||
require("element-plus/theme-chalk/src/dialog.scss");
|
||||
Reference in New Issue
Block a user