bj-web-components 0.2.8 → 0.2.9
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/dist/{BInputNumber-CCOxUWi5.mjs → BInputNumber-C9Rk9YRG.mjs} +67 -67
- package/dist/{BInputNumber-DCMCtHTu.js → BInputNumber-CVx-lMcq.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/web.js +1 -1
- package/dist/web.mjs +1 -1
- package/package.json +1 -1
|
@@ -175,36 +175,36 @@ function qe({
|
|
|
175
175
|
open: U,
|
|
176
176
|
onDropdownVisibleChange: J
|
|
177
177
|
}) {
|
|
178
|
-
const q = (v == null ? void 0 : v.namePlaceholder) ?? "请填写产品名称", V = (v == null ? void 0 : v.uploadLocal) ?? "本地上传", tt = (v == null ? void 0 : v.associateImage) ?? "关联图片", Z = O(null), X = O(null), _ = O(null), k = O(null), [I, E] = G([]), [z, j] = G(!1), [C,
|
|
178
|
+
const q = (v == null ? void 0 : v.namePlaceholder) ?? "请填写产品名称", V = (v == null ? void 0 : v.uploadLocal) ?? "本地上传", tt = (v == null ? void 0 : v.associateImage) ?? "关联图片", Z = O(null), X = O(null), _ = O(null), k = O(null), [I, E] = G([]), [z, j] = G(!1), [C, b] = G(!1), [x, D] = G(!1), F = Array.isArray(H) && H.length > 0, $ = U !== void 0 ? U : F && C, it = F ? e ? H.filter(
|
|
179
179
|
(c) => S ? S(c, e) : ge(c, e)
|
|
180
180
|
) : H : [];
|
|
181
181
|
ct(() => {
|
|
182
182
|
if (!z) return;
|
|
183
|
-
function c(
|
|
184
|
-
X.current && !X.current.contains(
|
|
183
|
+
function c(m) {
|
|
184
|
+
X.current && !X.current.contains(m.target) && j(!1);
|
|
185
185
|
}
|
|
186
186
|
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
187
187
|
}, [z]), ct(() => {
|
|
188
188
|
if (!$) return;
|
|
189
|
-
function c(
|
|
189
|
+
function c(m) {
|
|
190
190
|
var a, y;
|
|
191
|
-
const M =
|
|
192
|
-
(a = _.current) != null && a.contains(M) || (y = k.current) != null && y.contains(M) || (
|
|
191
|
+
const M = m.target;
|
|
192
|
+
(a = _.current) != null && a.contains(M) || (y = k.current) != null && y.contains(M) || (b(!1), J == null || J(!1));
|
|
193
193
|
}
|
|
194
194
|
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
195
195
|
}, [$, J]);
|
|
196
196
|
const R = K ?? I;
|
|
197
197
|
async function rt(c) {
|
|
198
198
|
var M;
|
|
199
|
-
const
|
|
200
|
-
if (
|
|
199
|
+
const m = (M = c.target.files) == null ? void 0 : M[0];
|
|
200
|
+
if (m) {
|
|
201
201
|
c.target.value = "", j(!1), D(!0);
|
|
202
202
|
try {
|
|
203
203
|
if (u) {
|
|
204
|
-
const a = await u(
|
|
204
|
+
const a = await u(m);
|
|
205
205
|
a && K === void 0 && E((y) => [...y, a]);
|
|
206
206
|
} else {
|
|
207
|
-
const a = URL.createObjectURL(
|
|
207
|
+
const a = URL.createObjectURL(m);
|
|
208
208
|
E((y) => [...y, a]);
|
|
209
209
|
}
|
|
210
210
|
} finally {
|
|
@@ -242,7 +242,7 @@ function qe({
|
|
|
242
242
|
i == null || i(c.target.value), P == null || P(c.target.value);
|
|
243
243
|
},
|
|
244
244
|
onFocus: () => {
|
|
245
|
-
F && U === void 0 && (
|
|
245
|
+
F && U === void 0 && (b(!0), J == null || J(!0));
|
|
246
246
|
},
|
|
247
247
|
placeholder: q,
|
|
248
248
|
...T
|
|
@@ -252,7 +252,7 @@ function qe({
|
|
|
252
252
|
不再用 portal + position:fixed + getBoundingClientRect 定位:iOS 软键盘弹出时
|
|
253
253
|
fixed 与 getBoundingClientRect 的视口基准不一致,会导致下拉框位置偏移。 */
|
|
254
254
|
/* @__PURE__ */ t("div", { className: "sku-input-card__dropdown", ref: _, children: /* @__PURE__ */ t("div", { className: "sku-input-card__dropdown-list", children: it.map((c) => {
|
|
255
|
-
const
|
|
255
|
+
const m = typeof c.label == "string" ? c.label : c.value;
|
|
256
256
|
return /* @__PURE__ */ t(
|
|
257
257
|
"div",
|
|
258
258
|
{
|
|
@@ -262,9 +262,9 @@ function qe({
|
|
|
262
262
|
c.value === e && "sku-input-card__dropdown-item--selected"
|
|
263
263
|
].filter(Boolean).join(" "),
|
|
264
264
|
onMouseDown: (M) => {
|
|
265
|
-
M.preventDefault(), !c.disabled && (i == null || i(c.value), Q == null || Q(c.value, c),
|
|
265
|
+
M.preventDefault(), !c.disabled && (i == null || i(c.value), Q == null || Q(c.value, c), b(!1), J == null || J(!1));
|
|
266
266
|
},
|
|
267
|
-
children: /* @__PURE__ */ t(fe, { text:
|
|
267
|
+
children: /* @__PURE__ */ t(fe, { text: m, keyword: e })
|
|
268
268
|
},
|
|
269
269
|
c.value
|
|
270
270
|
);
|
|
@@ -400,8 +400,8 @@ const Fe = Mt(
|
|
|
400
400
|
style: Z
|
|
401
401
|
}, X) {
|
|
402
402
|
q == null || q.zh, q == null || q.en;
|
|
403
|
-
function _(
|
|
404
|
-
let D = (parseFloat(o) || 0) +
|
|
403
|
+
function _(b) {
|
|
404
|
+
let D = (parseFloat(o) || 0) + b;
|
|
405
405
|
P !== void 0 && (D = Math.max(P, D)), U !== void 0 && (D = Math.min(U, D)), r == null || r(String(D));
|
|
406
406
|
}
|
|
407
407
|
const k = e === "textarea" && !!u, I = k || i === "bilingual" || H || S, E = A ? `${o.length}/${A}` : `${o.length}`, z = w && !!K && o.length > 0, j = [
|
|
@@ -429,7 +429,7 @@ const Fe = Mt(
|
|
|
429
429
|
id: V,
|
|
430
430
|
className: C,
|
|
431
431
|
value: o,
|
|
432
|
-
onChange: (
|
|
432
|
+
onChange: (b) => r == null ? void 0 : r(b.target.value),
|
|
433
433
|
onBlur: Q,
|
|
434
434
|
placeholder: f,
|
|
435
435
|
maxLength: A,
|
|
@@ -443,7 +443,7 @@ const Fe = Mt(
|
|
|
443
443
|
id: V,
|
|
444
444
|
className: C,
|
|
445
445
|
value: o,
|
|
446
|
-
onChange: (
|
|
446
|
+
onChange: (b) => r == null ? void 0 : r(b.target.value),
|
|
447
447
|
onBlur: Q,
|
|
448
448
|
placeholder: f,
|
|
449
449
|
disabled: v,
|
|
@@ -456,7 +456,7 @@ const Fe = Mt(
|
|
|
456
456
|
{
|
|
457
457
|
type: "button",
|
|
458
458
|
className: "bu-input__stepper-btn bu-input__stepper-btn--up",
|
|
459
|
-
onMouseDown: (
|
|
459
|
+
onMouseDown: (b) => b.preventDefault(),
|
|
460
460
|
onClick: () => _(J),
|
|
461
461
|
disabled: v || U !== void 0 && parseFloat(o || "0") >= U,
|
|
462
462
|
tabIndex: -1,
|
|
@@ -468,7 +468,7 @@ const Fe = Mt(
|
|
|
468
468
|
{
|
|
469
469
|
type: "button",
|
|
470
470
|
className: "bu-input__stepper-btn bu-input__stepper-btn--down",
|
|
471
|
-
onMouseDown: (
|
|
471
|
+
onMouseDown: (b) => b.preventDefault(),
|
|
472
472
|
onClick: () => _(-J),
|
|
473
473
|
disabled: v || P !== void 0 && parseFloat(o || "0") <= P,
|
|
474
474
|
tabIndex: -1,
|
|
@@ -483,7 +483,7 @@ const Fe = Mt(
|
|
|
483
483
|
id: V,
|
|
484
484
|
className: C,
|
|
485
485
|
value: o,
|
|
486
|
-
onChange: (
|
|
486
|
+
onChange: (b) => r == null ? void 0 : r(b.target.value),
|
|
487
487
|
onBlur: Q,
|
|
488
488
|
placeholder: f,
|
|
489
489
|
maxLength: A,
|
|
@@ -678,7 +678,7 @@ function Xe({
|
|
|
678
678
|
style: K,
|
|
679
679
|
getPopupContainer: v
|
|
680
680
|
}) {
|
|
681
|
-
const T = (u == null ? void 0 : u.searchPlaceholder) ?? "搜索", Y = (u == null ? void 0 : u.sortDefault) ?? "默认顺序", W = (u == null ? void 0 : u.sortAsc) ?? "名称A-Z", H = (u == null ? void 0 : u.sortDesc) ?? "名称Z-A", S = (u == null ? void 0 : u.noMatchText) ?? "暂无选项", Q = (u == null ? void 0 : u.manageFieldPre) ?? "请前往", P = (u == null ? void 0 : u.manageFieldLink) ?? "管理字段", U = (u == null ? void 0 : u.manageFieldPost) ?? "添加", [J, q] = G(!1), [V, tt] = G(""), [Z, X] = G("none"), [_, k] = G(!1), I = O(null), E = O(null), z = O(null), [j, C] = G({ top: 0, left: 0, width: 0 }),
|
|
681
|
+
const T = (u == null ? void 0 : u.searchPlaceholder) ?? "搜索", Y = (u == null ? void 0 : u.sortDefault) ?? "默认顺序", W = (u == null ? void 0 : u.sortAsc) ?? "名称A-Z", H = (u == null ? void 0 : u.sortDesc) ?? "名称Z-A", S = (u == null ? void 0 : u.noMatchText) ?? "暂无选项", Q = (u == null ? void 0 : u.manageFieldPre) ?? "请前往", P = (u == null ? void 0 : u.manageFieldLink) ?? "管理字段", U = (u == null ? void 0 : u.manageFieldPost) ?? "添加", [J, q] = G(!1), [V, tt] = G(""), [Z, X] = G("none"), [_, k] = G(!1), I = O(null), E = O(null), z = O(null), [j, C] = G({ top: 0, left: 0, width: 0 }), b = at(() => {
|
|
682
682
|
if (!I.current) return;
|
|
683
683
|
const c = I.current.getBoundingClientRect();
|
|
684
684
|
C({
|
|
@@ -688,32 +688,32 @@ function Xe({
|
|
|
688
688
|
});
|
|
689
689
|
}, []);
|
|
690
690
|
Et(() => {
|
|
691
|
-
J &&
|
|
692
|
-
}, [J,
|
|
691
|
+
J && b();
|
|
692
|
+
}, [J, b]), ct(() => {
|
|
693
693
|
if (!J) return;
|
|
694
|
-
const c = (
|
|
694
|
+
const c = (m) => {
|
|
695
695
|
var a, y;
|
|
696
|
-
const M =
|
|
696
|
+
const M = m.target;
|
|
697
697
|
(a = z.current) != null && a.contains(M) || (y = I.current) != null && y.contains(M) || rt();
|
|
698
698
|
};
|
|
699
|
-
return document.addEventListener("mousedown", c), window.addEventListener("scroll",
|
|
700
|
-
document.removeEventListener("mousedown", c), window.removeEventListener("scroll",
|
|
699
|
+
return document.addEventListener("mousedown", c), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
|
|
700
|
+
document.removeEventListener("mousedown", c), window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
|
|
701
701
|
};
|
|
702
|
-
}, [J,
|
|
702
|
+
}, [J, b]), ct(() => {
|
|
703
703
|
if (!_) return;
|
|
704
|
-
const c = (
|
|
705
|
-
E.current && !E.current.contains(
|
|
704
|
+
const c = (m) => {
|
|
705
|
+
E.current && !E.current.contains(m.target) && k(!1);
|
|
706
706
|
};
|
|
707
707
|
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
708
708
|
}, [_]);
|
|
709
709
|
const x = O(null), D = O(null), F = O({ dragging: !1, startX: 0, scrollLeft: 0, target: null }), $ = at((c) => ({
|
|
710
|
-
onMouseDown: (
|
|
710
|
+
onMouseDown: (m) => {
|
|
711
711
|
const M = c.current;
|
|
712
|
-
M && (F.current = { dragging: !0, startX:
|
|
712
|
+
M && (F.current = { dragging: !0, startX: m.clientX, scrollLeft: M.scrollLeft, target: M });
|
|
713
713
|
},
|
|
714
|
-
onMouseMove: (
|
|
714
|
+
onMouseMove: (m) => {
|
|
715
715
|
const { dragging: M, startX: a, scrollLeft: y, target: L } = F.current;
|
|
716
|
-
!M || !L || (
|
|
716
|
+
!M || !L || (m.preventDefault(), L.scrollLeft = y - (m.clientX - a));
|
|
717
717
|
},
|
|
718
718
|
onMouseUp: () => {
|
|
719
719
|
F.current.dragging = !1;
|
|
@@ -727,11 +727,11 @@ function Xe({
|
|
|
727
727
|
i == null || i(e.includes(c) ? [] : [c]), e.includes(c) || rt();
|
|
728
728
|
return;
|
|
729
729
|
}
|
|
730
|
-
const
|
|
731
|
-
i == null || i(
|
|
730
|
+
const m = e.includes(c) ? e.filter((M) => M !== c) : [...e, c];
|
|
731
|
+
i == null || i(m);
|
|
732
732
|
}
|
|
733
733
|
function R(c) {
|
|
734
|
-
i == null || i(e.filter((
|
|
734
|
+
i == null || i(e.filter((m) => m !== c));
|
|
735
735
|
}
|
|
736
736
|
function rt() {
|
|
737
737
|
q(!1), tt(""), X("none");
|
|
@@ -741,8 +741,8 @@ function Xe({
|
|
|
741
741
|
}
|
|
742
742
|
const ot = gt(() => {
|
|
743
743
|
let c = n.filter((M) => (M.searchText ?? (typeof M.label == "string" ? M.label : "")).toLowerCase().includes(V.toLowerCase()));
|
|
744
|
-
const
|
|
745
|
-
return Z === "asc" && (c = [...c].sort((M, a) =>
|
|
744
|
+
const m = (M) => M.searchText ?? (typeof M.label == "string" ? M.label : "");
|
|
745
|
+
return Z === "asc" && (c = [...c].sort((M, a) => m(M).localeCompare(m(a)))), Z === "desc" && (c = [...c].sort((M, a) => m(a).localeCompare(m(M)))), c;
|
|
746
746
|
}, [n, V, Z]), et = n.filter((c) => e.includes(c.value)), st = n.length > 0;
|
|
747
747
|
return /* @__PURE__ */ l("div", { ref: I, className: ["bu-pf", w].filter(Boolean).join(" "), style: K, children: [
|
|
748
748
|
!J && /* @__PURE__ */ l("div", { className: `bu-pf__trigger${et.length > 0 ? " bu-pf__trigger--selected" : ""}`, onClick: () => q(!0), children: [
|
|
@@ -759,8 +759,8 @@ function Xe({
|
|
|
759
759
|
{
|
|
760
760
|
type: "button",
|
|
761
761
|
className: "bu-pf__tag-close",
|
|
762
|
-
onClick: (
|
|
763
|
-
|
|
762
|
+
onClick: (m) => {
|
|
763
|
+
m.stopPropagation(), R(c.value);
|
|
764
764
|
},
|
|
765
765
|
children: /* @__PURE__ */ t(St, { size: 12 })
|
|
766
766
|
}
|
|
@@ -823,30 +823,30 @@ function Xe({
|
|
|
823
823
|
{ key: "none", label: Y },
|
|
824
824
|
{ key: "asc", label: W },
|
|
825
825
|
{ key: "desc", label: H }
|
|
826
|
-
].map(({ key: c, label:
|
|
826
|
+
].map(({ key: c, label: m }) => /* @__PURE__ */ t(
|
|
827
827
|
"div",
|
|
828
828
|
{
|
|
829
829
|
className: `bu-pf__sort-option${Z === c ? " bu-pf__sort-option--active" : ""}`,
|
|
830
830
|
onClick: () => ut(c),
|
|
831
|
-
children:
|
|
831
|
+
children: m
|
|
832
832
|
},
|
|
833
833
|
c
|
|
834
834
|
)) })
|
|
835
835
|
] })
|
|
836
836
|
] }),
|
|
837
837
|
/* @__PURE__ */ t("div", { className: "bu-pf__list", children: st && ot.length > 0 ? ot.map((c) => {
|
|
838
|
-
const
|
|
838
|
+
const m = e.includes(c.value);
|
|
839
839
|
return /* @__PURE__ */ l(
|
|
840
840
|
"div",
|
|
841
841
|
{
|
|
842
|
-
className: `bu-pf__option${r ? " bu-pf__option--multiple" : ""}${
|
|
842
|
+
className: `bu-pf__option${r ? " bu-pf__option--multiple" : ""}${m && !r ? " bu-pf__option--selected" : ""}`,
|
|
843
843
|
onClick: () => it(c.value),
|
|
844
844
|
children: [
|
|
845
845
|
r && /* @__PURE__ */ t(
|
|
846
846
|
"img",
|
|
847
847
|
{
|
|
848
848
|
className: "bu-pf__checkbox-img",
|
|
849
|
-
src:
|
|
849
|
+
src: m ? Me : Ee,
|
|
850
850
|
alt: ""
|
|
851
851
|
}
|
|
852
852
|
),
|
|
@@ -979,10 +979,10 @@ function Ve({
|
|
|
979
979
|
}
|
|
980
980
|
E = E.parentElement;
|
|
981
981
|
}
|
|
982
|
-
const z = ((x = Y.current) == null ? void 0 : x.offsetHeight) ?? 0, j = window.innerHeight - k.bottom, C = k.top,
|
|
982
|
+
const z = ((x = Y.current) == null ? void 0 : x.offsetHeight) ?? 0, j = window.innerHeight - k.bottom, C = k.top, b = z > 0 && j < z + 4 && C > j;
|
|
983
983
|
S({
|
|
984
984
|
position: "fixed",
|
|
985
|
-
top:
|
|
985
|
+
top: b ? k.top - z - 4 : k.bottom + 4,
|
|
986
986
|
left: k.left,
|
|
987
987
|
zIndex: I > 0 ? I + 10 : 1100,
|
|
988
988
|
...f
|
|
@@ -1082,10 +1082,10 @@ function Ve({
|
|
|
1082
1082
|
onMouseLeave: E ? (C) => C.currentTarget.classList.remove("bu-category-dropdown__col--scrollbar-visible") : void 0,
|
|
1083
1083
|
children: k.map((C) => {
|
|
1084
1084
|
var F;
|
|
1085
|
-
const
|
|
1085
|
+
const b = w[I] === C.value, x = !!((F = C.children) != null && F.length), D = [
|
|
1086
1086
|
"bu-category-dropdown__item",
|
|
1087
|
-
|
|
1088
|
-
|
|
1087
|
+
b && x ? "bu-category-dropdown__item--selected-branch" : "",
|
|
1088
|
+
b && !x ? "bu-category-dropdown__item--selected-leaf" : "",
|
|
1089
1089
|
C.disabled ? "bu-category-dropdown__item--disabled" : ""
|
|
1090
1090
|
].filter(Boolean).join(" ");
|
|
1091
1091
|
return /* @__PURE__ */ l(
|
|
@@ -1105,7 +1105,7 @@ function Ve({
|
|
|
1105
1105
|
getPopupContainer: g
|
|
1106
1106
|
}
|
|
1107
1107
|
),
|
|
1108
|
-
|
|
1108
|
+
x && /* @__PURE__ */ t("span", { className: "bu-category-dropdown__item-arrow", children: /* @__PURE__ */ t(ze, {}) })
|
|
1109
1109
|
]
|
|
1110
1110
|
},
|
|
1111
1111
|
C.value
|
|
@@ -1153,11 +1153,11 @@ const _e = (n) => {
|
|
|
1153
1153
|
t: Q = (a) => a,
|
|
1154
1154
|
className: P,
|
|
1155
1155
|
style: U
|
|
1156
|
-
} = n, [J, q] = G(i), [V, tt] = G(d), [Z, X] = G(!1), [_, k] = G("bottom"), [I, E] = G(null), z = O(null), j = O(null), C = e ?? J,
|
|
1156
|
+
} = n, [J, q] = G(i), [V, tt] = G(d), [Z, X] = G(!1), [_, k] = G("bottom"), [I, E] = G(null), z = O(null), j = O(null), C = e ?? J, b = s ?? V, x = Math.ceil(o / b);
|
|
1157
1157
|
if (w && x <= 1)
|
|
1158
1158
|
return null;
|
|
1159
1159
|
const D = (a) => {
|
|
1160
|
-
u || a < 1 || a > x || a === C || (e === void 0 && q(a), r == null || r(a,
|
|
1160
|
+
u || a < 1 || a > x || a === C || (e === void 0 && q(a), r == null || r(a, b));
|
|
1161
1161
|
}, F = (a) => {
|
|
1162
1162
|
const y = Math.ceil(o / a), L = Math.min(C, y) || 1;
|
|
1163
1163
|
s === void 0 && (tt(a), e === void 0 && q(L)), p == null || p(L, a), r == null || r(L, a);
|
|
@@ -1217,7 +1217,7 @@ const _e = (n) => {
|
|
|
1217
1217
|
a.push("..."), a.push(x);
|
|
1218
1218
|
}
|
|
1219
1219
|
return a;
|
|
1220
|
-
}, [C, x]), ot = (C - 1) *
|
|
1220
|
+
}, [C, x]), ot = (C - 1) * b + 1, et = Math.min(C * b, o), st = `pagination-${v}`, c = `pagination-${T}`, m = u ? "pagination-disabled" : "", M = (a, y) => a === "..." ? /* @__PURE__ */ t("span", { className: "pagination-item pagination-ellipsis", children: "..." }, `ellipsis-${y}`) : /* @__PURE__ */ t(
|
|
1221
1221
|
"button",
|
|
1222
1222
|
{
|
|
1223
1223
|
type: "button",
|
|
@@ -1231,7 +1231,7 @@ const _e = (n) => {
|
|
|
1231
1231
|
return Y ? /* @__PURE__ */ t(
|
|
1232
1232
|
"div",
|
|
1233
1233
|
{
|
|
1234
|
-
className: `pagination pagination-simple ${
|
|
1234
|
+
className: `pagination pagination-simple ${m} ${P || ""}`,
|
|
1235
1235
|
style: U,
|
|
1236
1236
|
children: /* @__PURE__ */ l("div", { className: "pagination-simple-list", children: [
|
|
1237
1237
|
/* @__PURE__ */ t(
|
|
@@ -1264,7 +1264,7 @@ const _e = (n) => {
|
|
|
1264
1264
|
) : /* @__PURE__ */ l(
|
|
1265
1265
|
"div",
|
|
1266
1266
|
{
|
|
1267
|
-
className: `pagination ${st} ${c} ${
|
|
1267
|
+
className: `pagination ${st} ${c} ${m} ${P || ""}`,
|
|
1268
1268
|
style: U,
|
|
1269
1269
|
children: [
|
|
1270
1270
|
K && /* @__PURE__ */ t("div", { className: "pagination-total", children: K(o, [ot, et]) }),
|
|
@@ -1306,7 +1306,7 @@ const _e = (n) => {
|
|
|
1306
1306
|
onClick: it,
|
|
1307
1307
|
disabled: u,
|
|
1308
1308
|
children: [
|
|
1309
|
-
|
|
1309
|
+
b,
|
|
1310
1310
|
Q("条每页"),
|
|
1311
1311
|
/* @__PURE__ */ l("svg", { className: `pagination-sizer-icon${Z ? " pagination-sizer-icon-open" : ""}`, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1312
1312
|
/* @__PURE__ */ t("path", { d: "M5.57321 8.828C5.41049 8.66528 5.41049 8.40152 5.57321 8.2388C5.73593 8.07608 5.99969 8.07608 6.1624 8.2388L10.032 12.1084L13.8347 8.24124C13.996 8.0772 14.2598 8.07503 14.4239 8.23636C14.5879 8.39771 14.5901 8.66149 14.4287 8.82555L10.5279 12.7924C10.2574 13.0675 9.81452 13.0694 9.54172 12.7966L5.57321 8.828Z", fill: "#333333" }),
|
|
@@ -1334,7 +1334,7 @@ const _e = (n) => {
|
|
|
1334
1334
|
type: "button",
|
|
1335
1335
|
className: "pagination-sizer-option",
|
|
1336
1336
|
onClick: () => R(a),
|
|
1337
|
-
"data-selected": a ===
|
|
1337
|
+
"data-selected": a === b,
|
|
1338
1338
|
children: [
|
|
1339
1339
|
a,
|
|
1340
1340
|
Q("条/页")
|
|
@@ -1791,7 +1791,7 @@ const tn = Mt(function({
|
|
|
1791
1791
|
className: E,
|
|
1792
1792
|
style: z
|
|
1793
1793
|
}, j) {
|
|
1794
|
-
const C = O(null), [
|
|
1794
|
+
const C = O(null), [b, x] = G(!1), D = O(!1), F = O(!1), $ = O(!1), it = O(""), [R, rt] = G(() => nt(e ?? i)), ut = (h) => {
|
|
1795
1795
|
e === void 0 && rt(h);
|
|
1796
1796
|
}, ot = at(
|
|
1797
1797
|
(h, B) => {
|
|
@@ -1817,16 +1817,16 @@ const tn = Mt(function({
|
|
|
1817
1817
|
return N;
|
|
1818
1818
|
},
|
|
1819
1819
|
[J, ot, V]
|
|
1820
|
-
), [c,
|
|
1820
|
+
), [c, m] = G(() => {
|
|
1821
1821
|
const h = i ?? e;
|
|
1822
1822
|
return R.isInvalidate() && ["string", "number"].includes(typeof h) ? h == null || Number.isNaN(h) ? "" : String(h) : st(R.toString(), !1);
|
|
1823
1823
|
});
|
|
1824
1824
|
it.current = c;
|
|
1825
1825
|
const M = (h, B) => {
|
|
1826
|
-
|
|
1826
|
+
m(
|
|
1827
1827
|
st(h.isInvalidate() ? h.toString(!1) : h.toString(!B), B)
|
|
1828
1828
|
);
|
|
1829
|
-
}, a = gt(() => Ht(o), [o]), y = gt(() => Ht(d), [d]), L = gt(() => !a || R.isInvalidate() ? !1 : a.lessEquals(R), [a, R]), lt = gt(() => !y || R.isInvalidate() ? !1 : R.lessEquals(y), [y, R]), [vt] = Se(C.current,
|
|
1829
|
+
}, a = gt(() => Ht(o), [o]), y = gt(() => Ht(d), [d]), L = gt(() => !a || R.isInvalidate() ? !1 : a.lessEquals(R), [a, R]), lt = gt(() => !y || R.isInvalidate() ? !1 : R.lessEquals(y), [y, R]), [vt] = Se(C.current, b), Ct = (h) => a && !h.lessEquals(a) ? a : y && !y.lessEquals(h) ? y : null, ht = (h) => !Ct(h), It = (h, B) => {
|
|
1830
1830
|
let N = h, dt = ht(N) || N.isEmpty();
|
|
1831
1831
|
if (!N.isEmpty() && !B && (N = Ct(N) || N, dt = !0), !f && !g && dt) {
|
|
1832
1832
|
const At = N.toString(), mt = ot(At, B);
|
|
@@ -1834,7 +1834,7 @@ const tn = Mt(function({
|
|
|
1834
1834
|
}
|
|
1835
1835
|
return R;
|
|
1836
1836
|
}, Wt = xe(), zt = (h) => {
|
|
1837
|
-
if (vt(), it.current = h,
|
|
1837
|
+
if (vt(), it.current = h, m(h), !F.current) {
|
|
1838
1838
|
const B = et(h), N = nt(B);
|
|
1839
1839
|
N.isNaN() || It(N, !0);
|
|
1840
1840
|
}
|
|
@@ -1882,7 +1882,7 @@ const tn = Mt(function({
|
|
|
1882
1882
|
}, kt = !!T, ie = typeof T == "object" ? T.icon : void 0, re = !R.isInvalidate() && !ht(R), oe = [
|
|
1883
1883
|
"bj-input-number",
|
|
1884
1884
|
`bj-input-number--${w}`,
|
|
1885
|
-
|
|
1885
|
+
b && "bj-input-number--focused",
|
|
1886
1886
|
g && "bj-input-number--disabled",
|
|
1887
1887
|
f && "bj-input-number--readonly",
|
|
1888
1888
|
!v && "bj-input-number--borderless",
|
|
@@ -1923,7 +1923,7 @@ const tn = Mt(function({
|
|
|
1923
1923
|
onCompositionStart: Zt,
|
|
1924
1924
|
onCompositionEnd: Xt,
|
|
1925
1925
|
onWheel: W ? (h) => {
|
|
1926
|
-
|
|
1926
|
+
b && jt(h.deltaY < 0);
|
|
1927
1927
|
} : void 0
|
|
1928
1928
|
}
|
|
1929
1929
|
) }),
|