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-modal/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Position } from './types';
|
|
2
|
+
import { ElDialogInstance } from '../ele-app/el';
|
|
2
3
|
|
|
3
4
|
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
appendToBody: {
|
|
@@ -11,7 +12,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
11
12
|
};
|
|
12
13
|
moveOut: import("vue").PropType<import("./types").MoveOut>;
|
|
13
14
|
resizable: import("vue").PropType<import("./types").Resizable>;
|
|
14
|
-
position: import("vue").PropType<
|
|
15
|
+
position: import("vue").PropType<Position>;
|
|
15
16
|
resetOnClose: {
|
|
16
17
|
type: BooleanConstructor;
|
|
17
18
|
default: boolean;
|
|
@@ -33,8 +34,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
33
34
|
footerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
34
35
|
closeBtnStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
35
36
|
fullscreenBtnStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
37
|
+
resizeIconStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
36
38
|
responsive: {
|
|
37
39
|
type: BooleanConstructor;
|
|
40
|
+
/** 弹窗类名 */
|
|
38
41
|
default: null;
|
|
39
42
|
};
|
|
40
43
|
form: BooleanConstructor;
|
|
@@ -89,11 +92,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
89
92
|
ariaLevel: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, unknown, unknown, "2", boolean>;
|
|
90
93
|
}, {
|
|
91
94
|
dialogRef: import("vue").Ref<ElDialogInstance>;
|
|
92
|
-
teleportTo: import("vue").Ref<string | Element>;
|
|
93
95
|
isFullscreen: import("vue").Ref<boolean>;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
dialogClass: import("vue").ComputedRef<string>;
|
|
97
|
+
teleportTo: import("vue").ComputedRef<string | Element>;
|
|
96
98
|
teleportDisabled: import("vue").ComputedRef<boolean>;
|
|
99
|
+
handleHeaderMousedown: (event: MouseEvent) => void;
|
|
100
|
+
handleResizeMousedown: (event: MouseEvent) => void;
|
|
97
101
|
updateModelValue: (modelValue: boolean) => void;
|
|
98
102
|
toggleFullscreen: (fullscreen?: boolean) => void;
|
|
99
103
|
onOpen: () => void;
|
|
@@ -122,7 +126,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
122
126
|
};
|
|
123
127
|
moveOut: import("vue").PropType<import("./types").MoveOut>;
|
|
124
128
|
resizable: import("vue").PropType<import("./types").Resizable>;
|
|
125
|
-
position: import("vue").PropType<
|
|
129
|
+
position: import("vue").PropType<Position>;
|
|
126
130
|
resetOnClose: {
|
|
127
131
|
type: BooleanConstructor;
|
|
128
132
|
default: boolean;
|
|
@@ -144,8 +148,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
144
148
|
footerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
145
149
|
closeBtnStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
146
150
|
fullscreenBtnStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
151
|
+
resizeIconStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
147
152
|
responsive: {
|
|
148
153
|
type: BooleanConstructor;
|
|
154
|
+
/** 弹窗类名 */
|
|
149
155
|
default: null;
|
|
150
156
|
};
|
|
151
157
|
form: BooleanConstructor;
|
package/lib/ele-modal/props.cjs
CHANGED
package/lib/ele-modal/props.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ export declare const modalProps: {
|
|
|
53
53
|
closeBtnStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
54
54
|
/** 自定义全屏按钮样式 */
|
|
55
55
|
fullscreenBtnStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
56
|
+
/** 拉伸图标样式 */
|
|
57
|
+
resizeIconStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
56
58
|
/** 是否开启响应式 */
|
|
57
59
|
responsive: {
|
|
58
60
|
type: BooleanConstructor;
|
|
@@ -39,72 +39,69 @@
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
}
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
/* header */
|
|
45
|
+
.ele-modal-header {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
padding: eleVar('modal', 'header-padding');
|
|
50
|
+
border-bottom: eleVar('modal', 'header-border');
|
|
51
|
+
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
.ele-modal-title {
|
|
54
|
+
flex: 1;
|
|
55
|
+
color: eleVar('modal', 'header-color');
|
|
56
|
+
font-size: eleVar('modal', 'header-font-size');
|
|
57
|
+
line-height: eleVar('modal', 'header-line-height');
|
|
58
|
+
font-weight: eleVar('modal', 'header-font-weight');
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
}
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
&:hover {
|
|
78
|
-
color: eleVar('modal', 'icon-hover-color');
|
|
79
|
-
background: eleVar('modal', 'icon-hover-bg');
|
|
80
|
-
}
|
|
62
|
+
/* 图标按钮 */
|
|
63
|
+
.ele-modal-tool {
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
width: eleVar('modal', 'icon-size');
|
|
69
|
+
height: eleVar('modal', 'icon-size');
|
|
70
|
+
line-height: eleVar('modal', 'icon-size');
|
|
71
|
+
color: eleVar('modal', 'icon-color');
|
|
72
|
+
font-size: eleVar('modal', 'icon-font-size');
|
|
73
|
+
border-radius: eleVar('modal', 'icon-radius');
|
|
74
|
+
transition: (color $ele-transition, background-color $ele-transition);
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
cursor: pointer;
|
|
81
77
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
&:hover {
|
|
79
|
+
color: eleVar('modal', 'icon-hover-color');
|
|
80
|
+
background: eleVar('modal', 'icon-hover-bg');
|
|
85
81
|
}
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
padding: eleVar('modal', 'body-padding');
|
|
90
|
-
box-sizing: border-box;
|
|
83
|
+
& + .ele-modal-tool {
|
|
84
|
+
margin-left: eleVar('modal', 'icon-space');
|
|
91
85
|
}
|
|
86
|
+
}
|
|
92
87
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
}
|
|
88
|
+
/* body */
|
|
89
|
+
.ele-modal-body {
|
|
90
|
+
padding: eleVar('modal', 'body-padding');
|
|
91
|
+
box-sizing: border-box;
|
|
99
92
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
& > .ele-modal-body {
|
|
103
|
-
padding: eleVar('modal', 'form-body-padding');
|
|
104
|
-
}
|
|
93
|
+
&.is-form {
|
|
94
|
+
padding: eleVar('modal', 'form-body-padding');
|
|
105
95
|
}
|
|
106
96
|
}
|
|
107
97
|
|
|
98
|
+
/* footer */
|
|
99
|
+
.ele-modal-footer {
|
|
100
|
+
padding: eleVar('modal', 'footer-padding');
|
|
101
|
+
border-top: eleVar('modal', 'footer-border');
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
}
|
|
104
|
+
|
|
108
105
|
/* 默认位置 */
|
|
109
106
|
.ele-modal-top > .el-overlay-dialog > .el-dialog {
|
|
110
107
|
margin: 0;
|
|
@@ -149,26 +146,24 @@
|
|
|
149
146
|
}
|
|
150
147
|
|
|
151
148
|
/* 支持拉伸 */
|
|
152
|
-
.ele-modal-
|
|
153
|
-
content: '';
|
|
149
|
+
.ele-modal-resize-icon {
|
|
154
150
|
position: absolute;
|
|
155
|
-
right:
|
|
156
|
-
bottom:
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
right: 2px;
|
|
152
|
+
bottom: 2px;
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
color: eleVar('modal', 'icon-color');
|
|
157
|
+
font-size: 12px;
|
|
159
158
|
cursor: se-resize;
|
|
160
|
-
background-image: eleVar('modal', 'resize-bg');
|
|
161
|
-
background-position: 0 0;
|
|
162
|
-
background-size: 10px 10px;
|
|
163
|
-
background-repeat: no-repeat;
|
|
164
|
-
}
|
|
165
159
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
160
|
+
&.is-horizontal {
|
|
161
|
+
cursor: e-resize;
|
|
162
|
+
}
|
|
169
163
|
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
&.is-vertical {
|
|
165
|
+
cursor: s-resize;
|
|
166
|
+
}
|
|
172
167
|
}
|
|
173
168
|
|
|
174
169
|
.ele-modal-resizable > .el-overlay-dialog > .el-dialog,
|
|
@@ -190,35 +185,36 @@
|
|
|
190
185
|
width: 100% !important;
|
|
191
186
|
height: 100% !important;
|
|
192
187
|
display: flex !important;
|
|
193
|
-
max-width:
|
|
194
|
-
min-width:
|
|
195
|
-
max-height:
|
|
196
|
-
min-height:
|
|
197
|
-
border:
|
|
198
|
-
border-radius: 0;
|
|
188
|
+
max-width: none !important;
|
|
189
|
+
min-width: auto !important;
|
|
190
|
+
max-height: none !important;
|
|
191
|
+
min-height: auto !important;
|
|
192
|
+
border-radius: 0 !important;
|
|
199
193
|
|
|
200
194
|
& > .el-dialog__header {
|
|
201
|
-
cursor: default
|
|
202
|
-
}
|
|
195
|
+
cursor: default;
|
|
203
196
|
|
|
204
|
-
|
|
205
|
-
|
|
197
|
+
& > .ele-modal-resize-icon {
|
|
198
|
+
display: none;
|
|
199
|
+
}
|
|
206
200
|
}
|
|
207
201
|
}
|
|
208
202
|
|
|
209
|
-
/*
|
|
210
|
-
|
|
203
|
+
/* 同时打开多个 */
|
|
204
|
+
.ele-modal-container {
|
|
211
205
|
position: absolute;
|
|
212
206
|
top: 0;
|
|
213
207
|
left: 0;
|
|
214
208
|
right: 0;
|
|
215
209
|
bottom: 0;
|
|
210
|
+
width: 100%;
|
|
211
|
+
height: 100%;
|
|
216
212
|
pointer-events: none;
|
|
217
213
|
z-index: elVar('index', 'popper');
|
|
218
214
|
}
|
|
219
215
|
|
|
220
216
|
.ele-modal-multiple {
|
|
221
|
-
pointer-events: none;
|
|
217
|
+
pointer-events: none !important;
|
|
222
218
|
position: absolute !important;
|
|
223
219
|
|
|
224
220
|
& > .el-overlay-dialog {
|
|
@@ -236,70 +232,13 @@
|
|
|
236
232
|
display: none !important;
|
|
237
233
|
}
|
|
238
234
|
|
|
239
|
-
/*
|
|
235
|
+
/* 最大宽度适应屏幕 */
|
|
240
236
|
.ele-modal-responsive > .el-overlay-dialog > .el-dialog {
|
|
241
|
-
max-width: calc(
|
|
237
|
+
max-width: calc(100% - #{eleVar('modal', 'mobile-space')} * 2);
|
|
242
238
|
}
|
|
243
239
|
|
|
244
|
-
/*
|
|
245
|
-
.ele-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
left: eleVar('sidebar', 'width', 0);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
&:not(.dialog-fade-leave-active):not(.dialog-fade-enter-active) {
|
|
252
|
-
transition: (width $ele-transition, left $ele-transition);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
&.ele-state-has-tab {
|
|
256
|
-
top: calc(#{eleVar('header', 'height')} + #{eleVar('tab', 'height')});
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&.ele-state-collapse {
|
|
260
|
-
left: eleVar('sidebar', 'collapse-width');
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
&.ele-state-mix-sidebar {
|
|
264
|
-
$box-width: eleVar('sidebox', 'width');
|
|
265
|
-
left: calc(#{$box-width} + #{eleVar('sidebar', 'mix-width')});
|
|
266
|
-
|
|
267
|
-
&.ele-state-collapse {
|
|
268
|
-
left: $box-width;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
&.ele-state-single-sidebar {
|
|
272
|
-
left: $box-width;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
&.ele-state-compact {
|
|
277
|
-
$collapse-width: eleVar('sidebar', 'collapse-width');
|
|
278
|
-
left: calc(#{$collapse-width} + #{eleVar('sidebar', 'mix-width')});
|
|
279
|
-
|
|
280
|
-
&.ele-state-single-sidebar {
|
|
281
|
-
left: $collapse-width;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
&.ele-state-collapse {
|
|
285
|
-
left: $collapse-width;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
&.ele-state-top-layout {
|
|
290
|
-
left: 0;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
&.ele-state-maximized {
|
|
294
|
-
top: eleVar('tab', 'height');
|
|
295
|
-
left: 0 !important;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
&.ele-state-expanded {
|
|
299
|
-
top: 0 !important;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
&.ele-state-mobile {
|
|
303
|
-
left: 0 !important;
|
|
304
|
-
}
|
|
240
|
+
/* 限制在主体区域 */
|
|
241
|
+
.ele-admin-modals > .ele-modal {
|
|
242
|
+
pointer-events: auto;
|
|
243
|
+
position: absolute !important;
|
|
305
244
|
}
|
package/lib/ele-modal/util.cjs
CHANGED
|
@@ -1,104 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const core = require("../utils/core");
|
|
4
|
-
const
|
|
5
|
-
const headerClass = "ele-modal-header";
|
|
4
|
+
const containerClass = "ele-modal-container";
|
|
6
5
|
const wrapperClass = "ele-modal";
|
|
7
|
-
const containerId = "ele-modal-container";
|
|
8
|
-
const movableClass = "ele-modal-movable";
|
|
9
|
-
const resizableClass = "ele-modal-resizable";
|
|
10
|
-
const multipleClass = "ele-modal-multiple";
|
|
11
|
-
const fullscreenClass = "ele-modal-fullscreen";
|
|
12
|
-
const innerClass = "ele-modal-inner";
|
|
13
|
-
const responsiveClass = "ele-modal-responsive";
|
|
14
6
|
const closedClass = "ele-modal-closed";
|
|
15
|
-
const hideClass = "ele-modal-hide";
|
|
16
|
-
const collapseClass = "ele-state-collapse";
|
|
17
|
-
const compactClass = "ele-state-compact";
|
|
18
|
-
const maximizedClass = "ele-state-maximized";
|
|
19
|
-
const hasTabClass = "ele-state-has-tab";
|
|
20
|
-
const mixSidebarClass = "ele-state-mix-sidebar";
|
|
21
|
-
const singleSidebarClass = "ele-state-single-sidebar";
|
|
22
|
-
const topLayoutClass = "ele-state-top-layout";
|
|
23
|
-
const expandedClass = "ele-state-expanded";
|
|
24
|
-
const mobileClass = "ele-state-mobile";
|
|
25
7
|
const fixTop = 0.65;
|
|
26
8
|
const fixLeft = 0.65;
|
|
27
|
-
function initModalStyle(modalEl
|
|
9
|
+
function initModalStyle(modalEl) {
|
|
28
10
|
modalEl.style.top = modalEl.offsetTop + "px";
|
|
29
11
|
modalEl.style.left = modalEl.offsetLeft + "px";
|
|
30
|
-
modalEl.style.bottom = "auto";
|
|
31
12
|
modalEl.style.right = "auto";
|
|
32
|
-
modalEl.style.
|
|
13
|
+
modalEl.style.bottom = "auto";
|
|
33
14
|
modalEl.style.position = "absolute";
|
|
34
|
-
modalEl.style.
|
|
35
|
-
modalEl.style.verticalAlign = "top";
|
|
36
|
-
}
|
|
37
|
-
function getModalContainer(multiple, appendTo) {
|
|
38
|
-
if (!multiple) {
|
|
39
|
-
return appendTo || "body";
|
|
40
|
-
}
|
|
41
|
-
const container = document.getElementById(containerId);
|
|
42
|
-
if (container) {
|
|
43
|
-
return container;
|
|
44
|
-
}
|
|
45
|
-
const elem = document.createElement("div");
|
|
46
|
-
elem.id = containerId;
|
|
47
|
-
document.body.appendChild(elem);
|
|
48
|
-
return elem;
|
|
49
|
-
}
|
|
50
|
-
function getVisibleModals() {
|
|
51
|
-
const el = getModalContainer(true);
|
|
52
|
-
const modals = el.querySelectorAll(`.${wrapperClass}:not(.${closedClass})`);
|
|
53
|
-
return modals ? Array.from(modals) : [];
|
|
54
|
-
}
|
|
55
|
-
function getModalMaxIndex(el) {
|
|
56
|
-
const modals = getVisibleModals();
|
|
57
|
-
let maxIndex = 0;
|
|
58
|
-
modals.forEach((modalEl) => {
|
|
59
|
-
const zIndex = core.getCurrentStyle(modalEl).zIndex;
|
|
60
|
-
if (zIndex != null) {
|
|
61
|
-
const index = Number(zIndex);
|
|
62
|
-
if (index >= maxIndex && (!el || modalEl !== el)) {
|
|
63
|
-
maxIndex = index + 1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
return maxIndex;
|
|
15
|
+
modalEl.style.margin = "0";
|
|
68
16
|
}
|
|
69
17
|
function canMoveOut(moveOut, direction) {
|
|
70
|
-
if (direction && moveOut != null &&
|
|
18
|
+
if (direction && moveOut != null && Array.isArray(moveOut)) {
|
|
71
19
|
return moveOut.includes(direction);
|
|
72
20
|
}
|
|
73
21
|
return false;
|
|
74
22
|
}
|
|
75
|
-
function
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
23
|
+
function getModalContainer(inner, multiple, appendTo, modalsEl) {
|
|
24
|
+
if (multiple) {
|
|
25
|
+
const parent = (inner ? modalsEl : void 0) || document.body;
|
|
26
|
+
const wrapper = parent.querySelector(`.${containerClass}`);
|
|
27
|
+
if (wrapper) {
|
|
28
|
+
return wrapper;
|
|
29
|
+
}
|
|
30
|
+
const elem = document.createElement("div");
|
|
31
|
+
elem.classList.add(containerClass);
|
|
32
|
+
parent.appendChild(elem);
|
|
33
|
+
return elem;
|
|
79
34
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return;
|
|
35
|
+
if (inner && modalsEl) {
|
|
36
|
+
return modalsEl;
|
|
83
37
|
}
|
|
38
|
+
return appendTo || "body";
|
|
39
|
+
}
|
|
40
|
+
function handleMove(modalEl, event, props) {
|
|
84
41
|
const wrapEl = modalEl.parentElement;
|
|
85
42
|
if (!wrapEl) {
|
|
86
43
|
return;
|
|
87
44
|
}
|
|
88
|
-
const headerEl = modalEl.querySelector("." + headerClass);
|
|
89
|
-
if (!headerEl) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const titleEl = headerEl.querySelector("." + titleClass);
|
|
93
|
-
if (!titleEl || event.target !== headerEl && event.target !== titleEl) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const modalClass = (_a = wrapEl.parentElement) == null ? void 0 : _a.classList;
|
|
97
|
-
if (modalClass && modalClass.contains(fullscreenClass)) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
45
|
modalEl.style.userSelect = "none";
|
|
101
|
-
initModalStyle(modalEl
|
|
46
|
+
initModalStyle(modalEl);
|
|
102
47
|
const downX = event.clientX;
|
|
103
48
|
const downY = event.clientY;
|
|
104
49
|
const downOL = modalEl.offsetLeft;
|
|
@@ -155,32 +100,13 @@ function handleMovable(event, props) {
|
|
|
155
100
|
document.addEventListener("mousemove", mousemoveFn);
|
|
156
101
|
document.addEventListener("mouseup", mouseupFn);
|
|
157
102
|
}
|
|
158
|
-
function
|
|
159
|
-
if (!props.resizable) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
const modalEl = event.currentTarget;
|
|
163
|
-
if (!modalEl) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
103
|
+
function handleResize(modalEl, event, props) {
|
|
166
104
|
const wrapEl = modalEl.parentElement;
|
|
167
105
|
if (!wrapEl) {
|
|
168
106
|
return;
|
|
169
107
|
}
|
|
170
|
-
const overlayEl = wrapEl.parentElement;
|
|
171
|
-
if (!overlayEl) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
if (overlayEl.classList.contains(fullscreenClass)) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
const limitX = modalEl.clientWidth + modalEl.offsetLeft - wrapEl.scrollLeft + overlayEl.offsetLeft;
|
|
178
|
-
const limitY = modalEl.clientHeight + modalEl.offsetTop - wrapEl.scrollTop + overlayEl.offsetTop;
|
|
179
|
-
if (event.clientX > limitX || limitX - event.clientX > 12 || event.clientY > limitY || limitY - event.clientY > 12) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
108
|
modalEl.style.userSelect = "none";
|
|
183
|
-
initModalStyle(modalEl
|
|
109
|
+
initModalStyle(modalEl);
|
|
184
110
|
const downX = event.clientX;
|
|
185
111
|
const downY = event.clientY;
|
|
186
112
|
const downW = modalEl.clientWidth;
|
|
@@ -211,34 +137,45 @@ function handleResizable(event, props) {
|
|
|
211
137
|
document.addEventListener("mousemove", mousemoveFn);
|
|
212
138
|
document.addEventListener("mouseup", mouseupFn);
|
|
213
139
|
}
|
|
214
|
-
function
|
|
140
|
+
function topModal(modalEl, zIndex) {
|
|
215
141
|
var _a;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
const overlayEl = (_a = modalEl.parentElement) == null ? void 0 : _a.parentElement;
|
|
220
|
-
if (!overlayEl || !overlayEl.classList || !overlayEl.classList.contains(multipleClass)) {
|
|
142
|
+
const overlayEl = (_a = modalEl == null ? void 0 : modalEl.parentElement) == null ? void 0 : _a.parentElement;
|
|
143
|
+
if (!overlayEl) {
|
|
221
144
|
return;
|
|
222
145
|
}
|
|
223
146
|
const currentIndex = core.getCurrentStyle(overlayEl).zIndex;
|
|
224
|
-
const
|
|
147
|
+
const containerEl = overlayEl.parentElement;
|
|
148
|
+
const modals = containerEl ? containerEl.querySelectorAll(`.${wrapperClass}:not(.${closedClass})`) : void 0;
|
|
149
|
+
let maxIndex = 0;
|
|
150
|
+
(modals ? Array.from(modals) : []).forEach((modalEl2) => {
|
|
151
|
+
const zIndex2 = core.getCurrentStyle(modalEl2).zIndex;
|
|
152
|
+
if (zIndex2 != null) {
|
|
153
|
+
const index = Number(zIndex2);
|
|
154
|
+
if (index >= maxIndex && (!overlayEl || modalEl2 !== overlayEl)) {
|
|
155
|
+
maxIndex = index + 1;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
225
159
|
if (maxIndex > Number(currentIndex || zIndex || 0)) {
|
|
226
160
|
overlayEl.style.zIndex = String(maxIndex);
|
|
227
161
|
}
|
|
228
162
|
}
|
|
229
|
-
function
|
|
163
|
+
function getPositionMargin(position) {
|
|
164
|
+
if (position == null || typeof position !== "object" || position.top == null && position.right == null && position.bottom == null && position.left == null) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
return [position.top, position.right, position.bottom, position.left].map((p) => typeof p === "number" ? `${p}px` : p || "auto").join(" ");
|
|
168
|
+
}
|
|
169
|
+
function resetModalStyle(modalEl, width, position) {
|
|
230
170
|
if (!modalEl) {
|
|
231
171
|
return;
|
|
232
172
|
}
|
|
173
|
+
modalEl.style.margin = getPositionMargin(position) || "";
|
|
174
|
+
modalEl.style.position = "";
|
|
233
175
|
modalEl.style.top = "";
|
|
234
176
|
modalEl.style.left = "";
|
|
235
177
|
modalEl.style.right = "";
|
|
236
178
|
modalEl.style.bottom = "";
|
|
237
|
-
modalEl.style.margin = "";
|
|
238
|
-
modalEl.style.marginTop = typeof top === "number" ? `${top}px` : top ?? "";
|
|
239
|
-
modalEl.style.display = "";
|
|
240
|
-
modalEl.style.position = "";
|
|
241
|
-
modalEl.style.verticalAlign = "";
|
|
242
179
|
modalEl.style.height = "";
|
|
243
180
|
modalEl.style.maxHeight = "";
|
|
244
181
|
modalEl.style.minHeight = "";
|
|
@@ -246,75 +183,12 @@ function resetModalStyle(modalEl, width, top) {
|
|
|
246
183
|
modalEl.style.maxWidth = "";
|
|
247
184
|
modalEl.style.minWidth = "";
|
|
248
185
|
}
|
|
249
|
-
function setModalPosition(modalEl, resizable, position, moveOut) {
|
|
250
|
-
if (!position || typeof position !== "object" || !modalEl) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
const wrapEl = modalEl.parentElement;
|
|
254
|
-
if (!wrapEl) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
initModalStyle(modalEl, resizable);
|
|
258
|
-
const location = {};
|
|
259
|
-
const canOutB = canMoveOut(moveOut, "bottom");
|
|
260
|
-
const canOutR = canMoveOut(moveOut, "right");
|
|
261
|
-
const t = wrapEl.clientHeight - modalEl.clientHeight - (canOutB ? 0 : fixTop);
|
|
262
|
-
const maxTop = t < 0 ? 0 : t;
|
|
263
|
-
const l = wrapEl.clientWidth - modalEl.clientWidth - (canOutR ? 0 : fixLeft);
|
|
264
|
-
const maxLeft = l < 0 ? 0 : l;
|
|
265
|
-
if (position.top != null) {
|
|
266
|
-
location.top = position.top;
|
|
267
|
-
} else if (position.bottom != null) {
|
|
268
|
-
location.bottom = position.bottom;
|
|
269
|
-
} else if (position.left != null || position.right != null) {
|
|
270
|
-
location.top = maxTop / 2;
|
|
271
|
-
}
|
|
272
|
-
if (position.left != null) {
|
|
273
|
-
location.left = position.left;
|
|
274
|
-
} else if (position.right != null) {
|
|
275
|
-
location.right = position.right;
|
|
276
|
-
} else if (position.top != null || position.bottom != null) {
|
|
277
|
-
location.left = maxLeft / 2;
|
|
278
|
-
}
|
|
279
|
-
Object.keys(location).forEach((key) => {
|
|
280
|
-
const value = location[key];
|
|
281
|
-
if (typeof value === "number") {
|
|
282
|
-
modalEl.style[key] = `${Math.floor(value)}px`;
|
|
283
|
-
} else if (value != null) {
|
|
284
|
-
modalEl.style[key] = value;
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
function setInitPosition(modalEl, resizable, position, moveOut, force) {
|
|
289
|
-
const attr = "ele-position";
|
|
290
|
-
if (modalEl && position && (force || !modalEl.getAttribute(attr))) {
|
|
291
|
-
modalEl.setAttribute(attr, "1");
|
|
292
|
-
setModalPosition(modalEl, resizable, position, moveOut);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
186
|
exports.closedClass = closedClass;
|
|
296
|
-
exports.
|
|
297
|
-
exports.compactClass = compactClass;
|
|
298
|
-
exports.containerId = containerId;
|
|
299
|
-
exports.expandedClass = expandedClass;
|
|
300
|
-
exports.fullscreenClass = fullscreenClass;
|
|
187
|
+
exports.containerClass = containerClass;
|
|
301
188
|
exports.getModalContainer = getModalContainer;
|
|
302
|
-
exports.
|
|
303
|
-
exports.
|
|
304
|
-
exports.
|
|
305
|
-
exports.hideClass = hideClass;
|
|
306
|
-
exports.innerClass = innerClass;
|
|
307
|
-
exports.maximizedClass = maximizedClass;
|
|
308
|
-
exports.mixSidebarClass = mixSidebarClass;
|
|
309
|
-
exports.mobileClass = mobileClass;
|
|
310
|
-
exports.movableClass = movableClass;
|
|
311
|
-
exports.multipleClass = multipleClass;
|
|
189
|
+
exports.getPositionMargin = getPositionMargin;
|
|
190
|
+
exports.handleMove = handleMove;
|
|
191
|
+
exports.handleResize = handleResize;
|
|
312
192
|
exports.resetModalStyle = resetModalStyle;
|
|
313
|
-
exports.
|
|
314
|
-
exports.responsiveClass = responsiveClass;
|
|
315
|
-
exports.setInitPosition = setInitPosition;
|
|
316
|
-
exports.setModalPosition = setModalPosition;
|
|
317
|
-
exports.setModalTop = setModalTop;
|
|
318
|
-
exports.singleSidebarClass = singleSidebarClass;
|
|
319
|
-
exports.topLayoutClass = topLayoutClass;
|
|
193
|
+
exports.topModal = topModal;
|
|
320
194
|
exports.wrapperClass = wrapperClass;
|