Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
9eed507d
Commit
9eed507d
authored
Dec 15, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add examples of what the props need to be
parent
40f43312
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
app/assets/javascripts/vue_pagination/index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+35
-0
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
9eed507d
...
@@ -13,10 +13,45 @@
...
@@ -13,10 +13,45 @@
gl.VueGlPagination = Vue.extend({
gl.VueGlPagination = Vue.extend({
props: {
props: {
/**
This function will take the information given by the pagination component
And make a new API call from the parent
Here is an example `change` method:
change(pagenum, apiScope) {
window.history.pushState({}, null, `?scope=${apiScope}&p=${pagenum}`);
clearInterval(this.timeLoopInterval);
this.pageRequest = true;
this.store.fetchDataLoop.call(this, Vue, pagenum, this.scope, apiScope);
},
*/
change: {
change: {
type: Function,
type: Function,
required: true,
required: true,
},
},
/**
pageInfo will come from the headers of the API call
in the `.then` clause of the VueResource API call
there should be a function that contructs the pageInfo for this component
This is an example:
const pageInfo = (headers) => {
const values = {};
values.perPage = +headers['X-Per-Page'];
values.page = +headers['X-Page'];
values.total = +headers['X-Total'];
values.totalPages = +headers['X-Total-Pages'];
values.nextPage = +headers['X-Next-Page'];
values.previousPage = +headers['X-Prev-Page'];
return values;
};
*/
pageInfo: {
pageInfo: {
type: Object,
type: Object,
required: true,
required: true,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment