ele-admin-plus 1.2.0-beta.3 → 1.2.0-beta.5

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.
Files changed (37) hide show
  1. package/es/ele-admin-layout/index.d.ts +14 -1
  2. package/es/ele-admin-layout/index.js +41 -26
  3. package/es/ele-admin-layout/props.d.ts +9 -0
  4. package/es/ele-admin-layout/props.js +9 -0
  5. package/es/ele-admin-layout/style/index.scss +9 -3
  6. package/es/ele-app/style/message/index.scss +37 -22
  7. package/es/ele-app/style/overwrite/index.js +0 -1
  8. package/es/ele-app/style/overwrite/tree/css-var.scss +8 -8
  9. package/es/ele-backtop/index.d.ts +3 -2
  10. package/es/ele-backtop/index.js +2 -1
  11. package/es/ele-backtop/style/index.js +1 -0
  12. package/es/ele-config-provider/components/receiver-view.js +1 -1
  13. package/es/ele-pro-layout/index.js +3 -8
  14. package/es/ele-virtual-table/types.d.ts +1 -1
  15. package/es/ele-virtual-table/util.d.ts +3 -3
  16. package/es/style/themes/dark.scss +2 -1
  17. package/es/style/themes/default.scss +4 -2
  18. package/es/style/themes/rounded.scss +1 -1
  19. package/lib/ele-admin-layout/index.cjs +40 -25
  20. package/lib/ele-admin-layout/index.d.ts +14 -1
  21. package/lib/ele-admin-layout/props.cjs +9 -0
  22. package/lib/ele-admin-layout/props.d.ts +9 -0
  23. package/lib/ele-admin-layout/style/index.scss +9 -3
  24. package/lib/ele-app/style/message/index.scss +37 -22
  25. package/lib/ele-app/style/overwrite/index.cjs +0 -1
  26. package/lib/ele-app/style/overwrite/tree/css-var.scss +8 -8
  27. package/lib/ele-backtop/index.cjs +2 -1
  28. package/lib/ele-backtop/index.d.ts +3 -2
  29. package/lib/ele-backtop/style/index.cjs +1 -0
  30. package/lib/ele-config-provider/components/receiver-view.cjs +1 -1
  31. package/lib/ele-pro-layout/index.cjs +3 -8
  32. package/lib/ele-virtual-table/types.d.ts +1 -1
  33. package/lib/ele-virtual-table/util.d.ts +3 -3
  34. package/lib/style/themes/dark.scss +2 -1
  35. package/lib/style/themes/default.scss +4 -2
  36. package/lib/style/themes/rounded.scss +1 -1
  37. package/package.json +5 -5
@@ -70,6 +70,12 @@ declare const _default: import('vue').DefineComponent<{
70
70
  sideboxCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
71
71
  tabsCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
72
72
  contentCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
73
+ logoSrc: StringConstructor;
74
+ logoTitle: StringConstructor;
75
+ menuScrollToActive: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
73
79
  mobile: BooleanConstructor;
74
80
  }, {
75
81
  ownSlots: string[];
@@ -144,7 +150,7 @@ declare const _default: import('vue').DefineComponent<{
144
150
  sideMenuItemClick: (_item: MenuItem, _e: MouseEvent) => boolean;
145
151
  sideMouseenter: (_e: MouseEvent) => boolean;
146
152
  sideMouseleave: (_e: MouseEvent) => boolean;
147
- tabClick: (_option: TabEventOption) => boolean;
153
+ tabClick: (_option: TabEventOption) => boolean; /** 是否是移动端风格折叠状态 */
148
154
  tabRemove: (_name: string) => boolean;
149
155
  tabContextMenu: (_option: TabEventOption) => boolean;
150
156
  tabSortChange: (_data: TabPaneItem[]) => boolean;
@@ -217,6 +223,12 @@ declare const _default: import('vue').DefineComponent<{
217
223
  sideboxCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
218
224
  tabsCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
219
225
  contentCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
226
+ logoSrc: StringConstructor;
227
+ logoTitle: StringConstructor;
228
+ menuScrollToActive: {
229
+ type: BooleanConstructor;
230
+ default: boolean;
231
+ };
220
232
  mobile: BooleanConstructor;
221
233
  }>> & {
222
234
  onTabClick?: ((_option: TabEventOption) => any) | undefined;
@@ -260,6 +272,7 @@ declare const _default: import('vue').DefineComponent<{
260
272
  sidebarIconSlot: string;
261
273
  sideboxTitleSlot: string;
262
274
  sideboxIconSlot: string;
275
+ menuScrollToActive: boolean;
263
276
  mobile: boolean;
264
277
  }, {}>;
265
278
  export default _default;
@@ -1,4 +1,4 @@
1
- import { defineComponent, shallowRef, computed, shallowReactive, provide, watch, nextTick, onMounted, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createCommentVNode, mergeProps, createSlots, normalizeProps, guardReactiveProps, renderList, createVNode, Fragment, createElementVNode } from "vue";
1
+ import { defineComponent, shallowRef, computed, shallowReactive, provide, watch, nextTick, onMounted, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createElementVNode, createCommentVNode, toDisplayString, mergeProps, createSlots, normalizeProps, guardReactiveProps, renderList, createVNode, Fragment } from "vue";
2
2
  import { ElScrollbar } from "element-plus";
3
3
  import { useTimer } from "../utils/hook";
4
4
  import EleMenus from "../ele-menus/index";
@@ -103,7 +103,7 @@ const _sfc_main = defineComponent({
103
103
  };
104
104
  const sidebarScrollToActive = () => {
105
105
  stopSidebarMenuTimer();
106
- if (sidebarMenuRef.value == null || isCollapseMobile.value || isMixSidebar.value && isCollapseSidebar.value) {
106
+ if (!props.menuScrollToActive || sidebarMenuRef.value == null || isCollapseMobile.value || isMixSidebar.value && isCollapseSidebar.value) {
107
107
  return;
108
108
  }
109
109
  startSidebarMenuTimer(() => {
@@ -112,7 +112,7 @@ const _sfc_main = defineComponent({
112
112
  };
113
113
  const sideboxScrollToActive = () => {
114
114
  stopSideboxMenuTimer();
115
- if (sideboxMenuRef.value == null || isCollapseMobile.value) {
115
+ if (!props.menuScrollToActive || sideboxMenuRef.value == null || isCollapseMobile.value) {
116
116
  return;
117
117
  }
118
118
  startSideboxMenuTimer(() => {
@@ -326,35 +326,38 @@ const _hoisted_1 = {
326
326
  key: 0,
327
327
  class: "ele-admin-logo"
328
328
  };
329
- const _hoisted_2 = {
329
+ const _hoisted_2 = ["src"];
330
+ const _hoisted_3 = {
330
331
  key: 1,
331
332
  class: "ele-admin-tools"
332
333
  };
333
- const _hoisted_3 = {
334
+ const _hoisted_4 = {
334
335
  key: 2,
335
336
  class: "ele-admin-breadcrumb"
336
337
  };
337
- const _hoisted_4 = {
338
+ const _hoisted_5 = {
338
339
  key: 3,
339
340
  class: "ele-admin-menus"
340
341
  };
341
- const _hoisted_5 = {
342
+ const _hoisted_6 = {
342
343
  key: 5,
343
344
  class: "ele-admin-tools"
344
345
  };
345
- const _hoisted_6 = {
346
+ const _hoisted_7 = {
346
347
  key: 0,
347
348
  class: "ele-admin-logo"
348
349
  };
349
- const _hoisted_7 = {
350
+ const _hoisted_8 = ["src"];
351
+ const _hoisted_9 = {
350
352
  key: 0,
351
353
  class: "ele-admin-logo-title"
352
354
  };
353
- const _hoisted_8 = {
355
+ const _hoisted_10 = {
354
356
  key: 1,
355
357
  class: "ele-admin-logo"
356
358
  };
357
- const _hoisted_9 = {
359
+ const _hoisted_11 = ["src"];
360
+ const _hoisted_12 = {
358
361
  ref: "modalsRef",
359
362
  class: "ele-admin-modals"
360
363
  };
@@ -395,20 +398,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
395
398
  onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.handleHeadMouseenter && _ctx.handleHeadMouseenter(...args)),
396
399
  onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleHeadMouseleave && _ctx.handleHeadMouseleave(...args))
397
400
  }, [
398
- _ctx.isHeaderLogo && (_ctx.$slots.logo || _ctx.$slots.logoTitle) ? (openBlock(), createElementBlock("div", _hoisted_1, [
399
- renderSlot(_ctx.$slots, "logo"),
400
- renderSlot(_ctx.$slots, "logoTitle")
401
+ _ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (openBlock(), createElementBlock("div", _hoisted_1, [
402
+ _ctx.logoSrc || _ctx.$slots.logo ? renderSlot(_ctx.$slots, "logo", { key: 0 }, () => [
403
+ createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_2)
404
+ ]) : createCommentVNode("", true),
405
+ _ctx.logoTitle || _ctx.$slots.logoTitle ? renderSlot(_ctx.$slots, "logoTitle", { key: 1 }, () => [
406
+ createElementVNode("h1", null, toDisplayString(_ctx.logoTitle), 1)
407
+ ]) : createCommentVNode("", true)
401
408
  ])) : createCommentVNode("", true),
402
- _ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_2, [
409
+ _ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_3, [
403
410
  renderSlot(_ctx.$slots, "left")
404
411
  ])) : createCommentVNode("", true),
405
- _ctx.breadcrumb ? (openBlock(), createElementBlock("div", _hoisted_3, [
412
+ _ctx.breadcrumb ? (openBlock(), createElementBlock("div", _hoisted_4, [
406
413
  renderSlot(_ctx.$slots, "breadcrumb", {}, () => [
407
414
  _ctx.levels && _ctx.levels.length ? (openBlock(), createBlock(_component_EleBreadcrumb, mergeProps({ key: 0 }, _ctx.breadcrumb === true ? {} : _ctx.breadcrumb, { items: _ctx.levels }), null, 16, ["items"])) : createCommentVNode("", true)
408
415
  ])
409
416
  ])) : createCommentVNode("", true),
410
417
  renderSlot(_ctx.$slots, "center"),
411
- !_ctx.showHeaderTabs || _ctx.showHeaderMenus ? (openBlock(), createElementBlock("div", _hoisted_4, [
418
+ !_ctx.showHeaderTabs || _ctx.showHeaderMenus ? (openBlock(), createElementBlock("div", _hoisted_5, [
412
419
  _ctx.showHeaderMenus && _ctx.headerMenus ? (openBlock(), createBlock(_component_EleMenus, mergeProps({
413
420
  key: 0,
414
421
  mode: "horizontal",
@@ -468,7 +475,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
468
475
  };
469
476
  })
470
477
  ]), 1032, ["tabs", "active", "fixedHome", "homePath", "isHome", "tabStyle", "tabContextMenu", "tabContextMenus", "tabSortable", "class", "style", "onTabClick", "onTabRemove", "onTabContextMenu", "onTabSortChange"])) : createCommentVNode("", true),
471
- _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_5, [
478
+ _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_6, [
472
479
  renderSlot(_ctx.$slots, "right")
473
480
  ])) : createCommentVNode("", true)
474
481
  ], 38)) : createCommentVNode("", true)
@@ -500,8 +507,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
500
507
  onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.handleBoxMouseEnter && _ctx.handleBoxMouseEnter(...args)),
501
508
  onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.handleBoxMouseLeave && _ctx.handleBoxMouseLeave(...args))
502
509
  }, [
503
- !_ctx.isHeaderLogo && _ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_6, [
504
- renderSlot(_ctx.$slots, "logo")
510
+ !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.$slots.logo) ? (openBlock(), createElementBlock("div", _hoisted_7, [
511
+ renderSlot(_ctx.$slots, "logo", {}, () => [
512
+ createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_8)
513
+ ])
505
514
  ])) : createCommentVNode("", true),
506
515
  renderSlot(_ctx.$slots, "boxTop"),
507
516
  createVNode(_component_ElScrollbar, { class: "ele-admin-menus" }, {
@@ -555,12 +564,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
555
564
  onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.handleSideMouseLeave && _ctx.handleSideMouseLeave(...args))
556
565
  }, [
557
566
  _ctx.isMixSidebar ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
558
- !_ctx.isHeaderLogo && _ctx.$slots.logoTitle ? (openBlock(), createElementBlock("div", _hoisted_7, [
559
- renderSlot(_ctx.$slots, "logoTitle")
567
+ !_ctx.isHeaderLogo && (_ctx.logoTitle || _ctx.$slots.logoTitle) ? (openBlock(), createElementBlock("div", _hoisted_9, [
568
+ renderSlot(_ctx.$slots, "logoTitle", {}, () => [
569
+ createElementVNode("h1", null, toDisplayString(_ctx.logoTitle), 1)
570
+ ])
560
571
  ])) : createCommentVNode("", true)
561
- ], 64)) : !_ctx.isHeaderLogo && (_ctx.$slots.logo || _ctx.$slots.logoTitle) ? (openBlock(), createElementBlock("div", _hoisted_8, [
562
- renderSlot(_ctx.$slots, "logo"),
563
- renderSlot(_ctx.$slots, "logoTitle")
572
+ ], 64)) : !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (openBlock(), createElementBlock("div", _hoisted_10, [
573
+ _ctx.logoSrc || _ctx.$slots.logo ? renderSlot(_ctx.$slots, "logo", { key: 0 }, () => [
574
+ createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_11)
575
+ ]) : createCommentVNode("", true),
576
+ _ctx.logoTitle || _ctx.$slots.logoTitle ? renderSlot(_ctx.$slots, "logoTitle", { key: 1 }, () => [
577
+ createElementVNode("h1", null, toDisplayString(_ctx.logoTitle), 1)
578
+ ]) : createCommentVNode("", true)
564
579
  ])) : createCommentVNode("", true),
565
580
  renderSlot(_ctx.$slots, "top"),
566
581
  createVNode(_component_ElScrollbar, { class: "ele-admin-menus" }, {
@@ -650,7 +665,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
650
665
  target: _ctx.fixedBody && _ctx.contentRef ? _ctx.contentRef : void 0,
651
666
  style: _ctx.fixedBody ? { position: "absolute" } : void 0
652
667
  }, _ctx.backTop === true ? {} : _ctx.backTop), null, 16, ["target", "style"])) : createCommentVNode("", true),
653
- createElementVNode("div", _hoisted_9, null, 512)
668
+ createElementVNode("div", _hoisted_12, null, 512)
654
669
  ]),
655
670
  default: withCtx(() => [
656
671
  createElementVNode("div", {
@@ -120,6 +120,15 @@ export declare const adminLayoutProps: {
120
120
  tabsCustomStyle: PropType<Partial<import('vue').CSSProperties>>;
121
121
  /** 内容区样式 */
122
122
  contentCustomStyle: PropType<Partial<import('vue').CSSProperties>>;
123
+ /** logo图片地址 */
124
+ logoSrc: StringConstructor;
125
+ /** logo文字 */
126
+ logoTitle: StringConstructor;
127
+ /** 菜单是否自动滚动到选中位置 */
128
+ menuScrollToActive: {
129
+ type: BooleanConstructor;
130
+ default: boolean;
131
+ };
123
132
  /** 是否是移动端风格 */
124
133
  mobile: BooleanConstructor;
125
134
  };
@@ -110,6 +110,15 @@ const adminLayoutProps = {
110
110
  tabsCustomStyle: Object,
111
111
  /** 内容区样式 */
112
112
  contentCustomStyle: Object,
113
+ /** logo图片地址 */
114
+ logoSrc: String,
115
+ /** logo文字 */
116
+ logoTitle: String,
117
+ /** 菜单是否自动滚动到选中位置 */
118
+ menuScrollToActive: {
119
+ type: Boolean,
120
+ default: true
121
+ },
113
122
  /** 是否是移动端风格 */
114
123
  mobile: Boolean
115
124
  };
@@ -140,6 +140,7 @@
140
140
  /* 移动端风格 */
141
141
  &.is-mobile > .ele-admin-side {
142
142
  width: 0;
143
+ z-index: calc(#{eleVar('layout', 'mask-index')} + 1);
143
144
  }
144
145
 
145
146
  &.is-collapse > .ele-admin-side {
@@ -206,8 +207,13 @@
206
207
  }
207
208
  }
208
209
 
209
- .ele-admin-logo > img + h1 {
210
- margin-left: 8px;
210
+ .ele-admin-logo > img {
211
+ width: 30px;
212
+ height: 30px;
213
+
214
+ & + h1 {
215
+ margin-left: 8px;
216
+ }
211
217
  }
212
218
 
213
219
  .ele-admin-sidebar.is-collapse > .ele-admin-logo > img + h1 {
@@ -296,7 +302,7 @@
296
302
  bottom: 0;
297
303
  width: 100%;
298
304
  height: 100%;
299
- z-index: calc(#{eleVar('layout', 'index')} + 2);
305
+ z-index: eleVar('layout', 'mask-index');
300
306
  background: elVar('overlay-color', 'lighter');
301
307
  transition: all $transition-base;
302
308
  }
@@ -15,7 +15,7 @@
15
15
  align-items: flex-start;
16
16
  margin: 0 auto eleVar('message', 'space') auto;
17
17
  transition: margin-bottom 0.2s;
18
- position: relative !important;
18
+ position: static !important;
19
19
  left: auto !important;
20
20
  top: auto !important;
21
21
  transform: none;
@@ -25,16 +25,31 @@
25
25
  display: none;
26
26
  }
27
27
 
28
- & > .el-message__icon,
28
+ /* 徽章 */
29
29
  & > .el-message__badge {
30
- z-index: calc(#{elVar('index', 'popper')} + 2);
30
+ position: relative;
31
+ top: auto;
32
+ right: auto;
33
+ width: 0;
34
+ height: 0;
35
+ overflow: visible;
36
+ order: 2;
37
+ z-index: calc(#{eleVar('message', 'index')} + 2);
31
38
  transition: (
32
39
  margin-top 0.4s,
33
40
  transform elVar('transition-duration'),
34
41
  opacity elVar('transition-duration')
35
42
  );
43
+
44
+ & > .el-badge__content {
45
+ position: absolute;
46
+ top: 8px;
47
+ right: -8px;
48
+ transform: translateY(-100%);
49
+ }
36
50
  }
37
51
 
52
+ /* 主体 */
38
53
  & > .el-message__icon {
39
54
  width: auto;
40
55
  height: auto;
@@ -50,7 +65,12 @@
50
65
  border-radius: eleVar('message', 'radius');
51
66
  background: elVar('color-primary', 'light-9');
52
67
  border: 0 solid elVar('color-primary', 'light-8');
53
- z-index: calc(#{elVar('index', 'popper')} + 1);
68
+ z-index: calc(#{eleVar('message', 'index')} + 1);
69
+ transition: (
70
+ margin-top 0.4s,
71
+ transform elVar('transition-duration'),
72
+ opacity elVar('transition-duration')
73
+ );
54
74
  box-sizing: border-box;
55
75
  position: relative;
56
76
  }
@@ -60,6 +80,7 @@
60
80
  margin-top: 0 !important;
61
81
  }
62
82
 
83
+ /* 图标 */
63
84
  .ele-message-icon {
64
85
  flex-shrink: 0;
65
86
  display: flex;
@@ -70,6 +91,7 @@
70
91
  margin: eleVar('message', 'icon-margin');
71
92
  }
72
93
 
94
+ /* 关闭按钮 */
73
95
  .ele-message-close {
74
96
  flex-shrink: 0;
75
97
  display: flex;
@@ -119,7 +141,8 @@
119
141
  }
120
142
  }
121
143
 
122
- .ele-message.el-message--info > .el-message__badge > .el-badge__content {
144
+ .ele-message.el-message--info > .el-message__badge > .el-badge__content,
145
+ .ele-message.is-loading > .el-message__badge > .el-badge__content {
123
146
  background: elVar('color-primary');
124
147
  }
125
148
 
@@ -162,23 +185,15 @@
162
185
  }
163
186
 
164
187
  /* 加载框 */
165
- .ele-message.is-loading {
166
- position: static !important;
167
-
168
- &::before {
169
- content: '';
170
- position: absolute;
171
- top: 0;
172
- left: 0;
173
- right: 0;
174
- bottom: 0;
175
- transition: opacity elVar('transition-duration');
176
- z-index: elVar('index', 'popper');
177
- }
178
-
179
- & > .el-message__badge {
180
- display: none;
181
- }
188
+ .ele-message.is-loading::before {
189
+ content: '';
190
+ position: absolute;
191
+ top: 0;
192
+ left: 0;
193
+ right: 0;
194
+ bottom: 0;
195
+ transition: opacity elVar('transition-duration');
196
+ z-index: eleVar('message', 'index');
182
197
  }
183
198
 
184
199
  /* 遮罩 */
@@ -12,7 +12,6 @@ import "./notification/index";
12
12
  import "./popper/index";
13
13
  import "./radio/index";
14
14
  import "./select/index";
15
- import "./table-filter/index";
16
15
  import "./tag/index";
17
16
  import "./tree/index";
18
17
  import "./tree-select/index";
@@ -1,8 +1,8 @@
1
- @use '../../../../style/util.scss' as *;
2
-
3
- /* ElTree 主题变量 */
4
- @mixin set-el-tree-var($var) {
5
- .el-tree {
6
- @include set-ele-var('tree', $var);
7
- }
8
- }
1
+ @use '../../../../style/util.scss' as *;
2
+
3
+ /* ElTree 主题变量 */
4
+ @mixin set-el-tree-var($var) {
5
+ .el-tree {
6
+ @include set-ele-var('tree', $var);
7
+ }
8
+ }
@@ -14,12 +14,13 @@ declare const _default: import('vue').DefineComponent<{
14
14
  };
15
15
  transitionName: {
16
16
  type: StringConstructor;
17
- default: string; /** 目标元素 */
17
+ default: string;
18
18
  };
19
19
  }, {
20
20
  visible: import('vue').Ref<boolean>;
21
21
  handleClick: (e: MouseEvent) => void;
22
22
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ /** 更新目标元素 */
23
24
  click: (_e: MouseEvent) => boolean;
24
25
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
25
26
  target: import('vue').PropType<string | HTMLElement>;
@@ -37,7 +38,7 @@ declare const _default: import('vue').DefineComponent<{
37
38
  };
38
39
  transitionName: {
39
40
  type: StringConstructor;
40
- default: string; /** 目标元素 */
41
+ default: string;
41
42
  };
42
43
  }>> & {
43
44
  onClick?: ((_e: MouseEvent) => any) | undefined;
@@ -1,10 +1,11 @@
1
1
  import { defineComponent, ref, shallowRef, watch, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, Transition, withCtx, createElementBlock, normalizeStyle, renderSlot, createVNode, createCommentVNode } from "vue";
2
+ import { ElIcon } from "element-plus";
2
3
  import { ArrowUp } from "../icons";
3
4
  import { throttle } from "../utils/core";
4
5
  import { backtopProps, backtopEmits } from "./props";
5
6
  const _sfc_main = defineComponent({
6
7
  name: "EleBacktop",
7
- components: { ArrowUp },
8
+ components: { ElIcon, ArrowUp },
8
9
  props: backtopProps,
9
10
  emits: backtopEmits,
10
11
  setup(props, { emit }) {
@@ -1 +1,2 @@
1
+ import "element-plus/es/components/icon/style/index";
1
2
  import "./index.scss";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as j, ref as N, computed as R, watch as T, resolveComponent as x, openBlock as y, createBlock as V, normalizeStyle as W, withCtx as Y, renderSlot as z } from "vue";
2
2
  import I from "../../ele-watermark/index";
3
3
  import { useReceiver as K } from "../receiver";
4
- const O = "1.1";
4
+ const O = "1.2";
5
5
  function J(t) {
6
6
  const r = (v, D, a) => {
7
7
  const s = ((l, S) => {
@@ -504,9 +504,6 @@ const _sfc_main = defineComponent({
504
504
  }
505
505
  emit("tabSortChange", result);
506
506
  };
507
- const handleTabAdd = (data) => {
508
- emit("tabAdd", data);
509
- };
510
507
  const getContentElem = () => {
511
508
  if (!layoutRef.value) {
512
509
  return null;
@@ -543,7 +540,7 @@ const _sfc_main = defineComponent({
543
540
  const t = getRouteTab(route, tabData.value, homeMenuPath.value, title);
544
541
  isHome.value = t.home;
545
542
  tabActive.value = t.key;
546
- handleTabAdd(t);
543
+ emit("tabAdd", t);
547
544
  if (!navigationIsChanged && !sideNavigationIsChanged) {
548
545
  updateMenuActive(active, matched);
549
546
  if (navigation.value === "mix" || sideNavigation.value === "mix" || sideNavigation.value === "box") {
@@ -645,10 +642,8 @@ const _sfc_main = defineComponent({
645
642
  return;
646
643
  }
647
644
  tabData.value = props.tabs.map((item) => {
648
- var _a;
649
645
  const m = findMenuByPath(item.path, menuData.value);
650
- const title = ((_a = m == null ? void 0 : m.meta) == null ? void 0 : _a.title) || routeI18n(item.path) || item.title;
651
- return { ...item, title };
646
+ return { ...item, title: routeI18n(item.path, m) || item.title };
652
647
  });
653
648
  };
654
649
  const updateLevelData = () => {
@@ -656,7 +651,7 @@ const _sfc_main = defineComponent({
656
651
  var _a;
657
652
  const t = findTabByPath(item.path, tabData.value);
658
653
  const m = findMenuByPath(item.path, menuData.value);
659
- const title = (t == null ? void 0 : t.title) || ((_a = m == null ? void 0 : m.meta) == null ? void 0 : _a.title) || routeI18n(item.path);
654
+ const title = (t == null ? void 0 : t.title) || ((_a = m == null ? void 0 : m.meta) == null ? void 0 : _a.title) || routeI18n(item.path, m);
660
655
  return { ...item, title: title || item.title };
661
656
  });
662
657
  };
@@ -167,7 +167,7 @@ export interface SumCol extends ColSize {
167
167
  /** 唯一值 */
168
168
  key: string;
169
169
  /** 显示文本 */
170
- text?: string;
170
+ text?: string | VNode;
171
171
  /** 对齐方式 */
172
172
  align?: string;
173
173
  /** 固定列 */
@@ -1,4 +1,4 @@
1
- import { SetupContext } from 'vue';
1
+ import { SetupContext, VNode } from 'vue';
2
2
  import { TableV2SortOrder } from 'element-plus';
3
3
  import { DataKey, DataItem, Column, Columns, Sorter, Filter, FilterValue, OrderValue, TableSize, RowKey, RowSelectable, TreeProps, ShowOverflowTooltip, SpanMethod, ColumnIndex, SummaryMethod } from '../ele-data-table/types';
4
4
  import { VirtualColumn, VirtualColumns, BodyColumns, HeaderColumn, HeaderRows, ColSize, CustomRenderProps, SortBy, TreeTableProps, CellSpan, CellParams, VirtualRow } from './types';
@@ -125,7 +125,7 @@ export declare function isAutoRowHeight(hasExpandCol: boolean, bodyCols: BodyCol
125
125
  * @param props 属性
126
126
  * @param ctx SetupContext
127
127
  */
128
- export declare function CellRender(props: CustomRenderProps, ctx: SetupContext): (string | number | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
128
+ export declare function CellRender(props: CustomRenderProps, ctx: SetupContext): (string | number | VNode<import('vue').RendererNode, import('vue').RendererElement, {
129
129
  [key: string]: any;
130
130
  }>)[] | undefined;
131
131
  /**
@@ -192,7 +192,7 @@ export declare function getCellSpan(params: CellParams, spanMethod?: SpanMethod)
192
192
  * @param bodyCols 表格主体列配置
193
193
  * @param data 表格数据
194
194
  */
195
- export declare function getUserSums(summaryMethod?: SummaryMethod, bodyCols?: BodyColumns, data?: DataItem[]): string[] | undefined;
195
+ export declare function getUserSums(summaryMethod?: SummaryMethod, bodyCols?: BodyColumns, data?: DataItem[]): (string | VNode)[] | undefined;
196
196
  /**
197
197
  * 计算列合计值
198
198
  * @param data 表格数据
@@ -14,7 +14,8 @@ $ele-dark: map.deep-merge(
14
14
  'tool-hover-bg': rgba(255, 255, 255, 0.05),
15
15
  'dark-tool-hover-bg': rgba(255, 255, 255, 0.05),
16
16
  'dark-bg': #1f1f1f,
17
- 'dark-shadow': 0 1px 4px rgba(0, 0, 0, 0.6)
17
+ 'dark-shadow': 0 1px 4px rgba(0, 0, 0, 0.6),
18
+ 'ghost-bg': hsla(0, 0%, 32%, 0.4)
18
19
  ),
19
20
  'logo': (
20
21
  'shadow': 0 3px 4px rgba(0, 0, 0, 0.6),
@@ -37,7 +37,8 @@ $ele: map.deep-merge(
37
37
  'layout': (
38
38
  // 布局
39
39
  'bg': elVar('bg-color', 'page'),
40
- 'index': 99
40
+ 'index': 99,
41
+ 'mask-index': calc(#{elVar('index', 'popper')} + 2000)
41
42
  ),
42
43
  'header': (
43
44
  // 顶栏
@@ -152,7 +153,8 @@ $ele: map.deep-merge(
152
153
  'close-hover-bg': transparent,
153
154
  'plain-bg': elVar('bg-color', 'overlay'),
154
155
  'alert-padding': 10px 14px,
155
- 'mask-color': elVar('overlay-color', 'lighter')
156
+ 'mask-color': elVar('overlay-color', 'lighter'),
157
+ 'index': calc(#{elVar('index', 'popper')} + 2002)
156
158
  ),
157
159
  'bottom-bar': (
158
160
  // 底部工具栏
@@ -54,7 +54,7 @@ $ele-rounded: map.deep-merge(
54
54
  'menu-active-line': 0
55
55
  ),
56
56
  'map': (
57
- 'search-padding': 0 12px 6px 12px
57
+ 'search-padding': 2px 12px 6px 12px
58
58
  ),
59
59
  'menu': (
60
60
  'arrow-margin': 0 -8px 0 6px,
@@ -104,7 +104,7 @@ const _sfc_main = vue.defineComponent({
104
104
  };
105
105
  const sidebarScrollToActive = () => {
106
106
  stopSidebarMenuTimer();
107
- if (sidebarMenuRef.value == null || isCollapseMobile.value || isMixSidebar.value && isCollapseSidebar.value) {
107
+ if (!props$1.menuScrollToActive || sidebarMenuRef.value == null || isCollapseMobile.value || isMixSidebar.value && isCollapseSidebar.value) {
108
108
  return;
109
109
  }
110
110
  startSidebarMenuTimer(() => {
@@ -113,7 +113,7 @@ const _sfc_main = vue.defineComponent({
113
113
  };
114
114
  const sideboxScrollToActive = () => {
115
115
  stopSideboxMenuTimer();
116
- if (sideboxMenuRef.value == null || isCollapseMobile.value) {
116
+ if (!props$1.menuScrollToActive || sideboxMenuRef.value == null || isCollapseMobile.value) {
117
117
  return;
118
118
  }
119
119
  startSideboxMenuTimer(() => {
@@ -327,35 +327,38 @@ const _hoisted_1 = {
327
327
  key: 0,
328
328
  class: "ele-admin-logo"
329
329
  };
330
- const _hoisted_2 = {
330
+ const _hoisted_2 = ["src"];
331
+ const _hoisted_3 = {
331
332
  key: 1,
332
333
  class: "ele-admin-tools"
333
334
  };
334
- const _hoisted_3 = {
335
+ const _hoisted_4 = {
335
336
  key: 2,
336
337
  class: "ele-admin-breadcrumb"
337
338
  };
338
- const _hoisted_4 = {
339
+ const _hoisted_5 = {
339
340
  key: 3,
340
341
  class: "ele-admin-menus"
341
342
  };
342
- const _hoisted_5 = {
343
+ const _hoisted_6 = {
343
344
  key: 5,
344
345
  class: "ele-admin-tools"
345
346
  };
346
- const _hoisted_6 = {
347
+ const _hoisted_7 = {
347
348
  key: 0,
348
349
  class: "ele-admin-logo"
349
350
  };
350
- const _hoisted_7 = {
351
+ const _hoisted_8 = ["src"];
352
+ const _hoisted_9 = {
351
353
  key: 0,
352
354
  class: "ele-admin-logo-title"
353
355
  };
354
- const _hoisted_8 = {
356
+ const _hoisted_10 = {
355
357
  key: 1,
356
358
  class: "ele-admin-logo"
357
359
  };
358
- const _hoisted_9 = {
360
+ const _hoisted_11 = ["src"];
361
+ const _hoisted_12 = {
359
362
  ref: "modalsRef",
360
363
  class: "ele-admin-modals"
361
364
  };
@@ -396,20 +399,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
396
399
  onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.handleHeadMouseenter && _ctx.handleHeadMouseenter(...args)),
397
400
  onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleHeadMouseleave && _ctx.handleHeadMouseleave(...args))
398
401
  }, [
399
- _ctx.isHeaderLogo && (_ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
400
- vue.renderSlot(_ctx.$slots, "logo"),
401
- vue.renderSlot(_ctx.$slots, "logoTitle")
402
+ _ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
403
+ _ctx.logoSrc || _ctx.$slots.logo ? vue.renderSlot(_ctx.$slots, "logo", { key: 0 }, () => [
404
+ vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_2)
405
+ ]) : vue.createCommentVNode("", true),
406
+ _ctx.logoTitle || _ctx.$slots.logoTitle ? vue.renderSlot(_ctx.$slots, "logoTitle", { key: 1 }, () => [
407
+ vue.createElementVNode("h1", null, vue.toDisplayString(_ctx.logoTitle), 1)
408
+ ]) : vue.createCommentVNode("", true)
402
409
  ])) : vue.createCommentVNode("", true),
403
- _ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
410
+ _ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
404
411
  vue.renderSlot(_ctx.$slots, "left")
405
412
  ])) : vue.createCommentVNode("", true),
406
- _ctx.breadcrumb ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
413
+ _ctx.breadcrumb ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
407
414
  vue.renderSlot(_ctx.$slots, "breadcrumb", {}, () => [
408
415
  _ctx.levels && _ctx.levels.length ? (vue.openBlock(), vue.createBlock(_component_EleBreadcrumb, vue.mergeProps({ key: 0 }, _ctx.breadcrumb === true ? {} : _ctx.breadcrumb, { items: _ctx.levels }), null, 16, ["items"])) : vue.createCommentVNode("", true)
409
416
  ])
410
417
  ])) : vue.createCommentVNode("", true),
411
418
  vue.renderSlot(_ctx.$slots, "center"),
412
- !_ctx.showHeaderTabs || _ctx.showHeaderMenus ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
419
+ !_ctx.showHeaderTabs || _ctx.showHeaderMenus ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
413
420
  _ctx.showHeaderMenus && _ctx.headerMenus ? (vue.openBlock(), vue.createBlock(_component_EleMenus, vue.mergeProps({
414
421
  key: 0,
415
422
  mode: "horizontal",
@@ -469,7 +476,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
469
476
  };
470
477
  })
471
478
  ]), 1032, ["tabs", "active", "fixedHome", "homePath", "isHome", "tabStyle", "tabContextMenu", "tabContextMenus", "tabSortable", "class", "style", "onTabClick", "onTabRemove", "onTabContextMenu", "onTabSortChange"])) : vue.createCommentVNode("", true),
472
- _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
479
+ _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
473
480
  vue.renderSlot(_ctx.$slots, "right")
474
481
  ])) : vue.createCommentVNode("", true)
475
482
  ], 38)) : vue.createCommentVNode("", true)
@@ -501,8 +508,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
501
508
  onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.handleBoxMouseEnter && _ctx.handleBoxMouseEnter(...args)),
502
509
  onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.handleBoxMouseLeave && _ctx.handleBoxMouseLeave(...args))
503
510
  }, [
504
- !_ctx.isHeaderLogo && _ctx.$slots.logo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
505
- vue.renderSlot(_ctx.$slots, "logo")
511
+ !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.$slots.logo) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
512
+ vue.renderSlot(_ctx.$slots, "logo", {}, () => [
513
+ vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_8)
514
+ ])
506
515
  ])) : vue.createCommentVNode("", true),
507
516
  vue.renderSlot(_ctx.$slots, "boxTop"),
508
517
  vue.createVNode(_component_ElScrollbar, { class: "ele-admin-menus" }, {
@@ -556,12 +565,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
556
565
  onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.handleSideMouseLeave && _ctx.handleSideMouseLeave(...args))
557
566
  }, [
558
567
  _ctx.isMixSidebar ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
559
- !_ctx.isHeaderLogo && _ctx.$slots.logoTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
560
- vue.renderSlot(_ctx.$slots, "logoTitle")
568
+ !_ctx.isHeaderLogo && (_ctx.logoTitle || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
569
+ vue.renderSlot(_ctx.$slots, "logoTitle", {}, () => [
570
+ vue.createElementVNode("h1", null, vue.toDisplayString(_ctx.logoTitle), 1)
571
+ ])
561
572
  ])) : vue.createCommentVNode("", true)
562
- ], 64)) : !_ctx.isHeaderLogo && (_ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
563
- vue.renderSlot(_ctx.$slots, "logo"),
564
- vue.renderSlot(_ctx.$slots, "logoTitle")
573
+ ], 64)) : !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
574
+ _ctx.logoSrc || _ctx.$slots.logo ? vue.renderSlot(_ctx.$slots, "logo", { key: 0 }, () => [
575
+ vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_11)
576
+ ]) : vue.createCommentVNode("", true),
577
+ _ctx.logoTitle || _ctx.$slots.logoTitle ? vue.renderSlot(_ctx.$slots, "logoTitle", { key: 1 }, () => [
578
+ vue.createElementVNode("h1", null, vue.toDisplayString(_ctx.logoTitle), 1)
579
+ ]) : vue.createCommentVNode("", true)
565
580
  ])) : vue.createCommentVNode("", true),
566
581
  vue.renderSlot(_ctx.$slots, "top"),
567
582
  vue.createVNode(_component_ElScrollbar, { class: "ele-admin-menus" }, {
@@ -651,7 +666,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
651
666
  target: _ctx.fixedBody && _ctx.contentRef ? _ctx.contentRef : void 0,
652
667
  style: _ctx.fixedBody ? { position: "absolute" } : void 0
653
668
  }, _ctx.backTop === true ? {} : _ctx.backTop), null, 16, ["target", "style"])) : vue.createCommentVNode("", true),
654
- vue.createElementVNode("div", _hoisted_9, null, 512)
669
+ vue.createElementVNode("div", _hoisted_12, null, 512)
655
670
  ]),
656
671
  default: vue.withCtx(() => [
657
672
  vue.createElementVNode("div", {
@@ -70,6 +70,12 @@ declare const _default: import('vue').DefineComponent<{
70
70
  sideboxCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
71
71
  tabsCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
72
72
  contentCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
73
+ logoSrc: StringConstructor;
74
+ logoTitle: StringConstructor;
75
+ menuScrollToActive: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
73
79
  mobile: BooleanConstructor;
74
80
  }, {
75
81
  ownSlots: string[];
@@ -144,7 +150,7 @@ declare const _default: import('vue').DefineComponent<{
144
150
  sideMenuItemClick: (_item: MenuItem, _e: MouseEvent) => boolean;
145
151
  sideMouseenter: (_e: MouseEvent) => boolean;
146
152
  sideMouseleave: (_e: MouseEvent) => boolean;
147
- tabClick: (_option: TabEventOption) => boolean;
153
+ tabClick: (_option: TabEventOption) => boolean; /** 是否是移动端风格折叠状态 */
148
154
  tabRemove: (_name: string) => boolean;
149
155
  tabContextMenu: (_option: TabEventOption) => boolean;
150
156
  tabSortChange: (_data: TabPaneItem[]) => boolean;
@@ -217,6 +223,12 @@ declare const _default: import('vue').DefineComponent<{
217
223
  sideboxCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
218
224
  tabsCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
219
225
  contentCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
226
+ logoSrc: StringConstructor;
227
+ logoTitle: StringConstructor;
228
+ menuScrollToActive: {
229
+ type: BooleanConstructor;
230
+ default: boolean;
231
+ };
220
232
  mobile: BooleanConstructor;
221
233
  }>> & {
222
234
  onTabClick?: ((_option: TabEventOption) => any) | undefined;
@@ -260,6 +272,7 @@ declare const _default: import('vue').DefineComponent<{
260
272
  sidebarIconSlot: string;
261
273
  sideboxTitleSlot: string;
262
274
  sideboxIconSlot: string;
275
+ menuScrollToActive: boolean;
263
276
  mobile: boolean;
264
277
  }, {}>;
265
278
  export default _default;
@@ -112,6 +112,15 @@ const adminLayoutProps = {
112
112
  tabsCustomStyle: Object,
113
113
  /** 内容区样式 */
114
114
  contentCustomStyle: Object,
115
+ /** logo图片地址 */
116
+ logoSrc: String,
117
+ /** logo文字 */
118
+ logoTitle: String,
119
+ /** 菜单是否自动滚动到选中位置 */
120
+ menuScrollToActive: {
121
+ type: Boolean,
122
+ default: true
123
+ },
115
124
  /** 是否是移动端风格 */
116
125
  mobile: Boolean
117
126
  };
@@ -120,6 +120,15 @@ export declare const adminLayoutProps: {
120
120
  tabsCustomStyle: PropType<Partial<import('vue').CSSProperties>>;
121
121
  /** 内容区样式 */
122
122
  contentCustomStyle: PropType<Partial<import('vue').CSSProperties>>;
123
+ /** logo图片地址 */
124
+ logoSrc: StringConstructor;
125
+ /** logo文字 */
126
+ logoTitle: StringConstructor;
127
+ /** 菜单是否自动滚动到选中位置 */
128
+ menuScrollToActive: {
129
+ type: BooleanConstructor;
130
+ default: boolean;
131
+ };
123
132
  /** 是否是移动端风格 */
124
133
  mobile: BooleanConstructor;
125
134
  };
@@ -140,6 +140,7 @@
140
140
  /* 移动端风格 */
141
141
  &.is-mobile > .ele-admin-side {
142
142
  width: 0;
143
+ z-index: calc(#{eleVar('layout', 'mask-index')} + 1);
143
144
  }
144
145
 
145
146
  &.is-collapse > .ele-admin-side {
@@ -206,8 +207,13 @@
206
207
  }
207
208
  }
208
209
 
209
- .ele-admin-logo > img + h1 {
210
- margin-left: 8px;
210
+ .ele-admin-logo > img {
211
+ width: 30px;
212
+ height: 30px;
213
+
214
+ & + h1 {
215
+ margin-left: 8px;
216
+ }
211
217
  }
212
218
 
213
219
  .ele-admin-sidebar.is-collapse > .ele-admin-logo > img + h1 {
@@ -296,7 +302,7 @@
296
302
  bottom: 0;
297
303
  width: 100%;
298
304
  height: 100%;
299
- z-index: calc(#{eleVar('layout', 'index')} + 2);
305
+ z-index: eleVar('layout', 'mask-index');
300
306
  background: elVar('overlay-color', 'lighter');
301
307
  transition: all $transition-base;
302
308
  }
@@ -15,7 +15,7 @@
15
15
  align-items: flex-start;
16
16
  margin: 0 auto eleVar('message', 'space') auto;
17
17
  transition: margin-bottom 0.2s;
18
- position: relative !important;
18
+ position: static !important;
19
19
  left: auto !important;
20
20
  top: auto !important;
21
21
  transform: none;
@@ -25,16 +25,31 @@
25
25
  display: none;
26
26
  }
27
27
 
28
- & > .el-message__icon,
28
+ /* 徽章 */
29
29
  & > .el-message__badge {
30
- z-index: calc(#{elVar('index', 'popper')} + 2);
30
+ position: relative;
31
+ top: auto;
32
+ right: auto;
33
+ width: 0;
34
+ height: 0;
35
+ overflow: visible;
36
+ order: 2;
37
+ z-index: calc(#{eleVar('message', 'index')} + 2);
31
38
  transition: (
32
39
  margin-top 0.4s,
33
40
  transform elVar('transition-duration'),
34
41
  opacity elVar('transition-duration')
35
42
  );
43
+
44
+ & > .el-badge__content {
45
+ position: absolute;
46
+ top: 8px;
47
+ right: -8px;
48
+ transform: translateY(-100%);
49
+ }
36
50
  }
37
51
 
52
+ /* 主体 */
38
53
  & > .el-message__icon {
39
54
  width: auto;
40
55
  height: auto;
@@ -50,7 +65,12 @@
50
65
  border-radius: eleVar('message', 'radius');
51
66
  background: elVar('color-primary', 'light-9');
52
67
  border: 0 solid elVar('color-primary', 'light-8');
53
- z-index: calc(#{elVar('index', 'popper')} + 1);
68
+ z-index: calc(#{eleVar('message', 'index')} + 1);
69
+ transition: (
70
+ margin-top 0.4s,
71
+ transform elVar('transition-duration'),
72
+ opacity elVar('transition-duration')
73
+ );
54
74
  box-sizing: border-box;
55
75
  position: relative;
56
76
  }
@@ -60,6 +80,7 @@
60
80
  margin-top: 0 !important;
61
81
  }
62
82
 
83
+ /* 图标 */
63
84
  .ele-message-icon {
64
85
  flex-shrink: 0;
65
86
  display: flex;
@@ -70,6 +91,7 @@
70
91
  margin: eleVar('message', 'icon-margin');
71
92
  }
72
93
 
94
+ /* 关闭按钮 */
73
95
  .ele-message-close {
74
96
  flex-shrink: 0;
75
97
  display: flex;
@@ -119,7 +141,8 @@
119
141
  }
120
142
  }
121
143
 
122
- .ele-message.el-message--info > .el-message__badge > .el-badge__content {
144
+ .ele-message.el-message--info > .el-message__badge > .el-badge__content,
145
+ .ele-message.is-loading > .el-message__badge > .el-badge__content {
123
146
  background: elVar('color-primary');
124
147
  }
125
148
 
@@ -162,23 +185,15 @@
162
185
  }
163
186
 
164
187
  /* 加载框 */
165
- .ele-message.is-loading {
166
- position: static !important;
167
-
168
- &::before {
169
- content: '';
170
- position: absolute;
171
- top: 0;
172
- left: 0;
173
- right: 0;
174
- bottom: 0;
175
- transition: opacity elVar('transition-duration');
176
- z-index: elVar('index', 'popper');
177
- }
178
-
179
- & > .el-message__badge {
180
- display: none;
181
- }
188
+ .ele-message.is-loading::before {
189
+ content: '';
190
+ position: absolute;
191
+ top: 0;
192
+ left: 0;
193
+ right: 0;
194
+ bottom: 0;
195
+ transition: opacity elVar('transition-duration');
196
+ z-index: eleVar('message', 'index');
182
197
  }
183
198
 
184
199
  /* 遮罩 */
@@ -13,7 +13,6 @@ require("./notification/index");
13
13
  require("./popper/index");
14
14
  require("./radio/index");
15
15
  require("./select/index");
16
- require("./table-filter/index");
17
16
  require("./tag/index");
18
17
  require("./tree/index");
19
18
  require("./tree-select/index");
@@ -1,8 +1,8 @@
1
- @use '../../../../style/util.scss' as *;
2
-
3
- /* ElTree 主题变量 */
4
- @mixin set-el-tree-var($var) {
5
- .el-tree {
6
- @include set-ele-var('tree', $var);
7
- }
8
- }
1
+ @use '../../../../style/util.scss' as *;
2
+
3
+ /* ElTree 主题变量 */
4
+ @mixin set-el-tree-var($var) {
5
+ .el-tree {
6
+ @include set-ele-var('tree', $var);
7
+ }
8
+ }
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
+ const elementPlus = require("element-plus");
3
4
  const icons = require("../icons");
4
5
  const core = require("../utils/core");
5
6
  const props = require("./props");
6
7
  const _sfc_main = vue.defineComponent({
7
8
  name: "EleBacktop",
8
- components: { ArrowUp: icons.ArrowUp },
9
+ components: { ElIcon: elementPlus.ElIcon, ArrowUp: icons.ArrowUp },
9
10
  props: props.backtopProps,
10
11
  emits: props.backtopEmits,
11
12
  setup(props2, { emit }) {
@@ -14,12 +14,13 @@ declare const _default: import('vue').DefineComponent<{
14
14
  };
15
15
  transitionName: {
16
16
  type: StringConstructor;
17
- default: string; /** 目标元素 */
17
+ default: string;
18
18
  };
19
19
  }, {
20
20
  visible: import('vue').Ref<boolean>;
21
21
  handleClick: (e: MouseEvent) => void;
22
22
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ /** 更新目标元素 */
23
24
  click: (_e: MouseEvent) => boolean;
24
25
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
25
26
  target: import('vue').PropType<string | HTMLElement>;
@@ -37,7 +38,7 @@ declare const _default: import('vue').DefineComponent<{
37
38
  };
38
39
  transitionName: {
39
40
  type: StringConstructor;
40
- default: string; /** 目标元素 */
41
+ default: string;
41
42
  };
42
43
  }>> & {
43
44
  onClick?: ((_e: MouseEvent) => any) | undefined;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ require("element-plus/es/components/icon/style/index");
2
3
  require("./index.scss");
@@ -1,2 +1,2 @@
1
- "use strict";const a=require("vue"),N=require("../../ele-watermark/index"),R=require("../receiver"),P="1.1";function T(t){const r=(C,A,c)=>{const s=((l,B)=>{const O=l.length-B;if(O<=0)return l;const k=new Array(l.length);for(let D=0;D<l.length;D++)D<B?k[D]=l[O+D]:k[D]=l[D-B];return k})(C.split(""),c).join(""),w=[];let E=0;for(;E<s.length;){let l=E+A;l>s.length&&(l=s.length);const B=s.substring(E,l);w.push(B.split("").reverse().join("")),E=l}return w.join("")},e="BAFEDIHGLKJONMRQPUTSXWVaZYdcbgfejihmlkponsrqvutyxw10z432765+98/C",i=t.indexOf("="),u=i===-1?t:t.substring(0,i),o=i===-1?"":t.substring(i),f=(r(u,12,3)+o).replace(/[^A-Za-z0-9\+\/\=]/g,""),p=r(e,3,1)+"=";let n="",_,d,v,F,m,b,$,S=0;for(;S<f.length;)F=p.indexOf(f.charAt(S++)),m=p.indexOf(f.charAt(S++)),b=p.indexOf(f.charAt(S++)),$=p.indexOf(f.charAt(S++)),_=F<<2|m>>4,d=(m&15)<<4|b>>2,v=(b&3)<<6|$,n=n+String.fromCharCode(_),b!=64&&(n=n+String.fromCharCode(d)),$!=64&&(n=n+String.fromCharCode(v));return n=(C=>{let A="",c=0,s=0,w=0,E=0;for(;c<C.length;)s=C.charCodeAt(c),s<128?(A+=String.fromCharCode(s),c++):s>191&&s<224?(w=C.charCodeAt(c+1),A+=String.fromCharCode((s&31)<<6|w&63),c+=2):(w=C.charCodeAt(c+1),E=C.charCodeAt(c+2),A+=String.fromCharCode((s&15)<<12|(w&63)<<6|E&63),c+=3);return A})(n),n}const j="EleAdminPlus\u9700\u8981\u6388\u6743\u4F7F\u7528,\u8BF7\u524D\u5F80eleadmin.com\u8D2D\u4E70\u6388\u6743";function g(t,r,e,i){const u=new Array(60).join("*"),o=[u];if(o.push(j),t==null&&r==null&&e==null&&i==null&&o.push("\u8BF7\u5148\u914D\u7F6E\u81EA\u5DF1\u7684\u6388\u6743\u7801;"),!t&&r==null&&!e&&o.push("\u8BF7\u4F7F\u7528\u6B63\u786E\u683C\u5F0F\u7684\u6388\u6743\u7801;"),t&&o.push(`\u6388\u6743\u7248\u672C\u53F7\u4E0D\u5339\u914D, \u8BF7\u4F7F\u7528: ${t}, \u5F53\u524D\u7248\u672C: ${P};`),typeof r=="number"){const h=new Date(r*1e3).toLocaleString();o.push(`\u6388\u6743\u5DF2\u5931\u6548, \u5230\u671F\u65F6\u95F4: ${h};`)}e&&o.push(`\u57DF\u540D\u4E0D\u5339\u914D, \u8BF7\u90E8\u7F72\u5728: ${e} \u4E0B, \u5F53\u524D\u57DF\u540D: ${i};`),o.push(u),console.error(o.join(`
1
+ "use strict";const a=require("vue"),N=require("../../ele-watermark/index"),R=require("../receiver"),P="1.2";function T(t){const r=(C,A,c)=>{const s=((l,B)=>{const O=l.length-B;if(O<=0)return l;const k=new Array(l.length);for(let D=0;D<l.length;D++)D<B?k[D]=l[O+D]:k[D]=l[D-B];return k})(C.split(""),c).join(""),w=[];let E=0;for(;E<s.length;){let l=E+A;l>s.length&&(l=s.length);const B=s.substring(E,l);w.push(B.split("").reverse().join("")),E=l}return w.join("")},e="BAFEDIHGLKJONMRQPUTSXWVaZYdcbgfejihmlkponsrqvutyxw10z432765+98/C",i=t.indexOf("="),u=i===-1?t:t.substring(0,i),o=i===-1?"":t.substring(i),f=(r(u,12,3)+o).replace(/[^A-Za-z0-9\+\/\=]/g,""),p=r(e,3,1)+"=";let n="",_,d,v,F,m,b,$,S=0;for(;S<f.length;)F=p.indexOf(f.charAt(S++)),m=p.indexOf(f.charAt(S++)),b=p.indexOf(f.charAt(S++)),$=p.indexOf(f.charAt(S++)),_=F<<2|m>>4,d=(m&15)<<4|b>>2,v=(b&3)<<6|$,n=n+String.fromCharCode(_),b!=64&&(n=n+String.fromCharCode(d)),$!=64&&(n=n+String.fromCharCode(v));return n=(C=>{let A="",c=0,s=0,w=0,E=0;for(;c<C.length;)s=C.charCodeAt(c),s<128?(A+=String.fromCharCode(s),c++):s>191&&s<224?(w=C.charCodeAt(c+1),A+=String.fromCharCode((s&31)<<6|w&63),c+=2):(w=C.charCodeAt(c+1),E=C.charCodeAt(c+2),A+=String.fromCharCode((s&15)<<12|(w&63)<<6|E&63),c+=3);return A})(n),n}const j="EleAdminPlus\u9700\u8981\u6388\u6743\u4F7F\u7528,\u8BF7\u524D\u5F80eleadmin.com\u8D2D\u4E70\u6388\u6743";function g(t,r,e,i){const u=new Array(60).join("*"),o=[u];if(o.push(j),t==null&&r==null&&e==null&&i==null&&o.push("\u8BF7\u5148\u914D\u7F6E\u81EA\u5DF1\u7684\u6388\u6743\u7801;"),!t&&r==null&&!e&&o.push("\u8BF7\u4F7F\u7528\u6B63\u786E\u683C\u5F0F\u7684\u6388\u6743\u7801;"),t&&o.push(`\u6388\u6743\u7248\u672C\u53F7\u4E0D\u5339\u914D, \u8BF7\u4F7F\u7528: ${t}, \u5F53\u524D\u7248\u672C: ${P};`),typeof r=="number"){const h=new Date(r*1e3).toLocaleString();o.push(`\u6388\u6743\u5DF2\u5931\u6548, \u5230\u671F\u65F6\u95F4: ${h};`)}e&&o.push(`\u57DF\u540D\u4E0D\u5339\u914D, \u8BF7\u90E8\u7F72\u5728: ${e} \u4E0B, \u5F53\u524D\u57DF\u540D: ${i};`),o.push(u),console.error(o.join(`
2
2
  `))}const q=a.defineComponent({name:"ReceiverView",components:{EleWatermark:N},props:{wrapPosition:{type:Boolean,default:!0}},setup(t){const r=R.useReceiver(),e=a.ref(!1),i=a.computed(()=>{const u=r.license;return u?u.trim():void 0});return a.watch(i,u=>{var o;if(typeof u!="string"||!u){e.value=!1,g();return}try{const h=JSON.parse(T(u)),{version:f,expiration:p,domain:n,product:_}=h;if(f&&f!==P){e.value=!1,g(f);return}if(_!=="EleAdminPlus"){e.value=!1,g("");return}if(p&&p<Date.now()/1e3){e.value=!1,g(void 0,p);return}if(n){const d=(o=window==null?void 0:window.location)==null?void 0:o.hostname;if(!d){e.value=!1,g(void 0,void 0,n,"");return}if(d!=="localhost"&&d!=="127.0.0.1"){const v=n.split("."),F=d.split(".");for(let m=v.length-1;m>=0;m--)if(v[m]!==F[m]){e.value=!1,g(void 0,void 0,n,d);return}if(F.length>v.length&&F[F.length-v.length-1]!=="www"){e.value=!1,g(void 0,void 0,n,d);return}}}}catch(h){e.value=!1,console.error(h),g("");return}e.value=!0},{immediate:!0}),{authenticated:e,watermark:j.split(",")}}}),x=(t,r)=>{const e=t.__vccOpts||t;for(const[i,u]of r)e[i]=u;return e};function y(t,r,e,i,u,o){const h=a.resolveComponent("EleWatermark");return a.openBlock(),a.createBlock(h,{wrapPosition:!1,style:a.normalizeStyle(!t.wrapPosition||t.authenticated?void 0:{position:"relative"}),disabled:t.authenticated,content:t.watermark},{default:a.withCtx(()=>[a.renderSlot(t.$slots,"default",{authenticated:t.authenticated})]),_:3},8,["style","disabled","content"])}const V=x(q,[["render",y]]);module.exports=V;
@@ -505,9 +505,6 @@ const _sfc_main = vue.defineComponent({
505
505
  }
506
506
  emit("tabSortChange", result);
507
507
  };
508
- const handleTabAdd = (data) => {
509
- emit("tabAdd", data);
510
- };
511
508
  const getContentElem = () => {
512
509
  if (!layoutRef.value) {
513
510
  return null;
@@ -544,7 +541,7 @@ const _sfc_main = vue.defineComponent({
544
541
  const t = util.getRouteTab(route, tabData.value, homeMenuPath.value, title);
545
542
  isHome.value = t.home;
546
543
  tabActive.value = t.key;
547
- handleTabAdd(t);
544
+ emit("tabAdd", t);
548
545
  if (!navigationIsChanged && !sideNavigationIsChanged) {
549
546
  updateMenuActive(active, matched);
550
547
  if (navigation.value === "mix" || sideNavigation.value === "mix" || sideNavigation.value === "box") {
@@ -646,10 +643,8 @@ const _sfc_main = vue.defineComponent({
646
643
  return;
647
644
  }
648
645
  tabData.value = props$1.tabs.map((item) => {
649
- var _a;
650
646
  const m = util.findMenuByPath(item.path, menuData.value);
651
- const title = ((_a = m == null ? void 0 : m.meta) == null ? void 0 : _a.title) || routeI18n(item.path) || item.title;
652
- return { ...item, title };
647
+ return { ...item, title: routeI18n(item.path, m) || item.title };
653
648
  });
654
649
  };
655
650
  const updateLevelData = () => {
@@ -657,7 +652,7 @@ const _sfc_main = vue.defineComponent({
657
652
  var _a;
658
653
  const t = util.findTabByPath(item.path, tabData.value);
659
654
  const m = util.findMenuByPath(item.path, menuData.value);
660
- const title = (t == null ? void 0 : t.title) || ((_a = m == null ? void 0 : m.meta) == null ? void 0 : _a.title) || routeI18n(item.path);
655
+ const title = (t == null ? void 0 : t.title) || ((_a = m == null ? void 0 : m.meta) == null ? void 0 : _a.title) || routeI18n(item.path, m);
661
656
  return { ...item, title: title || item.title };
662
657
  });
663
658
  };
@@ -167,7 +167,7 @@ export interface SumCol extends ColSize {
167
167
  /** 唯一值 */
168
168
  key: string;
169
169
  /** 显示文本 */
170
- text?: string;
170
+ text?: string | VNode;
171
171
  /** 对齐方式 */
172
172
  align?: string;
173
173
  /** 固定列 */
@@ -1,4 +1,4 @@
1
- import { SetupContext } from 'vue';
1
+ import { SetupContext, VNode } from 'vue';
2
2
  import { TableV2SortOrder } from 'element-plus';
3
3
  import { DataKey, DataItem, Column, Columns, Sorter, Filter, FilterValue, OrderValue, TableSize, RowKey, RowSelectable, TreeProps, ShowOverflowTooltip, SpanMethod, ColumnIndex, SummaryMethod } from '../ele-data-table/types';
4
4
  import { VirtualColumn, VirtualColumns, BodyColumns, HeaderColumn, HeaderRows, ColSize, CustomRenderProps, SortBy, TreeTableProps, CellSpan, CellParams, VirtualRow } from './types';
@@ -125,7 +125,7 @@ export declare function isAutoRowHeight(hasExpandCol: boolean, bodyCols: BodyCol
125
125
  * @param props 属性
126
126
  * @param ctx SetupContext
127
127
  */
128
- export declare function CellRender(props: CustomRenderProps, ctx: SetupContext): (string | number | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
128
+ export declare function CellRender(props: CustomRenderProps, ctx: SetupContext): (string | number | VNode<import('vue').RendererNode, import('vue').RendererElement, {
129
129
  [key: string]: any;
130
130
  }>)[] | undefined;
131
131
  /**
@@ -192,7 +192,7 @@ export declare function getCellSpan(params: CellParams, spanMethod?: SpanMethod)
192
192
  * @param bodyCols 表格主体列配置
193
193
  * @param data 表格数据
194
194
  */
195
- export declare function getUserSums(summaryMethod?: SummaryMethod, bodyCols?: BodyColumns, data?: DataItem[]): string[] | undefined;
195
+ export declare function getUserSums(summaryMethod?: SummaryMethod, bodyCols?: BodyColumns, data?: DataItem[]): (string | VNode)[] | undefined;
196
196
  /**
197
197
  * 计算列合计值
198
198
  * @param data 表格数据
@@ -14,7 +14,8 @@ $ele-dark: map.deep-merge(
14
14
  'tool-hover-bg': rgba(255, 255, 255, 0.05),
15
15
  'dark-tool-hover-bg': rgba(255, 255, 255, 0.05),
16
16
  'dark-bg': #1f1f1f,
17
- 'dark-shadow': 0 1px 4px rgba(0, 0, 0, 0.6)
17
+ 'dark-shadow': 0 1px 4px rgba(0, 0, 0, 0.6),
18
+ 'ghost-bg': hsla(0, 0%, 32%, 0.4)
18
19
  ),
19
20
  'logo': (
20
21
  'shadow': 0 3px 4px rgba(0, 0, 0, 0.6),
@@ -37,7 +37,8 @@ $ele: map.deep-merge(
37
37
  'layout': (
38
38
  // 布局
39
39
  'bg': elVar('bg-color', 'page'),
40
- 'index': 99
40
+ 'index': 99,
41
+ 'mask-index': calc(#{elVar('index', 'popper')} + 2000)
41
42
  ),
42
43
  'header': (
43
44
  // 顶栏
@@ -152,7 +153,8 @@ $ele: map.deep-merge(
152
153
  'close-hover-bg': transparent,
153
154
  'plain-bg': elVar('bg-color', 'overlay'),
154
155
  'alert-padding': 10px 14px,
155
- 'mask-color': elVar('overlay-color', 'lighter')
156
+ 'mask-color': elVar('overlay-color', 'lighter'),
157
+ 'index': calc(#{elVar('index', 'popper')} + 2002)
156
158
  ),
157
159
  'bottom-bar': (
158
160
  // 底部工具栏
@@ -54,7 +54,7 @@ $ele-rounded: map.deep-merge(
54
54
  'menu-active-line': 0
55
55
  ),
56
56
  'map': (
57
- 'search-padding': 0 12px 6px 12px
57
+ 'search-padding': 2px 12px 6px 12px
58
58
  ),
59
59
  'menu': (
60
60
  'arrow-margin': 0 -8px 0 6px,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ele-admin-plus",
3
- "version": "1.2.0-beta.3",
3
+ "version": "1.2.0-beta.5",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host --config vite.global.ts",
@@ -41,14 +41,14 @@
41
41
  "dayjs": "^1.11.11",
42
42
  "echarts": "^5.5.0",
43
43
  "echarts-wordcloud": "^2.1.0",
44
- "element-plus": "^2.7.4",
44
+ "element-plus": "^2.7.5",
45
45
  "eslint": "^8.57.0",
46
46
  "eslint-config-prettier": "^9.1.0",
47
47
  "eslint-plugin-prettier": "^5.1.3",
48
48
  "eslint-plugin-vue": "^9.26.0",
49
49
  "esno": "^4.7.0",
50
50
  "exceljs": "^4.4.0",
51
- "execa": "^9.1.0",
51
+ "execa": "^9.2.0",
52
52
  "github-markdown-css": "^5.5.1",
53
53
  "highlight.js": "^11.9.0",
54
54
  "jsbarcode": "^3.11.6",
@@ -64,14 +64,14 @@
64
64
  "tinymce": "^5.10.9",
65
65
  "typescript": "^5.4.5",
66
66
  "unplugin-vue-components": "^0.27.0",
67
- "vite": "^5.2.12",
67
+ "vite": "^5.2.13",
68
68
  "vite-plugin-dts": "^3.9.1",
69
69
  "vue": "^3.4.27",
70
70
  "vue-echarts": "^6.7.3",
71
71
  "vue-eslint-parser": "^9.4.3",
72
72
  "vue-i18n": "^9.13.1",
73
73
  "vue-router": "^4.3.2",
74
- "vue-tsc": "^2.0.19",
74
+ "vue-tsc": "^2.0.21",
75
75
  "vuedraggable": "^4.1.0",
76
76
  "xgplayer": "^3.0.18",
77
77
  "xgplayer-hls": "^3.0.18",