@avakhula/ui 0.0.21 → 0.0.23
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.
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
></ib-limit-selector>
|
|
8
8
|
|
|
9
9
|
<div class="repot-pagination">
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
10
|
+
<template v-if="showPaginationInput">
|
|
11
|
+
<ib-label>{{ labelInput }}</ib-label>
|
|
12
|
+
<div class="pagination-input">
|
|
13
|
+
<ib-input type="number" :debounce="500" @input="onInput"></ib-input>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
14
17
|
<div class="row-count">
|
|
15
18
|
{{ setCountOfRows + " of " + countRows }}
|
|
16
19
|
</div>
|
|
@@ -98,6 +101,10 @@ export default {
|
|
|
98
101
|
type: Number,
|
|
99
102
|
default: 10,
|
|
100
103
|
},
|
|
104
|
+
showPaginationInput: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: true,
|
|
107
|
+
},
|
|
101
108
|
},
|
|
102
109
|
data() {
|
|
103
110
|
return {
|
|
@@ -109,14 +116,10 @@ export default {
|
|
|
109
116
|
},
|
|
110
117
|
watch: {
|
|
111
118
|
current(newVal) {
|
|
112
|
-
this.currentPage = newVal;
|
|
113
|
-
},
|
|
114
|
-
currentPage(newVal) {
|
|
115
119
|
this.onSelect(newVal);
|
|
116
120
|
},
|
|
117
121
|
limitValue() {
|
|
118
122
|
this.currentPage = 1;
|
|
119
|
-
this.onSelect(this.currentPage);
|
|
120
123
|
},
|
|
121
124
|
},
|
|
122
125
|
methods: {
|
|
@@ -127,9 +130,17 @@ export default {
|
|
|
127
130
|
}
|
|
128
131
|
},
|
|
129
132
|
onInput(val) {
|
|
130
|
-
if (val
|
|
131
|
-
this.
|
|
133
|
+
if (val < 1) {
|
|
134
|
+
this.onSelect(1);
|
|
135
|
+
return;
|
|
132
136
|
}
|
|
137
|
+
|
|
138
|
+
if (val > this.countPagePagination) {
|
|
139
|
+
this.onSelect(this.countPagePagination);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
this.onSelect(Number(val));
|
|
133
144
|
},
|
|
134
145
|
onSelect(page) {
|
|
135
146
|
if (Number.isInteger(page)) {
|
|
@@ -153,7 +164,7 @@ export default {
|
|
|
153
164
|
}
|
|
154
165
|
|
|
155
166
|
if (this.countPagePagination >= 7) {
|
|
156
|
-
if (this.currentPage <= 3 && index <= 5
|
|
167
|
+
if (this.currentPage <= 3 && index <= 5) {
|
|
157
168
|
this.indexSpaceLeft = this.countPagePagination;
|
|
158
169
|
this.indexSpaceRight = null;
|
|
159
170
|
return true;
|