-
Notifications
You must be signed in to change notification settings - Fork 1
/
DOCS en-US44.0cb71eee40c7d7b6716e.js
529 lines (442 loc) · 34.6 KB
/
DOCS en-US44.0cb71eee40c7d7b6716e.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[40],{
/***/ 796:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/vue/dist/vue.esm-browser.prod.js
var vue_esm_browser_prod = __webpack_require__(0);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/dist/templateLoader.js??ref--6!./node_modules/vue-loader/dist??ref--3-0!./website/md-loader!./website/docs/en-US/pagination.md?vue&type=template&id=93f91b46
const paginationvue_type_template_id_93f91b46_hoisted_1 = {
class: "content element-doc"
};
const paginationvue_type_template_id_93f91b46_hoisted_2 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Pagination ");
const paginationvue_type_template_id_93f91b46_hoisted_3 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, "If you have too much data to display in one page, use pagination.", -1);
const paginationvue_type_template_id_93f91b46_hoisted_4 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Basic usage ");
const paginationvue_type_template_id_93f91b46_hoisted_5 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Set "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "layout"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" with different pagination elements you wish to display separated with a comma. Pagination elements are: "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "prev"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" (a button navigating to the previous page), "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "next"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" (a button navigating to the next page), "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "pager"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" (page list), "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "jumper"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" (a jump-to input), "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "total"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" (total item count), "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "size"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" (a select to determine page size) and "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "->"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("(every element after this symbol will be pulled to the right).")])], -1);
const paginationvue_type_template_id_93f91b46_hoisted_6 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <div class=\"block\">\n <span class=\"demonstration\">When you have few pages</span>\n <el-pagination layout=\"prev, pager, next\" :total=\"50\"> </el-pagination>\n </div>\n <div class=\"block\">\n <span class=\"demonstration\">When you have more than 7 pages</span>\n <el-pagination layout=\"prev, pager, next\" :total=\"1000\"> </el-pagination>\n </div>\n</template>\n")], -1);
const paginationvue_type_template_id_93f91b46_hoisted_7 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Number of pagers ");
const paginationvue_type_template_id_93f91b46_hoisted_8 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("By default, Pagination collapses extra pager buttons when it has more than 7 pages. This can be configured with the "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "pager-count"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" attribute.")])], -1);
const _hoisted_9 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-pagination\n :page-size=\"20\"\n :pager-count=\"11\"\n layout=\"prev, pager, next\"\n :total=\"1000\"\n >\n </el-pagination>\n</template>\n")], -1);
const _hoisted_10 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Buttons with background color ");
const _hoisted_11 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Set the "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "background"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" attribute and the buttons will have a background color.")])], -1);
const _hoisted_12 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-pagination background layout=\"prev, pager, next\" :total=\"1000\">\n </el-pagination>\n</template>\n")], -1);
const _hoisted_13 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Small Pagination ");
const _hoisted_14 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, "Use small pagination in the case of limited space.", -1);
const _hoisted_15 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Just set the "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "small"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" attribute to "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "true"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" and the Pagination becomes smaller.")])], -1);
const _hoisted_16 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <el-pagination small layout=\"prev, pager, next\" :total=\"50\"> </el-pagination>\n</template>\n")], -1);
const _hoisted_17 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("More elements ");
const _hoisted_18 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, "Add more modules based on your scenario.", -1);
const _hoisted_19 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("div", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("This example is a complete use case. It uses "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "size-change"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" and "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "current-change"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" event to handle page size changes and current page changes. "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "page-sizes"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" accepts an array of integers, each of which represents a different page size in the "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "sizes"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" select options, e.g. "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "[100, 200, 300, 400]"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" indicates that the select will have four options: 100, 200, 300 or 400 items per page.")])], -1);
const _hoisted_20 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <div class=\"block\">\n <span class=\"demonstration\">Total item count</span>\n <el-pagination\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n v-model:currentPage=\"currentPage1\"\n :page-size=\"100\"\n layout=\"total, prev, pager, next\"\n :total=\"1000\"\n >\n </el-pagination>\n </div>\n <div class=\"block\">\n <span class=\"demonstration\">Change page size</span>\n <el-pagination\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n v-model:currentPage=\"currentPage2\"\n :page-sizes=\"[100, 200, 300, 400]\"\n :page-size=\"100\"\n layout=\"sizes, prev, pager, next\"\n :total=\"1000\"\n >\n </el-pagination>\n </div>\n <div class=\"block\">\n <span class=\"demonstration\">Jump to</span>\n <el-pagination\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n v-model:currentPage=\"currentPage3\"\n :page-size=\"100\"\n layout=\"prev, pager, next, jumper\"\n :total=\"1000\"\n >\n </el-pagination>\n </div>\n <div class=\"block\">\n <span class=\"demonstration\">All combined</span>\n <el-pagination\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n v-model:currentPage=\"currentPage4\"\n :page-sizes=\"[100, 200, 300, 400]\"\n :page-size=\"100\"\n layout=\"total, sizes, prev, pager, next, jumper\"\n :total=\"400\"\n >\n </el-pagination>\n </div>\n</template>\n<script>\n export default {\n methods: {\n handleSizeChange(val) {\n console.log(`${val} items per page`)\n },\n handleCurrentChange(val) {\n console.log(`current page: ${val}`)\n },\n },\n data() {\n return {\n currentPage1: 5,\n currentPage2: 5,\n currentPage3: 5,\n currentPage4: 4,\n }\n },\n }\n</script>\n<!--\n<setup>\n\n import { defineComponent, ref } from 'vue';\n\n export default defineComponent({\n setup() {\n const handleSizeChange = (val) => {\n console.log(`${val} items per page`);\n };\n const handleCurrentChange = (val) => {\n console.log(`current page: ${val}`);\n };\n\n return {\n currentPage1: ref(5),\n currentPage2: ref(5),\n currentPage3: ref(5),\n currentPage4: ref(4),\n handleSizeChange,\n handleCurrentChange,\n };\n },\n });\n\n</setup>\n-->\n")], -1);
const _hoisted_21 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Hide pagination when there is only one page ");
const _hoisted_22 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("When there is only one page, hide the pagination by setting the "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "hide-on-single-page"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" attribute.")], -1);
const _hoisted_23 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("pre", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", {
class: "html"
}, "<template>\n <div>\n <el-switch v-model=\"value\"> </el-switch>\n <el-pagination\n :hide-on-single-page=\"value\"\n :total=\"5\"\n layout=\"prev, pager, next\"\n >\n </el-pagination>\n </div>\n</template>\n\n<script>\n export default {\n data() {\n return {\n value: false,\n }\n },\n }\n</script>\n<!--\n<setup>\n\n import { defineComponent, ref } from 'vue';\n\n export default defineComponent({\n setup() {\n return {\n value: ref(false),\n };\n },\n });\n\n</setup>\n-->\n")], -1);
const _hoisted_24 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Attributes ");
const _hoisted_25 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<table><thead><tr><th>Attribute</th><th>Description</th><th>Type</th><th>Accepted Values</th><th>Default</th></tr></thead><tbody><tr><td>small</td><td>whether to use small pagination</td><td>boolean</td><td>—</td><td>false</td></tr><tr><td>background</td><td>whether the buttons have a background color</td><td>boolean</td><td>—</td><td>false</td></tr><tr><td>page-size</td><td>item count of each page, supports the v-model bidirectional binding</td><td>number</td><td>—</td><td>10</td></tr><tr><td>default-page-size</td><td>default initial value of page size</td><td>number</td><td>-</td><td>-</td></tr><tr><td>total</td><td>total item count</td><td>number</td><td>—</td><td>—</td></tr><tr><td>page-count</td><td>total page count. Set either <code>total</code> or <code>page-count</code> and pages will be displayed; if you need <code>page-sizes</code>, <code>total</code> is required</td><td>number</td><td>—</td><td>—</td></tr><tr><td>pager-count</td><td>number of pagers. Pagination collapses when the total page count exceeds this value</td><td>number</td><td>odd number between 5 and 21</td><td>7</td></tr><tr><td>current-page</td><td>current page number, supports the v-model bidirectional binding</td><td>number</td><td>—</td><td>1</td></tr><tr><td>default-current-page</td><td>default initial value of current-page</td><td>number</td><td>-</td><td>-</td></tr><tr><td>layout</td><td>layout of Pagination, elements separated with a comma</td><td>string</td><td><code>sizes</code> / <code>prev</code> / <code>pager</code> / <code>next</code> / <code>jumper</code> / <code>-></code> / <code>total</code> / <code>slot</code></td><td>'prev, pager, next, jumper, ->, total'</td></tr><tr><td>page-sizes</td><td>options of item count per page</td><td>number[]</td><td>—</td><td>[10, 20, 30, 40, 50, 100]</td></tr><tr><td>popper-class</td><td>custom class name for the page size Select's dropdown</td><td>string</td><td>—</td><td>—</td></tr><tr><td>prev-text</td><td>text for the prev button</td><td>string</td><td>—</td><td>—</td></tr><tr><td>next-text</td><td>text for the next button</td><td>string</td><td>—</td><td>—</td></tr><tr><td>disabled</td><td>whether Pagination is disabled</td><td>boolean</td><td>—</td><td>false</td></tr><tr><td>hide-on-single-page</td><td>whether to hide when there's only one page</td><td>boolean</td><td>—</td><td>-</td></tr></tbody></table><div class=\"warning\"><p>We'll detect some deprecated usages, if your pagination don't appeared or worked as expected, please check rules below:</p><ul><li>You have to define one of <code>total</code> and <code>page-count</code>, otherwise we can't determine count of total pages.When both defined, <code>page-count</code> taken as priority.</li><li>If <code>current-page</code> is defined, you have to listen <code>current-page</code> change, by also define <code>@update:current-page</code>, otherwise pagination didn't work.</li><li>If <code>page-size</code> is defined while page size selector displayed(<code>sizes</code> included in <code>layout</code>), you have to listen <code>page-size</code> change as well, by define <code>@update:page-size</code>, otherwise change of page size didn't work.</li></ul></div>", 2);
const _hoisted_27 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Events ");
const _hoisted_28 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<table><thead><tr><th>Event Name</th><th>Description</th><th>Parameters</th></tr></thead><tbody><tr><td>size-change</td><td>triggers when <code>page-size</code> changes</td><td>the new page size</td></tr><tr><td>current-change</td><td>triggers when <code>current-page</code> changes</td><td>the new current page</td></tr><tr><td>prev-click</td><td>triggers when the prev button is clicked and current page changes</td><td>the new current page</td></tr><tr><td>next-click</td><td>triggers when the next button is clicked and current page changes</td><td>the new current page</td></tr></tbody></table><div class=\"warning\"><p>Events above are not recommended(but are still supported for compatible reason), better chioce is to use the two-way data binding by <code>v-model</code>.</p></div>", 2);
const _hoisted_30 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Slots ");
const _hoisted_31 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("table", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("thead", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("tr", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("th", null, "Name"), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("th", null, "Description")])]), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("tbody", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("tr", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("td", null, "—"), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("td", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("custom content. To use this, you need to declare "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "slot"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" in "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "layout")])])])], -1);
function paginationvue_type_template_id_93f91b46_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_app_link = Object(vue_esm_browser_prod["resolveComponent"])("app-link");
const _component_app_heading = Object(vue_esm_browser_prod["resolveComponent"])("app-heading");
const _component_element_demo0 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo0");
const _component_demo_block = Object(vue_esm_browser_prod["resolveComponent"])("demo-block");
const _component_element_demo1 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo1");
const _component_element_demo2 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo2");
const _component_element_demo3 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo3");
const _component_element_demo4 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo4");
const _component_element_demo5 = Object(vue_esm_browser_prod["resolveComponent"])("element-demo5");
const _component_right_nav = Object(vue_esm_browser_prod["resolveComponent"])("right-nav");
return Object(vue_esm_browser_prod["openBlock"])(), Object(vue_esm_browser_prod["createElementBlock"])("section", paginationvue_type_template_id_93f91b46_hoisted_1, [Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "pagination",
content: "Pagination",
href: "#pagination",
level: "2"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [paginationvue_type_template_id_93f91b46_hoisted_2, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#pagination"
})]),
_: 1
}), paginationvue_type_template_id_93f91b46_hoisted_3, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "basic-usage",
content: "Basic usage",
href: "#basic-usage",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [paginationvue_type_template_id_93f91b46_hoisted_4, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#basic-usage"
})]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo0)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [paginationvue_type_template_id_93f91b46_hoisted_6]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [paginationvue_type_template_id_93f91b46_hoisted_5]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "number-of-pagers",
content: "Number of pagers",
href: "#number-of-pagers",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [paginationvue_type_template_id_93f91b46_hoisted_7, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#number-of-pagers"
})]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo1)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_9]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [paginationvue_type_template_id_93f91b46_hoisted_8]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "buttons-with-background-color",
content: "Buttons with background color",
href: "#buttons-with-background-color",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_10, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#buttons-with-background-color"
})]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo2)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_12]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_11]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "small-pagination",
content: "Small Pagination",
href: "#small-pagination",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_13, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#small-pagination"
})]),
_: 1
}), _hoisted_14, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo3)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_16]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_15]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "more-elements",
content: "More elements",
href: "#more-elements",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_17, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#more-elements"
})]),
_: 1
}), _hoisted_18, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo4)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_20]),
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_19]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "hide-pagination-when-there-is-only-one-page",
content: "Hide pagination when there is only one page",
href: "#hide-pagination-when-there-is-only-one-page",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_21, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#hide-pagination-when-there-is-only-one-page"
})]),
_: 1
}), _hoisted_22, Object(vue_esm_browser_prod["createVNode"])(_component_demo_block, null, {
source: Object(vue_esm_browser_prod["withCtx"])(() => [Object(vue_esm_browser_prod["createVNode"])(_component_element_demo5)]),
highlight: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_23]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "attributes",
content: "Attributes",
href: "#attributes",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_24, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#attributes"
})]),
_: 1
}), _hoisted_25, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "events",
content: "Events",
href: "#events",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_27, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#events"
})]),
_: 1
}), _hoisted_28, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "slots",
content: "Slots",
href: "#slots",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_30, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#slots"
})]),
_: 1
}), _hoisted_31, Object(vue_esm_browser_prod["createVNode"])(_component_right_nav)]);
}
// CONCATENATED MODULE: ./website/docs/en-US/pagination.md?vue&type=template&id=93f91b46
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--3-0!./website/md-loader!./website/docs/en-US/pagination.md?vue&type=script&lang=ts
/* harmony default export */ var paginationvue_type_script_lang_ts = ({
name: 'component-doc',
components: {
"element-demo0": function () {
const {
createElementVNode: _createElementVNode,
resolveComponent: _resolveComponent,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
const _hoisted_1 = {
class: "block"
};
const _hoisted_2 = /*#__PURE__*/_createElementVNode("span", {
class: "demonstration"
}, "When you have few pages", -1);
const _hoisted_3 = {
class: "block"
};
const _hoisted_4 = /*#__PURE__*/_createElementVNode("span", {
class: "demonstration"
}, "When you have more than 7 pages", -1);
function render(_ctx, _cache) {
const _component_el_pagination = _resolveComponent("el-pagination");
return _openBlock(), _createElementBlock("div", null, [_createElementVNode("div", _hoisted_1, [_hoisted_2, _createVNode(_component_el_pagination, {
layout: "prev, pager, next",
total: 50
})]), _createElementVNode("div", _hoisted_3, [_hoisted_4, _createVNode(_component_el_pagination, {
layout: "prev, pager, next",
total: 1000
})])]);
}
const democomponentExport = {};
return {
render,
...democomponentExport
};
}(),
"element-demo1": function () {
const {
resolveComponent: _resolveComponent,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
function render(_ctx, _cache) {
const _component_el_pagination = _resolveComponent("el-pagination");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_pagination, {
"page-size": 20,
"pager-count": 11,
layout: "prev, pager, next",
total: 1000
})]);
}
const democomponentExport = {};
return {
render,
...democomponentExport
};
}(),
"element-demo2": function () {
const {
resolveComponent: _resolveComponent,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
function render(_ctx, _cache) {
const _component_el_pagination = _resolveComponent("el-pagination");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_pagination, {
background: "",
layout: "prev, pager, next",
total: 1000
})]);
}
const democomponentExport = {};
return {
render,
...democomponentExport
};
}(),
"element-demo3": function () {
const {
resolveComponent: _resolveComponent,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
function render(_ctx, _cache) {
const _component_el_pagination = _resolveComponent("el-pagination");
return _openBlock(), _createElementBlock("div", null, [_createVNode(_component_el_pagination, {
small: "",
layout: "prev, pager, next",
total: 50
})]);
}
const democomponentExport = {};
return {
render,
...democomponentExport
};
}(),
"element-demo4": function () {
const {
createElementVNode: _createElementVNode,
resolveComponent: _resolveComponent,
createVNode: _createVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
const _hoisted_1 = {
class: "block"
};
const _hoisted_2 = /*#__PURE__*/_createElementVNode("span", {
class: "demonstration"
}, "Total item count", -1);
const _hoisted_3 = {
class: "block"
};
const _hoisted_4 = /*#__PURE__*/_createElementVNode("span", {
class: "demonstration"
}, "Change page size", -1);
const _hoisted_5 = {
class: "block"
};
const _hoisted_6 = /*#__PURE__*/_createElementVNode("span", {
class: "demonstration"
}, "Jump to", -1);
const _hoisted_7 = {
class: "block"
};
const _hoisted_8 = /*#__PURE__*/_createElementVNode("span", {
class: "demonstration"
}, "All combined", -1);
function render(_ctx, _cache) {
const _component_el_pagination = _resolveComponent("el-pagination");
return _openBlock(), _createElementBlock("div", null, [_createElementVNode("div", _hoisted_1, [_hoisted_2, _createVNode(_component_el_pagination, {
onSizeChange: _ctx.handleSizeChange,
onCurrentChange: _ctx.handleCurrentChange,
currentPage: _ctx.currentPage1,
"onUpdate:currentPage": _cache[0] || (_cache[0] = $event => _ctx.currentPage1 = $event),
"page-size": 100,
layout: "total, prev, pager, next",
total: 1000
}, null, 8, ["onSizeChange", "onCurrentChange", "currentPage"])]), _createElementVNode("div", _hoisted_3, [_hoisted_4, _createVNode(_component_el_pagination, {
onSizeChange: _ctx.handleSizeChange,
onCurrentChange: _ctx.handleCurrentChange,
currentPage: _ctx.currentPage2,
"onUpdate:currentPage": _cache[1] || (_cache[1] = $event => _ctx.currentPage2 = $event),
"page-sizes": [100, 200, 300, 400],
"page-size": 100,
layout: "sizes, prev, pager, next",
total: 1000
}, null, 8, ["onSizeChange", "onCurrentChange", "currentPage"])]), _createElementVNode("div", _hoisted_5, [_hoisted_6, _createVNode(_component_el_pagination, {
onSizeChange: _ctx.handleSizeChange,
onCurrentChange: _ctx.handleCurrentChange,
currentPage: _ctx.currentPage3,
"onUpdate:currentPage": _cache[2] || (_cache[2] = $event => _ctx.currentPage3 = $event),
"page-size": 100,
layout: "prev, pager, next, jumper",
total: 1000
}, null, 8, ["onSizeChange", "onCurrentChange", "currentPage"])]), _createElementVNode("div", _hoisted_7, [_hoisted_8, _createVNode(_component_el_pagination, {
onSizeChange: _ctx.handleSizeChange,
onCurrentChange: _ctx.handleCurrentChange,
currentPage: _ctx.currentPage4,
"onUpdate:currentPage": _cache[3] || (_cache[3] = $event => _ctx.currentPage4 = $event),
"page-sizes": [100, 200, 300, 400],
"page-size": 100,
layout: "total, sizes, prev, pager, next, jumper",
total: 400
}, null, 8, ["onSizeChange", "onCurrentChange", "currentPage"])])]);
}
const democomponentExport = {
methods: {
handleSizeChange(val) {
console.log(`${val} items per page`);
},
handleCurrentChange(val) {
console.log(`current page: ${val}`);
}
},
data() {
return {
currentPage1: 5,
currentPage2: 5,
currentPage3: 5,
currentPage4: 4
};
}
};
return {
render,
...democomponentExport
};
}(),
"element-demo5": function () {
const {
resolveComponent: _resolveComponent,
createVNode: _createVNode,
createElementVNode: _createElementVNode,
openBlock: _openBlock,
createElementBlock: _createElementBlock
} = vue_esm_browser_prod;
function render(_ctx, _cache) {
const _component_el_switch = _resolveComponent("el-switch");
const _component_el_pagination = _resolveComponent("el-pagination");
return _openBlock(), _createElementBlock("div", null, [_createElementVNode("div", null, [_createVNode(_component_el_switch, {
modelValue: _ctx.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.value = $event)
}, null, 8, ["modelValue"]), _createVNode(_component_el_pagination, {
"hide-on-single-page": _ctx.value,
total: 5,
layout: "prev, pager, next"
}, null, 8, ["hide-on-single-page"])])]);
}
const democomponentExport = {
data() {
return {
value: false
};
}
};
return {
render,
...democomponentExport
};
}()
}
});
// CONCATENATED MODULE: ./website/docs/en-US/pagination.md?vue&type=script&lang=ts
// CONCATENATED MODULE: ./website/docs/en-US/pagination.md
paginationvue_type_script_lang_ts.render = paginationvue_type_template_id_93f91b46_render
/* harmony default export */ var pagination = __webpack_exports__["default"] = (paginationvue_type_script_lang_ts);
/***/ })
}]);