st-comp 0.0.75 → 0.0.76
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/components.d.ts +3 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +25 -223
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +15 -13
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +105 -102
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +45 -42
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +1 -1
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +121 -117
- package/es/Table.cjs +3 -3
- package/es/Table.js +275 -271
- package/es/VarietySearch.cjs +2 -2
- package/es/VarietySearch.js +476 -477
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +2724 -1
- package/es/{base-dbd10dcf.cjs → base-4865d432.cjs} +3 -3
- package/es/{base-00f6b0ab.js → base-6faccb01.js} +66 -65
- package/es/castArray-3341cbb4.cjs +1 -0
- package/es/castArray-bdee0d50.js +10 -0
- package/es/config-provider-465c8253.cjs +1 -0
- package/es/config-provider-be0e9c36.js +46 -0
- package/es/{el-button-12e38f0b.js → el-button-1b9c4fd6.js} +31 -31
- package/es/el-button-aad5268b.cjs +1 -0
- package/es/el-empty-348c46f7.js +204 -0
- package/es/el-empty-608948d9.cjs +1 -0
- package/es/el-icon-158ddc19.cjs +1 -0
- package/es/{el-icon-bacbcecf.js → el-icon-d385d377.js} +58 -57
- package/es/{el-overlay-ea0f5492.js → el-overlay-400ac6ce.js} +58 -57
- package/es/el-overlay-4713107e.cjs +5 -0
- package/es/el-scrollbar-83abe3de.js +248 -0
- package/es/el-scrollbar-bc381e35.cjs +1 -0
- package/es/el-select-7116533b.cjs +9 -0
- package/es/{el-select-f84b87d9.js → el-select-895360ba.js} +282 -280
- package/es/el-tag-2c7e5d4a.cjs +1 -0
- package/es/el-tag-30cecca3.js +2417 -0
- package/es/focus-trap-5ac78614.js +259 -0
- package/es/focus-trap-a169f160.cjs +1 -0
- package/es/{index-2cc1c02e.cjs → index-a091492d.cjs} +1 -1
- package/es/{index-16dfa199.js → index-caa490bf.js} +17 -14
- package/es/{python-336a8c96.js → python-0b8dfd75.js} +1 -1
- package/es/{python-044eec0c.cjs → python-bd86111b.cjs} +1 -1
- package/es/raf-5e5c53db.cjs +1 -0
- package/es/raf-92c5ed6d.js +6 -0
- package/es/{scroll-c6489061.js → scroll-264c50f3.js} +5 -5
- package/es/{scroll-891e3e9f.cjs → scroll-bb8039ba.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/typescript-7ae59c4c.js +4 -0
- package/es/typescript-b63f8e83.cjs +1 -0
- package/es/use-form-item-0e9cae13.js +668 -0
- package/es/use-form-item-6cef6b15.cjs +3 -0
- package/es/use-global-config-17f3d7c7.cjs +1 -0
- package/es/use-global-config-8c9c775f.js +110 -0
- package/es/{vnode-b44a499a.cjs → vnode-abafec9e.cjs} +1 -1
- package/es/{vnode-229e6729.js → vnode-b78096e3.js} +4 -4
- package/es/{zh-cn-e0c3b8df.js → zh-cn-8aaa7dd2.js} +2 -2
- package/es/{zh-cn-5c01bb26.cjs → zh-cn-e4d38144.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-d7f5d65b.js → index-bdeb684f.js} +17 -14
- package/lib/{python-31d7356c.js → python-c9833067.js} +1 -1
- package/package.json +1 -1
- package/packages/MonacoEditor/index.vue +5 -0
- package/src/pages/MonacoEditor/index.vue +5 -0
- package/es/config-provider-33068fb6.cjs +0 -1
- package/es/config-provider-c98bd563.js +0 -148
- package/es/el-button-fc645d0f.cjs +0 -1
- package/es/el-icon-99876220.cjs +0 -1
- package/es/el-overlay-dcbc4437.cjs +0 -5
- package/es/el-scrollbar-6800cb98.js +0 -2653
- package/es/el-scrollbar-9da140ab.cjs +0 -1
- package/es/el-select-d22b5aa3.cjs +0 -9
- package/es/focus-trap-9f4b1039.js +0 -880
- package/es/focus-trap-fae33d9d.cjs +0 -3
package/es/Pagination.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z as ge, E as pe } from "./zh-cn-
|
|
3
|
-
import {
|
|
4
|
-
import { i as me } from "./el-
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { b as j, g as A, _ as K, d as ee, u as U, j as se, k as D, w as ue } from "./base-6faccb01.js";
|
|
2
|
+
import { z as ge, E as pe } from "./zh-cn-8aaa7dd2.js";
|
|
3
|
+
import { a as ce, E as de, b as fe } from "./el-select-895360ba.js";
|
|
4
|
+
import { i as me } from "./el-tag-30cecca3.js";
|
|
5
|
+
import "./el-scrollbar-83abe3de.js";
|
|
6
|
+
import { defineComponent as _, computed as y, openBlock as d, createElementBlock as h, unref as a, toDisplayString as q, createBlock as $, withCtx as H, resolveDynamicComponent as ae, inject as be, ref as E, watch as R, normalizeClass as S, createVNode as G, Fragment as te, renderList as ne, createElementVNode as X, watchEffect as ve, withKeys as Pe, createCommentVNode as V, getCurrentInstance as Ce, provide as he, h as B, withDirectives as ye, mergeProps as ze, vShow as _e } from "vue";
|
|
7
|
+
import { i as J, E as ie, c as re, d as Se, e as Y, f as ke, g as Ne, b as xe } from "./use-form-item-0e9cae13.js";
|
|
8
|
+
import { m as le } from "./typescript-7ae59c4c.js";
|
|
7
9
|
import { _ as Ee } from "./_plugin-vue_export-helper-dad06003.js";
|
|
8
|
-
import "./config-provider-
|
|
9
|
-
import "./
|
|
10
|
-
|
|
10
|
+
import "./config-provider-be0e9c36.js";
|
|
11
|
+
import "./use-global-config-8c9c775f.js";
|
|
12
|
+
import "./focus-trap-5ac78614.js";
|
|
13
|
+
import "./scroll-264c50f3.js";
|
|
14
|
+
const oe = Symbol("elPaginationKey"), $e = j({
|
|
11
15
|
disabled: Boolean,
|
|
12
16
|
currentPage: {
|
|
13
17
|
type: Number,
|
|
@@ -28,25 +32,25 @@ const se = Symbol("elPaginationKey"), $e = j({
|
|
|
28
32
|
props: $e,
|
|
29
33
|
emits: we,
|
|
30
34
|
setup(e) {
|
|
31
|
-
const p = e, { t: n } = A(),
|
|
35
|
+
const p = e, { t: n } = A(), s = y(() => p.disabled || p.currentPage <= 1);
|
|
32
36
|
return (l, g) => (d(), h("button", {
|
|
33
37
|
type: "button",
|
|
34
38
|
class: "btn-prev",
|
|
35
|
-
disabled: a(
|
|
39
|
+
disabled: a(s),
|
|
36
40
|
"aria-label": l.prevText || a(n)("el.pagination.prev"),
|
|
37
|
-
"aria-disabled": a(
|
|
41
|
+
"aria-disabled": a(s),
|
|
38
42
|
onClick: g[0] || (g[0] = (f) => l.$emit("click", f))
|
|
39
43
|
}, [
|
|
40
|
-
l.prevText ? (d(), h("span", Be, q(l.prevText), 1)) : (d(), $(a(
|
|
44
|
+
l.prevText ? (d(), h("span", Be, q(l.prevText), 1)) : (d(), $(a(ie), { key: 1 }, {
|
|
41
45
|
default: H(() => [
|
|
42
|
-
(d(), $(
|
|
46
|
+
(d(), $(ae(l.prevIcon)))
|
|
43
47
|
]),
|
|
44
48
|
_: 1
|
|
45
49
|
}))
|
|
46
50
|
], 8, Te));
|
|
47
51
|
}
|
|
48
52
|
});
|
|
49
|
-
var De = /* @__PURE__ */
|
|
53
|
+
var De = /* @__PURE__ */ K(Ie, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/prev.vue"]]);
|
|
50
54
|
const qe = j({
|
|
51
55
|
disabled: Boolean,
|
|
52
56
|
currentPage: {
|
|
@@ -70,33 +74,33 @@ const qe = j({
|
|
|
70
74
|
props: qe,
|
|
71
75
|
emits: ["click"],
|
|
72
76
|
setup(e) {
|
|
73
|
-
const p = e, { t: n } = A(),
|
|
77
|
+
const p = e, { t: n } = A(), s = y(() => p.disabled || p.currentPage === p.pageCount || p.pageCount === 0);
|
|
74
78
|
return (l, g) => (d(), h("button", {
|
|
75
79
|
type: "button",
|
|
76
80
|
class: "btn-next",
|
|
77
|
-
disabled: a(
|
|
81
|
+
disabled: a(s),
|
|
78
82
|
"aria-label": l.nextText || a(n)("el.pagination.next"),
|
|
79
|
-
"aria-disabled": a(
|
|
83
|
+
"aria-disabled": a(s),
|
|
80
84
|
onClick: g[0] || (g[0] = (f) => l.$emit("click", f))
|
|
81
85
|
}, [
|
|
82
|
-
l.nextText ? (d(), h("span", Ae, q(l.nextText), 1)) : (d(), $(a(
|
|
86
|
+
l.nextText ? (d(), h("span", Ae, q(l.nextText), 1)) : (d(), $(a(ie), { key: 1 }, {
|
|
83
87
|
default: H(() => [
|
|
84
|
-
(d(), $(
|
|
88
|
+
(d(), $(ae(l.nextIcon)))
|
|
85
89
|
]),
|
|
86
90
|
_: 1
|
|
87
91
|
}))
|
|
88
92
|
], 8, je));
|
|
89
93
|
}
|
|
90
94
|
});
|
|
91
|
-
var
|
|
92
|
-
const Q = () =>
|
|
95
|
+
var Ke = /* @__PURE__ */ K(Ue, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/next.vue"]]);
|
|
96
|
+
const Q = () => be(oe, {}), Fe = j({
|
|
93
97
|
pageSize: {
|
|
94
98
|
type: Number,
|
|
95
99
|
required: !0
|
|
96
100
|
},
|
|
97
101
|
pageSizes: {
|
|
98
102
|
type: ee(Array),
|
|
99
|
-
default: () =>
|
|
103
|
+
default: () => le([10, 20, 30, 40, 50, 100])
|
|
100
104
|
},
|
|
101
105
|
popperClass: {
|
|
102
106
|
type: String
|
|
@@ -105,18 +109,18 @@ const Q = () => ve(se, {}), Ke = j({
|
|
|
105
109
|
teleported: Boolean,
|
|
106
110
|
size: {
|
|
107
111
|
type: String,
|
|
108
|
-
values:
|
|
112
|
+
values: re
|
|
109
113
|
}
|
|
110
114
|
}), Oe = _({
|
|
111
115
|
name: "ElPaginationSizes"
|
|
112
116
|
}), We = /* @__PURE__ */ _({
|
|
113
117
|
...Oe,
|
|
114
|
-
props:
|
|
118
|
+
props: Fe,
|
|
115
119
|
emits: ["page-size-change"],
|
|
116
120
|
setup(e, { emit: p }) {
|
|
117
|
-
const n = e, { t:
|
|
118
|
-
R(() => n.pageSizes, (c,
|
|
119
|
-
if (!me(c,
|
|
121
|
+
const n = e, { t: s } = A(), l = U("pagination"), g = Q(), f = E(n.pageSize);
|
|
122
|
+
R(() => n.pageSizes, (c, v) => {
|
|
123
|
+
if (!me(c, v) && Array.isArray(c)) {
|
|
120
124
|
const u = c.includes(n.pageSize) ? n.pageSize : n.pageSizes[0];
|
|
121
125
|
p("page-size-change", u);
|
|
122
126
|
}
|
|
@@ -125,10 +129,10 @@ const Q = () => ve(se, {}), Ke = j({
|
|
|
125
129
|
});
|
|
126
130
|
const m = y(() => n.pageSizes);
|
|
127
131
|
function z(c) {
|
|
128
|
-
var
|
|
129
|
-
c !== f.value && (f.value = c, (
|
|
132
|
+
var v;
|
|
133
|
+
c !== f.value && (f.value = c, (v = g.handleSizeChange) == null || v.call(g, Number(c)));
|
|
130
134
|
}
|
|
131
|
-
return (c,
|
|
135
|
+
return (c, v) => (d(), h("span", {
|
|
132
136
|
class: S(a(l).e("sizes"))
|
|
133
137
|
}, [
|
|
134
138
|
G(a(ce), {
|
|
@@ -141,10 +145,10 @@ const Q = () => ve(se, {}), Ke = j({
|
|
|
141
145
|
onChange: z
|
|
142
146
|
}, {
|
|
143
147
|
default: H(() => [
|
|
144
|
-
(d(!0), h(
|
|
148
|
+
(d(!0), h(te, null, ne(a(m), (u) => (d(), $(a(de), {
|
|
145
149
|
key: u,
|
|
146
150
|
value: u,
|
|
147
|
-
label: u + a(
|
|
151
|
+
label: u + a(s)("el.pagination.pagesize")
|
|
148
152
|
}, null, 8, ["value", "label"]))), 128))
|
|
149
153
|
]),
|
|
150
154
|
_: 1
|
|
@@ -152,11 +156,11 @@ const Q = () => ve(se, {}), Ke = j({
|
|
|
152
156
|
], 2));
|
|
153
157
|
}
|
|
154
158
|
});
|
|
155
|
-
var Ve = /* @__PURE__ */
|
|
159
|
+
var Ve = /* @__PURE__ */ K(We, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]);
|
|
156
160
|
const Je = j({
|
|
157
161
|
size: {
|
|
158
162
|
type: String,
|
|
159
|
-
values:
|
|
163
|
+
values: re
|
|
160
164
|
}
|
|
161
165
|
}), He = ["disabled"], Re = _({
|
|
162
166
|
name: "ElPaginationJumper"
|
|
@@ -164,14 +168,14 @@ const Je = j({
|
|
|
164
168
|
...Re,
|
|
165
169
|
props: Je,
|
|
166
170
|
setup(e) {
|
|
167
|
-
const { t: p } = A(), n = U("pagination"), { pageCount:
|
|
171
|
+
const { t: p } = A(), n = U("pagination"), { pageCount: s, disabled: l, currentPage: g, changeEvent: f } = Q(), m = E(), z = y(() => {
|
|
168
172
|
var u;
|
|
169
173
|
return (u = m.value) != null ? u : g == null ? void 0 : g.value;
|
|
170
174
|
});
|
|
171
175
|
function c(u) {
|
|
172
176
|
m.value = u ? +u : "";
|
|
173
177
|
}
|
|
174
|
-
function
|
|
178
|
+
function v(u) {
|
|
175
179
|
u = Math.trunc(+u), f == null || f(u), m.value = void 0;
|
|
176
180
|
}
|
|
177
181
|
return (u, k) => (d(), h("span", {
|
|
@@ -185,14 +189,14 @@ const Je = j({
|
|
|
185
189
|
size: u.size,
|
|
186
190
|
class: S([a(n).e("editor"), a(n).is("in-pagination")]),
|
|
187
191
|
min: 1,
|
|
188
|
-
max: a(
|
|
192
|
+
max: a(s),
|
|
189
193
|
disabled: a(l),
|
|
190
194
|
"model-value": a(z),
|
|
191
195
|
"validate-event": !1,
|
|
192
196
|
label: a(p)("el.pagination.page"),
|
|
193
197
|
type: "number",
|
|
194
198
|
"onUpdate:modelValue": c,
|
|
195
|
-
onChange:
|
|
199
|
+
onChange: v
|
|
196
200
|
}, null, 8, ["size", "class", "max", "disabled", "model-value", "label"]),
|
|
197
201
|
X("span", {
|
|
198
202
|
class: S([a(n).e("classifier")])
|
|
@@ -200,7 +204,7 @@ const Je = j({
|
|
|
200
204
|
], 10, He));
|
|
201
205
|
}
|
|
202
206
|
});
|
|
203
|
-
var Qe = /* @__PURE__ */
|
|
207
|
+
var Qe = /* @__PURE__ */ K(Ge, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/jumper.vue"]]);
|
|
204
208
|
const Xe = j({
|
|
205
209
|
total: {
|
|
206
210
|
type: Number,
|
|
@@ -212,16 +216,16 @@ const Xe = j({
|
|
|
212
216
|
...Ze,
|
|
213
217
|
props: Xe,
|
|
214
218
|
setup(e) {
|
|
215
|
-
const { t: p } = A(), n = U("pagination"), { disabled:
|
|
219
|
+
const { t: p } = A(), n = U("pagination"), { disabled: s } = Q();
|
|
216
220
|
return (l, g) => (d(), h("span", {
|
|
217
221
|
class: S(a(n).e("total")),
|
|
218
|
-
disabled: a(
|
|
222
|
+
disabled: a(s)
|
|
219
223
|
}, q(a(p)("el.pagination.total", {
|
|
220
224
|
total: l.total
|
|
221
225
|
})), 11, Ye));
|
|
222
226
|
}
|
|
223
227
|
});
|
|
224
|
-
var aa = /* @__PURE__ */
|
|
228
|
+
var aa = /* @__PURE__ */ K(ea, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/total.vue"]]);
|
|
225
229
|
const ta = j({
|
|
226
230
|
currentPage: {
|
|
227
231
|
type: Number,
|
|
@@ -236,45 +240,45 @@ const ta = j({
|
|
|
236
240
|
default: 7
|
|
237
241
|
},
|
|
238
242
|
disabled: Boolean
|
|
239
|
-
}), na = ["onKeyup"], ia = ["aria-current", "aria-label", "tabindex"], ra = ["tabindex", "aria-label"], la = ["aria-current", "aria-label", "tabindex"],
|
|
243
|
+
}), na = ["onKeyup"], ia = ["aria-current", "aria-label", "tabindex"], ra = ["tabindex", "aria-label"], la = ["aria-current", "aria-label", "tabindex"], oa = ["tabindex", "aria-label"], sa = ["aria-current", "aria-label", "tabindex"], ua = _({
|
|
240
244
|
name: "ElPaginationPager"
|
|
241
245
|
}), ga = /* @__PURE__ */ _({
|
|
242
246
|
...ua,
|
|
243
247
|
props: ta,
|
|
244
248
|
emits: ["change"],
|
|
245
249
|
setup(e, { emit: p }) {
|
|
246
|
-
const n = e,
|
|
250
|
+
const n = e, s = U("pager"), l = U("icon"), { t: g } = A(), f = E(!1), m = E(!1), z = E(!1), c = E(!1), v = E(!1), u = E(!1), k = y(() => {
|
|
247
251
|
const t = n.pagerCount, i = (t - 1) / 2, r = Number(n.currentPage), x = Number(n.pageCount);
|
|
248
252
|
let N = !1, w = !1;
|
|
249
253
|
x > t && (r > t - i && (N = !0), r < x - i && (w = !0));
|
|
250
254
|
const T = [];
|
|
251
255
|
if (N && !w) {
|
|
252
|
-
const
|
|
253
|
-
for (let I =
|
|
256
|
+
const b = x - (t - 2);
|
|
257
|
+
for (let I = b; I < x; I++)
|
|
254
258
|
T.push(I);
|
|
255
259
|
} else if (!N && w)
|
|
256
|
-
for (let
|
|
257
|
-
T.push(
|
|
260
|
+
for (let b = 2; b < t; b++)
|
|
261
|
+
T.push(b);
|
|
258
262
|
else if (N && w) {
|
|
259
|
-
const
|
|
260
|
-
for (let I = r -
|
|
263
|
+
const b = Math.floor(t / 2) - 1;
|
|
264
|
+
for (let I = r - b; I <= r + b; I++)
|
|
261
265
|
T.push(I);
|
|
262
266
|
} else
|
|
263
|
-
for (let
|
|
264
|
-
T.push(
|
|
267
|
+
for (let b = 2; b < x; b++)
|
|
268
|
+
T.push(b);
|
|
265
269
|
return T;
|
|
266
270
|
}), P = y(() => [
|
|
267
271
|
"more",
|
|
268
272
|
"btn-quickprev",
|
|
269
273
|
l.b(),
|
|
270
|
-
|
|
271
|
-
]),
|
|
274
|
+
s.is("disabled", n.disabled)
|
|
275
|
+
]), F = y(() => [
|
|
272
276
|
"more",
|
|
273
277
|
"btn-quicknext",
|
|
274
278
|
l.b(),
|
|
275
|
-
|
|
279
|
+
s.is("disabled", n.disabled)
|
|
276
280
|
]), M = y(() => n.disabled ? -1 : 0);
|
|
277
|
-
|
|
281
|
+
ve(() => {
|
|
278
282
|
const t = (n.pagerCount - 1) / 2;
|
|
279
283
|
f.value = !1, m.value = !1, n.pageCount > n.pagerCount && (n.currentPage > n.pagerCount - t && (f.value = !0), n.currentPage < n.pageCount - t && (m.value = !0));
|
|
280
284
|
});
|
|
@@ -282,7 +286,7 @@ const ta = j({
|
|
|
282
286
|
n.disabled || (t ? z.value = !0 : c.value = !0);
|
|
283
287
|
}
|
|
284
288
|
function W(t = !1) {
|
|
285
|
-
t ?
|
|
289
|
+
t ? v.value = !0 : u.value = !0;
|
|
286
290
|
}
|
|
287
291
|
function L(t) {
|
|
288
292
|
const i = t.target;
|
|
@@ -290,9 +294,9 @@ const ta = j({
|
|
|
290
294
|
const r = Number(i.textContent);
|
|
291
295
|
r !== n.currentPage && p("change", r);
|
|
292
296
|
} else
|
|
293
|
-
i.tagName.toLowerCase() === "li" && Array.from(i.classList).includes("more") &&
|
|
297
|
+
i.tagName.toLowerCase() === "li" && Array.from(i.classList).includes("more") && o(t);
|
|
294
298
|
}
|
|
295
|
-
function
|
|
299
|
+
function o(t) {
|
|
296
300
|
const i = t.target;
|
|
297
301
|
if (i.tagName.toLowerCase() === "ul" || n.disabled)
|
|
298
302
|
return;
|
|
@@ -301,15 +305,15 @@ const ta = j({
|
|
|
301
305
|
i.className.includes("more") && (i.className.includes("quickprev") ? r = N - w : i.className.includes("quicknext") && (r = N + w)), Number.isNaN(+r) || (r < 1 && (r = 1), r > x && (r = x)), r !== N && p("change", r);
|
|
302
306
|
}
|
|
303
307
|
return (t, i) => (d(), h("ul", {
|
|
304
|
-
class: S(a(
|
|
305
|
-
onClick:
|
|
308
|
+
class: S(a(s).b()),
|
|
309
|
+
onClick: o,
|
|
306
310
|
onKeyup: Pe(L, ["enter"])
|
|
307
311
|
}, [
|
|
308
312
|
t.pageCount > 0 ? (d(), h("li", {
|
|
309
313
|
key: 0,
|
|
310
314
|
class: S([[
|
|
311
|
-
a(
|
|
312
|
-
a(
|
|
315
|
+
a(s).is("active", t.currentPage === 1),
|
|
316
|
+
a(s).is("disabled", t.disabled)
|
|
313
317
|
], "number"]),
|
|
314
318
|
"aria-current": t.currentPage === 1,
|
|
315
319
|
"aria-label": a(g)("el.pagination.currentPage", { pager: 1 }),
|
|
@@ -323,15 +327,15 @@ const ta = j({
|
|
|
323
327
|
onMouseenter: i[0] || (i[0] = (r) => O(!0)),
|
|
324
328
|
onMouseleave: i[1] || (i[1] = (r) => z.value = !1),
|
|
325
329
|
onFocus: i[2] || (i[2] = (r) => W(!0)),
|
|
326
|
-
onBlur: i[3] || (i[3] = (r) =>
|
|
330
|
+
onBlur: i[3] || (i[3] = (r) => v.value = !1)
|
|
327
331
|
}, [
|
|
328
|
-
(z.value ||
|
|
332
|
+
(z.value || v.value) && !t.disabled ? (d(), $(a(Se), { key: 0 })) : (d(), $(a(Y), { key: 1 }))
|
|
329
333
|
], 42, ra)) : V("v-if", !0),
|
|
330
|
-
(d(!0), h(
|
|
334
|
+
(d(!0), h(te, null, ne(a(k), (r) => (d(), h("li", {
|
|
331
335
|
key: r,
|
|
332
336
|
class: S([[
|
|
333
|
-
a(
|
|
334
|
-
a(
|
|
337
|
+
a(s).is("active", t.currentPage === r),
|
|
338
|
+
a(s).is("disabled", t.disabled)
|
|
335
339
|
], "number"]),
|
|
336
340
|
"aria-current": t.currentPage === r,
|
|
337
341
|
"aria-label": a(g)("el.pagination.currentPage", { pager: r }),
|
|
@@ -339,7 +343,7 @@ const ta = j({
|
|
|
339
343
|
}, q(r), 11, la))), 128)),
|
|
340
344
|
m.value ? (d(), h("li", {
|
|
341
345
|
key: 2,
|
|
342
|
-
class: S(a(
|
|
346
|
+
class: S(a(F)),
|
|
343
347
|
tabindex: a(M),
|
|
344
348
|
"aria-label": a(g)("el.pagination.nextPages", { pager: t.pagerCount - 2 }),
|
|
345
349
|
onMouseenter: i[4] || (i[4] = (r) => O()),
|
|
@@ -348,21 +352,21 @@ const ta = j({
|
|
|
348
352
|
onBlur: i[7] || (i[7] = (r) => u.value = !1)
|
|
349
353
|
}, [
|
|
350
354
|
(c.value || u.value) && !t.disabled ? (d(), $(a(ke), { key: 0 })) : (d(), $(a(Y), { key: 1 }))
|
|
351
|
-
], 42,
|
|
355
|
+
], 42, oa)) : V("v-if", !0),
|
|
352
356
|
t.pageCount > 1 ? (d(), h("li", {
|
|
353
357
|
key: 3,
|
|
354
358
|
class: S([[
|
|
355
|
-
a(
|
|
356
|
-
a(
|
|
359
|
+
a(s).is("active", t.currentPage === t.pageCount),
|
|
360
|
+
a(s).is("disabled", t.disabled)
|
|
357
361
|
], "number"]),
|
|
358
362
|
"aria-current": t.currentPage === t.pageCount,
|
|
359
363
|
"aria-label": a(g)("el.pagination.currentPage", { pager: t.pageCount }),
|
|
360
364
|
tabindex: a(M)
|
|
361
|
-
}, q(t.pageCount), 11,
|
|
365
|
+
}, q(t.pageCount), 11, sa)) : V("v-if", !0)
|
|
362
366
|
], 42, na));
|
|
363
367
|
}
|
|
364
368
|
});
|
|
365
|
-
var pa = /* @__PURE__ */
|
|
369
|
+
var pa = /* @__PURE__ */ K(ga, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/pager.vue"]]);
|
|
366
370
|
const C = (e) => typeof e != "number", ca = j({
|
|
367
371
|
pageSize: Number,
|
|
368
372
|
defaultPageSize: Number,
|
|
@@ -381,7 +385,7 @@ const C = (e) => typeof e != "number", ca = j({
|
|
|
381
385
|
},
|
|
382
386
|
pageSizes: {
|
|
383
387
|
type: ee(Array),
|
|
384
|
-
default: () =>
|
|
388
|
+
default: () => le([10, 20, 30, 40, 50, 100])
|
|
385
389
|
},
|
|
386
390
|
popperClass: {
|
|
387
391
|
type: String,
|
|
@@ -424,7 +428,7 @@ var fa = _({
|
|
|
424
428
|
props: ca,
|
|
425
429
|
emits: da,
|
|
426
430
|
setup(e, { emit: p, slots: n }) {
|
|
427
|
-
const { t:
|
|
431
|
+
const { t: s } = A(), l = U("pagination"), g = Ce().vnode.props || {}, f = "onUpdate:currentPage" in g || "onUpdate:current-page" in g || "onCurrentChange" in g, m = "onUpdate:pageSize" in g || "onUpdate:page-size" in g || "onSizeChange" in g, z = y(() => {
|
|
428
432
|
if (C(e.total) && C(e.pageCount) || !C(e.currentPage) && !f)
|
|
429
433
|
return !1;
|
|
430
434
|
if (e.layout.includes("sizes")) {
|
|
@@ -435,33 +439,33 @@ var fa = _({
|
|
|
435
439
|
return !1;
|
|
436
440
|
}
|
|
437
441
|
return !0;
|
|
438
|
-
}), c = E(C(e.defaultPageSize) ? 10 : e.defaultPageSize),
|
|
442
|
+
}), c = E(C(e.defaultPageSize) ? 10 : e.defaultPageSize), v = E(C(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), u = y({
|
|
439
443
|
get() {
|
|
440
444
|
return C(e.pageSize) ? c.value : e.pageSize;
|
|
441
445
|
},
|
|
442
|
-
set(
|
|
443
|
-
C(e.pageSize) && (c.value =
|
|
446
|
+
set(o) {
|
|
447
|
+
C(e.pageSize) && (c.value = o), m && (p("update:page-size", o), p("size-change", o));
|
|
444
448
|
}
|
|
445
449
|
}), k = y(() => {
|
|
446
|
-
let
|
|
447
|
-
return C(e.pageCount) ? C(e.total) || (
|
|
450
|
+
let o = 0;
|
|
451
|
+
return C(e.pageCount) ? C(e.total) || (o = Math.max(1, Math.ceil(e.total / u.value))) : o = e.pageCount, o;
|
|
448
452
|
}), P = y({
|
|
449
453
|
get() {
|
|
450
|
-
return C(e.currentPage) ?
|
|
454
|
+
return C(e.currentPage) ? v.value : e.currentPage;
|
|
451
455
|
},
|
|
452
|
-
set(
|
|
453
|
-
let t =
|
|
454
|
-
|
|
456
|
+
set(o) {
|
|
457
|
+
let t = o;
|
|
458
|
+
o < 1 ? t = 1 : o > k.value && (t = k.value), C(e.currentPage) && (v.value = t), f && (p("update:current-page", t), p("current-change", t));
|
|
455
459
|
}
|
|
456
460
|
});
|
|
457
|
-
R(k, (
|
|
458
|
-
P.value >
|
|
461
|
+
R(k, (o) => {
|
|
462
|
+
P.value > o && (P.value = o);
|
|
459
463
|
});
|
|
460
|
-
function
|
|
461
|
-
P.value =
|
|
464
|
+
function F(o) {
|
|
465
|
+
P.value = o;
|
|
462
466
|
}
|
|
463
|
-
function M(
|
|
464
|
-
u.value =
|
|
467
|
+
function M(o) {
|
|
468
|
+
u.value = o;
|
|
465
469
|
const t = k.value;
|
|
466
470
|
P.value > t && (P.value = t);
|
|
467
471
|
}
|
|
@@ -471,19 +475,19 @@ var fa = _({
|
|
|
471
475
|
function W() {
|
|
472
476
|
e.disabled || (P.value += 1, p("next-click", P.value));
|
|
473
477
|
}
|
|
474
|
-
function L(
|
|
475
|
-
|
|
478
|
+
function L(o, t) {
|
|
479
|
+
o && (o.props || (o.props = {}), o.props.class = [o.props.class, t].join(" "));
|
|
476
480
|
}
|
|
477
|
-
return he(
|
|
481
|
+
return he(oe, {
|
|
478
482
|
pageCount: k,
|
|
479
483
|
disabled: y(() => e.disabled),
|
|
480
484
|
currentPage: P,
|
|
481
|
-
changeEvent:
|
|
485
|
+
changeEvent: F,
|
|
482
486
|
handleSizeChange: M
|
|
483
487
|
}), () => {
|
|
484
|
-
var
|
|
488
|
+
var o, t;
|
|
485
489
|
if (!z.value)
|
|
486
|
-
return
|
|
490
|
+
return se(Z, s("el.pagination.deprecationWarning")), null;
|
|
487
491
|
if (!e.layout || e.hideOnSinglePage && k.value <= 1)
|
|
488
492
|
return null;
|
|
489
493
|
const i = [], r = [], x = B("div", { class: l.e("rightwrapper") }, r), N = {
|
|
@@ -501,10 +505,10 @@ var fa = _({
|
|
|
501
505
|
currentPage: P.value,
|
|
502
506
|
pageCount: k.value,
|
|
503
507
|
pagerCount: e.pagerCount,
|
|
504
|
-
onChange:
|
|
508
|
+
onChange: F,
|
|
505
509
|
disabled: e.disabled
|
|
506
510
|
}),
|
|
507
|
-
next: B(
|
|
511
|
+
next: B(Ke, {
|
|
508
512
|
disabled: e.disabled,
|
|
509
513
|
currentPage: P.value,
|
|
510
514
|
pageCount: k.value,
|
|
@@ -520,16 +524,16 @@ var fa = _({
|
|
|
520
524
|
teleported: e.teleported,
|
|
521
525
|
size: e.small ? "small" : "default"
|
|
522
526
|
}),
|
|
523
|
-
slot: (t = (
|
|
527
|
+
slot: (t = (o = n == null ? void 0 : n.default) == null ? void 0 : o.call(n)) != null ? t : null,
|
|
524
528
|
total: B(aa, { total: C(e.total) ? 0 : e.total })
|
|
525
|
-
}, w = e.layout.split(",").map((
|
|
529
|
+
}, w = e.layout.split(",").map((b) => b.trim());
|
|
526
530
|
let T = !1;
|
|
527
|
-
return w.forEach((
|
|
528
|
-
if (
|
|
531
|
+
return w.forEach((b) => {
|
|
532
|
+
if (b === "->") {
|
|
529
533
|
T = !0;
|
|
530
534
|
return;
|
|
531
535
|
}
|
|
532
|
-
T ? r.push(N[
|
|
536
|
+
T ? r.push(N[b]) : i.push(N[b]);
|
|
533
537
|
}), L(i[0], l.is("first")), L(i[i.length - 1], l.is("last")), T && r.length > 0 && (L(r[0], l.is("first")), L(r[r.length - 1], l.is("last")), i.push(x)), B("div", {
|
|
534
538
|
class: [
|
|
535
539
|
l.b(),
|
|
@@ -543,7 +547,7 @@ var fa = _({
|
|
|
543
547
|
}
|
|
544
548
|
});
|
|
545
549
|
const ma = ue(fa);
|
|
546
|
-
const
|
|
550
|
+
const ba = /* @__PURE__ */ _({
|
|
547
551
|
__name: "index",
|
|
548
552
|
props: {
|
|
549
553
|
pageData: {
|
|
@@ -569,26 +573,26 @@ const va = /* @__PURE__ */ _({
|
|
|
569
573
|
},
|
|
570
574
|
emits: ["update:pageData", "change"],
|
|
571
575
|
setup(e, { emit: p }) {
|
|
572
|
-
const n = p,
|
|
576
|
+
const n = p, s = e, l = y({
|
|
573
577
|
get() {
|
|
574
|
-
return
|
|
578
|
+
return s.pageData.pageNum;
|
|
575
579
|
},
|
|
576
580
|
set(m) {
|
|
577
|
-
n("update:pageData", { ...
|
|
581
|
+
n("update:pageData", { ...s.pageData, pageNum: m });
|
|
578
582
|
}
|
|
579
583
|
}), g = y({
|
|
580
584
|
get() {
|
|
581
|
-
return
|
|
585
|
+
return s.pageData.pageSize;
|
|
582
586
|
},
|
|
583
587
|
set(m) {
|
|
584
|
-
n("update:pageData", { ...
|
|
588
|
+
n("update:pageData", { ...s.pageData, pageSize: m });
|
|
585
589
|
}
|
|
586
590
|
}), f = () => {
|
|
587
|
-
n("change",
|
|
591
|
+
n("change", s.pageData);
|
|
588
592
|
};
|
|
589
593
|
return (m, z) => {
|
|
590
|
-
const c = ma,
|
|
591
|
-
return d(), $(
|
|
594
|
+
const c = ma, v = pe;
|
|
595
|
+
return d(), $(v, { locale: a(ge) }, {
|
|
592
596
|
default: H(() => [
|
|
593
597
|
ye(G(c, ze({
|
|
594
598
|
class: "st-pagination",
|
|
@@ -612,11 +616,11 @@ const va = /* @__PURE__ */ _({
|
|
|
612
616
|
};
|
|
613
617
|
}
|
|
614
618
|
});
|
|
615
|
-
const
|
|
619
|
+
const va = /* @__PURE__ */ Ee(ba, [["__scopeId", "data-v-61b7745b"]]), Ta = {
|
|
616
620
|
install(e) {
|
|
617
|
-
e.component("st-pagination",
|
|
621
|
+
e.component("st-pagination", va);
|
|
618
622
|
}
|
|
619
623
|
};
|
|
620
624
|
export {
|
|
621
|
-
|
|
625
|
+
Ta as default
|
|
622
626
|
};
|