ele-admin-plus 1.1.9-beta.10 → 1.1.9-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ele-alert/index.js +2 -2
- package/es/ele-basic-select/index.d.ts +1 -1
- package/es/ele-basic-select/index.js +7 -1
- package/es/ele-config-provider/types.d.ts +3 -1
- package/es/ele-cropper-modal/index.js +1 -1
- package/es/ele-drawer/index.d.ts +8 -5
- package/es/ele-drawer/index.js +107 -113
- package/es/ele-drawer/style/index.scss +48 -105
- package/es/ele-edit-tag/index.js +1 -1
- package/es/ele-file-list/components/file-grid-item.js +1 -1
- package/es/ele-file-list/components/file-table-item.js +1 -1
- package/es/ele-icon-select/components/icon-grid.js +1 -1
- package/es/ele-loading/index.d.ts +0 -4
- package/es/ele-loading/index.js +10 -16
- package/es/ele-map-picker/components/map-view.js +1 -1
- package/es/ele-map-picker/index.js +1 -1
- package/es/ele-menus/index.d.ts +4 -6
- package/es/ele-menus/index.js +1 -1
- package/es/ele-menus/props.d.ts +1 -3
- package/es/ele-menus/props.js +1 -3
- package/es/ele-menus/style/css-var.scss +1 -5
- package/es/ele-modal/index.d.ts +12 -6
- package/es/ele-modal/index.js +163 -184
- package/es/ele-modal/props.d.ts +2 -0
- package/es/ele-modal/props.js +2 -0
- package/es/ele-modal/style/index.scss +85 -146
- package/es/ele-modal/util.d.ts +18 -44
- package/es/ele-modal/util.js +53 -179
- package/es/ele-pagination/index.d.ts +9 -0
- package/es/ele-pagination/index.js +4 -1
- package/es/ele-pagination/props.d.ts +5 -0
- package/es/ele-pagination/props.js +5 -0
- package/es/ele-popconfirm/index.d.ts +3 -3
- package/es/ele-popconfirm/index.js +6 -28
- package/es/ele-popover/index.d.ts +2 -2
- package/es/ele-popover/index.js +6 -14
- package/es/ele-pro-layout/components/pro-header.d.ts +66 -11
- package/es/ele-pro-layout/components/pro-header.js +110 -20
- package/es/ele-pro-layout/components/pro-sidebar.d.ts +2 -7
- package/es/ele-pro-layout/components/pro-sidebar.js +2 -5
- package/es/ele-pro-layout/components/pro-sidebox.d.ts +2 -7
- package/es/ele-pro-layout/components/pro-sidebox.js +2 -5
- package/es/ele-pro-layout/components/tab-dropdown.js +1 -1
- package/es/ele-pro-layout/index.d.ts +25 -27
- package/es/ele-pro-layout/index.js +45 -29
- package/es/ele-pro-layout/props.d.ts +3 -6
- package/es/ele-pro-layout/props.js +2 -4
- package/es/ele-pro-layout/style/css-var.scss +3 -18
- package/es/ele-pro-layout/style/header.scss +74 -9
- package/es/ele-pro-layout/style/layout-mobile.scss +2 -2
- package/es/ele-pro-layout/style/layout-style.scss +8 -3
- package/es/ele-pro-layout/style/layout-theme.scss +48 -23
- package/es/ele-pro-layout/style/layout.scss +23 -3
- package/es/ele-pro-layout/style/sidebar.scss +0 -1
- package/es/ele-pro-layout/style/tabs.scss +19 -11
- package/es/ele-pro-layout/types.d.ts +1 -1
- package/es/ele-pro-table/components/tool-print.js +0 -3
- package/es/ele-pro-table/index.d.ts +3 -5
- package/es/ele-pro-table/index.js +2 -1
- package/es/ele-pro-table/util.d.ts +1 -1
- package/es/ele-tab-wrap/index.js +2 -1
- package/es/ele-table-select/index.d.ts +13 -12
- package/es/ele-table-select/index.js +27 -26
- package/es/ele-tabs/index.js +1 -0
- package/es/ele-tabs/style/css-var.scss +1 -30
- package/es/ele-tabs/style/index.scss +372 -241
- package/es/ele-tabs/types.d.ts +2 -1
- package/es/ele-tooltip/index.js +3 -0
- package/es/ele-tooltip/props.d.ts +5 -0
- package/es/ele-tooltip/props.js +2 -0
- package/es/ele-virtual-table/style/index.scss +1 -1
- package/es/icons/ResizeOutlined.d.ts +2 -0
- package/es/icons/ResizeOutlined.js +30 -0
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +50 -48
- package/es/style/themes/dark.scss +9 -15
- package/es/style/themes/default.scss +56 -80
- package/es/style/themes/rounded.scss +16 -30
- package/lib/ele-alert/index.cjs +2 -2
- package/lib/ele-basic-select/index.cjs +7 -1
- package/lib/ele-basic-select/index.d.ts +1 -1
- package/lib/ele-config-provider/types.d.ts +3 -1
- package/lib/ele-cropper-modal/index.cjs +1 -1
- package/lib/ele-drawer/index.cjs +105 -111
- package/lib/ele-drawer/index.d.ts +8 -5
- package/lib/ele-drawer/style/index.scss +48 -105
- package/lib/ele-edit-tag/index.cjs +1 -1
- package/lib/ele-file-list/components/file-grid-item.cjs +1 -1
- package/lib/ele-file-list/components/file-table-item.cjs +1 -1
- package/lib/ele-icon-select/components/icon-grid.cjs +1 -1
- package/lib/ele-loading/index.cjs +9 -15
- package/lib/ele-loading/index.d.ts +0 -4
- package/lib/ele-map-picker/components/map-view.cjs +1 -1
- package/lib/ele-map-picker/index.cjs +1 -1
- package/lib/ele-menus/index.cjs +1 -1
- package/lib/ele-menus/index.d.ts +4 -6
- package/lib/ele-menus/props.cjs +1 -3
- package/lib/ele-menus/props.d.ts +1 -3
- package/lib/ele-menus/style/css-var.scss +1 -5
- package/lib/ele-modal/index.cjs +176 -197
- package/lib/ele-modal/index.d.ts +12 -6
- package/lib/ele-modal/props.cjs +2 -0
- package/lib/ele-modal/props.d.ts +2 -0
- package/lib/ele-modal/style/index.scss +85 -146
- package/lib/ele-modal/util.cjs +53 -179
- package/lib/ele-modal/util.d.ts +18 -44
- package/lib/ele-pagination/index.cjs +4 -1
- package/lib/ele-pagination/index.d.ts +9 -0
- package/lib/ele-pagination/props.cjs +5 -0
- package/lib/ele-pagination/props.d.ts +5 -0
- package/lib/ele-popconfirm/index.cjs +5 -27
- package/lib/ele-popconfirm/index.d.ts +3 -3
- package/lib/ele-popover/index.cjs +5 -13
- package/lib/ele-popover/index.d.ts +2 -2
- package/lib/ele-pro-layout/components/pro-header.cjs +109 -19
- package/lib/ele-pro-layout/components/pro-header.d.ts +66 -11
- package/lib/ele-pro-layout/components/pro-sidebar.cjs +2 -5
- package/lib/ele-pro-layout/components/pro-sidebar.d.ts +2 -7
- package/lib/ele-pro-layout/components/pro-sidebox.cjs +2 -5
- package/lib/ele-pro-layout/components/pro-sidebox.d.ts +2 -7
- package/lib/ele-pro-layout/components/tab-dropdown.cjs +1 -1
- package/lib/ele-pro-layout/index.cjs +45 -29
- package/lib/ele-pro-layout/index.d.ts +25 -27
- package/lib/ele-pro-layout/props.cjs +2 -4
- package/lib/ele-pro-layout/props.d.ts +3 -6
- package/lib/ele-pro-layout/style/css-var.scss +3 -18
- package/lib/ele-pro-layout/style/header.scss +74 -9
- package/lib/ele-pro-layout/style/layout-mobile.scss +2 -2
- package/lib/ele-pro-layout/style/layout-style.scss +8 -3
- package/lib/ele-pro-layout/style/layout-theme.scss +48 -23
- package/lib/ele-pro-layout/style/layout.scss +23 -3
- package/lib/ele-pro-layout/style/sidebar.scss +0 -1
- package/lib/ele-pro-layout/style/tabs.scss +19 -11
- package/lib/ele-pro-layout/types.d.ts +1 -1
- package/lib/ele-pro-table/components/tool-print.cjs +0 -3
- package/lib/ele-pro-table/index.cjs +2 -1
- package/lib/ele-pro-table/index.d.ts +3 -5
- package/lib/ele-pro-table/util.d.ts +1 -1
- package/lib/ele-tab-wrap/index.cjs +2 -1
- package/lib/ele-table-select/index.cjs +27 -26
- package/lib/ele-table-select/index.d.ts +13 -12
- package/lib/ele-tabs/index.cjs +1 -0
- package/lib/ele-tabs/style/css-var.scss +1 -30
- package/lib/ele-tabs/style/index.scss +372 -241
- package/lib/ele-tabs/types.d.ts +2 -1
- package/lib/ele-tooltip/index.cjs +3 -0
- package/lib/ele-tooltip/props.cjs +2 -0
- package/lib/ele-tooltip/props.d.ts +5 -0
- package/lib/ele-virtual-table/style/index.scss +1 -1
- package/lib/icons/ResizeOutlined.cjs +29 -0
- package/lib/icons/ResizeOutlined.d.ts +2 -0
- package/lib/icons/index.cjs +2 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/style/themes/dark.scss +9 -15
- package/lib/style/themes/default.scss +56 -80
- package/lib/style/themes/rounded.scss +16 -30
- package/package.json +9 -9
package/lib/ele-menus/index.d.ts
CHANGED
|
@@ -20,8 +20,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
20
20
|
firstPopperClass: StringConstructor;
|
|
21
21
|
tooltipDisabled: BooleanConstructor;
|
|
22
22
|
ellipsisProps: import("vue").PropType<import("./types").EllipsisProps>;
|
|
23
|
-
textEllipsisTooltip:
|
|
24
|
-
textEllipsisTooltipProps: import("vue").PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
23
|
+
textEllipsisTooltip: import("vue").PropType<boolean | Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
25
24
|
mode: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
26
25
|
defaultActive: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
27
26
|
defaultOpeneds: import("element-plus/es/utils/index").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
|
|
@@ -46,7 +45,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
46
45
|
open: (index: string) => void;
|
|
47
46
|
close: (index: string) => void;
|
|
48
47
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
|
-
|
|
48
|
+
/** 文本溢出提示是否显示 */
|
|
49
|
+
itemClick: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean; /** 是否是水平菜单 */
|
|
50
50
|
itemMouseenter: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
51
51
|
itemMouseleave: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
52
52
|
parentMouseenter: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
@@ -72,8 +72,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
72
72
|
firstPopperClass: StringConstructor;
|
|
73
73
|
tooltipDisabled: BooleanConstructor;
|
|
74
74
|
ellipsisProps: import("vue").PropType<import("./types").EllipsisProps>;
|
|
75
|
-
textEllipsisTooltip:
|
|
76
|
-
textEllipsisTooltipProps: import("vue").PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
75
|
+
textEllipsisTooltip: import("vue").PropType<boolean | Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
77
76
|
mode: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
78
77
|
defaultActive: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
79
78
|
defaultOpeneds: import("element-plus/es/utils/index").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
|
|
@@ -122,6 +121,5 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
122
121
|
colorful: boolean;
|
|
123
122
|
popupColorful: import("./types").PopupColorful;
|
|
124
123
|
tooltipDisabled: boolean;
|
|
125
|
-
textEllipsisTooltip: boolean;
|
|
126
124
|
}, {}>;
|
|
127
125
|
export default _default;
|
package/lib/ele-menus/props.cjs
CHANGED
|
@@ -29,9 +29,7 @@ const menusProps = {
|
|
|
29
29
|
/** 省略菜单的属性 */
|
|
30
30
|
ellipsisProps: Object,
|
|
31
31
|
/** 是否开启菜单文本溢出提示 */
|
|
32
|
-
textEllipsisTooltip: Boolean,
|
|
33
|
-
/** 菜单文本溢出提示属性 */
|
|
34
|
-
textEllipsisTooltipProps: Object
|
|
32
|
+
textEllipsisTooltip: [Boolean, Object]
|
|
35
33
|
};
|
|
36
34
|
const menuPropKeys = Object.keys(elementPlus.menuProps);
|
|
37
35
|
const menusEmits = {
|
package/lib/ele-menus/props.d.ts
CHANGED
|
@@ -32,9 +32,7 @@ export declare const menusProps: {
|
|
|
32
32
|
/** 省略菜单的属性 */
|
|
33
33
|
ellipsisProps: PropType<EllipsisProps>;
|
|
34
34
|
/** 是否开启菜单文本溢出提示 */
|
|
35
|
-
textEllipsisTooltip:
|
|
36
|
-
/** 菜单文本溢出提示属性 */
|
|
37
|
-
textEllipsisTooltipProps: PropType<Partial<import('../ele-tooltip/props').TooltipProps>>;
|
|
35
|
+
textEllipsisTooltip: PropType<boolean | Partial<import('../ele-tooltip/props').TooltipProps>>;
|
|
38
36
|
mode: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
39
37
|
defaultActive: import('element-plus/es/utils/index').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
40
38
|
defaultOpeneds: import('element-plus/es/utils/index').EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
|
|
@@ -22,11 +22,7 @@
|
|
|
22
22
|
@include set-ele-var('menu-colorful', $var);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.ele-menu.ele-menu-dark
|
|
26
|
-
.ele-admin-header.is-dark,
|
|
27
|
-
.ele-admin-header.is-primary,
|
|
28
|
-
.ele-admin-dark-sidebar .ele-admin-sidebar,
|
|
29
|
-
.ele-admin-dark-sidebar .ele-admin-sidebox {
|
|
25
|
+
.ele-menu.ele-menu-dark {
|
|
30
26
|
@include set-ele-var('menu-dark', $var);
|
|
31
27
|
}
|
|
32
28
|
|
package/lib/ele-modal/index.cjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const elementPlus = require("element-plus");
|
|
4
4
|
const icons = require("../icons");
|
|
5
|
-
const core = require("../utils/core");
|
|
6
5
|
const receiver = require("../ele-config-provider/receiver");
|
|
7
6
|
const ReceiverView = require("../ele-config-provider/components/receiver-view");
|
|
8
7
|
const util = require("./util");
|
|
@@ -15,195 +14,167 @@ const _sfc_main = vue.defineComponent({
|
|
|
15
14
|
CloseOutlined: icons.CloseOutlined,
|
|
16
15
|
CompressOutlined: icons.CompressOutlined,
|
|
17
16
|
ExpandOutlined: icons.ExpandOutlined,
|
|
17
|
+
ResizeOutlined: icons.ResizeOutlined,
|
|
18
18
|
ReceiverView
|
|
19
19
|
},
|
|
20
20
|
inheritAttrs: false,
|
|
21
21
|
props: props.modalProps,
|
|
22
22
|
emits: props.modalEmits,
|
|
23
|
-
setup(
|
|
23
|
+
setup(props2, { emit }) {
|
|
24
|
+
const state = { isInit: true };
|
|
24
25
|
const layoutProvide = receiver.useLayoutState();
|
|
25
26
|
const dialogRef = vue.ref(null);
|
|
26
|
-
const
|
|
27
|
-
util.getModalContainer(props$1.multiple, props$1.appendTo)
|
|
28
|
-
);
|
|
29
|
-
const isFullscreen = vue.ref(props$1.fullscreen ?? false);
|
|
27
|
+
const isFullscreen = vue.ref(props2.fullscreen ?? false);
|
|
30
28
|
const isActivated = vue.ref(true);
|
|
31
|
-
const dialogEnable = vue.ref(
|
|
32
|
-
props$1.destroyOnClose && !props$1.modelValue ? false : true
|
|
33
|
-
);
|
|
34
29
|
const dialogClass = vue.computed(() => {
|
|
35
30
|
const layoutState = vue.unref(layoutProvide);
|
|
36
31
|
const classes = [util.wrapperClass];
|
|
37
|
-
if (
|
|
38
|
-
classes.push(
|
|
32
|
+
if (props2.responsive ?? (layoutState == null ? void 0 : layoutState.responsive) ?? true) {
|
|
33
|
+
classes.push("ele-modal-responsive");
|
|
39
34
|
}
|
|
40
|
-
if (
|
|
41
|
-
classes.push("ele-modal-form");
|
|
42
|
-
}
|
|
43
|
-
if (props$1.position) {
|
|
44
|
-
if (props$1.position === "top") {
|
|
45
|
-
classes.push("ele-modal-top");
|
|
46
|
-
} else if (props$1.position === "bottom") {
|
|
47
|
-
classes.push("ele-modal-bottom");
|
|
48
|
-
} else if (props$1.position === "left") {
|
|
49
|
-
classes.push("ele-modal-left");
|
|
50
|
-
} else if (props$1.position === "right") {
|
|
51
|
-
classes.push("ele-modal-right");
|
|
52
|
-
} else if (props$1.position === "leftTop") {
|
|
53
|
-
classes.push("ele-modal-left-top");
|
|
54
|
-
} else if (props$1.position === "leftBottom") {
|
|
55
|
-
classes.push("ele-modal-left-bottom");
|
|
56
|
-
} else if (props$1.position === "rightTop") {
|
|
57
|
-
classes.push("ele-modal-right-top");
|
|
58
|
-
} else if (props$1.position === "rightBottom") {
|
|
59
|
-
classes.push("ele-modal-right-bottom");
|
|
60
|
-
} else if (props$1.position === "center") {
|
|
61
|
-
classes.push("ele-modal-center");
|
|
62
|
-
}
|
|
63
|
-
} else if (props$1.alignCenter) {
|
|
35
|
+
if (props2.alignCenter || props2.position === "center") {
|
|
64
36
|
classes.push("ele-modal-center");
|
|
37
|
+
} else if (props2.position === "top") {
|
|
38
|
+
classes.push("ele-modal-top");
|
|
39
|
+
} else if (props2.position === "bottom") {
|
|
40
|
+
classes.push("ele-modal-bottom");
|
|
41
|
+
} else if (props2.position === "left") {
|
|
42
|
+
classes.push("ele-modal-left");
|
|
43
|
+
} else if (props2.position === "right") {
|
|
44
|
+
classes.push("ele-modal-right");
|
|
45
|
+
} else if (props2.position === "leftTop") {
|
|
46
|
+
classes.push("ele-modal-left-top");
|
|
47
|
+
} else if (props2.position === "leftBottom") {
|
|
48
|
+
classes.push("ele-modal-left-bottom");
|
|
49
|
+
} else if (props2.position === "rightTop") {
|
|
50
|
+
classes.push("ele-modal-right-top");
|
|
51
|
+
} else if (props2.position === "rightBottom") {
|
|
52
|
+
classes.push("ele-modal-right-bottom");
|
|
65
53
|
}
|
|
66
|
-
if (
|
|
67
|
-
classes.push(
|
|
54
|
+
if (props2.draggable) {
|
|
55
|
+
classes.push("ele-modal-movable");
|
|
68
56
|
}
|
|
69
|
-
if (
|
|
70
|
-
classes.push(
|
|
71
|
-
if (typeof props$1.resizable === "string") {
|
|
72
|
-
classes.push(util.resizableClass + "-" + props$1.resizable);
|
|
73
|
-
}
|
|
57
|
+
if (props2.resizable) {
|
|
58
|
+
classes.push("ele-modal-resizable");
|
|
74
59
|
}
|
|
75
|
-
if (
|
|
76
|
-
classes.push(
|
|
60
|
+
if (props2.multiple) {
|
|
61
|
+
classes.push("ele-modal-multiple");
|
|
77
62
|
}
|
|
78
63
|
if (isFullscreen.value) {
|
|
79
|
-
classes.push(
|
|
64
|
+
classes.push("ele-modal-fullscreen");
|
|
80
65
|
}
|
|
81
|
-
if (!
|
|
66
|
+
if (!props2.modelValue) {
|
|
82
67
|
classes.push(util.closedClass);
|
|
83
68
|
}
|
|
84
|
-
if (!isActivated.value &&
|
|
85
|
-
classes.push(
|
|
69
|
+
if (!isActivated.value && props2.modelValue) {
|
|
70
|
+
classes.push("ele-modal-hide");
|
|
86
71
|
}
|
|
87
|
-
if (
|
|
88
|
-
classes.push(
|
|
89
|
-
if (layoutState && layoutState.sidebar != null) {
|
|
90
|
-
if (layoutState.collapse && !layoutState.topLayout) {
|
|
91
|
-
classes.push(util.collapseClass);
|
|
92
|
-
}
|
|
93
|
-
if (layoutState.compact && layoutState.mixSidebar && !layoutState.topLayout) {
|
|
94
|
-
classes.push(util.compactClass);
|
|
95
|
-
}
|
|
96
|
-
if (layoutState.maximized) {
|
|
97
|
-
classes.push(util.maximizedClass);
|
|
98
|
-
}
|
|
99
|
-
if (layoutState.tabBar) {
|
|
100
|
-
classes.push(util.hasTabClass);
|
|
101
|
-
}
|
|
102
|
-
if (layoutState.mixSidebar && !layoutState.topLayout) {
|
|
103
|
-
classes.push(util.mixSidebarClass);
|
|
104
|
-
if (!layoutState.sidebar) {
|
|
105
|
-
classes.push(util.singleSidebarClass);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (layoutState.topLayout) {
|
|
109
|
-
classes.push(util.topLayoutClass);
|
|
110
|
-
}
|
|
111
|
-
if (layoutState.maximized && layoutState.expanded) {
|
|
112
|
-
classes.push(util.expandedClass);
|
|
113
|
-
}
|
|
114
|
-
if (layoutState.mobile) {
|
|
115
|
-
classes.push(util.mobileClass);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
72
|
+
if (props2.inner) {
|
|
73
|
+
classes.push("ele-modal-inner");
|
|
118
74
|
}
|
|
119
|
-
if (
|
|
120
|
-
classes.push(
|
|
75
|
+
if (props2.modalClass) {
|
|
76
|
+
classes.push(props2.modalClass);
|
|
121
77
|
}
|
|
122
78
|
return classes.join(" ");
|
|
123
79
|
});
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
alignCenter: false,
|
|
132
|
-
destroyOnClose: false,
|
|
133
|
-
modalClass: dialogClass.value
|
|
134
|
-
};
|
|
135
|
-
return Object.assign({}, attrs, core.pick(props$1, props.dialogPropKeys), option);
|
|
80
|
+
const teleportTo = vue.computed(() => {
|
|
81
|
+
return util.getModalContainer(
|
|
82
|
+
props2.inner,
|
|
83
|
+
props2.multiple,
|
|
84
|
+
props2.appendTo,
|
|
85
|
+
layoutProvide ? vue.unref(layoutProvide).modalsEl : void 0
|
|
86
|
+
);
|
|
136
87
|
});
|
|
137
88
|
const teleportDisabled = vue.computed(() => {
|
|
138
|
-
const appendTo =
|
|
139
|
-
const disabled = appendTo === "body" ? !
|
|
140
|
-
return
|
|
89
|
+
const appendTo = props2.appendTo || "body";
|
|
90
|
+
const disabled = appendTo === "body" ? !props2.appendToBody : false;
|
|
91
|
+
return props2.multiple || props2.inner ? false : disabled;
|
|
141
92
|
});
|
|
142
93
|
const getModalEl = () => {
|
|
143
94
|
var _a, _b;
|
|
144
95
|
return (_b = vue.unref((_a = vue.unref(dialogRef)) == null ? void 0 : _a.dialogContentRef)) == null ? void 0 : _b.$el;
|
|
145
96
|
};
|
|
146
97
|
const getZIndex = () => {
|
|
147
|
-
return
|
|
98
|
+
return props2.zIndex ?? 2e3;
|
|
99
|
+
};
|
|
100
|
+
const getPosition = () => {
|
|
101
|
+
if (props2.alignCenter) {
|
|
102
|
+
return "center";
|
|
103
|
+
}
|
|
104
|
+
if (props2.top != null && props2.top !== "") {
|
|
105
|
+
return { top: props2.top };
|
|
106
|
+
}
|
|
107
|
+
return props2.position;
|
|
108
|
+
};
|
|
109
|
+
const setInitPosition = () => {
|
|
110
|
+
if (state.isInit) {
|
|
111
|
+
state.isInit = false;
|
|
112
|
+
const modalEl = getModalEl();
|
|
113
|
+
const margin = util.getPositionMargin(getPosition());
|
|
114
|
+
if (modalEl && margin != null) {
|
|
115
|
+
modalEl.style.margin = margin;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const mousedownListener = (event) => {
|
|
120
|
+
if (props2.multiple) {
|
|
121
|
+
util.topModal(event.currentTarget, getZIndex());
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const handleHeaderMousedown = (event) => {
|
|
125
|
+
const modalEl = getModalEl();
|
|
126
|
+
if (!modalEl || !props2.draggable || isFullscreen.value) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
util.handleMove(modalEl, event, props2);
|
|
130
|
+
};
|
|
131
|
+
const handleResizeMousedown = (event) => {
|
|
132
|
+
const modalEl = getModalEl();
|
|
133
|
+
if (!modalEl || !props2.resizable || isFullscreen.value) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
util.handleResize(modalEl, event, props2);
|
|
148
137
|
};
|
|
149
138
|
const updateModelValue = (modelValue) => {
|
|
150
139
|
emit("update:modelValue", modelValue);
|
|
151
140
|
};
|
|
152
141
|
const toggleFullscreen = (fullscreen) => {
|
|
153
|
-
isFullscreen.value = fullscreen
|
|
142
|
+
isFullscreen.value = fullscreen ?? !isFullscreen.value;
|
|
154
143
|
vue.nextTick(() => {
|
|
155
|
-
util.
|
|
144
|
+
util.topModal(getModalEl(), getZIndex());
|
|
156
145
|
});
|
|
157
146
|
emit("update:fullscreen", isFullscreen.value);
|
|
158
147
|
};
|
|
159
|
-
const mousedownListener = (event) => {
|
|
160
|
-
util.handleMovable(event, props$1);
|
|
161
|
-
util.handleResizable(event, props$1);
|
|
162
|
-
util.setModalTop(event.currentTarget, getZIndex());
|
|
163
|
-
};
|
|
164
148
|
const onOpen = () => {
|
|
165
|
-
if (
|
|
166
|
-
isFullscreen.value =
|
|
167
|
-
}
|
|
168
|
-
if (!dialogEnable.value) {
|
|
169
|
-
dialogEnable.value = true;
|
|
149
|
+
if (props2.resetOnClose || props2.destroyOnClose) {
|
|
150
|
+
isFullscreen.value = props2.fullscreen ?? false;
|
|
170
151
|
}
|
|
171
152
|
vue.nextTick(() => {
|
|
172
153
|
const modalEl = getModalEl();
|
|
173
|
-
if (
|
|
174
|
-
util.resetModalStyle(modalEl,
|
|
154
|
+
if (props2.resetOnClose) {
|
|
155
|
+
util.resetModalStyle(modalEl, props2.width, getPosition());
|
|
156
|
+
} else {
|
|
157
|
+
setInitPosition();
|
|
175
158
|
}
|
|
176
|
-
|
|
177
|
-
util.setInitPosition(
|
|
178
|
-
modalEl,
|
|
179
|
-
props$1.resizable,
|
|
180
|
-
props$1.position,
|
|
181
|
-
props$1.moveOut,
|
|
182
|
-
props$1.resetOnClose
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
util.setModalTop(modalEl, getZIndex());
|
|
159
|
+
util.topModal(modalEl, getZIndex());
|
|
186
160
|
});
|
|
187
161
|
emit("open");
|
|
188
162
|
};
|
|
189
163
|
const onOpened = () => {
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
|
|
164
|
+
const modalEl = getModalEl();
|
|
165
|
+
if (modalEl) {
|
|
166
|
+
modalEl.addEventListener("mousedown", mousedownListener);
|
|
193
167
|
}
|
|
194
168
|
emit("opened");
|
|
195
169
|
};
|
|
196
170
|
const onClose = () => {
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
|
|
171
|
+
const modalEl = getModalEl();
|
|
172
|
+
if (modalEl) {
|
|
173
|
+
modalEl.removeEventListener("mousedown", mousedownListener);
|
|
200
174
|
}
|
|
201
175
|
emit("close");
|
|
202
176
|
};
|
|
203
177
|
const onClosed = () => {
|
|
204
|
-
if (props$1.destroyOnClose && dialogEnable.value) {
|
|
205
|
-
dialogEnable.value = false;
|
|
206
|
-
}
|
|
207
178
|
emit("closed");
|
|
208
179
|
};
|
|
209
180
|
const onOpenAutoFocus = () => {
|
|
@@ -213,51 +184,16 @@ const _sfc_main = vue.defineComponent({
|
|
|
213
184
|
emit("closeAutoFocus");
|
|
214
185
|
};
|
|
215
186
|
vue.watch(
|
|
216
|
-
() =>
|
|
217
|
-
(multiple) => {
|
|
218
|
-
teleportTo.value = util.getModalContainer(multiple, props$1.appendTo);
|
|
219
|
-
}
|
|
220
|
-
);
|
|
221
|
-
vue.watch(
|
|
222
|
-
() => props$1.appendTo,
|
|
223
|
-
(appendTo) => {
|
|
224
|
-
if (!props$1.multiple) {
|
|
225
|
-
teleportTo.value = util.getModalContainer(false, appendTo);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
);
|
|
229
|
-
vue.watch(
|
|
230
|
-
() => props$1.fullscreen,
|
|
187
|
+
() => props2.fullscreen,
|
|
231
188
|
(fullscreen) => {
|
|
232
189
|
isFullscreen.value = fullscreen ?? false;
|
|
233
190
|
}
|
|
234
191
|
);
|
|
235
|
-
vue.
|
|
236
|
-
()
|
|
237
|
-
|
|
238
|
-
if (props$1.modelValue && position && typeof position === "object") {
|
|
239
|
-
util.setInitPosition(
|
|
240
|
-
getModalEl(),
|
|
241
|
-
props$1.resizable,
|
|
242
|
-
position,
|
|
243
|
-
props$1.moveOut,
|
|
244
|
-
true
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
vue.watch(
|
|
250
|
-
() => props$1.destroyOnClose,
|
|
251
|
-
(destroyOnClose) => {
|
|
252
|
-
if (destroyOnClose) {
|
|
253
|
-
if (!props$1.modelValue && dialogEnable.value) {
|
|
254
|
-
dialogEnable.value = false;
|
|
255
|
-
}
|
|
256
|
-
} else if (!dialogEnable.value) {
|
|
257
|
-
dialogEnable.value = true;
|
|
258
|
-
}
|
|
192
|
+
vue.onMounted(() => {
|
|
193
|
+
if (props2.modelValue) {
|
|
194
|
+
setInitPosition();
|
|
259
195
|
}
|
|
260
|
-
);
|
|
196
|
+
});
|
|
261
197
|
vue.onActivated(() => {
|
|
262
198
|
isActivated.value = true;
|
|
263
199
|
});
|
|
@@ -266,11 +202,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
266
202
|
});
|
|
267
203
|
return {
|
|
268
204
|
dialogRef,
|
|
269
|
-
teleportTo,
|
|
270
205
|
isFullscreen,
|
|
271
|
-
|
|
272
|
-
|
|
206
|
+
dialogClass,
|
|
207
|
+
teleportTo,
|
|
273
208
|
teleportDisabled,
|
|
209
|
+
handleHeaderMousedown,
|
|
210
|
+
handleResizeMousedown,
|
|
274
211
|
updateModelValue,
|
|
275
212
|
toggleFullscreen,
|
|
276
213
|
onOpen,
|
|
@@ -289,20 +226,41 @@ const _export_sfc = (sfc, props2) => {
|
|
|
289
226
|
}
|
|
290
227
|
return target;
|
|
291
228
|
};
|
|
292
|
-
const _hoisted_1 = ["onClick"];
|
|
293
229
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
294
230
|
const _component_CompressOutlined = vue.resolveComponent("CompressOutlined");
|
|
295
231
|
const _component_ExpandOutlined = vue.resolveComponent("ExpandOutlined");
|
|
296
232
|
const _component_ElIcon = vue.resolveComponent("ElIcon");
|
|
297
233
|
const _component_CloseOutlined = vue.resolveComponent("CloseOutlined");
|
|
234
|
+
const _component_ResizeOutlined = vue.resolveComponent("ResizeOutlined");
|
|
298
235
|
const _component_ReceiverView = vue.resolveComponent("ReceiverView");
|
|
299
236
|
const _component_ElDialog = vue.resolveComponent("ElDialog");
|
|
300
237
|
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
301
238
|
to: _ctx.teleportTo,
|
|
302
239
|
disabled: _ctx.teleportDisabled
|
|
303
240
|
}, [
|
|
304
|
-
vue.createVNode(_component_ElDialog, vue.mergeProps(_ctx
|
|
241
|
+
vue.createVNode(_component_ElDialog, vue.mergeProps(_ctx.$attrs, {
|
|
305
242
|
ref: "dialogRef",
|
|
243
|
+
modelValue: _ctx.modelValue,
|
|
244
|
+
title: _ctx.title,
|
|
245
|
+
width: _ctx.width,
|
|
246
|
+
fullscreen: false,
|
|
247
|
+
modal: _ctx.multiple ? false : _ctx.modal,
|
|
248
|
+
modalClass: _ctx.dialogClass,
|
|
249
|
+
appendToBody: false,
|
|
250
|
+
lockScroll: _ctx.inner || _ctx.multiple ? false : _ctx.lockScroll,
|
|
251
|
+
openDelay: _ctx.openDelay,
|
|
252
|
+
closeDelay: _ctx.closeDelay,
|
|
253
|
+
closeOnClickModal: _ctx.closeOnClickModal,
|
|
254
|
+
closeOnPressEscape: _ctx.closeOnPressEscape,
|
|
255
|
+
showClose: false,
|
|
256
|
+
beforeClose: _ctx.beforeClose,
|
|
257
|
+
draggable: false,
|
|
258
|
+
overflow: false,
|
|
259
|
+
center: _ctx.center,
|
|
260
|
+
alignCenter: false,
|
|
261
|
+
destroyOnClose: _ctx.destroyOnClose,
|
|
262
|
+
zIndex: _ctx.zIndex,
|
|
263
|
+
headerAriaLevel: _ctx.headerAriaLevel,
|
|
306
264
|
"onUpdate:modelValue": _ctx.updateModelValue,
|
|
307
265
|
onOpen: _ctx.onOpen,
|
|
308
266
|
onOpened: _ctx.onOpened,
|
|
@@ -313,11 +271,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
313
271
|
}), vue.createSlots({
|
|
314
272
|
header: vue.withCtx(({ close, titleId, titleClass }) => [
|
|
315
273
|
vue.createElementVNode("div", {
|
|
274
|
+
style: vue.normalizeStyle(_ctx.headerStyle),
|
|
316
275
|
class: "ele-modal-header",
|
|
317
|
-
|
|
276
|
+
onMousedown: _cache[4] || (_cache[4] = (...args) => _ctx.handleHeaderMousedown && _ctx.handleHeaderMousedown(...args))
|
|
318
277
|
}, [
|
|
319
|
-
|
|
320
|
-
key: 0,
|
|
278
|
+
vue.createElementVNode("div", {
|
|
321
279
|
class: "ele-modal-title",
|
|
322
280
|
style: vue.normalizeStyle(_ctx.titleStyle)
|
|
323
281
|
}, [
|
|
@@ -328,12 +286,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
328
286
|
}, () => [
|
|
329
287
|
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
330
288
|
])
|
|
331
|
-
], 4)
|
|
332
|
-
_ctx.
|
|
333
|
-
key:
|
|
289
|
+
], 4),
|
|
290
|
+
_ctx.maxable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
291
|
+
key: 0,
|
|
334
292
|
class: "ele-modal-tool",
|
|
335
293
|
style: vue.normalizeStyle(_ctx.fullscreenBtnStyle),
|
|
336
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.toggleFullscreen())
|
|
294
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.toggleFullscreen()),
|
|
295
|
+
onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
296
|
+
}, ["stop"]))
|
|
337
297
|
}, [
|
|
338
298
|
vue.renderSlot(_ctx.$slots, "maxIcon", { fullscreen: _ctx.isFullscreen }, () => [
|
|
339
299
|
vue.createVNode(_component_ElIcon, null, {
|
|
@@ -343,53 +303,72 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
343
303
|
_: 1
|
|
344
304
|
})
|
|
345
305
|
])
|
|
346
|
-
],
|
|
347
|
-
_ctx.
|
|
348
|
-
key:
|
|
306
|
+
], 36)) : vue.createCommentVNode("", true),
|
|
307
|
+
_ctx.showClose ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
308
|
+
key: 1,
|
|
349
309
|
class: "ele-modal-tool",
|
|
350
310
|
style: vue.normalizeStyle(_ctx.closeBtnStyle),
|
|
351
|
-
onClick:
|
|
311
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.updateModelValue(false)),
|
|
312
|
+
onMousedown: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
313
|
+
}, ["stop"]))
|
|
352
314
|
}, [
|
|
353
315
|
vue.renderSlot(_ctx.$slots, "closeIcon", {}, () => [
|
|
354
316
|
vue.createVNode(_component_ElIcon, null, {
|
|
355
317
|
default: vue.withCtx(() => [
|
|
356
|
-
vue.
|
|
318
|
+
_ctx.closeIcon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon), { key: 0 })) : (vue.openBlock(), vue.createBlock(_component_CloseOutlined, { key: 1 }))
|
|
357
319
|
]),
|
|
358
320
|
_: 1
|
|
359
321
|
})
|
|
360
322
|
])
|
|
361
|
-
],
|
|
362
|
-
],
|
|
323
|
+
], 36)) : vue.createCommentVNode("", true)
|
|
324
|
+
], 36),
|
|
325
|
+
_ctx.resizable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
326
|
+
key: 0,
|
|
327
|
+
class: vue.normalizeClass([
|
|
328
|
+
"ele-modal-resize-icon",
|
|
329
|
+
{ "is-horizontal": _ctx.resizable === "horizontal" },
|
|
330
|
+
{ "is-vertical": _ctx.resizable === "vertical" }
|
|
331
|
+
]),
|
|
332
|
+
style: vue.normalizeStyle(_ctx.resizeIconStyle),
|
|
333
|
+
onMousedown: _cache[5] || (_cache[5] = (...args) => _ctx.handleResizeMousedown && _ctx.handleResizeMousedown(...args))
|
|
334
|
+
}, [
|
|
335
|
+
vue.renderSlot(_ctx.$slots, "resizeIcon", {}, () => [
|
|
336
|
+
vue.createVNode(_component_ElIcon, null, {
|
|
337
|
+
default: vue.withCtx(() => [
|
|
338
|
+
vue.createVNode(_component_ResizeOutlined)
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
})
|
|
342
|
+
])
|
|
343
|
+
], 38)) : vue.createCommentVNode("", true)
|
|
363
344
|
]),
|
|
364
345
|
default: vue.withCtx(() => [
|
|
365
|
-
|
|
366
|
-
key: 0,
|
|
346
|
+
vue.createVNode(_component_ReceiverView, {
|
|
367
347
|
wrapPosition: false,
|
|
368
|
-
class: "ele-modal-body",
|
|
348
|
+
class: vue.normalizeClass(["ele-modal-body", { "is-form": _ctx.form }]),
|
|
369
349
|
style: vue.normalizeStyle(_ctx.bodyStyle)
|
|
370
350
|
}, {
|
|
371
351
|
default: vue.withCtx(() => [
|
|
372
352
|
vue.renderSlot(_ctx.$slots, "default")
|
|
373
353
|
]),
|
|
374
354
|
_: 3
|
|
375
|
-
}, 8, ["
|
|
355
|
+
}, 8, ["class", "style"])
|
|
376
356
|
]),
|
|
377
357
|
_: 2
|
|
378
358
|
}, [
|
|
379
359
|
_ctx.$slots.footer ? {
|
|
380
360
|
name: "footer",
|
|
381
361
|
fn: vue.withCtx(() => [
|
|
382
|
-
|
|
383
|
-
key: 0,
|
|
362
|
+
vue.createElementVNode("div", {
|
|
384
363
|
class: "ele-modal-footer",
|
|
385
364
|
style: vue.normalizeStyle(_ctx.footerStyle)
|
|
386
365
|
}, [
|
|
387
366
|
vue.renderSlot(_ctx.$slots, "footer")
|
|
388
|
-
], 4)
|
|
367
|
+
], 4)
|
|
389
368
|
]),
|
|
390
369
|
key: "0"
|
|
391
370
|
} : void 0
|
|
392
|
-
]), 1040, ["onUpdate:modelValue", "onOpen", "onOpened", "onClose", "onClosed", "onOpenAutoFocus", "onCloseAutoFocus"])
|
|
371
|
+
]), 1040, ["modelValue", "title", "width", "modal", "modalClass", "lockScroll", "openDelay", "closeDelay", "closeOnClickModal", "closeOnPressEscape", "beforeClose", "center", "destroyOnClose", "zIndex", "headerAriaLevel", "onUpdate:modelValue", "onOpen", "onOpened", "onClose", "onClosed", "onOpenAutoFocus", "onCloseAutoFocus"])
|
|
393
372
|
], 8, ["to", "disabled"]);
|
|
394
373
|
}
|
|
395
374
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|