pimelon-ui 0.0.104 → 0.0.105
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
CHANGED
|
@@ -33,6 +33,8 @@ export function createListResource(options, vm) {
|
|
|
33
33
|
debug: options.debug || 0,
|
|
34
34
|
originalData: null,
|
|
35
35
|
data: null,
|
|
36
|
+
previous,
|
|
37
|
+
hasPreviousPage: false,
|
|
36
38
|
next,
|
|
37
39
|
hasNextPage: true,
|
|
38
40
|
auto: options.auto,
|
|
@@ -55,6 +57,7 @@ export function createListResource(options, vm) {
|
|
|
55
57
|
}
|
|
56
58
|
},
|
|
57
59
|
onSuccess(data) {
|
|
60
|
+
out.hasPreviousPage = !!out.start
|
|
58
61
|
if (data.length < out.pageLength) {
|
|
59
62
|
out.hasNextPage = false
|
|
60
63
|
}
|
|
@@ -221,6 +224,11 @@ export function createListResource(options, vm) {
|
|
|
221
224
|
out.data = transform(data)
|
|
222
225
|
}
|
|
223
226
|
|
|
227
|
+
function previous() {
|
|
228
|
+
out.start = out.start - out.pageLength
|
|
229
|
+
out.list.fetch()
|
|
230
|
+
}
|
|
231
|
+
|
|
224
232
|
function next() {
|
|
225
233
|
out.start = out.start + out.pageLength
|
|
226
234
|
out.list.fetch()
|