litos-ui 0.17.3 → 0.17.5
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/lib/base.js +1 -1
- package/lib/calendar/index.d.ts +9 -3
- package/lib/calendar/index.js +71 -39
- package/lib/form/index.js +19 -19
- package/lib/loading/index.d.ts +1 -0
- package/lib/loading/index.js +38 -34
- package/package.json +1 -1
package/lib/base.js
CHANGED
|
@@ -32,7 +32,7 @@ class a extends HTMLElement {
|
|
|
32
32
|
this._pendingTask && (cancelAnimationFrame(this._pendingTask), this._pendingTask = void 0, this._pendingUpdate = !1);
|
|
33
33
|
}
|
|
34
34
|
batchUpdate() {
|
|
35
|
-
this._pendingUpdate || (this.cancelPending(), this._pendingUpdate = !0, requestAnimationFrame(() => {
|
|
35
|
+
this._pendingUpdate || (this.cancelPending(), this._pendingUpdate = !0, this._pendingTask = requestAnimationFrame(() => {
|
|
36
36
|
const e = new Set(this._changedProperties);
|
|
37
37
|
this._changedProperties.clear(), this.updateDOM(e), this._pendingUpdate = !1;
|
|
38
38
|
}));
|
package/lib/calendar/index.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import FormInner from "../form/form_inner";
|
|
2
2
|
type CalendarState = {
|
|
3
3
|
locale: string;
|
|
4
|
-
minDate
|
|
5
|
-
maxDate
|
|
4
|
+
minDate: number;
|
|
5
|
+
maxDate: number;
|
|
6
|
+
year: number;
|
|
7
|
+
month: number;
|
|
8
|
+
type: "select" | "range";
|
|
6
9
|
};
|
|
7
10
|
export default class Calendar extends FormInner<CalendarState> {
|
|
8
11
|
static baseName: string;
|
|
9
|
-
private _currentDate;
|
|
10
12
|
private _langData;
|
|
11
13
|
private $container?;
|
|
14
|
+
/** 选择的日期列表 */
|
|
15
|
+
private _selectDates;
|
|
16
|
+
private _range?;
|
|
12
17
|
constructor();
|
|
13
18
|
setValue(v: string): void;
|
|
14
19
|
connectedCallback(): void;
|
|
@@ -26,5 +31,6 @@ export default class Calendar extends FormInner<CalendarState> {
|
|
|
26
31
|
template?: string | HTMLElement | DocumentFragment;
|
|
27
32
|
style?: string | string[];
|
|
28
33
|
};
|
|
34
|
+
private _updateCellsState;
|
|
29
35
|
}
|
|
30
36
|
export {};
|
package/lib/calendar/index.js
CHANGED
|
@@ -1,79 +1,108 @@
|
|
|
1
1
|
import u from "../form/form_inner.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
class
|
|
2
|
+
import { parseAttrValue as g } from "../utils/index.js";
|
|
3
|
+
import { $one as m } from "ph-utils/dom";
|
|
4
|
+
import { langs as f } from "./langs.js";
|
|
5
|
+
import { get as T } from "ph-utils/storage";
|
|
6
|
+
import { parse as w, endOf as M, startOf as I, format as c } from "ph-utils/date";
|
|
7
|
+
const O = ":host{display:block;box-sizing:border-box;width:100%;height:100%}.calendar-table{width:100%;height:100%;border-collapse:collapse}.calendar-table thead{height:var(--calendar-header-height, auto)}.calendar-table th{font-weight:400;cursor:default}.calendar-table .prev-month,.calendar-table .next-month{color:var(--l-calendar-off-text-color, #a8abb2)}.calendar-table .today{color:var(--l-primary-color, #007bff)}.day{text-align:center;cursor:pointer;transition:background-color .2s;font-size:13px}.day:hover{background-color:#0000000a}.day.disabled{background-color:#0000000a;cursor:not-allowed}.day.active{background-color:var(--l-primary-color, #007bff);color:#fff;font-weight:700}";
|
|
8
|
+
class Y extends u {
|
|
9
9
|
static baseName = "calendar";
|
|
10
|
-
_currentDate;
|
|
11
10
|
_langData;
|
|
12
11
|
$container;
|
|
12
|
+
/** 选择的日期列表 */
|
|
13
|
+
_selectDates;
|
|
14
|
+
_range;
|
|
13
15
|
constructor() {
|
|
14
|
-
super(), this.version = 2
|
|
15
|
-
const
|
|
16
|
+
super(), this.version = 2;
|
|
17
|
+
const t = T("l_app_locale", "zh-CN", { storage: "session" }), e = /* @__PURE__ */ new Date();
|
|
16
18
|
this._state = {
|
|
17
|
-
locale:
|
|
18
|
-
|
|
19
|
+
locale: t,
|
|
20
|
+
minDate: -1 / 0,
|
|
21
|
+
maxDate: 1 / 0,
|
|
22
|
+
year: e.getFullYear(),
|
|
23
|
+
month: e.getMonth(),
|
|
24
|
+
type: "select"
|
|
25
|
+
}, this._langData = f[t], this._selectDates = [];
|
|
19
26
|
}
|
|
20
|
-
setValue(
|
|
21
|
-
|
|
27
|
+
setValue(t) {
|
|
28
|
+
t != this.value && (super.setValue(t), this._state.type === "select" ? this._selectDates = t.split(",") : this._range = t.split(",").map((e) => w(e).getTime()), this.batchUpdate());
|
|
22
29
|
}
|
|
23
30
|
connectedCallback() {
|
|
24
31
|
super.connectedCallback();
|
|
25
32
|
}
|
|
26
33
|
afterInit() {
|
|
27
|
-
this.$container =
|
|
34
|
+
this.$container = m(".calendar-table", this.root);
|
|
28
35
|
}
|
|
29
36
|
beforeDestroy() {
|
|
30
37
|
this.$container = void 0;
|
|
31
38
|
}
|
|
32
39
|
static get observedAttributes() {
|
|
33
|
-
return [
|
|
40
|
+
return [
|
|
41
|
+
...u.observedAttributes,
|
|
42
|
+
"locale",
|
|
43
|
+
"year",
|
|
44
|
+
"month",
|
|
45
|
+
"min-date",
|
|
46
|
+
"max-date",
|
|
47
|
+
"type"
|
|
48
|
+
];
|
|
34
49
|
}
|
|
35
|
-
attributeChanged(
|
|
36
|
-
switch (
|
|
50
|
+
attributeChanged(t, e, a) {
|
|
51
|
+
switch (t) {
|
|
37
52
|
case "locale":
|
|
38
|
-
|
|
53
|
+
f.hasOwnProperty(a) && (this._state.locale = a, this._langData = f[a]);
|
|
39
54
|
break;
|
|
40
55
|
case "min-date":
|
|
56
|
+
this._state.minDate = I(a).getTime();
|
|
57
|
+
break;
|
|
41
58
|
case "max-date":
|
|
42
|
-
this._state
|
|
59
|
+
this._state.maxDate = M(a).getTime();
|
|
60
|
+
break;
|
|
61
|
+
case "year":
|
|
62
|
+
this._state.year = g(a, this._state.year);
|
|
63
|
+
break;
|
|
64
|
+
case "month":
|
|
65
|
+
this._state.month = g(a, this._state.month + 1) - 1;
|
|
66
|
+
break;
|
|
67
|
+
case "type":
|
|
68
|
+
this._state.type = a;
|
|
43
69
|
break;
|
|
44
70
|
}
|
|
45
71
|
}
|
|
46
|
-
updateDOM(
|
|
47
|
-
|
|
72
|
+
updateDOM(t) {
|
|
73
|
+
t.has("locale") ? this.rerenderHeader() : (t.has("year") || t.has("month")) && this.$container && (this.$container.innerHTML = this.rerender());
|
|
48
74
|
}
|
|
49
75
|
_renderHeader() {
|
|
50
|
-
return `<tr>${this._langData.weekdays.map((
|
|
76
|
+
return `<tr>${this._langData.weekdays.map((e) => `<th>${e}</th>`).join("")}</tr>`;
|
|
51
77
|
}
|
|
52
78
|
_renderBody() {
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
const
|
|
79
|
+
const t = this._state.year, e = this._state.month, a = c(null, "yyyy-mm-dd"), b = new Date(t, e, 1);
|
|
80
|
+
let s = b.getDay() - 1;
|
|
81
|
+
s < 0 && (s = 6);
|
|
82
|
+
const p = new Date(t, e + 1, 0), D = p.getDate(), $ = c(p, "yyyy-mm"), _ = new Date(t, e, 0), x = _.getDate(), v = c(_, "yyyy-mm"), k = new Date(t, e + 1, 1), C = c(k, "yyyy-mm"), d = new Date(b);
|
|
83
|
+
d.setDate(d.getDate() - s);
|
|
84
|
+
let h = d.setHours(0, 0, 0, 0);
|
|
85
|
+
const H = 864e5;
|
|
57
86
|
let i = "";
|
|
58
|
-
for (let
|
|
59
|
-
|
|
60
|
-
let n,
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
87
|
+
for (let r = 0; r < 42; r++) {
|
|
88
|
+
r % 7 === 0 && (i += "<tr>");
|
|
89
|
+
let n, o = "day", l = "";
|
|
90
|
+
r < s ? (n = `${x - s + r + 1}`, o += " prev-month", l = v) : r < s + D ? (n = `${r - s + 1}`, l = $) : (n = `${r - s - D + 1}`, o += " next-month", l = C), (h < this._state.minDate || h > this._state.maxDate) && (o += " disabled");
|
|
91
|
+
const y = `${l}-${n.padStart(2, "0")}`;
|
|
92
|
+
y === a && (o += " today"), y === this.value && (o += " active"), i += `<td class="${o}" title="${y}">${n}</td>`, h += H, r % 7 === 6 && (i += "</tr>");
|
|
64
93
|
}
|
|
65
94
|
return i;
|
|
66
95
|
}
|
|
67
96
|
rerenderHeader() {
|
|
68
97
|
if (this.$container) {
|
|
69
|
-
const
|
|
70
|
-
|
|
98
|
+
const t = m("thead", this.$container);
|
|
99
|
+
t.innerHTML = this._renderHeader();
|
|
71
100
|
}
|
|
72
101
|
}
|
|
73
102
|
rerenderBody() {
|
|
74
103
|
if (this.$container) {
|
|
75
|
-
const
|
|
76
|
-
|
|
104
|
+
const t = m("tbody", this.$container);
|
|
105
|
+
t.innerHTML = this._renderBody();
|
|
77
106
|
}
|
|
78
107
|
}
|
|
79
108
|
rerender() {
|
|
@@ -82,10 +111,13 @@ class A extends u {
|
|
|
82
111
|
render_v2() {
|
|
83
112
|
return {
|
|
84
113
|
template: `<table class="calendar-table">${this.rerender()}</table>`,
|
|
85
|
-
style: [
|
|
114
|
+
style: [O]
|
|
86
115
|
};
|
|
87
116
|
}
|
|
117
|
+
//只要 minDate、maxDate、_rangeStart、_rangeEnd、_hoverDate、_selectedDates 任何一个发生了改变,都调用这个统一的函数。
|
|
118
|
+
_updateCellsState() {
|
|
119
|
+
}
|
|
88
120
|
}
|
|
89
121
|
export {
|
|
90
|
-
|
|
122
|
+
Y as default
|
|
91
123
|
};
|
package/lib/form/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import { $one as c, formatClass as d, on as r, off as o } from "ph-utils/dom";
|
|
|
2
2
|
import { unitNumberStr as m, parseAttrValue as f } from "../utils/index.js";
|
|
3
3
|
import u from "ph-utils/validator";
|
|
4
4
|
import { s as n } from "../index-CrMiSe0x.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
class k extends
|
|
5
|
+
import v from "../base.js";
|
|
6
|
+
const b = ":host{display:block}.l-form{display:flex;gap:var(--l-form-gap, 20px);flex-flow:column nowrap}.l-form-inline{display:flex;gap:var(--l-form-gap, 20px);flex-flow:row wrap}.l-form.l-form-inline{--l-form-item-display: flex}.l-form.l-form--left{--l-form-label-align: left}.l-form.l-form--top{--l-form-item-display: grid;--l-form-label-align: left;--l-form-label-empty-display: none;grid-template-columns:1fr}";
|
|
7
|
+
class k extends v {
|
|
8
8
|
static baseName = "form";
|
|
9
9
|
validator;
|
|
10
10
|
_data;
|
|
@@ -30,15 +30,15 @@ class k extends b {
|
|
|
30
30
|
this._state.labelPosition = e;
|
|
31
31
|
break;
|
|
32
32
|
case "inner-block":
|
|
33
|
-
const
|
|
34
|
-
this.context({ innerBlock:
|
|
33
|
+
const a = f(e, !1, t);
|
|
34
|
+
this.context({ innerBlock: a });
|
|
35
35
|
break;
|
|
36
36
|
case "label-width":
|
|
37
37
|
this._state.labelWidth = m(e);
|
|
38
38
|
break;
|
|
39
39
|
default:
|
|
40
|
-
const
|
|
41
|
-
this._state[t] =
|
|
40
|
+
const s = f(e, !1, t);
|
|
41
|
+
this._state[t] = s;
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -54,7 +54,7 @@ class k extends b {
|
|
|
54
54
|
t.has("label-width") && (this._state.labelWidth ? this.style.setProperty("--l-form-label-width", this._state.labelWidth) : this.style.removeProperty("--l-form-label-width"));
|
|
55
55
|
}
|
|
56
56
|
connectedCallback() {
|
|
57
|
-
r(this, "form-context-request", this._provide), this.loadStyleText([
|
|
57
|
+
r(this, "form-context-request", this._provide), this.loadStyleText([b]), super.connectedCallback();
|
|
58
58
|
}
|
|
59
59
|
afterInit() {
|
|
60
60
|
r(this, "form-rule-change", this.ruleChange), r(this, "form-value-change", this._valueChange), r(this, "form-action", this._formAction);
|
|
@@ -81,11 +81,11 @@ class k extends b {
|
|
|
81
81
|
t.detail === "submit" ? this.submit() : this.reset();
|
|
82
82
|
};
|
|
83
83
|
_valueChange = (t) => {
|
|
84
|
-
const { name: i, value: e, valid:
|
|
84
|
+
const { name: i, value: e, valid: a } = t.detail;
|
|
85
85
|
if (!i) return;
|
|
86
86
|
this._data == null && (this._data = {});
|
|
87
|
-
const
|
|
88
|
-
this._data[i] = e, !this._state.novalidate &&
|
|
87
|
+
const s = Object.hasOwn(this._data, i);
|
|
88
|
+
this._data[i] = e, !this._state.novalidate && s && a && this.validator.validateKey(i, e, this._data).then(() => {
|
|
89
89
|
const l = this.errors();
|
|
90
90
|
l[i] = void 0, this.errors({ ...l });
|
|
91
91
|
}).catch((l) => {
|
|
@@ -96,19 +96,19 @@ class k extends b {
|
|
|
96
96
|
const i = [];
|
|
97
97
|
if (this._data != null) {
|
|
98
98
|
if (Array.isArray(t))
|
|
99
|
-
for (let e = 0,
|
|
100
|
-
const
|
|
101
|
-
i.push(this.validator.validateKey(
|
|
99
|
+
for (let e = 0, a = t.length; e < a; e++) {
|
|
100
|
+
const s = t[e];
|
|
101
|
+
i.push(this.validator.validateKey(s, this._data[s], this._data));
|
|
102
102
|
}
|
|
103
103
|
else
|
|
104
104
|
i.push(this.validator.validateKey(t, this._data[t], this._data));
|
|
105
105
|
Promise.allSettled(i).then((e) => {
|
|
106
|
-
let
|
|
107
|
-
for (let
|
|
108
|
-
const h = e[
|
|
109
|
-
h.status === "rejected" ?
|
|
106
|
+
let a = {};
|
|
107
|
+
for (let s = 0, l = e.length; s < l; s++) {
|
|
108
|
+
const h = e[s];
|
|
109
|
+
h.status === "rejected" ? a = { ...a, ...h.reason.detail } : a[h.value.key] = void 0;
|
|
110
110
|
}
|
|
111
|
-
this.errors({ ...this.errors(), ...
|
|
111
|
+
this.errors({ ...this.errors(), ...a });
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
}
|
package/lib/loading/index.d.ts
CHANGED
package/lib/loading/index.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { $ as c, iterate as d, $one as r, addClass as g, hasClass as m, $$ as o } from "ph-utils/dom";
|
|
2
|
-
function f(
|
|
3
|
-
if (m(
|
|
2
|
+
function f(e, t) {
|
|
3
|
+
if (m(e, "l-loading")) return;
|
|
4
4
|
let l;
|
|
5
|
-
if (
|
|
5
|
+
if (t.fullscreen && r("#l-loading") != null)
|
|
6
6
|
return;
|
|
7
7
|
const s = ["l-loading"];
|
|
8
|
-
(
|
|
8
|
+
(t.mask === 1 || t.mask === 2 && t.shape === "circle") && (l = o("div", {
|
|
9
9
|
class: "l-loading-mask",
|
|
10
10
|
style: {
|
|
11
|
-
"background-color":
|
|
12
|
-
"--l-loading-zindex":
|
|
11
|
+
"background-color": t.background,
|
|
12
|
+
"--l-loading-zindex": t.zindex
|
|
13
13
|
}
|
|
14
|
-
}),
|
|
14
|
+
}), e.appendChild(l));
|
|
15
15
|
const n = o("div", {
|
|
16
|
-
class: `l-loading-spinner l-loading--${
|
|
16
|
+
class: `l-loading-spinner l-loading--${t.shape}`,
|
|
17
17
|
style: {
|
|
18
|
-
"--l-loading-color":
|
|
18
|
+
"--l-loading-color": t.color
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
if (
|
|
21
|
+
if (t.shape === "bar") {
|
|
22
22
|
const i = o("div", { class: "l-loading-progress" });
|
|
23
23
|
n.appendChild(i);
|
|
24
|
-
} else if (
|
|
24
|
+
} else if (t.shape === "circle") {
|
|
25
25
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
26
26
|
i.setAttribute("viewBox", "0 0 50 50"), i.classList.add("circle");
|
|
27
27
|
const a = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
28
|
-
if (a.classList.add("path"), a.setAttribute("cx", "25"), a.setAttribute("cy", "25"), a.setAttribute("r", "23"), a.setAttribute("fill", "none"), i.appendChild(a), n.appendChild(i),
|
|
28
|
+
if (a.classList.add("path"), a.setAttribute("cx", "25"), a.setAttribute("cy", "25"), a.setAttribute("r", "23"), a.setAttribute("fill", "none"), i.appendChild(a), n.appendChild(i), t.text) {
|
|
29
29
|
const p = o("p", {
|
|
30
30
|
class: "l-loading-text",
|
|
31
|
-
textContent:
|
|
31
|
+
textContent: t.text
|
|
32
32
|
});
|
|
33
33
|
n.appendChild(p);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
e.appendChild(n), t.lock && s.push("l-loading-lock"), t.fullscreen && (s.push("l-loading-fullscreen"), n.id = "l-loading"), e.classList.add(...s), requestAnimationFrame(() => {
|
|
37
37
|
l && (l.style.opacity = "1"), n.style.opacity = "1", g(n, "l-loading-bar--start");
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
function h(
|
|
41
|
-
const l =
|
|
40
|
+
function h(e, t) {
|
|
41
|
+
const l = e.tagName === "BODY" ? "body" : ".l-loading", s = r(`${l} > .l-loading-mask`, e), n = r(`${l} > .l-loading-spinner`, e);
|
|
42
42
|
if (!n) return;
|
|
43
43
|
function i() {
|
|
44
44
|
s && s.remove(), n.remove();
|
|
45
45
|
const a = ["l-loading"];
|
|
46
|
-
|
|
46
|
+
e.tagName === "BODY" && a.push("l-loading-fullscreen", "l-loading-lock"), e.classList.remove(...a);
|
|
47
47
|
}
|
|
48
48
|
n.addEventListener("transitionend", i, { once: !0 }), requestAnimationFrame(() => {
|
|
49
49
|
s && (s.style.opacity = "0"), g(n, "l-loading-bar--finish"), n.style.opacity = "0";
|
|
@@ -54,7 +54,7 @@ class b {
|
|
|
54
54
|
el;
|
|
55
55
|
option;
|
|
56
56
|
isLoading = !1;
|
|
57
|
-
constructor(
|
|
57
|
+
constructor(t) {
|
|
58
58
|
this.option = {
|
|
59
59
|
fullscreen: !0,
|
|
60
60
|
lock: !0,
|
|
@@ -63,9 +63,9 @@ class b {
|
|
|
63
63
|
background: "",
|
|
64
64
|
color: "",
|
|
65
65
|
mask: 2,
|
|
66
|
-
...
|
|
66
|
+
...t
|
|
67
67
|
};
|
|
68
|
-
const l = (
|
|
68
|
+
const l = (t || {}).to;
|
|
69
69
|
let s = null;
|
|
70
70
|
l != null && (typeof l == "string" ? s = document.querySelector(l) : s = l), (s == null || this.option.fullscreen) && (s = document.body), this.el = s, this.show();
|
|
71
71
|
}
|
|
@@ -80,27 +80,31 @@ class b {
|
|
|
80
80
|
destroy() {
|
|
81
81
|
this.hide(), this.el = void 0;
|
|
82
82
|
}
|
|
83
|
+
updateLoadingText(t) {
|
|
84
|
+
const l = r(".l-loading-text", this.el);
|
|
85
|
+
l && (l.textContent = t);
|
|
86
|
+
}
|
|
83
87
|
}
|
|
84
|
-
function u(
|
|
85
|
-
const
|
|
88
|
+
function u(e) {
|
|
89
|
+
const t = e.getAttribute("l-loading-text"), l = e.getAttribute("l-loading-lock");
|
|
86
90
|
return {
|
|
87
|
-
background:
|
|
88
|
-
text:
|
|
89
|
-
fullscreen:
|
|
91
|
+
background: e.getAttribute("l-loading-background"),
|
|
92
|
+
text: t ? t === "0" || t === "false" ? void 0 : t : "加载中……",
|
|
93
|
+
fullscreen: e.hasAttribute("l-loading-fullscreen"),
|
|
90
94
|
lock: !(l === "0" || l === "false"),
|
|
91
|
-
mask: Number(
|
|
92
|
-
shape:
|
|
93
|
-
color:
|
|
95
|
+
mask: Number(e.hasAttribute("l-loading-mask") || 2),
|
|
96
|
+
shape: e.getAttribute("l-loading-shape") || "circle",
|
|
97
|
+
color: e.getAttribute("l-loading-color")
|
|
94
98
|
};
|
|
95
99
|
}
|
|
96
100
|
const k = {
|
|
97
101
|
/** 创建并显示进度条 */
|
|
98
|
-
create(
|
|
99
|
-
return new b(
|
|
102
|
+
create(e) {
|
|
103
|
+
return new b(e);
|
|
100
104
|
},
|
|
101
105
|
/** 根据指令参数初始化进度条 */
|
|
102
|
-
init(
|
|
103
|
-
const
|
|
106
|
+
init(e) {
|
|
107
|
+
const t = e ? `[l-loading="${e}"]` : "[l-loading]", l = c(t);
|
|
104
108
|
d(l, (s) => {
|
|
105
109
|
const n = u(s);
|
|
106
110
|
f(n.fullscreen ? document.body : s, n);
|
|
@@ -114,8 +118,8 @@ const k = {
|
|
|
114
118
|
*
|
|
115
119
|
* @param id 可选参数,指定特定的加载元素 l-loading 对应的值,如果提供,则只关闭匹配该 id 的元素
|
|
116
120
|
*/
|
|
117
|
-
close(
|
|
118
|
-
const
|
|
121
|
+
close(e) {
|
|
122
|
+
const t = e ? `[l-loading="${e}"]` : "[l-loading]", l = c(t);
|
|
119
123
|
d(l, (s) => {
|
|
120
124
|
const n = u(s);
|
|
121
125
|
h(n.fullscreen ? document.body : s);
|