easy-component-ui 3.0.12 → 3.0.14
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/package.json +308 -304
- package/dist/assets/icon.css +0 -1
- package/dist/components/Base.js +0 -873
- package/dist/components/ea-alert.js +0 -196
- package/dist/components/ea-avatar.js +0 -159
- package/dist/components/ea-backtop.js +0 -136
- package/dist/components/ea-badge.js +0 -144
- package/dist/components/ea-breadcrumb.js +0 -148
- package/dist/components/ea-button.js +0 -265
- package/dist/components/ea-calendar.js +0 -10
- package/dist/components/ea-calendar2.js +0 -671
- package/dist/components/ea-card.js +0 -85
- package/dist/components/ea-carousel.js +0 -415
- package/dist/components/ea-checkbox.js +0 -446
- package/dist/components/ea-collapse.js +0 -313
- package/dist/components/ea-color-picker.js +0 -891
- package/dist/components/ea-container.js +0 -177
- package/dist/components/ea-countdown.js +0 -142
- package/dist/components/ea-date-picker.js +0 -649
- package/dist/components/ea-descriptions.js +0 -474
- package/dist/components/ea-dialog.js +0 -249
- package/dist/components/ea-drawer.js +0 -211
- package/dist/components/ea-dropdown.js +0 -228
- package/dist/components/ea-empty.js +0 -93
- package/dist/components/ea-icon.js +0 -68
- package/dist/components/ea-image-preview.js +0 -488
- package/dist/components/ea-image.js +0 -302
- package/dist/components/ea-infinite-scroll.js +0 -109
- package/dist/components/ea-input-number.js +0 -367
- package/dist/components/ea-input.js +0 -588
- package/dist/components/ea-layout.js +0 -125
- package/dist/components/ea-link.js +0 -101
- package/dist/components/ea-loading.js +0 -151
- package/dist/components/ea-menu.js +0 -433
- package/dist/components/ea-message-box.js +0 -624
- package/dist/components/ea-message.js +0 -251
- package/dist/components/ea-notification.js +0 -331
- package/dist/components/ea-overlay.js +0 -167
- package/dist/components/ea-page-header.js +0 -108
- package/dist/components/ea-pagination.js +0 -481
- package/dist/components/ea-popconfirm.js +0 -275
- package/dist/components/ea-popover.js +0 -123
- package/dist/components/ea-popper.js +0 -203
- package/dist/components/ea-progress.js +0 -286
- package/dist/components/ea-radio.js +0 -364
- package/dist/components/ea-rate.js +0 -241
- package/dist/components/ea-result.js +0 -100
- package/dist/components/ea-scrollbar.js +0 -235
- package/dist/components/ea-segmented.js +0 -215
- package/dist/components/ea-select.js +0 -609
- package/dist/components/ea-skeleton.js +0 -263
- package/dist/components/ea-slider.js +0 -421
- package/dist/components/ea-space.js +0 -123
- package/dist/components/ea-splitter.js +0 -217
- package/dist/components/ea-statistic.js +0 -74
- package/dist/components/ea-steps.js +0 -346
- package/dist/components/ea-switch.js +0 -271
- package/dist/components/ea-table.js +0 -1124
- package/dist/components/ea-tabs.js +0 -501
- package/dist/components/ea-tag.js +0 -228
- package/dist/components/ea-text.js +0 -113
- package/dist/components/ea-time-picker.js +0 -514
- package/dist/components/ea-timeline.js +0 -185
- package/dist/components/ea-tooltip.js +0 -121
- package/dist/components/ea-tour.js +0 -544
- package/dist/components/ea-transfer.js +0 -949
- package/dist/components/ea-tree.js +0 -1125
- package/dist/components/index.js +0 -61
- package/dist/core/FormBase.js +0 -238
- package/dist/css/ea-alert.style.js +0 -4
- package/dist/css/ea-aside.style.js +0 -4
- package/dist/css/ea-avatar.style.js +0 -4
- package/dist/css/ea-backtop.style.js +0 -4
- package/dist/css/ea-badge.style.js +0 -4
- package/dist/css/ea-breadcrumb-item.style.js +0 -4
- package/dist/css/ea-breadcrumb.style.js +0 -4
- package/dist/css/ea-button-group.style.js +0 -4
- package/dist/css/ea-button.style.js +0 -4
- package/dist/css/ea-calendar.style.js +0 -4
- package/dist/css/ea-card.style.js +0 -4
- package/dist/css/ea-carousel-item.style.js +0 -4
- package/dist/css/ea-carousel.style.js +0 -4
- package/dist/css/ea-check-tag.style.js +0 -4
- package/dist/css/ea-checkbox-group.style.js +0 -4
- package/dist/css/ea-checkbox.style.js +0 -4
- package/dist/css/ea-col.style.js +0 -4
- package/dist/css/ea-collapse-item.style.js +0 -4
- package/dist/css/ea-collapse.style.js +0 -4
- package/dist/css/ea-color-picker-panel.style.js +0 -4
- package/dist/css/ea-color-picker.style.js +0 -4
- package/dist/css/ea-container.style.js +0 -4
- package/dist/css/ea-date-picker.style.js +0 -4
- package/dist/css/ea-descriptions-item.style.js +0 -4
- package/dist/css/ea-descriptions.style.js +0 -4
- package/dist/css/ea-dialog.style.js +0 -4
- package/dist/css/ea-drawer.style.js +0 -4
- package/dist/css/ea-dropdown-item.style.js +0 -4
- package/dist/css/ea-dropdown-menu.style.js +0 -4
- package/dist/css/ea-dropdown.style.js +0 -4
- package/dist/css/ea-empty.style.js +0 -4
- package/dist/css/ea-footer.style.js +0 -4
- package/dist/css/ea-header.style.js +0 -4
- package/dist/css/ea-icon.style.js +0 -4
- package/dist/css/ea-image-preview.style.js +0 -4
- package/dist/css/ea-image.style.js +0 -4
- package/dist/css/ea-infinite-scroll.style.js +0 -4
- package/dist/css/ea-input-number.style.js +0 -4
- package/dist/css/ea-input.style.js +0 -4
- package/dist/css/ea-link.style.js +0 -4
- package/dist/css/ea-main.style.js +0 -4
- package/dist/css/ea-menu-item-group.style.js +0 -4
- package/dist/css/ea-menu-item.style.js +0 -4
- package/dist/css/ea-menu.style.js +0 -4
- package/dist/css/ea-message-box.style.js +0 -4
- package/dist/css/ea-message.style.js +0 -4
- package/dist/css/ea-notification.style.js +0 -4
- package/dist/css/ea-option-gropu.style.js +0 -4
- package/dist/css/ea-option.style.js +0 -4
- package/dist/css/ea-overlay.style.js +0 -4
- package/dist/css/ea-page-header.style.js +0 -4
- package/dist/css/ea-pagination.style.js +0 -4
- package/dist/css/ea-popconfirm.style.js +0 -4
- package/dist/css/ea-popover.style.js +0 -4
- package/dist/css/ea-popper.style.js +0 -4
- package/dist/css/ea-progress.style.js +0 -4
- package/dist/css/ea-radio-group.style.js +0 -4
- package/dist/css/ea-radio.style.js +0 -4
- package/dist/css/ea-rate.style.js +0 -4
- package/dist/css/ea-result.style.js +0 -4
- package/dist/css/ea-row.style.js +0 -4
- package/dist/css/ea-scrollbar.style.js +0 -4
- package/dist/css/ea-segmented.style.js +0 -4
- package/dist/css/ea-select.style.js +0 -4
- package/dist/css/ea-skeleton-item.style.js +0 -4
- package/dist/css/ea-skeleton.style.js +0 -4
- package/dist/css/ea-slider.style.js +0 -4
- package/dist/css/ea-space.style.js +0 -4
- package/dist/css/ea-splitter-bar.style.js +0 -4
- package/dist/css/ea-splitter-panel.style.js +0 -4
- package/dist/css/ea-splitter.style.js +0 -4
- package/dist/css/ea-statistic.style.js +0 -4
- package/dist/css/ea-step.style.js +0 -4
- package/dist/css/ea-steps.style.js +0 -4
- package/dist/css/ea-sub-menu.style.js +0 -4
- package/dist/css/ea-switch.style.js +0 -4
- package/dist/css/ea-tab-panel.style.js +0 -4
- package/dist/css/ea-tab.style.js +0 -4
- package/dist/css/ea-table-column.style.js +0 -4
- package/dist/css/ea-table.style.js +0 -4
- package/dist/css/ea-tabs.style.js +0 -4
- package/dist/css/ea-tag.style.js +0 -4
- package/dist/css/ea-text.style.js +0 -4
- package/dist/css/ea-time-picker.style.js +0 -4
- package/dist/css/ea-timeline-item.style.js +0 -4
- package/dist/css/ea-timeline.style.js +0 -4
- package/dist/css/ea-tooltip.style.js +0 -4
- package/dist/css/ea-tour-step.style.js +0 -4
- package/dist/css/ea-tour.style.js +0 -4
- package/dist/css/ea-transfer.style.js +0 -5
- package/dist/css/ea-tree.style.js +0 -6
- package/dist/css/ea-ui-component.style.js +0 -4
- package/dist/favicon.ico +0 -0
- package/dist/utils/Color.js +0 -439
- package/dist/utils/I18nManager.js +0 -218
- package/dist/utils/Utils.js +0 -65
- package/dist/utils/Variables.js +0 -12
- package/dist/utils/parseTime.js +0 -73
- package/dist/utils/timeout.js +0 -9
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
var a = Object.defineProperty;
|
|
2
|
-
var l = (s, t, e) => t in s ? a(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
-
var r = (s, t, e) => l(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { B as o } from "./Base.js";
|
|
5
|
-
import { s as n } from "../css/ea-col.style.js";
|
|
6
|
-
import { s as i } from "../css/ea-row.style.js";
|
|
7
|
-
class p extends o {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
/**
|
|
11
|
-
* @typedef {Object} State
|
|
12
|
-
* @property {Number} span 列数
|
|
13
|
-
* @property {Number} offset 列偏移
|
|
14
|
-
* @property {Number} push 列向右移动
|
|
15
|
-
* @property {Number} pull 列向左移动
|
|
16
|
-
*/
|
|
17
|
-
/** @type {State} */
|
|
18
|
-
r(this, "state", this.properties({
|
|
19
|
-
span: {
|
|
20
|
-
type: Number,
|
|
21
|
-
default: 24,
|
|
22
|
-
observer: (e) => {
|
|
23
|
-
this.style.setProperty("--ea-col-span", e);
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
offset: {
|
|
27
|
-
type: Number,
|
|
28
|
-
default: 0,
|
|
29
|
-
observer: (e) => {
|
|
30
|
-
this.style.setProperty("--ea-col-offset", e);
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
push: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 0,
|
|
36
|
-
observer: (e) => {
|
|
37
|
-
this.style.setProperty("--ea-col-push", e);
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
pull: {
|
|
41
|
-
type: Number,
|
|
42
|
-
default: 0,
|
|
43
|
-
observer: (e) => {
|
|
44
|
-
this.style.setProperty("--ea-col-pull", e);
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
tag: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: "div",
|
|
50
|
-
observer: (e) => {
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}));
|
|
54
|
-
this.stylesheet = n, this.$render();
|
|
55
|
-
}
|
|
56
|
-
static get observedAttributes() {
|
|
57
|
-
return ["span", "offset", "push", "pull", "tag"];
|
|
58
|
-
}
|
|
59
|
-
$render() {
|
|
60
|
-
this.shadowRoot.innerHTML = `
|
|
61
|
-
<${this.tag} class="ea-row" part="container">
|
|
62
|
-
<slot></slot>
|
|
63
|
-
</${this.tag}>
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
connectedCallback() {
|
|
67
|
-
super.connectedCallback();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
window.customElements.get("ea-col") || window.customElements.define("ea-col", p);
|
|
71
|
-
class u extends o {
|
|
72
|
-
constructor() {
|
|
73
|
-
super();
|
|
74
|
-
/**
|
|
75
|
-
* @typedef {Object} State
|
|
76
|
-
* @property {string} gutter - 列类型
|
|
77
|
-
* @property {string} justify - 列对齐方式
|
|
78
|
-
* @property {string} align - 列对齐方式
|
|
79
|
-
*/
|
|
80
|
-
/** @type {State} */
|
|
81
|
-
r(this, "state", this.properties({
|
|
82
|
-
gutter: {
|
|
83
|
-
type: Number,
|
|
84
|
-
default: 0,
|
|
85
|
-
observer: (e) => {
|
|
86
|
-
this.style.setProperty("--ea-row-gutter", e / 2 + "px");
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
justify: {
|
|
90
|
-
type: ["start", "end", "center", "space-around", "space-between", "space-evenly"],
|
|
91
|
-
default: "start",
|
|
92
|
-
observer: (e) => {
|
|
93
|
-
this.style.setProperty("--ea-row-justify", e);
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
align: {
|
|
97
|
-
type: ["top", "middle", "bottom"],
|
|
98
|
-
default: "",
|
|
99
|
-
observer: (e) => {
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
tag: {
|
|
103
|
-
type: String,
|
|
104
|
-
default: "div",
|
|
105
|
-
observer: (e) => {
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}));
|
|
109
|
-
this.stylesheet = i, this.$render();
|
|
110
|
-
}
|
|
111
|
-
static get observedAttributes() {
|
|
112
|
-
return ["gutter", "justify", "align", "tag"];
|
|
113
|
-
}
|
|
114
|
-
$render() {
|
|
115
|
-
this.shadowRoot.innerHTML = `
|
|
116
|
-
<${this.tag} class="ea-row" part="container">
|
|
117
|
-
<slot></slot>
|
|
118
|
-
</${this.tag}>
|
|
119
|
-
`;
|
|
120
|
-
}
|
|
121
|
-
connectedCallback() {
|
|
122
|
-
super.connectedCallback();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
window.customElements.get("ea-row") || window.customElements.define("ea-row", u);
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
var u = Object.defineProperty;
|
|
2
|
-
var d = (t) => {
|
|
3
|
-
throw TypeError(t);
|
|
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 c = (t, s, e) => p(t, typeof s != "symbol" ? s + "" : s, e), h = (t, s, e) => s.has(t) || d("Cannot " + e);
|
|
7
|
-
var a = (t, s, e) => (h(t, s, "read from private field"), e ? e.call(t) : s.get(t)), r = (t, s, e) => s.has(t) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), l = (t, s, e, o) => (h(t, s, "write to private field"), o ? o.call(t, e) : s.set(t, e), e);
|
|
8
|
-
import { B as m } from "./Base.js";
|
|
9
|
-
import { s as b } from "../css/ea-link.style.js";
|
|
10
|
-
var i, n;
|
|
11
|
-
class y extends m {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
/** @type {HTMLAnchorElement} */
|
|
15
|
-
r(this, i);
|
|
16
|
-
/** @type {HTMLElement} */
|
|
17
|
-
r(this, n);
|
|
18
|
-
/**
|
|
19
|
-
* @typedef {Object} LinkState
|
|
20
|
-
* @property {string} type
|
|
21
|
-
* @property {Boolean} disabled
|
|
22
|
-
* @property {Boolean} underline
|
|
23
|
-
* @property {string} href
|
|
24
|
-
* @property {string} icon
|
|
25
|
-
*/
|
|
26
|
-
/** @type {LinkState} */
|
|
27
|
-
c(this, "state", this.properties({
|
|
28
|
-
type: {
|
|
29
|
-
type: ["normal", "primary", "success", "info", "warning", "danger"],
|
|
30
|
-
default: "normal",
|
|
31
|
-
observer: (e) => {
|
|
32
|
-
a(this, i).className = this.updateContainerClasslist();
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
disabled: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: !1,
|
|
38
|
-
observer: (e) => {
|
|
39
|
-
a(this, i).className = this.updateContainerClasslist();
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
underline: {
|
|
43
|
-
type: ["always", "hover", "never"],
|
|
44
|
-
default: "",
|
|
45
|
-
observer: (e) => {
|
|
46
|
-
a(this, i).className = this.updateContainerClasslist();
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
href: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: "",
|
|
52
|
-
observer: (e) => {
|
|
53
|
-
a(this, i).href = e;
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
icon: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: "",
|
|
59
|
-
observer: (e) => {
|
|
60
|
-
a(this, n).setAttribute("icon", e), a(this, i).className = this.updateContainerClasslist();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}));
|
|
64
|
-
this.stylesheet = b, this.$render();
|
|
65
|
-
}
|
|
66
|
-
static get observedAttributes() {
|
|
67
|
-
return ["type", "disabled", "underline", "href", "icon"];
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* 获取 classlist 列表
|
|
71
|
-
* @return {string} 属性值
|
|
72
|
-
*/
|
|
73
|
-
updateContainerClasslist() {
|
|
74
|
-
var e;
|
|
75
|
-
return this.computedClasslist(
|
|
76
|
-
"ea-link",
|
|
77
|
-
{
|
|
78
|
-
["--" + this.type]: this.type,
|
|
79
|
-
["--underline-" + this.underline]: this.underline,
|
|
80
|
-
"--disabled": this.disabled
|
|
81
|
-
},
|
|
82
|
-
{ icon: (e = this.icon) == null ? void 0 : e.length }
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
$render() {
|
|
86
|
-
this.shadowRoot.innerHTML = `
|
|
87
|
-
<a class="ea-link" part="container" tabindex="-1">
|
|
88
|
-
<ea-icon class="ea-link__icon" part="icon"></ea-icon>
|
|
89
|
-
<slot></slot>
|
|
90
|
-
</a>
|
|
91
|
-
`, l(this, i, this.shadowRoot.querySelector(".ea-link")), l(this, n, this.shadowRoot.querySelector(".ea-link__icon"));
|
|
92
|
-
}
|
|
93
|
-
connectedCallback() {
|
|
94
|
-
super.connectedCallback();
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
i = new WeakMap(), n = new WeakMap();
|
|
98
|
-
window.customElements.get("ea-link") || window.customElements.define("ea-link", y);
|
|
99
|
-
export {
|
|
100
|
-
y as EaLink
|
|
101
|
-
};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
var p = (t) => {
|
|
2
|
-
throw TypeError(t);
|
|
3
|
-
};
|
|
4
|
-
var c = (t, i, e) => i.has(t) || p("Cannot " + e);
|
|
5
|
-
var n = (t, i, e) => (c(t, i, "read from private field"), e ? e.call(t) : i.get(t)), l = (t, i, e) => i.has(t) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), d = (t, i, e, o) => (c(t, i, "write to private field"), o ? o.call(t, e) : i.set(t, e), e), h = (t, i, e) => (c(t, i, "access private method"), e);
|
|
6
|
-
import { B as _ } from "./Base.js";
|
|
7
|
-
import "./ea-icon.js";
|
|
8
|
-
const b = `
|
|
9
|
-
.ea-loading_wrap {
|
|
10
|
-
position: relative;
|
|
11
|
-
}
|
|
12
|
-
.ea-loading_wrap .ea-loading_mask {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
display: none;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
background-color: hsla(0, 0%, 100%, 0.9);
|
|
22
|
-
z-index: 1;
|
|
23
|
-
transition: background-color 0.2s;
|
|
24
|
-
}
|
|
25
|
-
.ea-loading_wrap .ea-loading_spinner,
|
|
26
|
-
.ea-loading_wrap .ea-loading_text {
|
|
27
|
-
color: #409eff;
|
|
28
|
-
}
|
|
29
|
-
.ea-loading_wrap .ea-loading_spinner {
|
|
30
|
-
font-size: 2rem;
|
|
31
|
-
}
|
|
32
|
-
.ea-loading_wrap .ea-loading_text {
|
|
33
|
-
margin-left: 0.5rem;
|
|
34
|
-
}
|
|
35
|
-
.ea-loading_wrap.ea-loading_wrap--fullscreen {
|
|
36
|
-
position: fixed;
|
|
37
|
-
left: 0;
|
|
38
|
-
top: 0;
|
|
39
|
-
z-index: 3000;
|
|
40
|
-
width: 100%;
|
|
41
|
-
height: 100%;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
44
|
-
.ea-loading_wrap.ea-loading_wrap--loading .ea-loading_mask {
|
|
45
|
-
display: flex;
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
var s, a, r, g, u;
|
|
49
|
-
class m extends _ {
|
|
50
|
-
constructor() {
|
|
51
|
-
super();
|
|
52
|
-
l(this, g);
|
|
53
|
-
l(this, s);
|
|
54
|
-
l(this, a);
|
|
55
|
-
l(this, r);
|
|
56
|
-
const e = this.attachShadow({ mode: "open" });
|
|
57
|
-
e.innerHTML = `
|
|
58
|
-
<div class="ea-loading_wrap" part="container">
|
|
59
|
-
<div class="ea-loading_mask" part="mask-wrap">
|
|
60
|
-
<ea-icon icon="icon-spin6 animate-spin" class="ea-loading_spinner" part="icon"></ea-icon>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="ea-loading_content" part="content-wrap">
|
|
63
|
-
<slot></slot>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
`, d(this, s, e.querySelector(".ea-loading_wrap")), d(this, a, e.querySelector(".ea-loading_mask")), d(this, r, e.querySelector(".ea-loading_spinner")), this.build(e, b);
|
|
67
|
-
}
|
|
68
|
-
// ------- loading 加载状态 -------
|
|
69
|
-
// #region
|
|
70
|
-
get loading() {
|
|
71
|
-
return this.getAttrBoolean("loading") || !1;
|
|
72
|
-
}
|
|
73
|
-
set loading(e) {
|
|
74
|
-
this.setAttribute("loading", e), n(this, s).classList.toggle("ea-loading_wrap--loading", e), h(this, g, u).call(this, this.fullscreen, e, this.lock);
|
|
75
|
-
}
|
|
76
|
-
// #endregion
|
|
77
|
-
// ------- end -------
|
|
78
|
-
// ------- spinner 加载图标 -------
|
|
79
|
-
// #region
|
|
80
|
-
get spinner() {
|
|
81
|
-
return this.getAttribute("spinner") || "icon-spin6";
|
|
82
|
-
}
|
|
83
|
-
set spinner(e) {
|
|
84
|
-
this.setAttribute("spinner", e), n(this, r).icon = `${e} animate-spin`;
|
|
85
|
-
}
|
|
86
|
-
// #endregion
|
|
87
|
-
// ------- end -------
|
|
88
|
-
// ------- spinner-size 加载图标大小 -------
|
|
89
|
-
// #region
|
|
90
|
-
get spinnerSize() {
|
|
91
|
-
return this.getAttrNumber("spinner-size") || 16;
|
|
92
|
-
}
|
|
93
|
-
set spinnerSize(e) {
|
|
94
|
-
this.setAttribute("spinner-size", e), n(this, r).style.fontSize = `${e}px`;
|
|
95
|
-
}
|
|
96
|
-
// #endregion
|
|
97
|
-
// ------- end -------
|
|
98
|
-
// ------- background 背景颜色 -------
|
|
99
|
-
// #region
|
|
100
|
-
get background() {
|
|
101
|
-
return this.getAttribute("background") || "hsla(0, 0%, 100%, 0.9)";
|
|
102
|
-
}
|
|
103
|
-
set background(e) {
|
|
104
|
-
this.setAttribute("background", e), n(this, a).style.backgroundColor = e;
|
|
105
|
-
}
|
|
106
|
-
// #endregion
|
|
107
|
-
// ------- end -------
|
|
108
|
-
// ------- text 文本 -------
|
|
109
|
-
// #region
|
|
110
|
-
get text() {
|
|
111
|
-
return this.getAttribute("text") || "";
|
|
112
|
-
}
|
|
113
|
-
set text(e) {
|
|
114
|
-
e && this.setAttribute("text", e);
|
|
115
|
-
}
|
|
116
|
-
// #endregion
|
|
117
|
-
// ------- end -------
|
|
118
|
-
// ------- fullscreen 全屏 -------
|
|
119
|
-
// #region
|
|
120
|
-
get fullscreen() {
|
|
121
|
-
return this.getAttrBoolean("fullscreen") || !1;
|
|
122
|
-
}
|
|
123
|
-
set fullscreen(e) {
|
|
124
|
-
e && this.setAttribute("fullscreen", e);
|
|
125
|
-
}
|
|
126
|
-
// #endregion
|
|
127
|
-
// ------- end -------
|
|
128
|
-
// ------- lock 全屏是否锁定 -------
|
|
129
|
-
// #region
|
|
130
|
-
get lock() {
|
|
131
|
-
return this.getAttrBoolean("lock") || !1;
|
|
132
|
-
}
|
|
133
|
-
set lock(e) {
|
|
134
|
-
e && this.setAttribute("lock", e);
|
|
135
|
-
}
|
|
136
|
-
connectedCallback() {
|
|
137
|
-
if (this.fullscreen = this.fullscreen, this.loading = this.loading, this.spinnerSize = this.spinnerSize, this.spinner = this.spinner, this.background = this.background, this.text) {
|
|
138
|
-
const e = document.createElement("div");
|
|
139
|
-
e.className = "ea-loading_text", e.innerHTML = this.text, n(this, a).appendChild(e);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
s = new WeakMap(), a = new WeakMap(), r = new WeakMap(), g = new WeakSet(), // #endregion
|
|
144
|
-
// ------- end -------
|
|
145
|
-
u = function(e, o, f) {
|
|
146
|
-
e && (n(this, s).classList.toggle("ea-loading_wrap--fullscreen", o), f && (document.body.style.overflow = o ? "hidden" : "auto"));
|
|
147
|
-
};
|
|
148
|
-
customElements.get("ea-loading") || customElements.define("ea-loading", m);
|
|
149
|
-
export {
|
|
150
|
-
m as EaLoading
|
|
151
|
-
};
|