$
This commit is contained in:
@@ -76,14 +76,18 @@
|
|||||||
state: {
|
state: {
|
||||||
page: {
|
page: {
|
||||||
curIndex: 0,
|
curIndex: 0,
|
||||||
cat: null,
|
cat: [2],
|
||||||
name: [
|
name: [
|
||||||
"formation",
|
"formation",
|
||||||
"filière de formation",
|
"filière de formation",
|
||||||
"filière de formation détaillée"
|
"filière de formation détaillée"
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
data: null
|
data: []
|
||||||
|
},
|
||||||
|
|
||||||
|
updateCat(category, value) {
|
||||||
|
this.update(this.state.page.cat[category] = value)
|
||||||
},
|
},
|
||||||
|
|
||||||
previousPage(){
|
previousPage(){
|
||||||
@@ -91,7 +95,6 @@
|
|||||||
if(this.state.page.curIndex-1 >= 0) {
|
if(this.state.page.curIndex-1 >= 0) {
|
||||||
this.update({ curIndex: this.state.page.curIndex-- });
|
this.update({ curIndex: this.state.page.curIndex-- });
|
||||||
}
|
}
|
||||||
console.log(this.state.page.curIndex)
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
@@ -102,7 +105,6 @@
|
|||||||
if(this.state.page.curIndex+1 <= 2 ) {
|
if(this.state.page.curIndex+1 <= 2 ) {
|
||||||
this.update({ curIndex: this.state.page.curIndex++ });
|
this.update({ curIndex: this.state.page.curIndex++ });
|
||||||
}
|
}
|
||||||
console.log(this.state.page.curIndex)
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
@@ -121,7 +123,7 @@
|
|||||||
|
|
||||||
onBeforeMount() {
|
onBeforeMount() {
|
||||||
this.getData();
|
this.getData();
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -136,9 +138,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="selector-list-container">
|
<div id="selector-list-container">
|
||||||
<ul id="selector-list">
|
<ul if={ this.state.page.curIndex == 0 } id="selector-list">
|
||||||
<li each={ item in this.state.data } class="selector-list-inner">
|
<li each={ item in this.state.data } class="selector-list-inner">
|
||||||
<a onclick={ nextPage } class="selector-list-names">{ item.name }</a>
|
<a onclick={ nextPage } href={`?option1=${item.name}`} class="selector-list-names">{ item.name }</a>
|
||||||
<span class="selector-list-counts">{ item.count }</span>
|
<span class="selector-list-counts">{ item.count }</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Reference in New Issue
Block a user