Commit 4d8314ae authored by Regis's avatar Regis

move last to computed

parent 0c15bbad
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
((gl) => { ((gl) => {
gl.VueGlPagination = Vue.extend({ gl.VueGlPagination = Vue.extend({
data() {
return {
last: Math.ceil(+this.count / 5),
};
},
props: [ props: [
'changepage', 'changepage',
'pages', 'pages',
...@@ -21,6 +16,9 @@ ...@@ -21,6 +16,9 @@
}, },
}, },
computed: { computed: {
last() {
return Math.ceil(+this.count / 5)
},
lastpage() { lastpage() {
return `pipelines?p=${this.last}`; return `pipelines?p=${this.last}`;
}, },
...@@ -38,10 +36,7 @@ ...@@ -38,10 +36,7 @@
}, },
template: ` template: `
<div class="gl-pagination"> <div class="gl-pagination">
<ul <ul class="pagination clearfix" v-for='n in upcount'>
class="pagination clearfix"
v-for='n in upcount'
>
<li class="prev disabled" v-if='n === 1'> <li class="prev disabled" v-if='n === 1'>
<span>Prev</span> <span>Prev</span>
</li> </li>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment