ele-admin-plus 1.2.0-beta.6 → 1.2.1-beta.1

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 (51) hide show
  1. package/es/ele-admin-layout/index.d.ts +11 -1
  2. package/es/ele-admin-layout/index.js +53 -47
  3. package/es/ele-admin-layout/props.d.ts +10 -0
  4. package/es/ele-admin-layout/props.js +10 -0
  5. package/es/ele-app/components/message-body.d.ts +6 -0
  6. package/es/ele-app/components/message-body.js +10 -4
  7. package/es/ele-app/components/message-box-icon.d.ts +30 -0
  8. package/es/ele-app/components/message-box-icon.js +63 -0
  9. package/es/ele-app/el.d.ts +7 -0
  10. package/es/ele-app/style/overwrite/message-box/index.scss +19 -0
  11. package/es/ele-card/index.js +1 -1
  12. package/es/ele-pro-layout/index.d.ts +12 -2
  13. package/es/ele-pro-layout/index.js +6 -1
  14. package/es/ele-pro-layout/props.d.ts +10 -0
  15. package/es/ele-pro-layout/props.js +10 -0
  16. package/es/ele-pro-table/types.d.ts +3 -3
  17. package/es/ele-qr-code/qrcodegen.js +34 -70
  18. package/es/icons/MenuOutlined.d.ts +2 -0
  19. package/es/icons/MenuOutlined.js +32 -0
  20. package/es/icons/index.d.ts +1 -0
  21. package/es/icons/index.js +84 -82
  22. package/es/utils/message-box.js +28 -2
  23. package/es/utils/message.js +36 -13
  24. package/lib/components.cjs +4 -5
  25. package/lib/core-export.cjs +28 -35
  26. package/lib/core.cjs +8 -10
  27. package/lib/ele-admin-layout/index.cjs +53 -47
  28. package/lib/ele-admin-layout/index.d.ts +11 -1
  29. package/lib/ele-admin-layout/props.cjs +10 -0
  30. package/lib/ele-admin-layout/props.d.ts +10 -0
  31. package/lib/ele-app/components/message-body.cjs +9 -3
  32. package/lib/ele-app/components/message-body.d.ts +6 -0
  33. package/lib/ele-app/components/message-box-icon.cjs +62 -0
  34. package/lib/ele-app/components/message-box-icon.d.ts +30 -0
  35. package/lib/ele-app/el.d.ts +7 -0
  36. package/lib/ele-app/style/overwrite/message-box/index.scss +19 -0
  37. package/lib/ele-card/index.cjs +1 -1
  38. package/lib/ele-pro-layout/index.cjs +6 -1
  39. package/lib/ele-pro-layout/index.d.ts +12 -2
  40. package/lib/ele-pro-layout/props.cjs +10 -0
  41. package/lib/ele-pro-layout/props.d.ts +10 -0
  42. package/lib/ele-pro-table/types.d.ts +3 -3
  43. package/lib/ele-qr-code/qrcodegen.cjs +34 -70
  44. package/lib/icons/MenuOutlined.cjs +31 -0
  45. package/lib/icons/MenuOutlined.d.ts +2 -0
  46. package/lib/icons/index.cjs +2 -0
  47. package/lib/icons/index.d.ts +1 -0
  48. package/lib/index.cjs +8 -10
  49. package/lib/utils/message-box.cjs +27 -1
  50. package/lib/utils/message.cjs +35 -12
  51. package/package.json +11 -11
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance, provide, inject, onActivated, onDeactivated, isVNode, h, mergeProps } from "vue";
1
+ import { getCurrentInstance, provide, inject, onActivated, onDeactivated, onBeforeUnmount, isVNode, h, mergeProps } from "vue";
2
2
  import { ElMessage } from "element-plus";
3
3
  import { useGlobalProps } from "../ele-config-provider/receiver";
4
4
  import { useLayoutState } from "../ele-pro-layout/util";
@@ -40,7 +40,7 @@ function getOffsetStyle(offset, userStyle) {
40
40
  function isObjOpt(params) {
41
41
  return params != null && typeof params === "object" && !isVNode(params);
42
42
  }
43
- function normalizeOption(params, globalOpt, onClose, type, loading, getWrapEl2, groupKey) {
43
+ function normalizeOption(params, globalOpt, onClose, type, loading, getWrapEl2, groupKey, messageId, onMessageDestroy) {
44
44
  const opt = { ...globalOpt || {} };
45
45
  if (isObjOpt(params)) {
46
46
  Object.assign(opt, params);
@@ -89,7 +89,9 @@ function normalizeOption(params, globalOpt, onClose, type, loading, getWrapEl2,
89
89
  showClose: opt.showClose,
90
90
  dangerouslyUseHTMLString: opt.dangerouslyUseHTMLString,
91
91
  loading,
92
- onClose
92
+ messageId,
93
+ onClose,
94
+ onMessageDestroy
93
95
  },
94
96
  { default: isFn ? content : isStr ? void 0 : () => content }
95
97
  );
@@ -161,7 +163,8 @@ function useMessage(globalOpt) {
161
163
  const globalProps = useGlobalProps("message");
162
164
  const appContext = (_b = (_a = getCurrentInstance) == null ? void 0 : _a()) == null ? void 0 : _b.appContext;
163
165
  const groupKey = (globalOpt == null ? void 0 : globalOpt.groupKey) || getDefaultGroupKey();
164
- const state = { wrapEl: null, isActivated: true };
166
+ const state = { wrapEl: null, isActivated: true, id: 0 };
167
+ const instances = /* @__PURE__ */ new Map();
165
168
  const hideClass = "is-hide";
166
169
  provide(MESSAGE_KEY, { groupKey, getInnerWrap: () => getWrap(true) });
167
170
  const parentMsg = inject(MESSAGE_KEY, null);
@@ -173,6 +176,12 @@ function useMessage(globalOpt) {
173
176
  state.isActivated = false;
174
177
  state.wrapEl && state.wrapEl.classList.add(hideClass);
175
178
  });
179
+ onBeforeUnmount(() => {
180
+ for (const [_key, ins] of instances) {
181
+ ins && ins.close && ins.close();
182
+ }
183
+ instances.clear();
184
+ });
176
185
  const getWrap = (inner) => {
177
186
  if (inner) {
178
187
  if (parentMsg != null && parentMsg.groupKey === groupKey) {
@@ -190,49 +199,63 @@ function useMessage(globalOpt) {
190
199
  }
191
200
  return getWrapEl();
192
201
  };
193
- const getOption = function(params, onClose, type, loading) {
194
- return normalizeOption(
202
+ const getOpt = function(params, onClose, type, loading) {
203
+ state.id++;
204
+ const msgId = `m_${state.id}`;
205
+ const opt = normalizeOption(
195
206
  params,
196
207
  { ...globalProps.value || {}, ...globalOpt || {} },
197
208
  onClose,
198
209
  type,
199
210
  loading,
200
211
  getWrap,
201
- groupKey
212
+ groupKey,
213
+ msgId,
214
+ (messageId) => {
215
+ messageId && instances.delete(messageId);
216
+ }
202
217
  );
218
+ return { opt, msgId };
203
219
  };
204
220
  const message = function(params) {
205
- const opt = getOption(params, () => ins.close());
221
+ const { opt, msgId } = getOpt(params, () => ins.close());
206
222
  const ins = ElMessage(opt, appContext);
223
+ instances.set(msgId, ins);
207
224
  return ins;
208
225
  };
209
226
  message.success = function(params) {
210
- const opt = getOption(params, () => ins.close(), "success", false);
227
+ const { opt, msgId } = getOpt(params, () => ins.close(), "success", false);
211
228
  const ins = ElMessage(opt, appContext);
229
+ instances.set(msgId, ins);
212
230
  return ins;
213
231
  };
214
232
  message.warning = function(params) {
215
- const opt = getOption(params, () => ins.close(), "warning", false);
233
+ const { opt, msgId } = getOpt(params, () => ins.close(), "warning", false);
216
234
  const ins = ElMessage(opt, appContext);
235
+ instances.set(msgId, ins);
217
236
  return ins;
218
237
  };
219
238
  message.error = function(params) {
220
- const opt = getOption(params, () => ins.close(), "error", false);
239
+ const { opt, msgId } = getOpt(params, () => ins.close(), "error", false);
221
240
  const ins = ElMessage(opt, appContext);
241
+ instances.set(msgId, ins);
222
242
  return ins;
223
243
  };
224
244
  message.info = function(params) {
225
- const opt = getOption(params, () => ins.close());
245
+ const { opt, msgId } = getOpt(params, () => ins.close());
226
246
  const ins = ElMessage(opt, appContext);
247
+ instances.set(msgId, ins);
227
248
  return ins;
228
249
  };
229
250
  message.loading = function(params) {
230
251
  blurCurrentFocus();
231
- const opt = getOption(params, () => ins.close(), void 0, true);
252
+ const { opt, msgId } = getOpt(params, () => ins.close(), void 0, true);
232
253
  const ins = ElMessage(opt, appContext);
254
+ instances.set(msgId, ins);
233
255
  return ins;
234
256
  };
235
257
  message.closeAll = function(type) {
258
+ instances.clear();
236
259
  return ElMessage.closeAll(type);
237
260
  };
238
261
  return message;
@@ -14,9 +14,8 @@ exports.EleCropperModal = index$3;
14
14
  exports.EleMapPicker = index$4;
15
15
  exports.EleXgPlayer = index$5;
16
16
  Object.keys(coreComponents).forEach((k) => {
17
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
18
- Object.defineProperty(exports, k, {
19
- enumerable: true,
20
- get: () => coreComponents[k]
21
- });
17
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
18
+ enumerable: true,
19
+ get: () => coreComponents[k]
20
+ });
22
21
  });
@@ -14,51 +14,44 @@ exports.LayoutTool = layoutTool;
14
14
  exports.SidebarTool = layoutTool;
15
15
  exports.TabDropdown = tabDropdown;
16
16
  Object.keys(chartThemeDark).forEach((k) => {
17
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
18
- Object.defineProperty(exports, k, {
19
- enumerable: true,
20
- get: () => chartThemeDark[k]
21
- });
17
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
18
+ enumerable: true,
19
+ get: () => chartThemeDark[k]
20
+ });
22
21
  });
23
22
  Object.keys(chartTheme).forEach((k) => {
24
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
25
- Object.defineProperty(exports, k, {
26
- enumerable: true,
27
- get: () => chartTheme[k]
28
- });
23
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
24
+ enumerable: true,
25
+ get: () => chartTheme[k]
26
+ });
29
27
  });
30
28
  Object.keys(core).forEach((k) => {
31
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
32
- Object.defineProperty(exports, k, {
33
- enumerable: true,
34
- get: () => core[k]
35
- });
29
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
30
+ enumerable: true,
31
+ get: () => core[k]
32
+ });
36
33
  });
37
34
  Object.keys(menuUtil).forEach((k) => {
38
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
39
- Object.defineProperty(exports, k, {
40
- enumerable: true,
41
- get: () => menuUtil[k]
42
- });
35
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
36
+ enumerable: true,
37
+ get: () => menuUtil[k]
38
+ });
43
39
  });
44
40
  Object.keys(message).forEach((k) => {
45
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
46
- Object.defineProperty(exports, k, {
47
- enumerable: true,
48
- get: () => message[k]
49
- });
41
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
42
+ enumerable: true,
43
+ get: () => message[k]
44
+ });
50
45
  });
51
46
  Object.keys(messageBox).forEach((k) => {
52
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
53
- Object.defineProperty(exports, k, {
54
- enumerable: true,
55
- get: () => messageBox[k]
56
- });
47
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
48
+ enumerable: true,
49
+ get: () => messageBox[k]
50
+ });
57
51
  });
58
52
  Object.keys(validate).forEach((k) => {
59
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
60
- Object.defineProperty(exports, k, {
61
- enumerable: true,
62
- get: () => validate[k]
63
- });
53
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
54
+ enumerable: true,
55
+ get: () => validate[k]
56
+ });
64
57
  });
package/lib/core.cjs CHANGED
@@ -8,16 +8,14 @@ Object.defineProperty(exports, "default", {
8
8
  get: () => coreInstaller.installer
9
9
  });
10
10
  Object.keys(coreComponents).forEach((k) => {
11
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
12
- Object.defineProperty(exports, k, {
13
- enumerable: true,
14
- get: () => coreComponents[k]
15
- });
11
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
12
+ enumerable: true,
13
+ get: () => coreComponents[k]
14
+ });
16
15
  });
17
16
  Object.keys(coreExport).forEach((k) => {
18
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
19
- Object.defineProperty(exports, k, {
20
- enumerable: true,
21
- get: () => coreExport[k]
22
- });
17
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
18
+ enumerable: true,
19
+ get: () => coreExport[k]
20
+ });
23
21
  });
@@ -323,42 +323,22 @@ const _export_sfc = (sfc, props2) => {
323
323
  }
324
324
  return target;
325
325
  };
326
- const _hoisted_1 = {
327
- key: 0,
328
- class: "ele-admin-logo"
329
- };
330
- const _hoisted_2 = ["src"];
331
- const _hoisted_3 = {
326
+ const _hoisted_1 = ["src"];
327
+ const _hoisted_2 = {
332
328
  key: 1,
333
329
  class: "ele-admin-tools"
334
330
  };
335
- const _hoisted_4 = {
331
+ const _hoisted_3 = {
336
332
  key: 2,
337
333
  class: "ele-admin-breadcrumb"
338
334
  };
339
- const _hoisted_5 = {
340
- key: 3,
341
- class: "ele-admin-menus"
342
- };
343
- const _hoisted_6 = {
335
+ const _hoisted_4 = {
344
336
  key: 5,
345
337
  class: "ele-admin-tools"
346
338
  };
339
+ const _hoisted_5 = ["src"];
340
+ const _hoisted_6 = ["src"];
347
341
  const _hoisted_7 = {
348
- key: 0,
349
- class: "ele-admin-logo"
350
- };
351
- const _hoisted_8 = ["src"];
352
- const _hoisted_9 = {
353
- key: 0,
354
- class: "ele-admin-logo-title"
355
- };
356
- const _hoisted_10 = {
357
- key: 1,
358
- class: "ele-admin-logo"
359
- };
360
- const _hoisted_11 = ["src"];
361
- const _hoisted_12 = {
362
342
  ref: "modalsRef",
363
343
  class: "ele-admin-modals"
364
344
  };
@@ -399,24 +379,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
399
379
  onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.handleHeadMouseenter && _ctx.handleHeadMouseenter(...args)),
400
380
  onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleHeadMouseleave && _ctx.handleHeadMouseleave(...args))
401
381
  }, [
402
- _ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
382
+ _ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", {
383
+ key: 0,
384
+ class: "ele-admin-logo",
385
+ style: vue.normalizeStyle(_ctx.logoStyle)
386
+ }, [
403
387
  _ctx.logoSrc || _ctx.$slots.logo ? vue.renderSlot(_ctx.$slots, "logo", { key: 0 }, () => [
404
- vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_2)
388
+ vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_1)
405
389
  ]) : vue.createCommentVNode("", true),
406
390
  _ctx.logoTitle || _ctx.$slots.logoTitle ? vue.renderSlot(_ctx.$slots, "logoTitle", { key: 1 }, () => [
407
391
  vue.createElementVNode("h1", null, vue.toDisplayString(_ctx.logoTitle), 1)
408
392
  ]) : vue.createCommentVNode("", true)
409
- ])) : vue.createCommentVNode("", true),
410
- _ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
393
+ ], 4)) : vue.createCommentVNode("", true),
394
+ _ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
411
395
  vue.renderSlot(_ctx.$slots, "left")
412
396
  ])) : vue.createCommentVNode("", true),
413
- _ctx.breadcrumb ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
397
+ _ctx.breadcrumb ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
414
398
  vue.renderSlot(_ctx.$slots, "breadcrumb", {}, () => [
415
399
  _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)
416
400
  ])
417
401
  ])) : vue.createCommentVNode("", true),
418
402
  vue.renderSlot(_ctx.$slots, "center"),
419
- !_ctx.showHeaderTabs || _ctx.showHeaderMenus ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
403
+ !_ctx.showHeaderTabs || _ctx.showHeaderMenus ? (vue.openBlock(), vue.createElementBlock("div", {
404
+ key: 3,
405
+ class: "ele-admin-menus",
406
+ style: vue.normalizeStyle(_ctx.headerMenusStyle)
407
+ }, [
420
408
  _ctx.showHeaderMenus && _ctx.headerMenus ? (vue.openBlock(), vue.createBlock(_component_EleMenus, vue.mergeProps({
421
409
  key: 0,
422
410
  mode: "horizontal",
@@ -446,7 +434,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
446
434
  key: "1"
447
435
  } : void 0
448
436
  ]), 1040, ["theme", "popupTheme", "defaultActive", "items", "onOpen", "onClose", "onItemClick", "onItemMouseenter", "onItemMouseleave"])) : vue.createCommentVNode("", true)
449
- ])) : vue.createCommentVNode("", true),
437
+ ], 4)) : vue.createCommentVNode("", true),
450
438
  _ctx.showHeaderTabs ? (vue.openBlock(), vue.createBlock(_component_LayoutTabs, {
451
439
  key: 4,
452
440
  tabs: _ctx.tabs,
@@ -476,7 +464,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
476
464
  };
477
465
  })
478
466
  ]), 1032, ["tabs", "active", "fixedHome", "homePath", "isHome", "tabStyle", "tabContextMenu", "tabContextMenus", "tabSortable", "class", "style", "onTabClick", "onTabRemove", "onTabContextMenu", "onTabSortChange"])) : vue.createCommentVNode("", true),
479
- _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
467
+ _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
480
468
  vue.renderSlot(_ctx.$slots, "right")
481
469
  ])) : vue.createCommentVNode("", true)
482
470
  ], 38)) : vue.createCommentVNode("", true)
@@ -508,13 +496,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
508
496
  onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.handleBoxMouseEnter && _ctx.handleBoxMouseEnter(...args)),
509
497
  onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.handleBoxMouseLeave && _ctx.handleBoxMouseLeave(...args))
510
498
  }, [
511
- !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.$slots.logo) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
499
+ !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.$slots.logo) ? (vue.openBlock(), vue.createElementBlock("div", {
500
+ key: 0,
501
+ class: "ele-admin-logo",
502
+ style: vue.normalizeStyle(_ctx.logoStyle)
503
+ }, [
512
504
  vue.renderSlot(_ctx.$slots, "logo", {}, () => [
513
- vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_8)
505
+ vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_5)
514
506
  ])
515
- ])) : vue.createCommentVNode("", true),
507
+ ], 4)) : vue.createCommentVNode("", true),
516
508
  vue.renderSlot(_ctx.$slots, "boxTop"),
517
- vue.createVNode(_component_ElScrollbar, { class: "ele-admin-menus" }, {
509
+ vue.createVNode(_component_ElScrollbar, {
510
+ class: "ele-admin-menus",
511
+ style: vue.normalizeStyle(_ctx.sideboxMenusStyle)
512
+ }, {
518
513
  default: vue.withCtx(() => [
519
514
  _ctx.sideboxMenus ? (vue.openBlock(), vue.createBlock(_component_EleMenus, vue.mergeProps({
520
515
  key: 0,
@@ -548,7 +543,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
548
543
  ]), 1040, ["theme", "defaultActive", "collapse", "items", "onItemClick", "onItemMouseenter", "onItemMouseleave"])) : vue.createCommentVNode("", true)
549
544
  ]),
550
545
  _: 3
551
- }),
546
+ }, 8, ["style"]),
552
547
  vue.renderSlot(_ctx.$slots, "boxBottom")
553
548
  ], 38)) : vue.createCommentVNode("", true),
554
549
  !_ctx.isBoxSidebar ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -565,21 +560,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
565
560
  onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.handleSideMouseLeave && _ctx.handleSideMouseLeave(...args))
566
561
  }, [
567
562
  _ctx.isMixSidebar ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
568
- !_ctx.isHeaderLogo && (_ctx.logoTitle || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
563
+ !_ctx.isHeaderLogo && (_ctx.logoTitle || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", {
564
+ key: 0,
565
+ class: "ele-admin-logo-title",
566
+ style: vue.normalizeStyle(_ctx.logoTitleStyle)
567
+ }, [
569
568
  vue.renderSlot(_ctx.$slots, "logoTitle", {}, () => [
570
569
  vue.createElementVNode("h1", null, vue.toDisplayString(_ctx.logoTitle), 1)
571
570
  ])
572
- ])) : vue.createCommentVNode("", true)
573
- ], 64)) : !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
571
+ ], 4)) : vue.createCommentVNode("", true)
572
+ ], 64)) : !_ctx.isHeaderLogo && (_ctx.logoSrc || _ctx.logoTitle || _ctx.$slots.logo || _ctx.$slots.logoTitle) ? (vue.openBlock(), vue.createElementBlock("div", {
573
+ key: 1,
574
+ class: "ele-admin-logo",
575
+ style: vue.normalizeStyle(_ctx.logoStyle)
576
+ }, [
574
577
  _ctx.logoSrc || _ctx.$slots.logo ? vue.renderSlot(_ctx.$slots, "logo", { key: 0 }, () => [
575
- vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_11)
578
+ vue.createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_6)
576
579
  ]) : vue.createCommentVNode("", true),
577
580
  _ctx.logoTitle || _ctx.$slots.logoTitle ? vue.renderSlot(_ctx.$slots, "logoTitle", { key: 1 }, () => [
578
581
  vue.createElementVNode("h1", null, vue.toDisplayString(_ctx.logoTitle), 1)
579
582
  ]) : vue.createCommentVNode("", true)
580
- ])) : vue.createCommentVNode("", true),
583
+ ], 4)) : vue.createCommentVNode("", true),
581
584
  vue.renderSlot(_ctx.$slots, "top"),
582
- vue.createVNode(_component_ElScrollbar, { class: "ele-admin-menus" }, {
585
+ vue.createVNode(_component_ElScrollbar, {
586
+ class: "ele-admin-menus",
587
+ style: vue.normalizeStyle(_ctx.sidebarMenusStyle)
588
+ }, {
583
589
  default: vue.withCtx(() => [
584
590
  _ctx.sidebarMenus ? (vue.openBlock(), vue.createBlock(_component_EleMenus, vue.mergeProps({
585
591
  key: 0,
@@ -612,7 +618,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
612
618
  ]), 1040, ["theme", "defaultActive", "collapse", "items", "onOpen", "onClose", "onItemClick"])) : vue.createCommentVNode("", true)
613
619
  ]),
614
620
  _: 3
615
- }),
621
+ }, 8, ["style"]),
616
622
  vue.renderSlot(_ctx.$slots, "bottom")
617
623
  ], 38)) : vue.createCommentVNode("", true)
618
624
  ], 6)) : vue.createCommentVNode("", true)
@@ -666,7 +672,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
666
672
  target: _ctx.fixedBody && _ctx.contentRef ? _ctx.contentRef : void 0,
667
673
  style: _ctx.fixedBody ? { position: "absolute" } : void 0
668
674
  }, _ctx.backTop === true ? {} : _ctx.backTop), null, 16, ["target", "style"])) : vue.createCommentVNode("", true),
669
- vue.createElementVNode("div", _hoisted_12, null, 512)
675
+ vue.createElementVNode("div", _hoisted_7, null, 512)
670
676
  ]),
671
677
  default: vue.withCtx(() => [
672
678
  vue.createElementVNode("div", {
@@ -70,6 +70,11 @@ 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
+ logoStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
74
+ logoTitleStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
75
+ headerMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
76
+ sidebarMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
77
+ sideboxMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
73
78
  logoSrc: StringConstructor;
74
79
  logoTitle: StringConstructor;
75
80
  menuScrollToActive: {
@@ -150,7 +155,7 @@ declare const _default: import('vue').DefineComponent<{
150
155
  sideMenuItemClick: (_item: MenuItem, _e: MouseEvent) => boolean;
151
156
  sideMouseenter: (_e: MouseEvent) => boolean;
152
157
  sideMouseleave: (_e: MouseEvent) => boolean;
153
- tabClick: (_option: TabEventOption) => boolean; /** 是否是移动端风格折叠状态 */
158
+ tabClick: (_option: TabEventOption) => boolean;
154
159
  tabRemove: (_name: string) => boolean;
155
160
  tabContextMenu: (_option: TabEventOption) => boolean;
156
161
  tabSortChange: (_data: TabPaneItem[]) => boolean;
@@ -223,6 +228,11 @@ declare const _default: import('vue').DefineComponent<{
223
228
  sideboxCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
224
229
  tabsCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
225
230
  contentCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
231
+ logoStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
232
+ logoTitleStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
233
+ headerMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
234
+ sidebarMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
235
+ sideboxMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
226
236
  logoSrc: StringConstructor;
227
237
  logoTitle: StringConstructor;
228
238
  menuScrollToActive: {
@@ -112,6 +112,16 @@ const adminLayoutProps = {
112
112
  tabsCustomStyle: Object,
113
113
  /** 内容区样式 */
114
114
  contentCustomStyle: Object,
115
+ /** logo样式 */
116
+ logoStyle: Object,
117
+ /** logo文字样式 */
118
+ logoTitleStyle: Object,
119
+ /** 顶栏菜单样式 */
120
+ headerMenusStyle: Object,
121
+ /** 侧栏菜单样式 */
122
+ sidebarMenusStyle: Object,
123
+ /** 双侧栏一级菜单样式 */
124
+ sideboxMenusStyle: Object,
115
125
  /** logo图片地址 */
116
126
  logoSrc: String,
117
127
  /** logo文字 */
@@ -120,6 +120,16 @@ 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
+ logoStyle: PropType<Partial<import('vue').CSSProperties>>;
125
+ /** logo文字样式 */
126
+ logoTitleStyle: PropType<Partial<import('vue').CSSProperties>>;
127
+ /** 顶栏菜单样式 */
128
+ headerMenusStyle: PropType<Partial<import('vue').CSSProperties>>;
129
+ /** 侧栏菜单样式 */
130
+ sidebarMenusStyle: PropType<Partial<import('vue').CSSProperties>>;
131
+ /** 双侧栏一级菜单样式 */
132
+ sideboxMenusStyle: PropType<Partial<import('vue').CSSProperties>>;
123
133
  /** logo图片地址 */
124
134
  logoSrc: StringConstructor;
125
135
  /** logo文字 */
@@ -25,12 +25,18 @@ const _sfc_main = vue.defineComponent({
25
25
  /** 内容是否是富文本 */
26
26
  dangerouslyUseHTMLString: Boolean,
27
27
  /** 是否是加载框 */
28
- loading: Boolean
28
+ loading: Boolean,
29
+ /** 标识id */
30
+ messageId: String
29
31
  },
30
32
  emits: {
31
- close: () => true
33
+ close: () => true,
34
+ messageDestroy: (_messageId) => true
32
35
  },
33
- setup(_props, { emit }) {
36
+ setup(props, { emit }) {
37
+ vue.onBeforeUnmount(() => {
38
+ emit("messageDestroy", props.messageId);
39
+ });
34
40
  return { onClose: () => emit("close") };
35
41
  }
36
42
  });
@@ -13,10 +13,13 @@ declare const _default: import('vue').DefineComponent<{
13
13
  dangerouslyUseHTMLString: BooleanConstructor;
14
14
  /** 是否是加载框 */
15
15
  loading: PropType<boolean | null>;
16
+ /** 标识id */
17
+ messageId: StringConstructor;
16
18
  }, {
17
19
  onClose: () => void;
18
20
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
21
  close: () => true;
22
+ messageDestroy: (_messageId?: string) => true;
20
23
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
21
24
  /** 内容 */
22
25
  message: StringConstructor;
@@ -30,8 +33,11 @@ declare const _default: import('vue').DefineComponent<{
30
33
  dangerouslyUseHTMLString: BooleanConstructor;
31
34
  /** 是否是加载框 */
32
35
  loading: PropType<boolean | null>;
36
+ /** 标识id */
37
+ messageId: StringConstructor;
33
38
  }>> & {
34
39
  onClose?: (() => any) | undefined;
40
+ onMessageDestroy?: ((_messageId?: string | undefined) => any) | undefined;
35
41
  }, {
36
42
  showClose: boolean;
37
43
  dangerouslyUseHTMLString: boolean;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const icons = require("../../icons");
4
+ const _sfc_main = vue.defineComponent({
5
+ name: "MessageBoxIcon",
6
+ components: {
7
+ CloseOutlined: icons.CloseOutlined,
8
+ InfoCircleFilled: icons.InfoCircleFilled,
9
+ CheckCircleFilled: icons.CheckCircleFilled,
10
+ ExclamationCircleFilled: icons.ExclamationCircleFilled,
11
+ CloseCircleFilled: icons.CloseCircleFilled
12
+ },
13
+ props: {
14
+ /** 类型 */
15
+ type: String,
16
+ /** 图标 */
17
+ icon: [String, Object, Function],
18
+ /** 标识id */
19
+ boxId: String
20
+ },
21
+ emits: {
22
+ boxDestroy: (_boxId) => true,
23
+ boxMounted: (_) => true
24
+ },
25
+ setup(props, { emit }) {
26
+ var _a;
27
+ const ins = (_a = vue.getCurrentInstance) == null ? void 0 : _a.call(vue);
28
+ vue.onBeforeUnmount(() => {
29
+ emit("boxDestroy", props.boxId);
30
+ });
31
+ vue.onMounted(() => {
32
+ var _a2, _b;
33
+ emit("boxMounted", {
34
+ boxId: props.boxId,
35
+ // @ts-ignore
36
+ doClose: (_b = (_a2 = ins == null ? void 0 : ins.ctx) == null ? void 0 : _a2.$root) == null ? void 0 : _b.doClose
37
+ });
38
+ });
39
+ return {};
40
+ }
41
+ });
42
+ const _export_sfc = (sfc, props) => {
43
+ const target = sfc.__vccOpts || sfc;
44
+ for (const [key, val] of props) {
45
+ target[key] = val;
46
+ }
47
+ return target;
48
+ };
49
+ const _hoisted_1 = { class: "ele-message-box-icon" };
50
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
51
+ const _component_CheckCircleFilled = vue.resolveComponent("CheckCircleFilled");
52
+ const _component_ExclamationCircleFilled = vue.resolveComponent("ExclamationCircleFilled");
53
+ const _component_CloseCircleFilled = vue.resolveComponent("CloseCircleFilled");
54
+ const _component_InfoCircleFilled = vue.resolveComponent("InfoCircleFilled");
55
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
56
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon), { key: 0 })) : _ctx.type === "success" ? (vue.openBlock(), vue.createBlock(_component_CheckCircleFilled, { key: 1 })) : _ctx.type === "warning" ? (vue.openBlock(), vue.createBlock(_component_ExclamationCircleFilled, { key: 2 })) : _ctx.type === "error" ? (vue.openBlock(), vue.createBlock(_component_CloseCircleFilled, { key: 3 })) : _ctx.type === "info" ? (vue.openBlock(), vue.createBlock(_component_InfoCircleFilled, { key: 4 })) : vue.createCommentVNode("", true)
57
+ ], 512)), [
58
+ [vue.vShow, _ctx.type || _ctx.icon]
59
+ ]);
60
+ }
61
+ const messageBoxIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
62
+ module.exports = messageBoxIcon;
@@ -0,0 +1,30 @@
1
+ import { PropType } from 'vue';
2
+
3
+ declare const _default: import('vue').DefineComponent<{
4
+ /** 类型 */
5
+ type: PropType<("" | "success" | "warning" | "error" | "info") | undefined>;
6
+ /** 图标 */
7
+ icon: PropType<string | import('vue').Component | undefined>;
8
+ /** 标识id */
9
+ boxId: StringConstructor;
10
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ boxDestroy: (_boxId?: string) => true;
12
+ boxMounted: (_: {
13
+ boxId?: string;
14
+ doClose?: () => void;
15
+ }) => true;
16
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
17
+ /** 类型 */
18
+ type: PropType<("" | "success" | "warning" | "error" | "info") | undefined>;
19
+ /** 图标 */
20
+ icon: PropType<string | import('vue').Component | undefined>;
21
+ /** 标识id */
22
+ boxId: StringConstructor;
23
+ }>> & {
24
+ onBoxDestroy?: ((_boxId?: string | undefined) => any) | undefined;
25
+ onBoxMounted?: ((_: {
26
+ boxId?: string | undefined;
27
+ doClose?: (() => void) | undefined;
28
+ }) => any) | undefined;
29
+ }, {}, {}>;
30
+ export default _default;