@dataloop-ai/components 0.18.126 → 0.18.127
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/package.json +1 -1
- package/src/components/compound/DlPagination/DlPagination.vue +3 -3
- package/src/components/compound/DlPagination/components/PageNavigation.vue +15 -9
- package/src/components/compound/DlTable/hooks/tablePagination.ts +0 -1
- package/src/demos/DlDatasetBrowserLayoutDemo/components/DatasetFooter.vue +3 -3
- package/src/demos/DlPaginationDemo.vue +4 -4
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:model-value="value"
|
|
20
20
|
:min="min"
|
|
21
21
|
:max="max"
|
|
22
|
-
:max-
|
|
22
|
+
:max-display-range="maxDisplayRange"
|
|
23
23
|
:disabled="disabled"
|
|
24
24
|
:boundary-numbers="boundaryNumbers"
|
|
25
25
|
:boundary-links="boundaryLinks"
|
|
@@ -79,9 +79,9 @@ export default defineComponent({
|
|
|
79
79
|
type: Number,
|
|
80
80
|
default: 1
|
|
81
81
|
},
|
|
82
|
-
|
|
82
|
+
maxDisplayRange: {
|
|
83
83
|
type: Number,
|
|
84
|
-
default:
|
|
84
|
+
default: 7,
|
|
85
85
|
validator: (v: number) => v >= 0
|
|
86
86
|
},
|
|
87
87
|
rowsPerPage: {
|
|
@@ -129,9 +129,9 @@ export default defineComponent({
|
|
|
129
129
|
type: Number,
|
|
130
130
|
required: true
|
|
131
131
|
},
|
|
132
|
-
|
|
132
|
+
maxDisplayRange: {
|
|
133
133
|
type: Number,
|
|
134
|
-
default:
|
|
134
|
+
default: 7,
|
|
135
135
|
validator: (v: number) => v >= 0
|
|
136
136
|
},
|
|
137
137
|
disabled: Boolean,
|
|
@@ -235,26 +235,32 @@ export default defineComponent({
|
|
|
235
235
|
this.ellipsesStart = false
|
|
236
236
|
this.ellipsesEnd = false
|
|
237
237
|
|
|
238
|
-
let
|
|
239
|
-
this.
|
|
238
|
+
let maxDisplayRange = Math.max(
|
|
239
|
+
this.maxDisplayRange,
|
|
240
240
|
3 + (this.boundaryNumbers ? 2 : 0)
|
|
241
241
|
)
|
|
242
242
|
|
|
243
243
|
this.pgFrom = this.boundaryNumbers ? this.min + 1 : this.min
|
|
244
244
|
this.pgTo = this.boundaryNumbers ? this.max - 1 : this.max
|
|
245
245
|
|
|
246
|
-
if (
|
|
247
|
-
|
|
246
|
+
if (
|
|
247
|
+
this.maxDisplayRange &&
|
|
248
|
+
maxDisplayRange < this.max - this.min + 1
|
|
249
|
+
) {
|
|
250
|
+
maxDisplayRange = 1 + Math.floor(maxDisplayRange / 2) * 2
|
|
248
251
|
|
|
249
252
|
this.pgFrom = Math.max(
|
|
250
253
|
this.min,
|
|
251
254
|
Math.min(
|
|
252
|
-
this.max -
|
|
253
|
-
this.value - Math.floor(
|
|
255
|
+
this.max - maxDisplayRange + 1,
|
|
256
|
+
this.value - Math.floor(maxDisplayRange / 2)
|
|
254
257
|
)
|
|
255
258
|
)
|
|
256
259
|
|
|
257
|
-
this.pgTo = Math.min(
|
|
260
|
+
this.pgTo = Math.min(
|
|
261
|
+
this.max,
|
|
262
|
+
this.pgFrom + maxDisplayRange - 1
|
|
263
|
+
)
|
|
258
264
|
|
|
259
265
|
if (this.boundaryNumbers) {
|
|
260
266
|
this.pgFrom += 1
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:boundary-numbers="boundaryNumbers"
|
|
14
14
|
:boundary-links="boundaryLinks"
|
|
15
15
|
:direction-links="directionLinks"
|
|
16
|
-
:max-
|
|
16
|
+
:max-display-range="maxDisplayRange"
|
|
17
17
|
:disabled="disabled"
|
|
18
18
|
:with-legend="withLegend"
|
|
19
19
|
:total-items="total"
|
|
@@ -41,7 +41,7 @@ export default defineComponent({
|
|
|
41
41
|
const boundaryNumbers = ref(true)
|
|
42
42
|
const boundaryLinks = ref(true)
|
|
43
43
|
const directionLinks = ref(true)
|
|
44
|
-
const
|
|
44
|
+
const maxDisplayRange = ref(6)
|
|
45
45
|
const disabled = ref(false)
|
|
46
46
|
const withLegend = ref(true)
|
|
47
47
|
const total = ref(200)
|
|
@@ -55,7 +55,7 @@ export default defineComponent({
|
|
|
55
55
|
boundaryNumbers,
|
|
56
56
|
boundaryLinks,
|
|
57
57
|
directionLinks,
|
|
58
|
-
|
|
58
|
+
maxDisplayRange,
|
|
59
59
|
disabled,
|
|
60
60
|
withLegend,
|
|
61
61
|
total,
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
title="max"
|
|
15
15
|
/>
|
|
16
16
|
<dl-input
|
|
17
|
-
v-model="
|
|
18
|
-
title="
|
|
17
|
+
v-model="maxDisplayRange"
|
|
18
|
+
title="maxDisplayRange"
|
|
19
19
|
/>
|
|
20
20
|
<dl-input
|
|
21
21
|
v-model="itemsName"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
:boundary-numbers="boundaryNumbers"
|
|
61
61
|
:boundary-links="boundaryLinks"
|
|
62
62
|
:direction-links="directionLinks"
|
|
63
|
-
:max-
|
|
63
|
+
:max-display-range="maxDisplayRange"
|
|
64
64
|
:disabled="disabled"
|
|
65
65
|
:with-legend="withLegend"
|
|
66
66
|
:total-items="total"
|
|
@@ -101,7 +101,7 @@ export default defineComponent({
|
|
|
101
101
|
return {
|
|
102
102
|
page: 18,
|
|
103
103
|
max: 119,
|
|
104
|
-
|
|
104
|
+
maxDisplayRange: 6,
|
|
105
105
|
rowsPerPage: 10,
|
|
106
106
|
boundaryNumbers: true,
|
|
107
107
|
boundaryLinks: true,
|