easy-component-ui 3.0.11 → 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.
- package/README.md +162 -162
- package/dist/assets/icon.css +1 -1
- package/dist/components/Base.js +190 -188
- package/dist/components/ea-alert.js +71 -54
- package/dist/components/ea-avatar.js +42 -37
- package/dist/components/ea-breadcrumb.js +33 -33
- package/dist/components/ea-button.js +53 -52
- package/dist/components/ea-card.js +63 -27
- package/dist/components/ea-carousel.js +2 -2
- package/dist/components/ea-collapse.js +93 -73
- package/dist/components/ea-color-picker.js +221 -221
- package/dist/components/ea-container.js +90 -61
- package/dist/components/ea-countdown.js +77 -56
- package/dist/components/ea-date-picker.js +1 -1
- package/dist/components/ea-descriptions.js +133 -70
- package/dist/components/ea-dialog.js +4 -4
- package/dist/components/ea-drawer.js +93 -71
- package/dist/components/ea-empty.js +31 -23
- package/dist/components/ea-icon.js +122 -32
- package/dist/components/ea-image-preview.js +237 -193
- package/dist/components/ea-image.js +69 -44
- package/dist/components/ea-input-number.js +9 -9
- package/dist/components/ea-input.js +15 -15
- package/dist/components/ea-layout.js +10 -3
- package/dist/components/ea-link.js +1 -1
- package/dist/components/ea-menu.js +69 -53
- package/dist/components/ea-message-box.js +73 -73
- package/dist/components/ea-message.js +184 -121
- package/dist/components/ea-notification.js +80 -80
- package/dist/components/ea-overlay.js +41 -34
- package/dist/components/ea-page-header.js +5 -5
- package/dist/components/ea-pagination.js +6 -5
- package/dist/components/ea-popconfirm.js +133 -78
- package/dist/components/ea-popover.js +35 -11
- package/dist/components/ea-popper.js +9 -9
- package/dist/components/ea-progress.js +88 -71
- package/dist/components/ea-rate.js +1 -1
- package/dist/components/ea-result.js +20 -20
- package/dist/components/ea-select.js +119 -108
- package/dist/components/ea-skeleton.js +99 -82
- package/dist/components/ea-slider.js +88 -79
- package/dist/components/ea-splitter.js +34 -18
- package/dist/components/ea-statistic.js +72 -4
- package/dist/components/ea-steps.js +108 -74
- package/dist/components/ea-table.js +562 -434
- package/dist/components/ea-tabs.js +28 -28
- package/dist/components/ea-tag.js +37 -43
- package/dist/components/ea-time-picker.js +2 -6
- package/dist/components/ea-timeline.js +11 -12
- package/dist/components/ea-tooltip.js +63 -23
- package/dist/components/ea-tour.js +21 -21
- package/dist/components/ea-transfer.js +2 -2
- package/dist/components/ea-tree.js +1 -1
- package/dist/components/index.js +1 -2
- package/dist/css/ea-card.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-container.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-footer.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-switch.style.js +1 -1
- package/dist/css/ea-tab.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-tabs.style.js +1 -1
- package/dist/css/ea-tag.style.js +1 -1
- package/dist/css/ea-time-picker.style.js +1 -1
- package/dist/css/ea-timeline-item.style.js +1 -1
- package/dist/utils/Variables.js +10 -17
- package/dist/utils/parseTime.js +73 -0
- package/package.json +302 -304
- package/dist/components/ea-loading.js +0 -151
- package/dist/components/ea-statistic2.js +0 -83
|
@@ -1,93 +1,121 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var f = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { B as
|
|
9
|
-
import { s as
|
|
10
|
-
import { s as
|
|
11
|
-
import { s as
|
|
12
|
-
import { s as
|
|
13
|
-
import { s as
|
|
14
|
-
var
|
|
15
|
-
class
|
|
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
|
-
|
|
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
|
-
|
|
29
|
+
n(this, "state", this.properties({
|
|
26
30
|
direction: {
|
|
27
31
|
type: ["horizontal", "vertical"],
|
|
28
32
|
default: "horizontal",
|
|
29
|
-
observer: (
|
|
30
|
-
this.
|
|
33
|
+
observer: () => {
|
|
34
|
+
this.updateContainerClasslist();
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
}));
|
|
34
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
53
|
-
customElements.get("ea-container") || customElements.define("ea-container",
|
|
54
|
-
class
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
|
115
|
+
window.customElements.get("ea-header") || window.customElements.define("ea-header", k);
|
|
116
|
+
class x extends c {
|
|
89
117
|
constructor() {
|
|
90
|
-
super(), this.stylesheet =
|
|
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",
|
|
104
|
-
var
|
|
105
|
-
class
|
|
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
|
-
|
|
110
|
-
/**
|
|
137
|
+
o(this, p);
|
|
138
|
+
/**
|
|
111
139
|
* @typedef {Object} State
|
|
140
|
+
* @property {string} height
|
|
112
141
|
*/
|
|
113
142
|
/** @type {State} */
|
|
114
|
-
|
|
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 =
|
|
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
|
-
`,
|
|
162
|
+
`, a(this, p, this.shadowRoot.querySelector(".ea-footer"));
|
|
134
163
|
}
|
|
135
164
|
connectedCallback() {
|
|
136
165
|
super.connectedCallback();
|
|
137
166
|
}
|
|
138
167
|
}
|
|
139
|
-
|
|
140
|
-
window.customElements.get("ea-footer") || window.customElements.define("ea-footer",
|
|
141
|
-
var
|
|
142
|
-
class
|
|
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
|
-
|
|
147
|
-
/**
|
|
175
|
+
o(this, m);
|
|
176
|
+
/**
|
|
148
177
|
* @typedef {Object} State
|
|
149
178
|
*/
|
|
150
179
|
/** @type {State} */
|
|
151
|
-
|
|
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 =
|
|
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
|
-
`,
|
|
199
|
+
`, a(this, m, this.shadowRoot.querySelector(".ea-aside"));
|
|
171
200
|
}
|
|
172
201
|
connectedCallback() {
|
|
173
202
|
super.connectedCallback();
|
|
174
203
|
}
|
|
175
204
|
}
|
|
176
|
-
|
|
177
|
-
window.customElements.get("ea-aside") || window.customElements.define("ea-aside",
|
|
205
|
+
m = new WeakMap();
|
|
206
|
+
window.customElements.get("ea-aside") || window.customElements.define("ea-aside", R);
|
|
@@ -1,48 +1,59 @@
|
|
|
1
1
|
var I = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var H = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var T = (t, s, e) =>
|
|
7
|
-
var n = (t, s, e) => (
|
|
5
|
+
var N = (t, s, e) => s in t ? I(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
6
|
+
var T = (t, s, e) => N(t, typeof s != "symbol" ? s + "" : s, e), _ = (t, s, e) => s.has(t) || H("Cannot " + e);
|
|
7
|
+
var n = (t, s, e) => (_(t, s, "read from private field"), e ? e.call(t) : s.get(t)), f = (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), o = (t, s, e, a) => (_(t, s, "write to private field"), a ? a.call(t, e) : s.set(t, e), e);
|
|
8
|
+
import { EaStatistic as O } from "./ea-statistic.js";
|
|
9
|
+
import { d as Y } from "./ea-calendar2.js";
|
|
8
10
|
import { t as A } from "../utils/timeout.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import { p as k } from "../utils/parseTime.js";
|
|
12
|
+
class U extends Event {
|
|
13
|
+
constructor(s) {
|
|
14
|
+
super("ea-finish", {
|
|
15
|
+
bubbles: !0,
|
|
16
|
+
composed: !0
|
|
17
|
+
}), this.detail = s;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
var y, b, v, S, M, d, c, w, g;
|
|
21
|
+
class $ extends O {
|
|
13
22
|
constructor() {
|
|
14
23
|
super();
|
|
15
24
|
/** @type {HTMLElement} */
|
|
16
|
-
f(this,
|
|
17
|
-
/** @type {HTMLElement} */
|
|
18
|
-
f(this, w);
|
|
19
|
-
/** @type {HTMLElement} */
|
|
20
|
-
f(this, p);
|
|
25
|
+
f(this, y);
|
|
21
26
|
/** @type {HTMLElement} */
|
|
22
27
|
f(this, b);
|
|
23
28
|
/** @type {HTMLElement} */
|
|
29
|
+
f(this, v);
|
|
30
|
+
/** @type {HTMLElement} */
|
|
24
31
|
f(this, S);
|
|
25
|
-
|
|
26
|
-
f(this,
|
|
27
|
-
f(this,
|
|
32
|
+
/** @type {HTMLElement} */
|
|
33
|
+
f(this, M);
|
|
34
|
+
f(this, d, null);
|
|
35
|
+
f(this, c, null);
|
|
36
|
+
f(this, w, {
|
|
28
37
|
displayValue: ""
|
|
29
38
|
});
|
|
30
39
|
T(this, "state", this.properties({
|
|
31
40
|
value: {
|
|
32
|
-
type:
|
|
41
|
+
type: String,
|
|
33
42
|
default: "",
|
|
34
43
|
observer: (e) => {
|
|
35
|
-
n(this,
|
|
36
|
-
const
|
|
37
|
-
const { diff:
|
|
38
|
-
n(this,
|
|
39
|
-
new
|
|
44
|
+
n(this, d) && (clearInterval(n(this, d)), o(this, d, null)), n(this, c) && (clearTimeout(n(this, c)), o(this, c, null));
|
|
45
|
+
const a = k(e) || e, r = () => {
|
|
46
|
+
const { diff: h, currentTime: l, displayValue: m } = n(this, g).call(this, a, this.format);
|
|
47
|
+
n(this, v).textContent = m, this.emit("change", { detail: { value: l, displayValue: m } }), (h <= 0 || !h) && (n(this, c) && (clearTimeout(n(this, c)), o(this, c, null)), n(this, d) && (clearInterval(n(this, d)), o(this, d, null)), this.dispatchEvent(
|
|
48
|
+
new U({ value: l, displayValue: m })
|
|
40
49
|
));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
};
|
|
51
|
+
r();
|
|
52
|
+
const i = Number(this["refresh-interval"]) || 1e3, p = Date.now();
|
|
53
|
+
let u = i - p % i;
|
|
54
|
+
u === 0 && (u = i), o(this, c, A(() => {
|
|
55
|
+
o(this, c, null), r(), o(this, d, setInterval(r, i));
|
|
56
|
+
}, u));
|
|
46
57
|
}
|
|
47
58
|
},
|
|
48
59
|
format: {
|
|
@@ -65,57 +76,67 @@ class U extends k {
|
|
|
65
76
|
* @param {string} format
|
|
66
77
|
* @return {{currentTime: number, diff: number, displayValue: string}}
|
|
67
78
|
*/
|
|
68
|
-
f(this,
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
79
|
+
f(this, g, (e, a) => {
|
|
80
|
+
const r = Y(), i = Y(e), p = i.valueOf() - r.valueOf(), u = (q, R = 2) => `${q}`.padStart(R, "0");
|
|
81
|
+
if (p <= 0 || i.isBefore(r) || !p)
|
|
71
82
|
return {
|
|
72
|
-
currentTime:
|
|
73
|
-
diff:
|
|
83
|
+
currentTime: r.valueOf(),
|
|
84
|
+
diff: p,
|
|
74
85
|
displayValue: "00:00:00"
|
|
75
86
|
};
|
|
76
|
-
let
|
|
77
|
-
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
let D =
|
|
81
|
-
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
let
|
|
89
|
-
return !
|
|
90
|
-
currentTime:
|
|
91
|
-
diff:
|
|
92
|
-
displayValue:
|
|
87
|
+
let h = i.diff(r, "year"), l = r.add(h, "year");
|
|
88
|
+
l.isAfter(i) && (h -= 1, l = r.add(h, "year"));
|
|
89
|
+
let m = i.diff(l, "month");
|
|
90
|
+
l = l.add(m, "month");
|
|
91
|
+
let D = i.diff(l, "day");
|
|
92
|
+
l = l.add(D, "day");
|
|
93
|
+
let V = i.diff(l, "hour");
|
|
94
|
+
l = l.add(V, "hour");
|
|
95
|
+
let x = i.diff(l, "minute");
|
|
96
|
+
l = l.add(x, "minute");
|
|
97
|
+
let C = i.diff(l, "second");
|
|
98
|
+
l = l.add(C, "second");
|
|
99
|
+
let E = i.diff(l, "millisecond");
|
|
100
|
+
return !a.includes("YY") && a.includes("MM") && (m = Math.floor(i.diff(r, "month", !0))), !a.includes("MM") && a.includes("DD") && (D = Math.floor(i.diff(r, "day", !0))), !a.includes("DD") && a.includes("HH") && (V = Math.floor(i.diff(r, "hour", !0))), !a.includes("HH") && a.includes("mm") && (x = Math.floor(i.diff(r, "minute", !0))), !a.includes("mm") && a.includes("ss") && (C = Math.floor(i.diff(r, "second", !0))), !a.includes("ss") && a.includes("SSS") && (E = Math.floor(i.diff(r, "millisecond", !0))), {
|
|
101
|
+
currentTime: r.valueOf(),
|
|
102
|
+
diff: p,
|
|
103
|
+
displayValue: a.replace("YYYY", u(h)).replace("MM", u(m)).replace("DD", u(D)).replace("HH", u(V)).replace("mm", u(x)).replace("ss", u(C)).replace("SSS", u(E, 3)).replace(/\[|\]/g, "")
|
|
93
104
|
};
|
|
94
105
|
});
|
|
95
|
-
|
|
106
|
+
o(this, y, this.shadowRoot.querySelector(".ea-statistic")), o(this, b, this.shadowRoot.querySelector(".ea-statistic__number slot")), o(this, v, this.shadowRoot.querySelector(".ea-statistic__number")), o(this, S, this.shadowRoot.querySelector(".ea-statistic__prefix slot")), o(this, M, this.shadowRoot.querySelector(".ea-statistic__suffix slot"));
|
|
96
107
|
}
|
|
97
108
|
// ------- displayValue -------
|
|
98
109
|
// #region
|
|
99
110
|
get displayValue() {
|
|
100
|
-
return n(this,
|
|
111
|
+
return n(this, w).displayValue;
|
|
101
112
|
}
|
|
102
113
|
set displayValue(e) {
|
|
103
|
-
n(this,
|
|
114
|
+
n(this, w).displayValue = e;
|
|
104
115
|
}
|
|
105
116
|
// #endregion
|
|
106
117
|
// ------- end -------
|
|
107
118
|
static get observedAttributes() {
|
|
108
119
|
return [...super.observedAttributes, "value", "format", "refresh-interval"];
|
|
109
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* 获取 classlist 列表
|
|
123
|
+
* @return {string} 属性值
|
|
124
|
+
*/
|
|
125
|
+
updateContainerClasslist() {
|
|
126
|
+
const e = this.computedClasslist("ea-countdown", {
|
|
127
|
+
// ['--' + this.type]: this.type,
|
|
128
|
+
});
|
|
129
|
+
return n(this, y).className = e, e;
|
|
130
|
+
}
|
|
110
131
|
connectedCallback() {
|
|
111
132
|
super.connectedCallback();
|
|
112
133
|
}
|
|
113
134
|
$beforeUnmounted() {
|
|
114
|
-
clearInterval(n(this,
|
|
135
|
+
clearInterval(n(this, d));
|
|
115
136
|
}
|
|
116
137
|
}
|
|
117
|
-
|
|
118
|
-
window.customElements.get("ea-countdown") || window.customElements.define("ea-countdown",
|
|
138
|
+
y = new WeakMap(), b = new WeakMap(), v = new WeakMap(), S = new WeakMap(), M = new WeakMap(), d = new WeakMap(), c = new WeakMap(), w = new WeakMap(), g = new WeakMap();
|
|
139
|
+
window.customElements.get("ea-countdown") || window.customElements.define("ea-countdown", $);
|
|
119
140
|
export {
|
|
120
|
-
|
|
141
|
+
$ as EaCountdown
|
|
121
142
|
};
|
|
@@ -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="
|
|
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")}'>
|