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,50 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var C = Object.defineProperty;
|
|
2
|
+
var S = (s) => {
|
|
3
3
|
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var t = (s, i, e) => (
|
|
8
|
-
import { B as
|
|
9
|
-
import { s as
|
|
10
|
-
var m,
|
|
11
|
-
class
|
|
5
|
+
var N = (s, i, e) => i in s ? C(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
|
|
6
|
+
var p = (s, i, e) => N(s, typeof i != "symbol" ? i + "" : i, e), E = (s, i, e) => i.has(s) || S("Cannot " + e);
|
|
7
|
+
var t = (s, i, e) => (E(s, i, "read from private field"), e ? e.call(s) : i.get(s)), a = (s, i, e) => i.has(s) ? S("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), n = (s, i, e, o) => (E(s, i, "write to private field"), o ? o.call(s, e) : i.set(s, e), e);
|
|
8
|
+
import { B as A } from "./Base.js";
|
|
9
|
+
import { s as D } from "../css/ea-image.style.js";
|
|
10
|
+
var m, l, w, v, r, u, d, h, c, g;
|
|
11
|
+
class _ extends A {
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
14
14
|
/** @type {HTMLElement} */
|
|
15
|
-
|
|
15
|
+
a(this, m);
|
|
16
16
|
/** @type {HTMLImageElement} */
|
|
17
|
-
|
|
17
|
+
a(this, l);
|
|
18
18
|
/** @type {HTMLElement} */
|
|
19
|
-
|
|
19
|
+
a(this, w);
|
|
20
20
|
/** @type {HTMLElement} */
|
|
21
|
-
|
|
21
|
+
a(this, v);
|
|
22
22
|
/** @type {EaImagePreview} */
|
|
23
|
-
|
|
23
|
+
a(this, r);
|
|
24
|
+
/** @type {HTMLSlotElement} */
|
|
25
|
+
a(this, u);
|
|
26
|
+
/** @type {HTMLSlotElement} */
|
|
27
|
+
a(this, d);
|
|
24
28
|
/** @type {AbortController} */
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
a(this, h);
|
|
30
|
+
a(this, c, {
|
|
27
31
|
/** @type {"loading" | "error" | "success"} */
|
|
28
32
|
imageStatus: "loading",
|
|
29
33
|
previewQueue: []
|
|
30
34
|
});
|
|
31
|
-
|
|
35
|
+
p(this, "state", this.properties({
|
|
32
36
|
src: {
|
|
33
37
|
type: String,
|
|
34
38
|
default: "",
|
|
35
39
|
observer: async (e) => {
|
|
36
|
-
const
|
|
40
|
+
const o = new Image();
|
|
37
41
|
if (this.updateContainerClasslist(), this.lazy) {
|
|
38
|
-
const
|
|
39
|
-
|
|
42
|
+
const f = new IntersectionObserver((b) => {
|
|
43
|
+
b[0].intersectionRatio <= 0 || (f.disconnect(), o.src = this.src);
|
|
40
44
|
});
|
|
41
|
-
|
|
45
|
+
f.observe(this);
|
|
42
46
|
} else
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
t(this,
|
|
46
|
-
},
|
|
47
|
-
t(this,
|
|
47
|
+
o.src = e;
|
|
48
|
+
o.onload = () => {
|
|
49
|
+
t(this, l).setAttribute("src", e), t(this, c).imageStatus = "success", this.updateContainerClasslist(), this.emit("load");
|
|
50
|
+
}, o.onerror = () => {
|
|
51
|
+
t(this, c).imageStatus = "error", this.updateContainerClasslist(), this.emit("error");
|
|
48
52
|
};
|
|
49
53
|
}
|
|
50
54
|
},
|
|
@@ -85,28 +89,28 @@ class C extends S {
|
|
|
85
89
|
type: String,
|
|
86
90
|
default: "",
|
|
87
91
|
observer: (e) => {
|
|
88
|
-
t(this,
|
|
92
|
+
t(this, l).alt = e;
|
|
89
93
|
}
|
|
90
94
|
},
|
|
91
95
|
loading: {
|
|
92
96
|
type: ["lazy", "eager"],
|
|
93
97
|
default: "eager",
|
|
94
98
|
observer: (e) => {
|
|
95
|
-
t(this,
|
|
99
|
+
t(this, l).setAttribute("loading", e);
|
|
96
100
|
}
|
|
97
101
|
},
|
|
98
102
|
referrerpolicy: {
|
|
99
103
|
type: String,
|
|
100
104
|
default: "",
|
|
101
105
|
observer: (e) => {
|
|
102
|
-
t(this,
|
|
106
|
+
t(this, l).setAttribute("referrerpolicy", e);
|
|
103
107
|
}
|
|
104
108
|
},
|
|
105
109
|
crossorigin: {
|
|
106
110
|
type: String,
|
|
107
111
|
default: "",
|
|
108
112
|
observer: (e) => {
|
|
109
|
-
t(this,
|
|
113
|
+
t(this, l).setAttribute("sizes", e);
|
|
110
114
|
}
|
|
111
115
|
},
|
|
112
116
|
lazy: {
|
|
@@ -193,7 +197,7 @@ class C extends S {
|
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
}));
|
|
196
|
-
|
|
200
|
+
p(this, "propState", this.properties({
|
|
197
201
|
previewSrcList: {
|
|
198
202
|
props: !0,
|
|
199
203
|
type: Array,
|
|
@@ -206,26 +210,36 @@ class C extends S {
|
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
212
|
}));
|
|
213
|
+
/**
|
|
214
|
+
* 处理 slotchange 事件,动态设置 slot 属性以传递给 ea-image-preview
|
|
215
|
+
* @param {HTMLSlotElement} slotElement
|
|
216
|
+
* @param {string} slotName
|
|
217
|
+
*/
|
|
218
|
+
a(this, g, (e, o) => {
|
|
219
|
+
e.assignedNodes({ flatten: !0 }).some(
|
|
220
|
+
(y) => y.nodeType === Node.ELEMENT_NODE || y.nodeType === Node.TEXT_NODE && y.textContent.trim()
|
|
221
|
+
) ? e.setAttribute("slot", o) : e.removeAttribute("slot");
|
|
222
|
+
});
|
|
209
223
|
/**
|
|
210
224
|
* 设置当前项
|
|
211
225
|
* @param {Number} index
|
|
212
226
|
*/
|
|
213
|
-
|
|
227
|
+
p(this, "setActiveItem", (e) => {
|
|
214
228
|
this.preview && t(this, r).setActiveItem(e);
|
|
215
229
|
});
|
|
216
230
|
/**
|
|
217
231
|
* 重置预览器的所有状态
|
|
218
232
|
*/
|
|
219
|
-
|
|
233
|
+
p(this, "reset", () => {
|
|
220
234
|
this.preview && t(this, r).reset();
|
|
221
235
|
});
|
|
222
236
|
/**
|
|
223
237
|
* 显示预览(ea-image-preview)
|
|
224
238
|
*/
|
|
225
|
-
|
|
239
|
+
p(this, "showPreview", () => {
|
|
226
240
|
t(this, r).visible = !0;
|
|
227
241
|
});
|
|
228
|
-
this.stylesheet =
|
|
242
|
+
this.stylesheet = D, this.$render();
|
|
229
243
|
}
|
|
230
244
|
static get observedAttributes() {
|
|
231
245
|
return [
|
|
@@ -258,7 +272,7 @@ class C extends S {
|
|
|
258
272
|
*/
|
|
259
273
|
updateContainerClasslist() {
|
|
260
274
|
const e = this.computedClasslist("ea-image", {
|
|
261
|
-
[`--${t(this,
|
|
275
|
+
[`--${t(this, c).imageStatus}`]: t(this, c).imageStatus
|
|
262
276
|
});
|
|
263
277
|
return t(this, m).className = e, e;
|
|
264
278
|
}
|
|
@@ -274,15 +288,26 @@ class C extends S {
|
|
|
274
288
|
</section>
|
|
275
289
|
</div>
|
|
276
290
|
<ea-image-preview class="ea-image-preview" part='preview'>
|
|
277
|
-
<slot name='progress'
|
|
278
|
-
<slot name='toolbar'
|
|
279
|
-
<slot name='progress' slot="progress"></slot>
|
|
291
|
+
<slot name='progress'></slot>
|
|
292
|
+
<slot name='toolbar'></slot>
|
|
280
293
|
</ea-image-preview>
|
|
281
|
-
`,
|
|
294
|
+
`, n(this, m, this.shadowRoot.querySelector(".ea-image")), n(this, l, this.shadowRoot.querySelector(".ea-image__image")), n(this, w, this.shadowRoot.querySelector(".ea-image__error")), n(this, v, this.shadowRoot.querySelector(".ea-image__placeholder")), n(this, r, this.shadowRoot.querySelector(".ea-image-preview")), n(this, u, this.shadowRoot.querySelector('slot[name="progress"]')), n(this, d, this.shadowRoot.querySelector('slot[name="toolbar"]'));
|
|
282
295
|
}
|
|
283
296
|
async connectedCallback() {
|
|
284
297
|
var e;
|
|
285
|
-
super.connectedCallback(), (e = t(this, h)) == null || e.abort(),
|
|
298
|
+
super.connectedCallback(), (e = t(this, h)) == null || e.abort(), n(this, h, new AbortController()), this.getAttribute("src") || this.setAttribute("src", ""), t(this, u).addEventListener(
|
|
299
|
+
"slotchange",
|
|
300
|
+
() => t(this, g).call(this, t(this, u), "progress"),
|
|
301
|
+
{
|
|
302
|
+
signal: t(this, h).signal
|
|
303
|
+
}
|
|
304
|
+
), t(this, d).addEventListener(
|
|
305
|
+
"slotchange",
|
|
306
|
+
() => t(this, g).call(this, t(this, d), "toolbar"),
|
|
307
|
+
{
|
|
308
|
+
signal: t(this, h).signal
|
|
309
|
+
}
|
|
310
|
+
), this.preview && (await customElements.whenDefined("ea-image-preview"), t(this, m).addEventListener(
|
|
286
311
|
"click",
|
|
287
312
|
() => {
|
|
288
313
|
this.showPreview();
|
|
@@ -295,8 +320,8 @@ class C extends S {
|
|
|
295
320
|
(e = t(this, h)) == null || e.abort();
|
|
296
321
|
}
|
|
297
322
|
}
|
|
298
|
-
m = new WeakMap(),
|
|
299
|
-
window.customElements.get("ea-image") || window.customElements.define("ea-image",
|
|
323
|
+
m = new WeakMap(), l = new WeakMap(), w = new WeakMap(), v = new WeakMap(), r = new WeakMap(), u = new WeakMap(), d = new WeakMap(), h = new WeakMap(), c = new WeakMap(), g = new WeakMap();
|
|
324
|
+
window.customElements.get("ea-image") || window.customElements.define("ea-image", _);
|
|
300
325
|
export {
|
|
301
|
-
|
|
326
|
+
_ as EaImage
|
|
302
327
|
};
|
|
@@ -12,16 +12,16 @@ class S extends Event {
|
|
|
12
12
|
super("ea-change", { bubbles: !0, cancelable: !0, composed: !0 }), this.detail = i;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
var
|
|
15
|
+
var d, r, c, b, m, o, u, f, v, y;
|
|
16
16
|
class M extends A {
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
19
19
|
/** @type {HTMLElement} */
|
|
20
|
-
n(this,
|
|
20
|
+
n(this, d);
|
|
21
21
|
/** @type {HTMLInputElement} */
|
|
22
22
|
n(this, r);
|
|
23
23
|
/** @type {HTMLElement} */
|
|
24
|
-
n(this,
|
|
24
|
+
n(this, c);
|
|
25
25
|
/** @type {HTMLElement} */
|
|
26
26
|
n(this, b);
|
|
27
27
|
/** @type {HTMLLabelElement} */
|
|
@@ -307,14 +307,14 @@ class M extends A {
|
|
|
307
307
|
"no-controls": !this.controls
|
|
308
308
|
}
|
|
309
309
|
);
|
|
310
|
-
return t(this,
|
|
310
|
+
return t(this, d).className = e, e;
|
|
311
311
|
}
|
|
312
312
|
$render() {
|
|
313
313
|
this.shadowRoot.innerHTML = `
|
|
314
314
|
<label class="ea-input-number" part="container">
|
|
315
315
|
<span class="ea-input-number__form-label" part="label"></span>
|
|
316
316
|
<section class="ea-input-number__region" part="region">
|
|
317
|
-
<ea-icon class="ea-input-number__operator decrease" part="decrease"
|
|
317
|
+
<ea-icon class="ea-input-number__operator decrease" part="decrease" name="minus"></ea-icon>
|
|
318
318
|
<span class="ea-input-number__prefix" part="prefix">
|
|
319
319
|
<slot name="prefix"></slot>
|
|
320
320
|
</span>
|
|
@@ -322,10 +322,10 @@ class M extends A {
|
|
|
322
322
|
<span class="ea-input-number__suffix" part="suffix">
|
|
323
323
|
<slot name="suffix"></slot>
|
|
324
324
|
</span>
|
|
325
|
-
<ea-icon class="ea-input-number__operator increase" part="increase"
|
|
325
|
+
<ea-icon class="ea-input-number__operator increase" part="increase" name="plus"></ea-icon>
|
|
326
326
|
</section>
|
|
327
327
|
</label>
|
|
328
|
-
`, l(this,
|
|
328
|
+
`, l(this, d, this.shadowRoot.querySelector(".ea-input-number")), l(this, m, this.shadowRoot.querySelector(".ea-input-number__form-label")), l(this, r, this.shadowRoot.querySelector(".ea-input-number__inner")), l(this, c, this.shadowRoot.querySelector(
|
|
329
329
|
".ea-input-number__operator.decrease"
|
|
330
330
|
)), l(this, b, this.shadowRoot.querySelector(
|
|
331
331
|
".ea-input-number__operator.increase"
|
|
@@ -339,7 +339,7 @@ class M extends A {
|
|
|
339
339
|
}, a = () => {
|
|
340
340
|
this.disabled || !this.controls || t(this, v).call(this);
|
|
341
341
|
};
|
|
342
|
-
t(this,
|
|
342
|
+
t(this, c).addEventListener("click", e, {
|
|
343
343
|
signal: t(this, o).signal
|
|
344
344
|
}), t(this, b).addEventListener("click", a, {
|
|
345
345
|
signal: t(this, o).signal
|
|
@@ -360,7 +360,7 @@ class M extends A {
|
|
|
360
360
|
(e = t(this, o)) == null || e.abort();
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
|
|
363
|
+
d = new WeakMap(), r = new WeakMap(), c = new WeakMap(), b = new WeakMap(), m = new WeakMap(), o = new WeakMap(), u = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap();
|
|
364
364
|
window.customElements.get("ea-input-number") || window.customElements.define("ea-input-number", M);
|
|
365
365
|
export {
|
|
366
366
|
M as EaInputNumber
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
1
|
+
var B = Object.defineProperty;
|
|
2
2
|
var $ = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var T = (n, o, t) =>
|
|
7
|
-
var e = (n, o, t) => (
|
|
8
|
-
import { F as
|
|
5
|
+
var F = (n, o, t) => o in n ? B(n, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[o] = t;
|
|
6
|
+
var T = (n, o, t) => F(n, typeof o != "symbol" ? o + "" : o, t), k = (n, o, t) => o.has(n) || $("Cannot " + t);
|
|
7
|
+
var e = (n, o, t) => (k(n, o, "read from private field"), t ? t.call(n) : o.get(n)), a = (n, o, t) => o.has(n) ? $("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, t), h = (n, o, t, s) => (k(n, o, "write to private field"), s ? s.call(n, t) : o.set(n, t), t);
|
|
8
|
+
import { F as I } from "../core/FormBase.js";
|
|
9
9
|
import { E as M } from "../utils/Utils.js";
|
|
10
10
|
import { s as V } from "../css/ea-input.style.js";
|
|
11
11
|
class U extends Event {
|
|
@@ -14,7 +14,7 @@ class U extends Event {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
var g, C, _, w, y, i, R, b, m, p, x, S, v, u, l, d, r, P, O, E, A, q, z, L, H, f;
|
|
17
|
-
class G extends
|
|
17
|
+
class G extends I {
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
20
20
|
/** @type {HTMLElement} */
|
|
@@ -165,9 +165,9 @@ class G extends k {
|
|
|
165
165
|
},
|
|
166
166
|
"clear-icon": {
|
|
167
167
|
type: String,
|
|
168
|
-
default: "
|
|
168
|
+
default: "xmark",
|
|
169
169
|
observer: (t) => {
|
|
170
|
-
this.clearable && e(this, m).setAttribute("
|
|
170
|
+
this.clearable && e(this, m).setAttribute("name", t);
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
disabled: {
|
|
@@ -182,7 +182,7 @@ class G extends k {
|
|
|
182
182
|
default: !1,
|
|
183
183
|
observer: (t) => {
|
|
184
184
|
var s;
|
|
185
|
-
this.type !== "textarea" && ((s = e(this, l).showPasswordController) == null || s.abort(), this.type === "text" ? e(this, p).
|
|
185
|
+
this.type !== "textarea" && ((s = e(this, l).showPasswordController) == null || s.abort(), this.type === "text" ? e(this, p).name = "eye" : this.type === "password" && (e(this, p).name = "eye-slash"), t && (this.type === "password" || this.type === "text") && (e(this, l).showPasswordController = new AbortController(), e(this, p).addEventListener(
|
|
186
186
|
"click",
|
|
187
187
|
e(this, L),
|
|
188
188
|
{
|
|
@@ -195,14 +195,14 @@ class G extends k {
|
|
|
195
195
|
type: String,
|
|
196
196
|
default: "",
|
|
197
197
|
observer: (t) => {
|
|
198
|
-
t && (e(this, w).innerHTML = `<ea-icon class="ea-input__prefix-icon" part="prefix-icon"
|
|
198
|
+
t && (e(this, w).innerHTML = `<ea-icon class="ea-input__prefix-icon" part="prefix-icon" name="${t}"></ea-icon>`);
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
201
|
"suffix-icon": {
|
|
202
202
|
type: String,
|
|
203
203
|
default: "",
|
|
204
204
|
observer: (t) => {
|
|
205
|
-
t && (e(this, b).innerHTML = `<ea-icon class="ea-input__suffix-icon" part="suffix-icon"
|
|
205
|
+
t && (e(this, b).innerHTML = `<ea-icon class="ea-input__suffix-icon" part="suffix-icon" name="${t}"></ea-icon>`);
|
|
206
206
|
}
|
|
207
207
|
},
|
|
208
208
|
"show-word-limit": {
|
|
@@ -349,7 +349,7 @@ class G extends k {
|
|
|
349
349
|
*/
|
|
350
350
|
a(this, P, (t) => {
|
|
351
351
|
const s = this.id || Math.random().toString(36).substring(2, 7), c = t === "textarea" ? `<textarea id="${s}" class="ea-input__original" part="original"></textarea>` : `<input id="${s}" class="ea-input__original" type="${t}" part="original" />`;
|
|
352
|
-
e(this, y).innerHTML = c, h(this, i, e(this, y).querySelector(".ea-input__original")), e(this, d).isOriginalRendered = !0;
|
|
352
|
+
e(this, y).innerHTML = c, h(this, i, e(this, y).querySelector(".ea-input__original")), e(this, i).value = this.value, e(this, d).isOriginalRendered = !0;
|
|
353
353
|
});
|
|
354
354
|
/**
|
|
355
355
|
* 输入框内容发生改变时触发
|
|
@@ -396,7 +396,7 @@ class G extends k {
|
|
|
396
396
|
* 显示密码按钮点击时触发
|
|
397
397
|
*/
|
|
398
398
|
a(this, L, () => {
|
|
399
|
-
this.type === "password" ? (this.type = "text", e(this, p).
|
|
399
|
+
this.type === "password" ? (this.type = "text", e(this, p).name = "eye") : this.type === "text" && (this.type = "password", e(this, p).name = "eye-slash"), this.focus();
|
|
400
400
|
});
|
|
401
401
|
/**
|
|
402
402
|
* 自动调整高度
|
|
@@ -495,8 +495,8 @@ class G extends k {
|
|
|
495
495
|
<span class="ea-input__original-wrapper" part="original-wrapper">
|
|
496
496
|
</span>
|
|
497
497
|
<span class="ea-input__suffix" part="suffix">
|
|
498
|
-
<ea-icon class="ea-input__clear-icon"
|
|
499
|
-
<ea-icon class="ea-input__show-password-icon"
|
|
498
|
+
<ea-icon class="ea-input__clear-icon" name="xmark" part="clear-icon"></ea-icon>
|
|
499
|
+
<ea-icon class="ea-input__show-password-icon" name="eye-slash" part="show-password-icon"></ea-icon>
|
|
500
500
|
<span class="ea-input__suffix-icon" part="suffix-icon">
|
|
501
501
|
<slot name="suffix"></slot>
|
|
502
502
|
</span>
|
|
@@ -7,7 +7,7 @@ import { s as i } from "../css/ea-row.style.js";
|
|
|
7
7
|
class p extends o {
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
11
|
* @typedef {Object} State
|
|
12
12
|
* @property {Number} span 列数
|
|
13
13
|
* @property {Number} offset 列偏移
|
|
@@ -71,7 +71,7 @@ window.customElements.get("ea-col") || window.customElements.define("ea-col", p)
|
|
|
71
71
|
class u extends o {
|
|
72
72
|
constructor() {
|
|
73
73
|
super();
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
75
|
* @typedef {Object} State
|
|
76
76
|
* @property {string} gutter - 列类型
|
|
77
77
|
* @property {string} justify - 列对齐方式
|
|
@@ -87,7 +87,14 @@ class u extends o {
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
justify: {
|
|
90
|
-
type: [
|
|
90
|
+
type: [
|
|
91
|
+
"start",
|
|
92
|
+
"end",
|
|
93
|
+
"center",
|
|
94
|
+
"space-around",
|
|
95
|
+
"space-between",
|
|
96
|
+
"space-evenly"
|
|
97
|
+
],
|
|
91
98
|
default: "start",
|
|
92
99
|
observer: (e) => {
|
|
93
100
|
this.style.setProperty("--ea-row-justify", e);
|
|
@@ -57,7 +57,7 @@ class y extends m {
|
|
|
57
57
|
type: String,
|
|
58
58
|
default: "",
|
|
59
59
|
observer: (e) => {
|
|
60
|
-
a(this, n).setAttribute("
|
|
60
|
+
a(this, n).setAttribute("name", e), a(this, i).className = this.updateContainerClasslist();
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}));
|