litos-ui 0.18.5 → 0.20.0
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-LvfO4mmL.js → base-Dyj1rzaK.js} +11 -12
- package/lib/base.d.ts +2 -2
- package/lib/base.js +14 -10
- package/lib/button/index.js +1 -1
- package/lib/{button-CC5NBWtI.js → button-CDYYpQu6.js} +3 -4
- package/lib/calendar/index.js +1 -1
- package/lib/{calendar-Clbg3qot.js → calendar-CvlUsN6w.js} +20 -23
- package/lib/carousel/index.js +1 -1
- package/lib/carousel/item.js +1 -1
- package/lib/{carousel-Dgirxwzb.js → carousel-DvkZ1YXq.js} +23 -19
- package/lib/check/checkbox.js +1 -1
- package/lib/check/checkbox_group.js +1 -1
- package/lib/check/radio.js +1 -1
- package/lib/check/radio_group.js +1 -1
- package/lib/{check-BDOpD_0-.js → check-DFlwStH9.js} +10 -13
- package/lib/{check-CrlZ7zVL.js → check-doQ2ZpQj.js} +10 -10
- package/lib/{checkbox-D_bZGoUD.js → checkbox-DhGHJXwI.js} +1 -1
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/item.js +1 -1
- package/lib/{collapse-BRxYoeJx.js → collapse-B6-Rn05A.js} +8 -10
- package/lib/color_picker/index.js +1 -1
- package/lib/{color_picker-AaFcIczZ.js → color_picker-0a-IGZY9.js} +3 -3
- package/lib/date_picker/index.js +1 -1
- package/lib/{date_picker-HjkRma9j.js → date_picker-BDN2PAz5.js} +3 -7
- package/lib/date_picker_ori/index.js +1 -1
- package/lib/{date_picker_ori-1IOHZsan.js → date_picker_ori-BXFs1eET.js} +4 -6
- package/lib/description_panel/index.js +1 -1
- package/lib/{description_panel-DaqVcA6-.js → description_panel--AKXBzLL.js} +2 -6
- package/lib/dialog/dialog_container.js +1 -1
- package/lib/dialog/index.js +9 -7
- package/lib/{dialog_container-CcTyfoaD.js → dialog_container-Bq6HsKey.js} +7 -6
- package/lib/{esm-Cir9D6cn.js → esm-DAha108i.js} +67 -67
- package/lib/form/form_item.d.ts +1 -1
- package/lib/form/form_item.js +1 -1
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +1 -1
- package/lib/{form-BvZHaqAt.js → form-DJxvBiLy.js} +30 -32
- package/lib/{form_inner-52DR1IPu.js → form_inner-Cnwb6f_Q.js} +3 -5
- package/lib/{form_item-DtqChzc3.js → form_item-CFIkfH29.js} +3 -5
- package/lib/icon/arrow_down.js +1 -1
- package/lib/icon/arrow_left.js +1 -1
- package/lib/icon/arrow_right.js +1 -1
- package/lib/icon/arrow_up.js +1 -1
- package/lib/icon/base.js +1 -1
- package/lib/icon/calendar.js +1 -1
- package/lib/icon/caret_bottom.js +1 -1
- package/lib/icon/caret_top.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/close_filled.js +1 -1
- package/lib/icon/d_arrow_left.js +1 -1
- package/lib/icon/d_arrow_right.js +1 -1
- package/lib/icon/font_icon.js +1 -1
- package/lib/icon/info.js +1 -1
- package/lib/icon/loading.js +1 -1
- package/lib/icon/moon.js +1 -1
- package/lib/icon/more.js +1 -1
- package/lib/icon/reduction.js +1 -1
- package/lib/icon/refresh.js +1 -1
- package/lib/icon/refresh_left.js +1 -1
- package/lib/icon/refresh_right.js +1 -1
- package/lib/icon/search.js +1 -1
- package/lib/icon/select.js +1 -1
- package/lib/icon/sort.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/sun.js +1 -1
- package/lib/icon/theme_default.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/zoom_in.js +1 -1
- package/lib/icon/zoom_out.js +1 -1
- package/lib/image/image_preview.js +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{image-BCUhVAFo.js → image-CVQai6NX.js} +19 -19
- package/lib/{image_preview-BeJzfEoF.js → image_preview-DfQAKSJH.js} +3 -5
- package/lib/index.js +36 -36
- package/lib/input/index.js +3 -5
- package/lib/{item-42bYhAkZ.js → item-CQ2Sknbz.js} +1 -1
- package/lib/{item-Dq6M7lxw.js → item-DI6mQXtB.js} +5 -7
- package/lib/{item-CX8C9X57.js → item-D_ZOPXuE.js} +1 -1
- package/lib/list/index.js +1 -1
- package/lib/{list-Dz1Ya118.js → list-Dg5u5dgr.js} +1 -1
- package/lib/loading/index.js +6 -4
- package/lib/mask/index.js +1 -1
- package/lib/{mask-BlDl9u8F.js → mask-Bx-yNIJv.js} +2 -6
- package/lib/md_input/index.js +1 -1
- package/lib/{md_input-DN3ceqsw.js → md_input-BX3bujz8.js} +2 -2
- package/lib/menu/index.d.ts +10 -2
- package/lib/menu/index.js +1 -1
- package/lib/menu-DKscK5mw.js +274 -0
- package/lib/message/index.js +1 -1
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal_box.js +4 -4
- package/lib/{modal-cjj3Nw1B.js → modal-iwxqmAqW.js} +11 -9
- package/lib/page_header/index.js +1 -1
- package/lib/{page_header-BfuWJIdd.js → page_header-ujV3pncE.js} +2 -4
- package/lib/pagination/index.d.ts +25 -18
- package/lib/pagination/index.js +1 -1
- package/lib/{pagination-DpOSOFwl.js → pagination-aRbGd3Rf.js} +86 -83
- package/lib/polygon/index.js +1 -1
- package/lib/{polygon-BY1FAACc.js → polygon-DhhovlrG.js} +1 -1
- package/lib/qrcode/index.js +1 -1
- package/lib/{qrcode-Bgr8gJzA.js → qrcode-Dip8uLSA.js} +1 -1
- package/lib/{radio-C7dkhgwc.js → radio-C9NPQWGI.js} +1 -1
- package/lib/select/index.js +1 -1
- package/lib/{select-Cis6kRjQ.js → select-BZMDj5VE.js} +33 -30
- package/lib/select_ori/index.js +1 -1
- package/lib/{select_ori-DcJbNYYr.js → select_ori-C7sUZxen.js} +3 -3
- package/lib/space/index.js +1 -1
- package/lib/{space-BT_dVhhv.js → space-CKuTk0YB.js} +6 -5
- package/lib/switch/index.js +1 -1
- package/lib/{switch-UyhlgW7F.js → switch-wh2-ivty.js} +11 -9
- package/lib/tabbar/index.js +1 -1
- package/lib/tabbar/item.js +1 -1
- package/lib/{tabbar-DO0kB58Y.js → tabbar-CBXK-_AV.js} +1 -1
- package/lib/table/index.d.ts +7 -3
- package/lib/table/index.js +1 -1
- package/lib/{table-saZMryiV.js → table-BQxMD2Ae.js} +32 -33
- package/lib/tabs/index.js +4 -2
- package/lib/tag/index.js +1 -1
- package/lib/{tag-BtDcKdxo.js → tag-Di1z9PoZ.js} +3 -5
- package/lib/theme/index.js +1 -1
- package/lib/theme/theme_color.js +4 -5
- package/lib/{theme-Barcq234.js → theme-CLbBS-in.js} +9 -10
- package/lib/utils/context_provide.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/popover.js +1 -1
- package/lib/utils/transition.js +1 -1
- package/package.json +11 -11
- package/lib/menu-BOmVa4xN.js +0 -224
|
@@ -1,202 +1,205 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
2
|
import { kebabToCamel as t, parseAttrValue as n, tagAttr as r } from "./utils/index.js";
|
|
3
|
-
import { $one as i,
|
|
3
|
+
import { $one as i, clsx as a, off as o, on as s, shouldEventNext as c } from "ph-utils/browser";
|
|
4
4
|
//#region src/components/pagination/index.less?inline
|
|
5
5
|
var l = ":host{white-space:nowrap;color:#333;font-size:14px;line-height:1}.l-pagination{align-items:center;justify-content:var(--l-pagination-justify-content,flex-start);display:flex}.l-pagination-item{box-sizing:border-box;width:30px;height:30px}.l-pagination-item+.l-pagination-item{margin-left:5px}.l-pagination--btn{--l-btn-padding:0}.l-pagination--link{color:#666;cursor:pointer;border:1px solid #0000;border-radius:3px;justify-content:center;align-items:center;text-decoration:none;transition:color .3s,border-color .3s;display:inline-flex}.l-pagination--link.active{color:var(--l-primary-color,#722ed1);border-color:var(--l-primary-color,#722ed1)}.darrow-icon{display:none}.more-icon{display:inline-block}.l-pagination--link:hover{color:var(--l-primary-color-light1,#9254de)}.l-pagination--link:hover .darrow-icon{display:inline-block}.l-pagination--link:hover .more-icon{display:none}.l-pagination--link:active{color:var(--l-primary-color-light1,#9254de)}.l-pagination-simple-layout{align-items:center;width:auto;display:inline-flex}.l-pagination-simple-input{--l-form-control-height:30px;box-sizing:border-box;text-align:center;width:60px}.l-pagination-simple-divide{margin:0 5px}", u = class extends e {
|
|
6
6
|
static baseName = "pagination";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
set current(e) {
|
|
19
|
-
this.setCurrent(e);
|
|
20
|
-
}
|
|
21
|
-
setCurrent(e) {
|
|
22
|
-
e !== this.#e && (this.#e = e, this.rerender());
|
|
23
|
-
}
|
|
24
|
-
connectedCallback() {
|
|
25
|
-
this.loadStyleText(l), super.connectedCallback();
|
|
7
|
+
constructor() {
|
|
8
|
+
super(), this.version = 2, this._state = {
|
|
9
|
+
total: 0,
|
|
10
|
+
pageCount: 0,
|
|
11
|
+
pageSize: 10,
|
|
12
|
+
align: "start",
|
|
13
|
+
simple: !1,
|
|
14
|
+
hideOnSinglePage: !1,
|
|
15
|
+
currentPage: 1
|
|
16
|
+
};
|
|
26
17
|
}
|
|
27
18
|
static get observedAttributes() {
|
|
28
19
|
return [
|
|
29
20
|
"align",
|
|
30
|
-
"current",
|
|
21
|
+
"current-page",
|
|
31
22
|
"page-count",
|
|
32
23
|
"total",
|
|
33
24
|
"hide-on-single-page",
|
|
34
|
-
"simple"
|
|
25
|
+
"simple",
|
|
26
|
+
"page-size"
|
|
35
27
|
];
|
|
36
28
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
let a = n(i, this[e], e);
|
|
40
|
-
if (a !== this[e]) switch (this[e] = a, e) {
|
|
29
|
+
attributeChanged(e, r, i) {
|
|
30
|
+
switch (e) {
|
|
41
31
|
case "align":
|
|
42
|
-
this.
|
|
32
|
+
this._state.align = i || "start";
|
|
43
33
|
break;
|
|
44
34
|
case "total":
|
|
45
35
|
case "page-count":
|
|
46
|
-
|
|
36
|
+
case "page-size":
|
|
37
|
+
case "current-page":
|
|
38
|
+
let r = n(i, this._state[e]);
|
|
39
|
+
this._state[t(e)] = r, (e === "total" || e === "page-count") && (this._state.pageCount = this.#t());
|
|
47
40
|
break;
|
|
48
41
|
case "simple":
|
|
49
|
-
case "hide-on-single-page":
|
|
50
|
-
this.rendered && this.rerender();
|
|
51
|
-
break;
|
|
42
|
+
case "hide-on-single-page": this._state[t(e)] = n(i, !1, e);
|
|
52
43
|
}
|
|
53
44
|
}
|
|
45
|
+
updateDOM(e) {
|
|
46
|
+
if (e.has("align")) {
|
|
47
|
+
let e = this._state.align === "center" ? this._state.align : `flex-${this._state.align}`;
|
|
48
|
+
this.style.setProperty("--l-pagination-justify-content", e);
|
|
49
|
+
} else this.rerender(), e.clear();
|
|
50
|
+
}
|
|
54
51
|
rerender() {
|
|
55
52
|
let e = i(".l-pagination", this.root);
|
|
56
|
-
e && (this.#
|
|
53
|
+
e && (this.#i(), e.innerHTML = this.#n(), this.#r());
|
|
57
54
|
}
|
|
58
55
|
render() {
|
|
59
|
-
return `<div class="l-pagination">${this.#
|
|
56
|
+
return `<div class="l-pagination">${this.#n()}</div>`;
|
|
57
|
+
}
|
|
58
|
+
render_v2() {
|
|
59
|
+
return {
|
|
60
|
+
template: this.render(),
|
|
61
|
+
style: l
|
|
62
|
+
};
|
|
60
63
|
}
|
|
61
64
|
afterInit() {
|
|
62
|
-
s(this.root, "click", this.#
|
|
65
|
+
s(this.root, "click", this.#e), this.#r();
|
|
63
66
|
}
|
|
64
67
|
beforeDestroy() {
|
|
65
|
-
o(this.root, "click", this.#
|
|
68
|
+
o(this.root, "click", this.#e), this.#i();
|
|
66
69
|
}
|
|
67
|
-
#
|
|
70
|
+
#e = (e) => {
|
|
68
71
|
let [t, n] = c(e, "data-page", this.root);
|
|
69
72
|
if (t) {
|
|
70
73
|
let e = Number(n);
|
|
71
|
-
e = Math.min(this
|
|
74
|
+
e = Math.min(this._state.pageCount, Math.max(1, e)), e !== this._state.currentPage && (this._state.currentPage = e, this.rerender(), this.emit("change", { detail: {
|
|
72
75
|
current: e,
|
|
73
|
-
pageSize: this.pageSize || 10,
|
|
74
|
-
totalPage: this
|
|
76
|
+
pageSize: this._state.pageSize || 10,
|
|
77
|
+
totalPage: this._state.pageCount
|
|
75
78
|
} }));
|
|
76
79
|
}
|
|
77
80
|
};
|
|
78
|
-
#
|
|
79
|
-
let e = this.pageCount;
|
|
80
|
-
return e
|
|
81
|
+
#t() {
|
|
82
|
+
let e = this._state.pageCount, t = this._state.total;
|
|
83
|
+
return e === 0 && t > 0 && (e = Math.ceil(t / (this._state.pageSize || 10))), e;
|
|
81
84
|
}
|
|
82
|
-
#
|
|
83
|
-
if (this
|
|
85
|
+
#n() {
|
|
86
|
+
if (this._state.pageCount <= 1) return "";
|
|
84
87
|
let e = [];
|
|
85
|
-
if (e.push(this.#
|
|
88
|
+
if (e.push(this.#c("l-button", {
|
|
86
89
|
title: "上一页",
|
|
87
|
-
disabled: this.
|
|
88
|
-
"data-page": this.
|
|
90
|
+
disabled: this._state.currentPage === 1,
|
|
91
|
+
"data-page": this._state.currentPage - 1,
|
|
89
92
|
innerHTML: "<l-arrow-left-icon></l-arrow-left-icon>",
|
|
90
93
|
class: [
|
|
91
94
|
"l-pagination-item",
|
|
92
95
|
"l-pagination--btn",
|
|
93
96
|
"prev-btn"
|
|
94
97
|
]
|
|
95
|
-
})), this.simple) e.push(this.#
|
|
98
|
+
})), this._state.simple) e.push(this.#c("div", {
|
|
96
99
|
class: ["l-pagination-item", "l-pagination-simple-layout"],
|
|
97
100
|
innerHTML: [
|
|
98
|
-
this.#
|
|
101
|
+
this.#c("l-input", {
|
|
99
102
|
inputmode: "numeric",
|
|
100
|
-
value: `${this.
|
|
103
|
+
value: `${this._state.currentPage}`,
|
|
101
104
|
class: ["l-pagination-simple-input"],
|
|
102
105
|
"allow-input": "integer"
|
|
103
106
|
}),
|
|
104
107
|
"<span class=\"l-pagination-simple-divide\">/</span>",
|
|
105
|
-
`<span>${this
|
|
108
|
+
`<span>${this._state.pageCount}</span>`
|
|
106
109
|
]
|
|
107
110
|
}));
|
|
108
111
|
else {
|
|
109
|
-
e.push(this.#
|
|
112
|
+
e.push(this.#c("a", {
|
|
110
113
|
title: "1",
|
|
111
114
|
innerHTML: "1",
|
|
112
115
|
class: [
|
|
113
116
|
"l-pagination-item",
|
|
114
117
|
"l-pagination--link",
|
|
115
|
-
this.
|
|
118
|
+
this._state.currentPage === 1 ? "active" : ""
|
|
116
119
|
],
|
|
117
120
|
"data-page": "1"
|
|
118
|
-
})), this.
|
|
121
|
+
})), this._state.currentPage > 4 && e.push(this.#c("a", {
|
|
119
122
|
title: "上5页",
|
|
120
123
|
innerHTML: ["<l-d-arrow-left-icon class='darrow-icon'></l-d-arrow-left-icon>", "<l-more-icon class='more-icon'></l-more-icon>"],
|
|
121
124
|
class: ["l-pagination-item", "l-pagination--link"],
|
|
122
|
-
"data-page": `${this.
|
|
125
|
+
"data-page": `${this._state.currentPage - 5}`
|
|
123
126
|
}));
|
|
124
|
-
let t = Math.max(this.
|
|
125
|
-
r < 4 && (n = Math.min(this
|
|
127
|
+
let t = Math.max(this._state.currentPage - 2, 1), n = Math.min(this._state.currentPage + 2, this._state.pageCount), r = n - t;
|
|
128
|
+
r < 4 && (n = Math.min(this._state.pageCount, n + (4 - r))), r = n - t, r < 4 && (t = Math.max(1, t - (4 - r)));
|
|
126
129
|
for (let r = t; r <= n; r++) if (!(r <= 1)) {
|
|
127
|
-
if (r >= this
|
|
128
|
-
e.push(this.#
|
|
130
|
+
if (r >= this._state.pageCount) break;
|
|
131
|
+
e.push(this.#c("a", {
|
|
129
132
|
title: `${r}`,
|
|
130
133
|
innerHTML: `${r}`,
|
|
131
134
|
class: [
|
|
132
135
|
"l-pagination-item",
|
|
133
136
|
"l-pagination--link",
|
|
134
|
-
this.
|
|
137
|
+
this._state.currentPage === r ? "active" : ""
|
|
135
138
|
],
|
|
136
139
|
"data-page": `${r}`
|
|
137
140
|
}));
|
|
138
141
|
}
|
|
139
|
-
this.
|
|
142
|
+
this._state.currentPage < this._state.pageCount - 3 && e.push(this.#c("a", {
|
|
140
143
|
title: "下5页",
|
|
141
144
|
innerHTML: ["<l-d-arrow-right-icon class='darrow-icon'></l-d-arrow-right-icon>", "<l-more-icon class='more-icon'></l-more-icon>"],
|
|
142
145
|
class: ["l-pagination-item", "l-pagination--link"],
|
|
143
|
-
"data-page": `${this.
|
|
144
|
-
})), this
|
|
145
|
-
title: `${this
|
|
146
|
-
innerHTML: `${this
|
|
146
|
+
"data-page": `${this._state.currentPage + 5}`
|
|
147
|
+
})), this._state.pageCount > 1 && e.push(this.#c("a", {
|
|
148
|
+
title: `${this._state.pageCount}`,
|
|
149
|
+
innerHTML: `${this._state.pageCount}`,
|
|
147
150
|
class: [
|
|
148
151
|
"l-pagination-item",
|
|
149
152
|
"l-pagination--link",
|
|
150
|
-
this.
|
|
153
|
+
this._state.currentPage === this._state.pageCount ? "active" : ""
|
|
151
154
|
],
|
|
152
|
-
"data-page": `${this
|
|
155
|
+
"data-page": `${this._state.pageCount}`
|
|
153
156
|
}));
|
|
154
157
|
}
|
|
155
|
-
return e.push(this.#
|
|
156
|
-
title: `${this.
|
|
158
|
+
return e.push(this.#c("l-button", {
|
|
159
|
+
title: `${this._state.currentPage + 1}`,
|
|
157
160
|
innerHTML: "<l-arrow-right-icon></l-arrow-right-icon>",
|
|
158
161
|
class: [
|
|
159
162
|
"l-pagination-item",
|
|
160
163
|
"l-pagination--btn",
|
|
161
164
|
"next-btn"
|
|
162
165
|
],
|
|
163
|
-
disabled: this.
|
|
164
|
-
"data-page": `${this.
|
|
166
|
+
disabled: this._state.currentPage === this._state.pageCount,
|
|
167
|
+
"data-page": `${this._state.currentPage + 1}`
|
|
165
168
|
})), e.join("");
|
|
166
169
|
}
|
|
167
|
-
#
|
|
170
|
+
#r() {
|
|
168
171
|
let e = i(".l-pagination-simple-input", this.root);
|
|
169
|
-
e && (e.setParser(this.#
|
|
172
|
+
e && (e.setParser(this.#s), s(e, "keyup", this.#o), s(e, "blur", this.#a));
|
|
170
173
|
}
|
|
171
|
-
#
|
|
174
|
+
#i() {
|
|
172
175
|
let e = i(".l-pagination-simple-input", this.root);
|
|
173
|
-
e && (e.setParser(void 0), o(e, "keyup", this.#
|
|
176
|
+
e && (e.setParser(void 0), o(e, "keyup", this.#o), o(e, "blur", this.#a));
|
|
174
177
|
}
|
|
175
|
-
#
|
|
178
|
+
#a = (e) => {
|
|
176
179
|
let t = e.target, n = t.value;
|
|
177
180
|
if (!n) {
|
|
178
|
-
t.value = `${this.
|
|
181
|
+
t.value = `${this._state.currentPage}`;
|
|
179
182
|
return;
|
|
180
183
|
}
|
|
181
|
-
this.
|
|
184
|
+
this._state.currentPage = Number(n), this.rerender();
|
|
182
185
|
};
|
|
183
|
-
#
|
|
186
|
+
#o = (e) => {
|
|
184
187
|
if (e.key === "Enter") {
|
|
185
188
|
let t = e.target.value;
|
|
186
189
|
if (t) {
|
|
187
190
|
let e = Number(t);
|
|
188
|
-
this.
|
|
191
|
+
this._state.currentPage = e, this.rerender();
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
};
|
|
192
|
-
#
|
|
195
|
+
#s = (e) => {
|
|
193
196
|
if (e) {
|
|
194
197
|
let t = Number(e);
|
|
195
|
-
t = Math.max(1, Math.min(this
|
|
198
|
+
t = Math.max(1, Math.min(this._state.pageCount, t)), e = String(t);
|
|
196
199
|
}
|
|
197
200
|
return e;
|
|
198
201
|
};
|
|
199
|
-
#
|
|
202
|
+
#c(e = "a", t) {
|
|
200
203
|
let n = [], i = "";
|
|
201
204
|
for (let e in t) if (e === "innerHTML") i = t[e], Array.isArray(i) && (i = i.join(""));
|
|
202
205
|
else if (e === "class") {
|
package/lib/polygon/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../polygon-
|
|
1
|
+
import { t as e } from "../polygon-DhhovlrG.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
2
|
import { initAttr as t } from "./utils/index.js";
|
|
3
|
-
import { formatClass as n, formatStyle as r } from "ph-utils/
|
|
3
|
+
import { formatClass as n, formatStyle as r } from "ph-utils/browser";
|
|
4
4
|
//#region src/components/polygon/index.less?inline
|
|
5
5
|
var i = ".l-polygon{--l-polygen-size:10px;--l-polygen-width:var(--l-polygen-size);--l-polygen-height:var(--l-polygen-size);--l-polygen-background:#666;width:var(--l-polygen-width);height:var(--l-polygen-height);background:var(--l-polygen-background);transition:background .3s ease-in-out;display:inline-block}.l-polygon-triangle-top{clip-path:polygon(calc(var(--l-polygen-width) / 2) 0, var(--l-polygen-width) var(--l-polygen-height), 0 var(--l-polygen-height))}.l-polygon-triangle-top-left{clip-path:polygon(0 0, var(--l-polygen-width) 0, 0 var(--l-polygen-height))}.l-polygon-triangle-top-right{clip-path:polygon(0 0, var(--l-polygen-width) 0, var(--l-polygen-width) var(--l-polygen-height))}.l-polygon-triangle-right{clip-path:polygon(0 0, var(--l-polygen-width) calc(var(--l-polygen-height) / 2), 0 var(--l-polygen-height))}.l-polygon-triangle-left{clip-path:polygon(var(--l-polygen-width) 0, var(--l-polygen-width) var(--l-polygen-height), 0 calc(var(--l-polygen-height) / 2))}.l-polygon-triangle-bottom{clip-path:polygon(0 0, var(--l-polygen-width) 0, calc(var(--l-polygen-width) / 2) var(--l-polygen-height))}.l-polygon-triangle-bottom-left{clip-path:polygon(0 0, 0 var(--l-polygen-height), var(--l-polygen-width) var(--l-polygen-height))}.l-polygon-triangle-bottom-right{clip-path:polygon(var(--l-polygen-width) 0, var(--l-polygen-width) var(--l-polygen-height), 0 var(--l-polygen-height))}", a = class extends e {
|
|
6
6
|
static baseName = "polygon";
|
package/lib/qrcode/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../qrcode-
|
|
1
|
+
import { t as e } from "../qrcode-Dip8uLSA.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
|
-
import { $one as t } from "ph-utils/
|
|
2
|
+
import { $one as t } from "ph-utils/browser";
|
|
3
3
|
import { QRCodeRender as n, renderToCanvas as r } from "qrcode-generator-es";
|
|
4
4
|
//#region src/components/qrcode/index.less?inline
|
|
5
5
|
var i = ":host,.renderer-el{display:inline-flex}", a = class extends e {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "./check-
|
|
1
|
+
import { n as e, t } from "./check-doQ2ZpQj.js";
|
|
2
2
|
//#region src/components/check/radio.less?inline
|
|
3
3
|
var n = ".l-check__inner{border-radius:50%}.l-check__inner:after{content:\"\";background-color:#0000;border-radius:50%;width:60%;height:60%;transition:background-color .3s ease-in-out;display:block}:host(.is-checked) .l-check__inner:after{background-color:var(--l-primary-color,#722ed1)}:host(.is-disabled) .l-check__inner{border-color:var(--l-disabled-color,#e6e6e6)}:host(.is-disabled) .l-check__inner:after{background-color:var(--l-disabled-color,#e6e6e6)}", r = class extends e {
|
|
4
4
|
static baseName = "radio";
|
package/lib/select/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { kebabToCamel as e, parseAttrValue as t, unitNumberStr as n } from "./utils/index.js";
|
|
2
|
-
import { t as r } from "./form_inner-
|
|
2
|
+
import { t as r } from "./form_inner-Cnwb6f_Q.js";
|
|
3
3
|
import { Popover as i } from "./utils/popover.js";
|
|
4
|
-
import { $ as a, $$ as o, $one as s,
|
|
5
|
-
import { debounce as f } from "ph-utils/web";
|
|
4
|
+
import { $ as a, $$ as o, $one as s, debounce as c, iterate as l, off as u, on as d, shouldEventNext as f } from "ph-utils/browser";
|
|
6
5
|
//#region src/components/select/index.less?inline
|
|
7
6
|
var p = ":host{--l-select-width:100%;min-height:var(--l-form-control-height,32px);width:var(--l-select-width);border:1px solid var(--l-border-color,#d9d9d9);cursor:pointer;box-sizing:border-box;border-radius:4px;justify-content:space-between;align-items:center;gap:5px;padding:4px 10px;font-size:14px;line-height:1;transition:border-color .3s;display:inline-flex;position:relative}:host(:hover){border-color:silver}:host(.l-select--disabled){background-color:var(--l-disabled-color,#f5f7fa);cursor:not-allowed}:host(.l-select--expand),:host(.l-select--active){border-color:var(--l-primary-color,#722ed1)}:host(.l-select--expand) .l-select-arrow{transform:rotate(180deg)}:host(.l-select--loading) .l-select-arrow{opacity:.2}:host(.l-select--clearable) .l-select-arrow{opacity:0}.l-select-main{box-sizing:border-box;flex-flow:wrap;flex-grow:1;gap:5px;display:flex;overflow:hidden}.l-selected-item{flex-shrink:0}.l-select-placeholder{flex-grow:1}.l-select-placeholder,.l-select-arrow{color:#a8abb2}.l-select-filter{background-color:#0000;border:none;outline:none;flex-grow:1;flex-shrink:0;width:0;min-width:15px;max-width:100%}.l-select-filter::placeholder{color:#a8abb2}.l-select-arrow{flex-shrink:0;transition:transform .3s,opacity .3s;transform:rotate(0)}.l-select-tag-close{box-sizing:border-box;cursor:pointer;border-radius:50%;justify-content:center;align-items:center;width:14px;height:14px;margin-left:3px;font-size:12px;transition:color .3s,background-color .3s;display:inline-flex}.l-select-tag-close:hover{color:#fff;background-color:#999}.l-select-clear,.l-select-loading{position:absolute;top:50%;right:10px;transform:translateY(-50%)}.l-select-loading{color:var(--l-primary-color,#722ed1);z-index:2;animation:1.5s linear infinite l-select-loading}.l-select-clear{color:#afafaf;z-index:1}@keyframes l-select-loading{0%{transform:translateY(-50%)rotate(0)}to{transform:translateY(-50%)rotate(360deg)}}", m = class extends r {
|
|
8
7
|
static baseName = "select";
|
|
@@ -89,9 +88,7 @@ var p = ":host{--l-select-width:100%;min-height:var(--l-form-control-height,32px
|
|
|
89
88
|
case "remote":
|
|
90
89
|
this._state[e(r)] = t(a, !1, r);
|
|
91
90
|
break;
|
|
92
|
-
case "loading":
|
|
93
|
-
this.setLoading(t(a, !1, r));
|
|
94
|
-
break;
|
|
91
|
+
case "loading": this.setLoading(t(a, !1, r));
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
94
|
updateDOM(e) {
|
|
@@ -182,7 +179,7 @@ var p = ":host{--l-select-width:100%;min-height:var(--l-form-control-height,32px
|
|
|
182
179
|
}
|
|
183
180
|
_onRootTap = (e) => {
|
|
184
181
|
e.stopPropagation();
|
|
185
|
-
let [t, n, r] =
|
|
182
|
+
let [t, n, r] = f(e, "data-action", e.currentTarget);
|
|
186
183
|
if (t) {
|
|
187
184
|
if (n === "clear") this.value = this._state.multiple ? [] : "", this.selectedLabels = [], this._toggleClearable(!0), this._reRenderLabels(), this._updatePopoverContent();
|
|
188
185
|
else {
|
|
@@ -217,7 +214,7 @@ var p = ":host{--l-select-width:100%;min-height:var(--l-form-control-height,32px
|
|
|
217
214
|
return this._backOptions && (t = this._backOptions.filter((t) => e ? this.filter ? this.filter(e, t) : t[this._state.labelField].includes(e) : !0)), t;
|
|
218
215
|
}
|
|
219
216
|
afterInit() {
|
|
220
|
-
|
|
217
|
+
d(this, "mouseenter", this._onMouseEnter), d(this, "mouseleave", this._onMouseLeave), d(this.root, "click", this._onRootTap), d(this, "click", this._onTap), this._searchEl = s(".l-select-filter", this.root), this._searchEl && (this.inputHandler = c(this._handleFilte, 300), d(this._searchEl, "input", this._onSearchInput), d(this._searchEl, "blur", this._onSearchBlur)), this.disabledChange(), this._popover ||= new i({
|
|
221
218
|
arrow: !1,
|
|
222
219
|
offset: 2,
|
|
223
220
|
placement: "bottom",
|
|
@@ -241,28 +238,33 @@ var p = ":host{--l-select-width:100%;min-height:var(--l-form-control-height,32px
|
|
|
241
238
|
},
|
|
242
239
|
onPopoverAction: (e, t) => {
|
|
243
240
|
if (e && this._options) {
|
|
244
|
-
let n = Number(e), r = this._options[n], i = r[this._state.valueField], o = r[this._state.labelField], s = this.value,
|
|
245
|
-
if (this._state.multiple === !0)
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
241
|
+
let n = Number(e), r = this._options[n], i = r[this._state.valueField], o = r[this._state.labelField], s = this.value, c = this.selectedLabels;
|
|
242
|
+
if (this._state.multiple === !0) {
|
|
243
|
+
if (!s) s = [i], c = [o];
|
|
244
|
+
else if (Array.isArray(s)) {
|
|
245
|
+
let e = s.indexOf(i);
|
|
246
|
+
e === -1 ? (s.push(i), c.push(o)) : (s.splice(e, 1), c.splice(e, 1));
|
|
247
|
+
} else s != i && (s = [s, i], c = [c, o]);
|
|
248
|
+
} else s = i, c = [o];
|
|
251
249
|
this._value != s && this.emit("change", { detail: {
|
|
252
250
|
value: s,
|
|
253
|
-
labels:
|
|
254
|
-
} }), this._value = s, this.selectedLabels =
|
|
251
|
+
labels: c
|
|
252
|
+
} }), this._value = s, this.selectedLabels = c;
|
|
255
253
|
let u = this._isOptionSelect(i);
|
|
256
|
-
this._state.multiple
|
|
257
|
-
|
|
258
|
-
|
|
254
|
+
if (!this._state.multiple) {
|
|
255
|
+
let e = a(".l-select-option--selected", t.parentElement);
|
|
256
|
+
l(e, (e) => {
|
|
257
|
+
this._updateOptionSelect(e, !1);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
this._updateOptionSelect(t, u), this._reRenderLabels(), !this._state.multiple && this._popover && this._popover.hide(), this._searchEl && this._state.multiple && this._searchEl.focus();
|
|
259
261
|
}
|
|
260
262
|
}
|
|
261
263
|
});
|
|
262
264
|
}
|
|
263
265
|
beforeDestroy() {
|
|
264
|
-
if (
|
|
265
|
-
if (
|
|
266
|
+
if (u(this, "mouseenter", this._onMouseEnter), u(this, "mouseleave", this._onMouseLeave), u(this.root, "click", this._onRootTap), u(this, "click", this._onTap), this._options = void 0, this._popover &&= (this._popover.destroy(), void 0), this._searchEl) {
|
|
267
|
+
if (u(this._searchEl, "blur", this._onSearchBlur), u(this._searchEl, "input", this._onSearchInput), this.inputHandler) {
|
|
266
268
|
try {
|
|
267
269
|
this.inputHandler.cancel();
|
|
268
270
|
} catch {}
|
|
@@ -318,7 +320,7 @@ var p = ":host{--l-select-width:100%;min-height:var(--l-form-control-height,32px
|
|
|
318
320
|
let e = s(".l-select-main", this.root);
|
|
319
321
|
if (e) {
|
|
320
322
|
let t = a(".l-selected-item", e);
|
|
321
|
-
t.length > 0 &&
|
|
323
|
+
t.length > 0 && l(t, (e) => {
|
|
322
324
|
e && e != this._searchEl && e.remove();
|
|
323
325
|
});
|
|
324
326
|
let n = this._renderSelectedLabels();
|
|
@@ -334,13 +336,14 @@ var p = ":host{--l-select-width:100%;min-height:var(--l-form-control-height,32px
|
|
|
334
336
|
}
|
|
335
337
|
_renderSelectedLabels() {
|
|
336
338
|
let e = document.createDocumentFragment(), t = this.selectedLabels.length;
|
|
337
|
-
if (t > 0)
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
339
|
+
if (t > 0) {
|
|
340
|
+
if (!this._state.multiple) this._state.filterable || e.appendChild(o("span", {
|
|
341
|
+
class: "l-selected-item",
|
|
342
|
+
textContent: this.selectedLabels[0]
|
|
343
|
+
}));
|
|
344
|
+
else if (this._state.collapseTags) e.appendChild(this._renderTag(this.selectedLabels[0])), t > 1 && e.appendChild(this._renderTag(`+${t - 1}`, -1, !1));
|
|
345
|
+
else for (let n = 0; n < t; n++) e.appendChild(this._renderTag(this.selectedLabels[n], n));
|
|
346
|
+
} else this._state.filterable || e.appendChild(o("span", {
|
|
344
347
|
class: "l-selected-item l-select-placeholder",
|
|
345
348
|
textContent: this._state.placeholder
|
|
346
349
|
}));
|
package/lib/select_ori/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../select_ori-
|
|
1
|
+
import { t as e } from "../select_ori-C7sUZxen.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tagAttrs as e } from "./utils/index.js";
|
|
2
|
-
import { t } from "./form_inner-
|
|
2
|
+
import { t } from "./form_inner-Cnwb6f_Q.js";
|
|
3
3
|
import { t as n } from "./input_inner-x4GfLGjj.js";
|
|
4
|
-
import { $one as r, off as i, on as a } from "ph-utils/
|
|
4
|
+
import { $one as r, off as i, on as a } from "ph-utils/browser";
|
|
5
5
|
//#region src/components/select_ori/index.less?inline
|
|
6
6
|
var o = ":host{height:var(--l-form-control-height,32px);display:inline-flex}.l-input__inner{border:1px solid var(--l-border-color,#dedede);border-radius:var(--l-border-radius,3px);transition:border-color .3s}.l-input__inner:hover{border-color:var(--l-primary-color-light1,#c6c6c6)}.l-input__inner:focus{border-color:var(--l-primary-color,#1890ff);box-shadow:0 0 0 3px var(--l-primary-color-light5)}", s = class extends t {
|
|
7
7
|
static baseName = "select-ori";
|
|
@@ -50,7 +50,7 @@ var o = ":host{height:var(--l-form-control-height,32px);display:inline-flex}.l-i
|
|
|
50
50
|
}
|
|
51
51
|
_handleChange = (e) => {
|
|
52
52
|
let t = e.target.value;
|
|
53
|
-
super.setValue(t), this.
|
|
53
|
+
super.setValue(t), this.emit("change", { detail: t });
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
//#endregion
|
package/lib/space/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../space-
|
|
1
|
+
import { t as e } from "../space-CKuTk0YB.js";
|
|
2
2
|
export { e as default };
|
|
@@ -21,11 +21,12 @@ var i = ":host{box-sizing:border-box;display:var(--l-space-display,flex);align-i
|
|
|
21
21
|
e = t(e);
|
|
22
22
|
let o = n(a, this[e], e);
|
|
23
23
|
if (e === "inline") n(a, !1, "inline") ? this.style.setProperty("--l-space-display", "inline-flex") : this.style.removeProperty("--l-space-display");
|
|
24
|
-
else if (e === "gap")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
else if (e === "gap") {
|
|
25
|
+
if (o) {
|
|
26
|
+
let e = o.split(",").map((e) => r(e) ? `${e}px` : e);
|
|
27
|
+
this.style.setProperty("--l-space-gap", e.join(" "));
|
|
28
|
+
} else this.style.removeProperty("--l-space-gap");
|
|
29
|
+
} else {
|
|
29
30
|
let t = `--l-space-${e}`;
|
|
30
31
|
o ? this.style.setProperty(t, o) : this.style.removeProperty(t);
|
|
31
32
|
}
|
package/lib/switch/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../switch-
|
|
1
|
+
import { t as e } from "../switch-wh2-ivty.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initAttr as e } from "./utils/index.js";
|
|
2
|
-
import { t } from "./form_inner-
|
|
3
|
-
import { $one as n, addClass as r, off as i, on as a, removeClass as o } from "ph-utils/
|
|
2
|
+
import { t } from "./form_inner-Cnwb6f_Q.js";
|
|
3
|
+
import { $one as n, addClass as r, off as i, on as a, removeClass as o } from "ph-utils/browser";
|
|
4
4
|
//#region src/components/switch/index.less?inline
|
|
5
5
|
var s = ":host{box-sizing:border-box;--l-switch-height:22px;--l-switch-width:40px;width:auto;width:var(--l-switch-width);height:var(--l-switch-height);border-radius:calc(var(--l-switch-height) / 2);cursor:pointer;vertical-align:middle;background-color:#dcdfe6;border:1px solid #c2c2c2;justify-content:flex-start;align-items:center;padding:2px;transition:all .3s ease-in-out;display:inline-flex;position:relative}:host(:hover),:host(.l-switch--checked):hover{border-color:var(--l-primary-color,#722ed1)}:host(.l-switch--checked){background-color:var(--l-primary-color,#722ed1);border-color:var(--l-primary-color,#722ed1)}.l-switch-action{width:calc(var(--l-switch-height) - 6px);box-sizing:border-box;background-color:#fff;border-radius:50%;justify-content:center;align-items:center;padding:2px;font-size:12px;transition:all .3s ease-in-out;display:flex;position:absolute;top:2px;bottom:2px;left:2px}.l-switch-text{color:#fff;padding-left:calc(var(--l-switch-width) - 20px);transition:padding-left .3s ease-in-out}:host(.l-switch--checked) .l-switch-action{left:calc(var(--l-switch-width) - var(--l-switch-height) + 3px)}:host(.l-switch--checked) .l-switch-text{padding-left:5px}", c = class extends t {
|
|
6
6
|
static baseName = "switch";
|
|
@@ -23,7 +23,7 @@ var s = ":host{box-sizing:border-box;--l-switch-height:22px;--l-switch-width:40p
|
|
|
23
23
|
return e.join("");
|
|
24
24
|
}
|
|
25
25
|
#e = (e) => {
|
|
26
|
-
this.isDisabled() || (this.setValue(!this.value), this.
|
|
26
|
+
this.isDisabled() || (this.setValue(!this.value), this.emit("change"));
|
|
27
27
|
};
|
|
28
28
|
setValue(e) {
|
|
29
29
|
super.setValue(e), e ? r(this, "l-switch--checked") : o(this, "l-switch--checked");
|
|
@@ -35,12 +35,14 @@ var s = ":host{box-sizing:border-box;--l-switch-height:22px;--l-switch-width:40p
|
|
|
35
35
|
}
|
|
36
36
|
#t() {
|
|
37
37
|
let e = n(".l-switch-action", this.root);
|
|
38
|
-
if (e)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
if (e) {
|
|
39
|
+
if (this.actionRender) {
|
|
40
|
+
let t = this.actionRender({ checked: this.value });
|
|
41
|
+
e.innerHTML = typeof t == "string" ? t : t.outerHTML;
|
|
42
|
+
} else {
|
|
43
|
+
let t = n("[slot=\"checked-action\"]", this), r = n("[slot=\"unchecked-action\"]", this);
|
|
44
|
+
this.value && t ? e.innerHTML = "<slot name=\"checked-action\"></slot>" : !this.value && r && (e.innerHTML = "<slot name=\"unchecked-action\"></slot>");
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
};
|
package/lib/tabbar/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../tabbar-
|
|
1
|
+
import { t as e } from "../tabbar-CBXK-_AV.js";
|
|
2
2
|
export { e as default };
|
package/lib/tabbar/item.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../item-
|
|
1
|
+
import { t as e } from "../item-D_ZOPXuE.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
2
|
import { parseAttrValue as t } from "./utils/index.js";
|
|
3
|
-
import { $$ as n, $one as r, addClass as i, create as a, isVisible as o, off as s, on as c, removeClass as l, shouldEventNext as u } from "ph-utils/
|
|
3
|
+
import { $$ as n, $one as r, addClass as i, create as a, isVisible as o, off as s, on as c, removeClass as l, shouldEventNext as u } from "ph-utils/browser";
|
|
4
4
|
import { isBlank as d, isNumeric as f } from "ph-utils";
|
|
5
5
|
//#region src/components/tabbar/index.less?inline
|
|
6
6
|
var p = ":host{--l-tabbar-hover-color:var(--l-primary-color-light1,#9254de);--l-tabbar-active-color:var(--l-primary-color,#722ed1);--l-tabbar-item-gap:0;--l-tabbar-height:38px;height:var(--l-tabbar-height);align-items:stretch;gap:var(--l-tabbar-item-gap);box-sizing:border-box;background-color:#fff;flex-wrap:nowrap;display:flex;position:relative;overflow:hidden}:host(.l-tabbar--nav){--l-tabbar-height:50px;--l-tabbar-item-grow:1;width:100%}:host(.l-tabbar--bar){--l-tabbar-bar-vertical-padding:10px;--l-tabbar-item-gap:30px;--l-tabbar-line-color:var(--l-primary-color,#722ed1);white-space:nowrap;overflow:auto}.l-tabbar--bar-line{background-color:var(--l-tabbar-line-color);border-radius:1px;width:32px;height:2px;transition:all .3s ease-in-out;position:absolute;bottom:0;left:0}:host(.l-tabbar--card){--l-tabbar-card-border-color:#f5f7fa;--l-tabbar-line-color:#fff;--l-tabbar-item-gap:0;--l-tabbar-card-border-radius:5px}.l-tabbar-card-border{background-color:var(--l-tabbar-card-border-color);height:1px;position:absolute;bottom:0;left:0;right:0}", m = class extends e {
|
package/lib/table/index.d.ts
CHANGED
|
@@ -4,8 +4,7 @@ type ChangeFixedParams = {
|
|
|
4
4
|
fixedColumn?: boolean;
|
|
5
5
|
fixedHead?: boolean;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
static baseName: string;
|
|
7
|
+
type TableState = {
|
|
9
8
|
/** 斑马纹 */
|
|
10
9
|
stripe: boolean;
|
|
11
10
|
/** 是否显示四周边框 */
|
|
@@ -18,6 +17,10 @@ export default class Table extends BaseComponent {
|
|
|
18
17
|
maxHeight?: number | string;
|
|
19
18
|
/** 表格布局 */
|
|
20
19
|
tableLayout?: "auto" | "fixed";
|
|
20
|
+
};
|
|
21
|
+
export default class Table extends BaseComponent<TableState> {
|
|
22
|
+
static baseName: string;
|
|
23
|
+
constructor();
|
|
21
24
|
columns?: Column[];
|
|
22
25
|
data?: any[];
|
|
23
26
|
sortInfo?: SortOption;
|
|
@@ -28,7 +31,8 @@ export default class Table extends BaseComponent {
|
|
|
28
31
|
setData(data: any[], sortInfo?: SortOption): void;
|
|
29
32
|
changeFixed(params?: ChangeFixedParams): void;
|
|
30
33
|
static get observedAttributes(): string[];
|
|
31
|
-
|
|
34
|
+
protected attributeChanged(name: string, _oldValue: string, newValue: string): void;
|
|
35
|
+
protected updateDOM(changedProps: Set<string>): void;
|
|
32
36
|
render(): HTMLElement;
|
|
33
37
|
rerender(partial: "head" | "body" | "all"): void;
|
|
34
38
|
private _changeCssVar;
|
package/lib/table/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../table-
|
|
1
|
+
import { t as e } from "../table-BQxMD2Ae.js";
|
|
2
2
|
export { e as default };
|