easy-component-ui 3.0.12 → 3.0.13

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 (61) hide show
  1. package/README.md +162 -162
  2. package/dist/assets/icon.css +1 -1
  3. package/dist/components/Base.js +3 -2
  4. package/dist/components/ea-alert.js +71 -54
  5. package/dist/components/ea-avatar.js +42 -37
  6. package/dist/components/ea-button.js +53 -52
  7. package/dist/components/ea-calendar2.js +329 -327
  8. package/dist/components/ea-card.js +63 -27
  9. package/dist/components/ea-carousel.js +2 -2
  10. package/dist/components/ea-collapse.js +28 -28
  11. package/dist/components/ea-color-picker.js +63 -66
  12. package/dist/components/ea-container.js +90 -61
  13. package/dist/components/ea-date-picker.js +1 -1
  14. package/dist/components/ea-dialog.js +4 -4
  15. package/dist/components/ea-drawer.js +51 -46
  16. package/dist/components/ea-icon.js +122 -32
  17. package/dist/components/ea-image-preview.js +237 -193
  18. package/dist/components/ea-image.js +69 -44
  19. package/dist/components/ea-input-number.js +9 -9
  20. package/dist/components/ea-input.js +15 -15
  21. package/dist/components/ea-layout.js +10 -3
  22. package/dist/components/ea-link.js +1 -1
  23. package/dist/components/ea-menu.js +1 -1
  24. package/dist/components/ea-message-box.js +73 -73
  25. package/dist/components/ea-message.js +184 -121
  26. package/dist/components/ea-notification.js +80 -80
  27. package/dist/components/ea-overlay.js +20 -19
  28. package/dist/components/ea-page-header.js +5 -5
  29. package/dist/components/ea-pagination.js +5 -5
  30. package/dist/components/ea-popconfirm.js +3 -3
  31. package/dist/components/ea-popover.js +35 -11
  32. package/dist/components/ea-progress.js +28 -28
  33. package/dist/components/ea-rate.js +1 -1
  34. package/dist/components/ea-result.js +13 -13
  35. package/dist/components/ea-select.js +12 -12
  36. package/dist/components/ea-slider.js +88 -79
  37. package/dist/components/ea-splitter.js +34 -18
  38. package/dist/components/ea-steps.js +33 -33
  39. package/dist/components/ea-table.js +332 -321
  40. package/dist/components/ea-tabs.js +28 -28
  41. package/dist/components/ea-tag.js +6 -6
  42. package/dist/components/ea-time-picker.js +2 -6
  43. package/dist/components/ea-timeline.js +1 -1
  44. package/dist/components/ea-tooltip.js +63 -23
  45. package/dist/components/ea-tour.js +21 -21
  46. package/dist/components/ea-transfer.js +2 -2
  47. package/dist/components/ea-tree.js +1 -1
  48. package/dist/components/index.js +0 -1
  49. package/dist/css/ea-card.style.js +2 -2
  50. package/dist/css/ea-container.style.js +1 -1
  51. package/dist/css/ea-footer.style.js +1 -1
  52. package/dist/css/ea-progress.style.js +1 -1
  53. package/dist/css/ea-step.style.js +1 -1
  54. package/dist/css/ea-switch.style.js +1 -1
  55. package/dist/css/ea-tab.style.js +1 -1
  56. package/dist/css/ea-tabs.style.js +1 -1
  57. package/dist/css/ea-tag.style.js +1 -1
  58. package/dist/css/ea-time-picker.style.js +1 -1
  59. package/dist/utils/Variables.js +10 -10
  60. package/package.json +302 -304
  61. package/dist/components/ea-loading.js +0 -151
@@ -1,93 +1,121 @@
1
- var u = Object.defineProperty;
2
- var h = (t) => {
1
+ var b = Object.defineProperty;
2
+ var f = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var p = (t, s, e) => s in t ? u(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
6
- var r = (t, s, e) => p(t, typeof s != "symbol" ? s + "" : s, e), m = (t, s, e) => s.has(t) || h("Cannot " + e);
7
- var i = (t, s, e) => s.has(t) ? h("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), n = (t, s, e, a) => (m(t, s, "write to private field"), a ? a.call(t, e) : s.set(t, e), e);
8
- import { B as o } from "./Base.js";
9
- import { s as f } from "../css/ea-container.style.js";
10
- import { s as w } from "../css/ea-header.style.js";
11
- import { s as y } from "../css/ea-main.style.js";
12
- import { s as b } from "../css/ea-footer.style.js";
13
- import { s as g } from "../css/ea-aside.style.js";
14
- var c;
15
- class E extends o {
5
+ var g = (t, s, e) => s in t ? b(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
6
+ var n = (t, s, e) => g(t, typeof s != "symbol" ? s + "" : s, e), y = (t, s, e) => s.has(t) || f("Cannot " + e);
7
+ var r = (t, s, e) => (y(t, s, "read from private field"), e ? e.call(t) : s.get(t)), o = (t, s, e) => s.has(t) ? f("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), a = (t, s, e, d) => (y(t, s, "write to private field"), d ? d.call(t, e) : s.set(t, e), e);
8
+ import { B as c } from "./Base.js";
9
+ import { s as w } from "../css/ea-container.style.js";
10
+ import { s as C } from "../css/ea-header.style.js";
11
+ import { s as E } from "../css/ea-main.style.js";
12
+ import { s as $ } from "../css/ea-footer.style.js";
13
+ import { s as v } from "../css/ea-aside.style.js";
14
+ var h, l, i, u;
15
+ class S extends c {
16
16
  constructor() {
17
17
  super();
18
18
  /** @type {HTMLElement} */
19
- i(this, c);
20
- /**
19
+ o(this, h);
20
+ /** @type {SlotElement} */
21
+ o(this, l);
22
+ /** @type {AbortController} */
23
+ o(this, i);
24
+ /**
21
25
  * @typedef {Object} State
22
26
  * @property {string} direction 排列方向
23
27
  */
24
28
  /** @type {State} */
25
- r(this, "state", this.properties({
29
+ n(this, "state", this.properties({
26
30
  direction: {
27
31
  type: ["horizontal", "vertical"],
28
32
  default: "horizontal",
29
- observer: (e) => {
30
- this.style.setProperty("--ea-container-direction", e === "vertical" ? "column" : "row");
33
+ observer: () => {
34
+ this.updateContainerClasslist();
31
35
  }
32
36
  }
33
37
  }));
34
- this.stylesheet = f, this.$render();
38
+ /**
39
+ * 处理槽位变化事件
40
+ */
41
+ o(this, u, () => {
42
+ const e = [...this.querySelectorAll("& > *")].map(
43
+ (d) => d.tagName.toLowerCase()
44
+ );
45
+ this.hasAttribute("direction") || (e.includes("ea-header") || e.includes("ea-footer") ? this.direction = "vertical" : this.direction = "horizontal");
46
+ });
47
+ this.stylesheet = w, this.$render();
35
48
  }
36
49
  static get observedAttributes() {
37
- return ["direction"];
50
+ return [...super.observedAttributes, "direction"];
51
+ }
52
+ /**
53
+ * 获取 classlist 列表
54
+ * @return {string} 属性值
55
+ */
56
+ updateContainerClasslist() {
57
+ const e = this.computedClasslist("ea-container", {
58
+ [`--${this.direction}`]: this.direction
59
+ });
60
+ return r(this, h).className = e, e;
38
61
  }
39
62
  $render() {
40
63
  this.shadowRoot.innerHTML = `
41
- <div class="ea-container" part="container">
42
- <slot></slot>
43
- </div>
44
- `, n(this, c, this.shadowRoot.querySelector(".ea-container"));
64
+ <div class="ea-container" part="container">
65
+ <slot></slot>
66
+ </div>
67
+ `, a(this, h, this.shadowRoot.querySelector(".ea-container")), a(this, l, this.shadowRoot.querySelector("slot"));
45
68
  }
46
69
  connectedCallback() {
47
- super.connectedCallback();
48
- const e = [...this.children].map((a) => a.tagName.toLowerCase());
49
- e.includes("ea-header") || e.includes("ea-footer") ? this.direction = "vertical" : this.direction = "horizontal";
70
+ var e;
71
+ super.connectedCallback(), (e = r(this, i)) == null || e.abort(), a(this, i, new AbortController()), r(this, l).addEventListener("slotchange", r(this, u), {
72
+ signal: r(this, i).signal
73
+ });
74
+ }
75
+ $beforeUnmounted() {
76
+ var e;
77
+ (e = r(this, i)) == null || e.abort();
50
78
  }
51
79
  }
52
- c = new WeakMap();
53
- customElements.get("ea-container") || customElements.define("ea-container", E);
54
- class $ extends o {
80
+ h = new WeakMap(), l = new WeakMap(), i = new WeakMap(), u = new WeakMap();
81
+ customElements.get("ea-container") || customElements.define("ea-container", S);
82
+ class k extends c {
55
83
  constructor() {
56
84
  super();
57
- /**
85
+ /**
58
86
  * @typedef {Object} State
59
87
  * @property {string} height
60
88
  */
61
89
  /** @type {State} */
62
- r(this, "state", this.properties({
90
+ n(this, "state", this.properties({
63
91
  height: {
64
92
  type: String,
65
93
  default: "60px",
66
94
  observer: (e) => {
67
- this.style.setProperty("--ea-header-height", e);
95
+ e && CSS.supports("height", e) ? this.style.setProperty("--ea-header-height", e) : e ? this.style.setProperty("--ea-header-height", "60px") : this.style.setProperty("--ea-header-height", "auto");
68
96
  }
69
97
  }
70
98
  }));
71
- this.stylesheet = w, this.$render();
99
+ this.stylesheet = C, this.$render();
72
100
  }
73
101
  static get observedAttributes() {
74
102
  return ["height"];
75
103
  }
76
104
  $render() {
77
105
  this.shadowRoot.innerHTML = `
78
- <header class="ea-header" part="container">
79
- <slot></slot>
80
- </header>
81
- `;
106
+ <header class="ea-header" part="container">
107
+ <slot></slot>
108
+ </header>
109
+ `;
82
110
  }
83
111
  connectedCallback() {
84
112
  super.connectedCallback();
85
113
  }
86
114
  }
87
- window.customElements.get("ea-header") || window.customElements.define("ea-header", $);
88
- class v extends o {
115
+ window.customElements.get("ea-header") || window.customElements.define("ea-header", k);
116
+ class x extends c {
89
117
  constructor() {
90
- super(), this.stylesheet = y, this.$render();
118
+ super(), this.stylesheet = E, this.$render();
91
119
  }
92
120
  $render() {
93
121
  this.shadowRoot.innerHTML = `
@@ -100,27 +128,28 @@ class v extends o {
100
128
  super.connectedCallback();
101
129
  }
102
130
  }
103
- window.customElements.get("ea-main") || window.customElements.define("ea-main", v);
104
- var d;
105
- class C extends o {
131
+ window.customElements.get("ea-main") || window.customElements.define("ea-main", x);
132
+ var p;
133
+ class A extends c {
106
134
  constructor() {
107
135
  super();
108
136
  /** @type {HTMLElement} */
109
- i(this, d);
110
- /**
137
+ o(this, p);
138
+ /**
111
139
  * @typedef {Object} State
140
+ * @property {string} height
112
141
  */
113
142
  /** @type {State} */
114
- r(this, "state", this.properties({
143
+ n(this, "state", this.properties({
115
144
  height: {
116
145
  type: String,
117
146
  default: "60px",
118
147
  observer: (e) => {
119
- this.style.setProperty("--ea-footer-height", e);
148
+ e && CSS.supports("height", e) ? this.style.setProperty("--ea-footer-height", e) : e ? this.style.setProperty("--ea-footer-height", "60px") : this.style.setProperty("--ea-footer-height", "auto");
120
149
  }
121
150
  }
122
151
  }));
123
- this.stylesheet = b, this.$render();
152
+ this.stylesheet = $, this.$render();
124
153
  }
125
154
  static get observedAttributes() {
126
155
  return ["height"];
@@ -130,25 +159,25 @@ class C extends o {
130
159
  <footer class="ea-footer" part="container">
131
160
  <slot></slot>
132
161
  </footer>
133
- `, n(this, d, this.shadowRoot.querySelector(".ea-footer"));
162
+ `, a(this, p, this.shadowRoot.querySelector(".ea-footer"));
134
163
  }
135
164
  connectedCallback() {
136
165
  super.connectedCallback();
137
166
  }
138
167
  }
139
- d = new WeakMap();
140
- window.customElements.get("ea-footer") || window.customElements.define("ea-footer", C);
141
- var l;
142
- class k extends o {
168
+ p = new WeakMap();
169
+ window.customElements.get("ea-footer") || window.customElements.define("ea-footer", A);
170
+ var m;
171
+ class R extends c {
143
172
  constructor() {
144
173
  super();
145
174
  /** @type {HTMLElement} */
146
- i(this, l);
147
- /**
175
+ o(this, m);
176
+ /**
148
177
  * @typedef {Object} State
149
178
  */
150
179
  /** @type {State} */
151
- r(this, "state", this.properties({
180
+ n(this, "state", this.properties({
152
181
  width: {
153
182
  type: String,
154
183
  default: "300px",
@@ -157,7 +186,7 @@ class k extends o {
157
186
  }
158
187
  }
159
188
  }));
160
- this.stylesheet = g, this.$render();
189
+ this.stylesheet = v, this.$render();
161
190
  }
162
191
  static get observedAttributes() {
163
192
  return ["width"];
@@ -167,11 +196,11 @@ class k extends o {
167
196
  <aside class="ea-aside" part="container">
168
197
  <slot></slot>
169
198
  </aside>
170
- `, n(this, l, this.shadowRoot.querySelector(".ea-aside"));
199
+ `, a(this, m, this.shadowRoot.querySelector(".ea-aside"));
171
200
  }
172
201
  connectedCallback() {
173
202
  super.connectedCallback();
174
203
  }
175
204
  }
176
- l = new WeakMap();
177
- window.customElements.get("ea-aside") || window.customElements.define("ea-aside", k);
205
+ m = new WeakMap();
206
+ window.customElements.get("ea-aside") || window.customElements.define("ea-aside", R);
@@ -542,7 +542,7 @@ class Yt extends ft {
542
542
  this.shadowRoot.innerHTML = this.html(`
543
543
  <div class='${e.b()}' part='container'>
544
544
  <div class='${e.e("input-wrap")}' part='input-wrap'>
545
- <ea-input class="${e.e("input")}" part='input' prefix-icon="icon-calendar-times-o" readonly></ea-input>
545
+ <ea-input class="${e.e("input")}" part='input' prefix-icon="calendar-xmark" readonly></ea-input>
546
546
  </div>
547
547
  <div class='${e.e("dropdown-wrap")}' part='dropdown-wrap'>
548
548
  <div class='${e.e("calendar-wrapper")}'>
@@ -9,7 +9,7 @@ import { EaOverlay as E } from "./ea-overlay.js";
9
9
  import { s as B } from "../css/ea-dialog.style.js";
10
10
  import { t as C } from "../utils/timeout.js";
11
11
  var n, h, c, p, r, i, b, f, g;
12
- class A extends E {
12
+ class k extends E {
13
13
  constructor() {
14
14
  super();
15
15
  /** @type {HTMLElement} */
@@ -168,7 +168,7 @@ class A extends E {
168
168
  <header class='ea-dialog-main__header' part='header'>
169
169
  <slot name="header">
170
170
  <span class='ea-dialog-main__title' part='title'></span>
171
- <ea-icon class='ea-dialog-main__close-icon' icon='icon-cancel' part='close-icon'></ea-icon>
171
+ <ea-icon class='ea-dialog-main__close-icon' name='xmark' part='close-icon'></ea-icon>
172
172
  </slot>
173
173
  </header>
174
174
  <main class='ea-dialog-main__content' part='content'>
@@ -243,7 +243,7 @@ class A extends E {
243
243
  }
244
244
  }
245
245
  n = new WeakMap(), h = new WeakMap(), c = new WeakMap(), p = new WeakMap(), r = new WeakMap(), i = new WeakMap(), b = new WeakMap(), f = new WeakMap(), g = new WeakMap();
246
- window.customElements.get("ea-dialog") || window.customElements.define("ea-dialog", A);
246
+ window.customElements.get("ea-dialog") || window.customElements.define("ea-dialog", k);
247
247
  export {
248
- A as EaDialog
248
+ k as EaDialog
249
249
  };
@@ -1,35 +1,35 @@
1
- var E = Object.defineProperty;
2
- var v = (s) => {
1
+ var g = Object.defineProperty;
2
+ var _ = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
- var g = (s, o, e) => o in s ? E(s, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[o] = e;
6
- var C = (s, o, e) => g(s, typeof o != "symbol" ? o + "" : o, e), _ = (s, o, e) => o.has(s) || v("Cannot " + e);
7
- var t = (s, o, e) => (_(s, o, "read from private field"), e ? e.call(s) : o.get(s)), r = (s, o, e) => o.has(s) ? v("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, e), a = (s, o, e, l) => (_(s, o, "write to private field"), l ? l.call(s, e) : o.set(s, e), e);
8
- import { EaOverlay as S } from "./ea-overlay.js";
9
- import { s as k } from "../css/ea-drawer.style.js";
5
+ var S = (s, o, e) => o in s ? g(s, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[o] = e;
6
+ var C = (s, o, e) => S(s, typeof o != "symbol" ? o + "" : o, e), E = (s, o, e) => o.has(s) || _("Cannot " + e);
7
+ var t = (s, o, e) => (E(s, o, "read from private field"), e ? e.call(s) : o.get(s)), a = (s, o, e) => o.has(s) ? _("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, e), l = (s, o, e, i) => (E(s, o, "write to private field"), i ? i.call(s, e) : o.set(s, e), e);
8
+ import { EaOverlay as k } from "./ea-overlay.js";
9
+ import { s as A } from "../css/ea-drawer.style.js";
10
10
  import { E as q } from "../utils/Utils.js";
11
- import { t as A } from "../utils/timeout.js";
12
- var f, h, p, u, d, w, b, n, i, m, c, y;
13
- class R extends S {
11
+ import { t as R } from "../utils/timeout.js";
12
+ var p, c, u, f, n, w, b, h, r, m, d, y;
13
+ class B extends k {
14
14
  constructor() {
15
15
  super();
16
16
  /** @type {HTMLElement} */
17
- r(this, f);
17
+ a(this, p);
18
18
  /** @type {HTMLElement} */
19
- r(this, h);
19
+ a(this, c);
20
20
  /** @type {HTMLElement} */
21
- r(this, p);
21
+ a(this, u);
22
22
  /** @type {HTMLElement} */
23
- r(this, u);
23
+ a(this, f);
24
24
  /** @type {HTMLElement} */
25
- r(this, d);
25
+ a(this, n);
26
26
  /** @type {HTMLElement} */
27
- r(this, w);
27
+ a(this, w);
28
28
  /** @type {HTMLElement} */
29
- r(this, b);
29
+ a(this, b);
30
30
  /** @type {AbortController} */
31
- r(this, n);
32
- r(this, i, {
31
+ a(this, h);
32
+ a(this, r, {
33
33
  /** @type {AbortController | null} */
34
34
  showClose: null,
35
35
  /** @type {AbortController | null} */
@@ -46,33 +46,33 @@ class R extends S {
46
46
  repeatable: !0,
47
47
  observer: (e) => {
48
48
  if (!e && this.beforeClose && this.status !== this.visible) {
49
- this.visible = !e, t(this, c).call(this);
49
+ this.visible = !e, t(this, d).call(this);
50
50
  return;
51
51
  }
52
- e && A(() => this.focus(), 0), (e || !this.beforeClose) && (this.status = e);
52
+ e && R(() => this.focus(), 0), (e || !this.beforeClose) && (this.status = e);
53
53
  }
54
54
  },
55
55
  "with-header": {
56
56
  type: Boolean,
57
57
  default: !0,
58
58
  observer: (e) => {
59
- t(this, p).style.display = e ? "flex" : "none";
59
+ t(this, u).style.display = e ? "flex" : "none";
60
60
  }
61
61
  },
62
62
  title: {
63
63
  type: String,
64
64
  default: "",
65
65
  observer: (e) => {
66
- this["with-header"] && (t(this, u).textContent = e);
66
+ this["with-header"] && (t(this, f).textContent = e);
67
67
  }
68
68
  },
69
69
  showClose: {
70
70
  type: Boolean,
71
71
  default: !0,
72
72
  observer: (e) => {
73
- var l;
74
- (l = t(this, i).showClose) == null || l.abort(), t(this, i).showClose = null, this["with-header"] && (t(this, d).style.display = e ? "block" : "none"), e && (t(this, i).showClose = new AbortController(), t(this, d).addEventListener("click", t(this, c), {
75
- signal: t(this, i).showClose.signal
73
+ var i;
74
+ (i = t(this, r).showClose) == null || i.abort(), t(this, r).showClose = null, this["with-header"] && (t(this, n).style.display = e ? "block" : "none"), e && (t(this, r).showClose = new AbortController(), t(this, n).addEventListener("click", t(this, d), {
75
+ signal: t(this, r).showClose.signal
76
76
  }));
77
77
  }
78
78
  },
@@ -91,9 +91,9 @@ class R extends S {
91
91
  type: Boolean,
92
92
  default: !0,
93
93
  observer: (e) => {
94
- var l;
95
- (l = t(this, i).closeOnPressEscape) == null || l.abort(), t(this, i).closeOnPressEscape = null, e && (t(this, i).closeOnPressEscape = new AbortController(), document.addEventListener("keydown", t(this, y), {
96
- signal: t(this, i).closeOnPressEscape.signal
94
+ var i;
95
+ (i = t(this, r).closeOnPressEscape) == null || i.abort(), t(this, r).closeOnPressEscape = null, e && (t(this, r).closeOnPressEscape = new AbortController(), document.addEventListener("keydown", t(this, y), {
96
+ signal: t(this, r).closeOnPressEscape.signal
97
97
  }));
98
98
  }
99
99
  }
@@ -110,14 +110,14 @@ class R extends S {
110
110
  * 初始化抽屉 DOM 结构
111
111
  * @param {HTMLElement} container - 抽屉内容容器
112
112
  */
113
- r(this, m, (e) => {
113
+ a(this, m, (e) => {
114
114
  e.innerHTML = `
115
115
  <div class="ea-drawer-main" part="container">
116
116
  <header class="ea-drawer-main__header" part="header">
117
117
  <span class="ea-drawer-main__title" part="title">
118
118
  <slot name="title"></slot>
119
119
  </span>
120
- <ea-icon class="ea-drawer-main__close-icon" icon="icon-cancel" part="close-icon"></ea-icon>
120
+ <ea-icon class="ea-drawer-main__close-icon" name="xmark" part="close-icon"></ea-icon>
121
121
  </header>
122
122
  <main class="ea-drawer-main__content" part="content">
123
123
  <slot></slot>
@@ -126,14 +126,14 @@ class R extends S {
126
126
  <slot name="footer"></slot>
127
127
  </footer>
128
128
  </div>
129
- `, a(this, f, this.shadowRoot.querySelector(".ea-overlay")), a(this, h, this.shadowRoot.querySelector(".ea-drawer-main")), a(this, p, this.shadowRoot.querySelector(".ea-drawer-main__header")), a(this, u, this.shadowRoot.querySelector(".ea-drawer-main__title")), a(this, d, this.shadowRoot.querySelector(
129
+ `, l(this, p, this.shadowRoot.querySelector(".ea-overlay")), l(this, c, this.shadowRoot.querySelector(".ea-drawer-main")), l(this, u, this.shadowRoot.querySelector(".ea-drawer-main__header")), l(this, f, this.shadowRoot.querySelector(".ea-drawer-main__title")), l(this, n, this.shadowRoot.querySelector(
130
130
  ".ea-drawer-main__close-icon"
131
- )), a(this, w, this.shadowRoot.querySelector(".ea-drawer-main__content")), a(this, b, this.shadowRoot.querySelector(".ea-drawer-main__footer"));
131
+ )), l(this, w, this.shadowRoot.querySelector(".ea-drawer-main__content")), l(this, b, this.shadowRoot.querySelector(".ea-drawer-main__footer"));
132
132
  });
133
133
  /**
134
134
  * 处理抽屉关闭前的回调
135
135
  */
136
- r(this, c, () => {
136
+ a(this, d, () => {
137
137
  this.beforeClose ? this.beforeClose(() => {
138
138
  this.status = !1, this.visible = !1;
139
139
  }) : (this.status = !1, this.visible = !1);
@@ -142,8 +142,8 @@ class R extends S {
142
142
  * 处理键盘事件
143
143
  * @param {KeyboardEvent} e - 键盘事件对象
144
144
  */
145
- r(this, y, (e) => {
146
- e.key === "Escape" && this.visible && t(this, c).call(this);
145
+ a(this, y, (e) => {
146
+ e.key === "Escape" && this.visible && t(this, d).call(this);
147
147
  });
148
148
  this["append-to-body"] && document.body.appendChild(this);
149
149
  const e = this.shadowRoot.querySelector(
@@ -174,7 +174,7 @@ class R extends S {
174
174
  * @return {string} 属性值
175
175
  */
176
176
  updateContainerClasslist() {
177
- return `${super.updateContainerClasslist()} ${this.computedClasslist(
177
+ const e = `${super.updateContainerClasslist()} ${this.computedClasslist(
178
178
  "ea-drawer",
179
179
  {
180
180
  ["--" + this.direction]: this.direction
@@ -183,10 +183,11 @@ class R extends S {
183
183
  drawer: !0
184
184
  }
185
185
  )}`;
186
+ return t(this, p).className = e, e;
186
187
  }
187
188
  connectedCallback() {
188
- var e;
189
- (e = t(this, n)) == null || e.abort(), a(this, n, new AbortController()), t(this, h).ariaModal = !0, t(this, h).role = "dialog", this["close-on-click-modal"] = this.getAttrBoolean(
189
+ var e, i;
190
+ (e = t(this, h)) == null || e.abort(), l(this, h, new AbortController()), t(this, c).ariaModal = !0, t(this, c).role = "dialog", this["close-on-click-modal"] = this.getAttrBoolean(
190
191
  "close-on-click-modal",
191
192
  !0
192
193
  ), this.addEventListener(
@@ -195,17 +196,21 @@ class R extends S {
195
196
  this.visible = !1;
196
197
  },
197
198
  {
198
- signal: t(this, n).signal
199
+ signal: t(this, h).signal
199
200
  }
200
- ), super.connectedCallback(), this.assignedStyle(k);
201
+ ), this["show-close"] && ((i = t(this, r).showClose) == null || i.abort(), t(this, r).showClose = new AbortController(), t(this, n).addEventListener("click", t(this, d), {
202
+ signal: t(this, r).showClose.signal
203
+ })), super.connectedCallback(), this.assignedStyle(A);
201
204
  }
202
205
  $beforeUnmounted() {
203
- var e;
204
- (e = t(this, n)) == null || e.abort();
206
+ var e, i;
207
+ (e = t(this, h)) == null || e.abort();
208
+ for (const v in t(this, r))
209
+ (i = t(this, r)[v]) == null || i.abort(), t(this, r)[v] = null;
205
210
  }
206
211
  }
207
- f = new WeakMap(), h = new WeakMap(), p = new WeakMap(), u = new WeakMap(), d = new WeakMap(), w = new WeakMap(), b = new WeakMap(), n = new WeakMap(), i = new WeakMap(), m = new WeakMap(), c = new WeakMap(), y = new WeakMap();
208
- window.customElements.get("ea-drawer") || window.customElements.define("ea-drawer", R);
212
+ p = new WeakMap(), c = new WeakMap(), u = new WeakMap(), f = new WeakMap(), n = new WeakMap(), w = new WeakMap(), b = new WeakMap(), h = new WeakMap(), r = new WeakMap(), m = new WeakMap(), d = new WeakMap(), y = new WeakMap();
213
+ window.customElements.get("ea-drawer") || window.customElements.define("ea-drawer", B);
209
214
  export {
210
- R as EaDrawer
215
+ B as EaDrawer
211
216
  };