easy-component-ui 3.0.10 → 3.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Base.js +187 -186
- package/dist/components/ea-breadcrumb.js +33 -33
- package/dist/components/ea-carousel.js +71 -70
- package/dist/components/ea-collapse.js +100 -80
- package/dist/components/ea-color-picker.js +199 -196
- package/dist/components/ea-countdown.js +77 -56
- package/dist/components/ea-descriptions.js +133 -70
- package/dist/components/ea-drawer.js +87 -70
- package/dist/components/ea-empty.js +31 -23
- package/dist/components/ea-menu.js +68 -52
- package/dist/components/ea-overlay.js +35 -29
- package/dist/components/ea-pagination.js +1 -0
- package/dist/components/ea-popconfirm.js +132 -77
- package/dist/components/ea-popper.js +9 -9
- package/dist/components/ea-progress.js +81 -64
- package/dist/components/ea-result.js +22 -22
- package/dist/components/ea-select.js +110 -99
- package/dist/components/ea-skeleton.js +99 -82
- package/dist/components/ea-statistic.js +72 -4
- package/dist/components/ea-steps.js +104 -70
- package/dist/components/ea-table.js +514 -397
- package/dist/components/ea-tag.js +37 -43
- package/dist/components/ea-timeline.js +10 -11
- package/dist/components/index.js +1 -1
- package/dist/css/ea-card.style.js +1 -1
- package/dist/css/ea-carousel.style.js +2 -2
- package/dist/css/ea-collapse-item.style.js +1 -1
- package/dist/css/ea-color-picker-panel.style.js +1 -1
- package/dist/css/ea-descriptions-item.style.js +2 -2
- package/dist/css/ea-descriptions.style.js +1 -1
- package/dist/css/ea-empty.style.js +1 -1
- package/dist/css/ea-progress.style.js +1 -1
- package/dist/css/ea-skeleton.style.js +1 -1
- package/dist/css/ea-step.style.js +1 -1
- package/dist/css/ea-table-column.style.js +4 -0
- package/dist/css/ea-table.style.js +1 -1
- package/dist/css/ea-timeline-item.style.js +1 -1
- package/dist/utils/Variables.js +5 -12
- package/dist/utils/parseTime.js +73 -0
- package/package.json +1 -1
- package/dist/components/ea-statistic2.js +0 -83
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var v = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var o = (e, s, t) => (
|
|
8
|
-
import { B as
|
|
5
|
+
var C = (e, s, t) => s in e ? b(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var p = (e, s, t) => C(e, typeof s != "symbol" ? s + "" : s, t), y = (e, s, t) => s.has(e) || v("Cannot " + t);
|
|
7
|
+
var o = (e, s, t) => (y(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? v("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), d = (e, s, t, n) => (y(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { B as w } from "./Base.js";
|
|
9
9
|
import { s as k } from "../css/ea-overlay.style.js";
|
|
10
10
|
import { t as g } from "../utils/timeout.js";
|
|
11
|
-
var a,
|
|
12
|
-
class E extends
|
|
11
|
+
var a, u, l, c, i, f, m;
|
|
12
|
+
class E extends w {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
15
15
|
/** @type {HTMLElement} */
|
|
16
|
-
|
|
16
|
+
r(this, a);
|
|
17
17
|
/** @type {HTMLElement} */
|
|
18
|
-
|
|
18
|
+
r(this, u);
|
|
19
19
|
/** @type {HTMLElement} */
|
|
20
|
-
|
|
20
|
+
r(this, l);
|
|
21
21
|
/** @type {AbortController} */
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
r(this, c);
|
|
23
|
+
p(this, "state", this.properties({
|
|
24
24
|
status: {
|
|
25
25
|
type: Boolean,
|
|
26
26
|
default: !1,
|
|
27
27
|
observer: (t) => {
|
|
28
|
-
t ? (o(this, a).className = this.updateContainerClasslist(), o(this,
|
|
28
|
+
t ? (o(this, a).className = this.updateContainerClasslist(), o(this, i).call(this, "open"), requestAnimationFrame(() => {
|
|
29
29
|
o(this, a).classList.add("ea-overlay--is-show"), o(this, a).addEventListener(
|
|
30
30
|
"transitionend",
|
|
31
31
|
() => {
|
|
32
|
-
o(this,
|
|
32
|
+
o(this, i).call(this, "opened");
|
|
33
33
|
},
|
|
34
34
|
{ once: !0 }
|
|
35
35
|
);
|
|
36
|
-
})) : (o(this, a).classList.add("ea-overlay--before-close"), o(this,
|
|
36
|
+
})) : (o(this, a).classList.add("ea-overlay--before-close"), o(this, i).call(this, "close"), o(this, a).addEventListener(
|
|
37
37
|
"transitionend",
|
|
38
38
|
() => {
|
|
39
|
-
o(this, a).className = this.updateContainerClasslist(), o(this,
|
|
39
|
+
o(this, a).className = this.updateContainerClasslist(), o(this, i).call(this, "closed");
|
|
40
40
|
},
|
|
41
41
|
{ once: !0 }
|
|
42
42
|
));
|
|
@@ -75,25 +75,31 @@ class E extends C {
|
|
|
75
75
|
].reduce((t, n) => (t[n] = {
|
|
76
76
|
type: String,
|
|
77
77
|
default: "",
|
|
78
|
-
observer: (
|
|
79
|
-
this.style.setProperty(`--ea-overlay-${n}`,
|
|
78
|
+
observer: (h) => {
|
|
79
|
+
this.style.setProperty(`--ea-overlay-${n}`, h);
|
|
80
80
|
}
|
|
81
81
|
}, t), {})
|
|
82
82
|
}));
|
|
83
|
-
|
|
83
|
+
p(this, "funcStates", this.properties({
|
|
84
|
+
beforeClose: {
|
|
85
|
+
rawFunction: !0,
|
|
86
|
+
props: !0,
|
|
87
|
+
type: Function,
|
|
88
|
+
default: null
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
r(this, i, (t, n) => {
|
|
84
92
|
this.emit(t, {
|
|
85
93
|
detail: n
|
|
86
94
|
// bubbles: true,
|
|
87
95
|
// composed: true,
|
|
88
96
|
});
|
|
89
97
|
});
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
r(this, f, () => this.status = !1);
|
|
99
|
+
r(this, m, (t) => {
|
|
92
100
|
[...this.children].find(
|
|
93
|
-
(
|
|
94
|
-
) || o(this, l) === t.target || o(this, l).contains(t.target) || (this
|
|
95
|
-
detail: { done: () => o(this, h).call(this) }
|
|
96
|
-
}) : o(this, h).call(this));
|
|
101
|
+
(h) => h === t.target || h.contains(t.target)
|
|
102
|
+
) || o(this, l) === t.target || o(this, l).contains(t.target) || (this.beforeClose ? this.beforeClose(() => this.status = !1) : o(this, f).call(this));
|
|
97
103
|
});
|
|
98
104
|
this.stylesheet = k, this.$render(), document.activeElement.blur(), g(() => {
|
|
99
105
|
this.focus();
|
|
@@ -103,7 +109,7 @@ class E extends C {
|
|
|
103
109
|
return [
|
|
104
110
|
"status",
|
|
105
111
|
"modal",
|
|
106
|
-
"before-close",
|
|
112
|
+
// "before-close",
|
|
107
113
|
"close-on-click-modal",
|
|
108
114
|
"z-index",
|
|
109
115
|
"background-color",
|
|
@@ -141,12 +147,12 @@ class E extends C {
|
|
|
141
147
|
<slot></slot>
|
|
142
148
|
</div>
|
|
143
149
|
</div>
|
|
144
|
-
`, d(this, a, this.shadowRoot.querySelector(".ea-overlay")), d(this,
|
|
150
|
+
`, d(this, a, this.shadowRoot.querySelector(".ea-overlay")), d(this, u, this.shadowRoot.querySelector(".ea-overlay__mask")), d(this, l, this.shadowRoot.querySelector(
|
|
145
151
|
".ea-overlay__content"
|
|
146
152
|
));
|
|
147
153
|
}
|
|
148
154
|
connectedCallback() {
|
|
149
|
-
super.connectedCallback(), d(this, c, new AbortController()), this["close-on-click-modal"] && this.shadowRoot.addEventListener("click", o(this,
|
|
155
|
+
super.connectedCallback(), d(this, c, new AbortController()), this["close-on-click-modal"] && this.shadowRoot.addEventListener("click", o(this, m), {
|
|
150
156
|
signal: o(this, c).signal
|
|
151
157
|
});
|
|
152
158
|
}
|
|
@@ -154,7 +160,7 @@ class E extends C {
|
|
|
154
160
|
o(this, c).abort();
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
|
-
a = new WeakMap(),
|
|
163
|
+
a = new WeakMap(), u = new WeakMap(), l = new WeakMap(), c = new WeakMap(), i = new WeakMap(), f = new WeakMap(), m = new WeakMap();
|
|
158
164
|
window.customElements.get("ea-overlay") || window.customElements.define("ea-overlay", E);
|
|
159
165
|
export {
|
|
160
166
|
E as EaOverlay
|
|
@@ -1,49 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var z = (n) => {
|
|
3
|
+
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { EaPopper as
|
|
9
|
-
import { s as
|
|
10
|
-
var
|
|
11
|
-
class
|
|
5
|
+
var j = (n, i, t) => i in n ? F(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
|
|
6
|
+
var H = (n, i, t) => j(n, typeof i != "symbol" ? i + "" : i, t), x = (n, i, t) => i.has(n) || z("Cannot " + t);
|
|
7
|
+
var e = (n, i, t) => (x(n, i, "read from private field"), t ? t.call(n) : i.get(n)), s = (n, i, t) => i.has(n) ? z("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(n) : i.set(n, t), a = (n, i, t, o) => (x(n, i, "write to private field"), o ? o.call(n, t) : i.set(n, t), t), M = (n, i, t) => (x(n, i, "access private method"), t);
|
|
8
|
+
import { EaPopper as D } from "./ea-popper.js";
|
|
9
|
+
import { s as G } from "../css/ea-popconfirm.style.js";
|
|
10
|
+
var v, p, f, B, L, d, u, m, $, C, b, y, h, c, S, _, U, g, w, q;
|
|
11
|
+
class J extends D {
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
14
|
-
|
|
14
|
+
s(this, _);
|
|
15
15
|
/** @type {HTMLElement} */
|
|
16
|
-
|
|
16
|
+
s(this, v);
|
|
17
17
|
/** @type {HTMLElement} */
|
|
18
|
-
|
|
18
|
+
s(this, p);
|
|
19
19
|
/** @type {HTMLElement} */
|
|
20
|
-
|
|
20
|
+
s(this, f);
|
|
21
21
|
/** @type {HTMLElement} */
|
|
22
|
-
|
|
22
|
+
s(this, B);
|
|
23
23
|
/** @type {HTMLElement} */
|
|
24
|
-
|
|
24
|
+
s(this, L);
|
|
25
25
|
/** @type {HTMLElement} */
|
|
26
|
-
|
|
26
|
+
s(this, d);
|
|
27
27
|
/** @type {HTMLElement} */
|
|
28
|
-
|
|
28
|
+
s(this, u);
|
|
29
29
|
/** @type {HTMLElement} */
|
|
30
|
-
|
|
30
|
+
s(this, m);
|
|
31
31
|
/** @type {HTMLElement} */
|
|
32
|
-
|
|
32
|
+
s(this, $);
|
|
33
33
|
/** @type {HTMLElement} */
|
|
34
|
-
|
|
34
|
+
s(this, C);
|
|
35
35
|
/** @type {HTMLElement} */
|
|
36
|
-
|
|
36
|
+
s(this, b);
|
|
37
37
|
/** @type {HTMLElement} */
|
|
38
|
-
|
|
38
|
+
s(this, y);
|
|
39
39
|
/** @type {AbortController} */
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
s(this, h);
|
|
41
|
+
s(this, c, {
|
|
42
|
+
/** @type {AbortController | null} */
|
|
43
|
+
globalClose: null,
|
|
44
|
+
/** @type {AbortController | null} */
|
|
45
|
+
customActions: null
|
|
46
|
+
});
|
|
47
|
+
H(this, "state", this.properties({
|
|
42
48
|
title: {
|
|
43
49
|
type: String,
|
|
44
50
|
default: "",
|
|
45
51
|
observer: (t) => {
|
|
46
|
-
|
|
52
|
+
e(this, y).innerText = t;
|
|
47
53
|
}
|
|
48
54
|
},
|
|
49
55
|
visible: {
|
|
@@ -57,7 +63,7 @@ class M extends z {
|
|
|
57
63
|
type: String,
|
|
58
64
|
default: "icon-help",
|
|
59
65
|
observer: (t) => {
|
|
60
|
-
|
|
66
|
+
e(this, b).icon = t;
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
"icon-color": {
|
|
@@ -85,93 +91,117 @@ class M extends z {
|
|
|
85
91
|
type: String,
|
|
86
92
|
default: "确定",
|
|
87
93
|
observer: (t) => {
|
|
88
|
-
|
|
94
|
+
e(this, m).textContent = t;
|
|
89
95
|
}
|
|
90
96
|
},
|
|
91
97
|
"cancel-button-text": {
|
|
92
98
|
type: String,
|
|
93
99
|
default: "取消",
|
|
94
100
|
observer: (t) => {
|
|
95
|
-
|
|
101
|
+
e(this, u).textContent = t;
|
|
96
102
|
}
|
|
97
103
|
},
|
|
98
104
|
"confirm-button-type": {
|
|
99
105
|
type: ["normal", "primary", "success", "warning", "danger"],
|
|
100
106
|
default: "primary",
|
|
101
107
|
observer: (t) => {
|
|
102
|
-
|
|
108
|
+
e(this, m).type = t;
|
|
103
109
|
}
|
|
104
110
|
},
|
|
105
111
|
"cancel-button-type": {
|
|
106
112
|
type: ["normal", "primary", "success", "warning", "danger"],
|
|
107
113
|
default: "normal",
|
|
108
114
|
observer: (t) => {
|
|
109
|
-
|
|
115
|
+
e(this, u).type = t;
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
}));
|
|
113
119
|
/**
|
|
114
|
-
*
|
|
120
|
+
* 渲染title
|
|
115
121
|
* @returns {{
|
|
116
122
|
* titleContainer: HTMLElement,
|
|
117
123
|
* titleIcon: HTMLElement,
|
|
118
124
|
* titleContent: HTMLElement,
|
|
119
125
|
* }}
|
|
120
126
|
*/
|
|
121
|
-
|
|
127
|
+
s(this, S, () => {
|
|
122
128
|
const t = document.createElement("section");
|
|
123
129
|
return t.classList.add("ea-popconfirm__title"), t.part = "title", t.innerHTML = `
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
${this.icon ? `<ea-icon icon="${this.icon}" part="icon"></ea-icon>` : ""}
|
|
131
|
+
<span class="ea-popconfirm__title-content" part="title-content">${this.title}</span>
|
|
132
|
+
`, e(this, p).appendChild(t), {
|
|
127
133
|
titleContainer: t,
|
|
128
|
-
titleIcon: t
|
|
134
|
+
titleIcon: t.querySelector("ea-icon"),
|
|
129
135
|
titleContent: t.querySelector(".ea-popconfirm__title-content")
|
|
130
136
|
};
|
|
131
137
|
});
|
|
132
|
-
i(this, C, () => {
|
|
133
|
-
const t = new AbortController();
|
|
134
|
-
c(this, u, t), n(this, l).querySelector("slot").remove(), this.assignedStyle(H);
|
|
135
|
-
});
|
|
136
138
|
/**
|
|
137
|
-
*
|
|
139
|
+
* 初始化关闭事件
|
|
138
140
|
* @param {HTMLElement} el
|
|
139
|
-
* @param {'cancel' | 'confirm'} closeEventName
|
|
141
|
+
* @param {'cancel' | 'confirm'} closeEventName 关闭事件名称
|
|
140
142
|
*/
|
|
141
|
-
|
|
143
|
+
s(this, g, (t, o) => {
|
|
142
144
|
t && t.addEventListener(
|
|
143
145
|
"click",
|
|
144
146
|
() => {
|
|
145
|
-
this.dispatchEvent(new CustomEvent(
|
|
147
|
+
this.dispatchEvent(new CustomEvent(o)), this.hide();
|
|
146
148
|
},
|
|
147
|
-
{ signal:
|
|
149
|
+
{ signal: e(this, h).signal }
|
|
148
150
|
);
|
|
149
151
|
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
+
/**
|
|
153
|
+
* 初始化触发事件
|
|
154
|
+
*/
|
|
155
|
+
s(this, w, () => {
|
|
156
|
+
const t = e(this, f).querySelector(
|
|
152
157
|
'slot[name="reference"]'
|
|
153
|
-
).
|
|
158
|
+
), o = e(this, d).querySelector('slot[name="actions"]');
|
|
159
|
+
t.addEventListener(
|
|
154
160
|
"click",
|
|
155
161
|
() => {
|
|
156
|
-
|
|
157
|
-
|
|
162
|
+
this.open();
|
|
163
|
+
},
|
|
164
|
+
{ signal: e(this, h).signal }
|
|
165
|
+
), o.assignedElements().length ? e(this, q).call(this) : (e(this, g).call(this, e(this, u), "cancel"), e(this, g).call(this, e(this, m), "confirm"));
|
|
166
|
+
});
|
|
167
|
+
/**
|
|
168
|
+
* 初始化自定义 actions slot 的事件监听
|
|
169
|
+
*/
|
|
170
|
+
s(this, q, () => {
|
|
171
|
+
var l;
|
|
172
|
+
const t = e(this, d).querySelector('slot[name="actions"]');
|
|
173
|
+
if (!t) return;
|
|
174
|
+
(l = e(this, c).customActions) == null || l.abort(), e(this, c).customActions = new AbortController();
|
|
175
|
+
const o = () => {
|
|
176
|
+
t.assignedElements().forEach((r) => {
|
|
177
|
+
var T, P, I, R;
|
|
178
|
+
const E = ((T = r.querySelector) == null ? void 0 : T.call(r, "[data-cancel]")) || ((P = r.matches) != null && P.call(r, "[data-cancel]") ? r : null), k = ((I = r.querySelector) == null ? void 0 : I.call(r, "[data-confirm]")) || ((R = r.matches) != null && R.call(r, "[data-confirm]") ? r : null);
|
|
179
|
+
E && E.addEventListener(
|
|
158
180
|
"click",
|
|
159
|
-
(
|
|
160
|
-
this.
|
|
181
|
+
() => {
|
|
182
|
+
this.close(), this.dispatchEvent(new CustomEvent("cancel"));
|
|
161
183
|
},
|
|
162
|
-
{ signal:
|
|
184
|
+
{ signal: e(this, c).customActions.signal }
|
|
185
|
+
), k && k.addEventListener(
|
|
186
|
+
"click",
|
|
187
|
+
() => {
|
|
188
|
+
this.close(), this.dispatchEvent(new CustomEvent("confirm"));
|
|
189
|
+
},
|
|
190
|
+
{ signal: e(this, c).customActions.signal }
|
|
163
191
|
);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
t.addEventListener("slotchange", o, {
|
|
195
|
+
signal: e(this, c).customActions.signal
|
|
196
|
+
});
|
|
167
197
|
});
|
|
168
|
-
|
|
198
|
+
a(this, v, this.shadowRoot.querySelector(".ea-popper")), a(this, p, this.shadowRoot.querySelector(
|
|
169
199
|
".ea-popper__original"
|
|
170
|
-
)),
|
|
200
|
+
)), a(this, f, this.shadowRoot.querySelector(
|
|
171
201
|
".ea-popper__reference"
|
|
172
202
|
));
|
|
173
|
-
const { titleContainer: t, titleIcon:
|
|
174
|
-
|
|
203
|
+
const { titleContainer: t, titleIcon: o, titleContent: l } = e(this, S).call(this), { footer: A, cancelButton: r, confirmButton: E } = M(this, _, U).call(this);
|
|
204
|
+
a(this, d, A), a(this, u, r), a(this, m, E), a(this, C, t), a(this, b, o), a(this, y, l);
|
|
175
205
|
}
|
|
176
206
|
static get observedAttributes() {
|
|
177
207
|
return [
|
|
@@ -187,15 +217,40 @@ class M extends z {
|
|
|
187
217
|
"cancel-button-type"
|
|
188
218
|
];
|
|
189
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* 打开 popconfirm
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
224
|
+
open() {
|
|
225
|
+
var o;
|
|
226
|
+
const t = (l) => {
|
|
227
|
+
var r;
|
|
228
|
+
this.contains(l.target) || ((r = e(this, c).globalClose) == null || r.abort(), this.hide());
|
|
229
|
+
};
|
|
230
|
+
this.show(), (o = e(this, c).globalClose) == null || o.abort(), e(this, c).globalClose = new AbortController(), window.addEventListener("click", t, {
|
|
231
|
+
signal: e(this, c).globalClose.signal
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* 关闭 popconfirm
|
|
236
|
+
* @public
|
|
237
|
+
*/
|
|
238
|
+
close() {
|
|
239
|
+
var t;
|
|
240
|
+
this.hide(), (t = e(this, c).globalClose) == null || t.abort();
|
|
241
|
+
}
|
|
190
242
|
connectedCallback() {
|
|
191
|
-
|
|
243
|
+
var t, o;
|
|
244
|
+
super.connectedCallback(), (t = e(this, h)) == null || t.abort(), a(this, h, new AbortController()), (o = e(this, p).querySelector("slot")) == null || o.remove(), this.assignedStyle(G), e(this, w).call(this);
|
|
192
245
|
}
|
|
193
246
|
$beforeUnmounted() {
|
|
194
|
-
var t;
|
|
195
|
-
super.$beforeUnmounted(), (t =
|
|
247
|
+
var t, o;
|
|
248
|
+
super.$beforeUnmounted(), (t = e(this, h)) == null || t.abort();
|
|
249
|
+
for (const l in e(this, c))
|
|
250
|
+
(o = e(this, c)[l]) == null || o.abort();
|
|
196
251
|
}
|
|
197
252
|
}
|
|
198
|
-
|
|
253
|
+
v = new WeakMap(), p = new WeakMap(), f = new WeakMap(), B = new WeakMap(), L = new WeakMap(), d = new WeakMap(), u = new WeakMap(), m = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), b = new WeakMap(), y = new WeakMap(), h = new WeakMap(), c = new WeakMap(), S = new WeakMap(), _ = new WeakSet(), /**
|
|
199
254
|
* 渲染footer
|
|
200
255
|
* @return {{
|
|
201
256
|
* footer: HTMLElement,
|
|
@@ -203,18 +258,18 @@ b = new WeakMap(), l = new WeakMap(), h = new WeakMap(), w = new WeakMap(), q =
|
|
|
203
258
|
* confirmButton: HTMLElement,
|
|
204
259
|
* }}
|
|
205
260
|
*/
|
|
206
|
-
|
|
207
|
-
const t =
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return
|
|
212
|
-
footer:
|
|
213
|
-
cancelButton:
|
|
214
|
-
confirmButton:
|
|
261
|
+
U = function() {
|
|
262
|
+
const t = `<slot name="actions">
|
|
263
|
+
<ea-button type="${this["cancel-button-type"]}" class="ea-popconfirm__cancel" size="small" part="cancel-button" text>${this["cancel-button-text"]}</ea-button>
|
|
264
|
+
<ea-button type="${this["confirm-button-type"]}" class="ea-popconfirm__confirm" part="confirm-button" size="small">${this["confirm-button-text"]}</ea-button>
|
|
265
|
+
</slot>`, o = document.createElement("footer");
|
|
266
|
+
return o.classList.add("ea-popconfirm__footer"), o.part = "footer", o.innerHTML = t, e(this, p).appendChild(o), {
|
|
267
|
+
footer: o,
|
|
268
|
+
cancelButton: o.querySelector(".ea-popconfirm__cancel"),
|
|
269
|
+
confirmButton: o.querySelector(".ea-popconfirm__confirm")
|
|
215
270
|
};
|
|
216
|
-
},
|
|
217
|
-
window.customElements.get("ea-popconfirm") || window.customElements.define("ea-popconfirm",
|
|
271
|
+
}, g = new WeakMap(), w = new WeakMap(), q = new WeakMap();
|
|
272
|
+
window.customElements.get("ea-popconfirm") || window.customElements.define("ea-popconfirm", J);
|
|
218
273
|
export {
|
|
219
|
-
|
|
274
|
+
J as EaPopconfirm
|
|
220
275
|
};
|
|
@@ -169,15 +169,15 @@ class R extends C {
|
|
|
169
169
|
}
|
|
170
170
|
$render() {
|
|
171
171
|
this.shadowRoot.innerHTML = `
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
172
|
+
<div class='ea-popper' part='container' tabindex='-1'>
|
|
173
|
+
<div class='ea-popper__reference' part='reference' tabindex='-1'>
|
|
174
|
+
<div class='ea-popper__original' part='original' tabindex='0'>
|
|
175
|
+
<slot></slot>
|
|
176
|
+
</div>
|
|
177
|
+
<slot name='reference'></slot>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
`, c(this, o, this.shadowRoot.querySelector(".ea-popper")), c(this, a, this.shadowRoot.querySelector(
|
|
181
181
|
".ea-popper__original"
|
|
182
182
|
)), c(this, f, this.shadowRoot.querySelector(
|
|
183
183
|
".ea-popper__reference"
|