mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add next button to initialList
This commit is contained in:
parent
85d0297946
commit
200b6f265b
1 changed files with 35 additions and 0 deletions
|
|
@ -208,6 +208,28 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<nav
|
||||||
|
v-if="showingInitialList"
|
||||||
|
class="pagination w-full flex justify-center"
|
||||||
|
>
|
||||||
|
<LinkButton
|
||||||
|
v-if="nextPageUrl"
|
||||||
|
:href="nextPageUrl"
|
||||||
|
|
||||||
|
class="border-2 border-gray-700 bg-dark hover:bg-darkest hover:border-white hover:border-opacity-50"
|
||||||
|
>
|
||||||
|
<span>Next</span>
|
||||||
|
|
||||||
|
<svg
|
||||||
|
class="h-5 w-5 -mr-2"
|
||||||
|
viewBox="0 0 20 20"
|
||||||
|
fill="currentColor"
|
||||||
|
>
|
||||||
|
<use href="#chevron-right" />
|
||||||
|
</svg>
|
||||||
|
</LinkButton>
|
||||||
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -311,6 +333,9 @@ export default {
|
||||||
hasSearchInputText () {
|
hasSearchInputText () {
|
||||||
return this.query.length > 0
|
return this.query.length > 0
|
||||||
},
|
},
|
||||||
|
showingInitialList () {
|
||||||
|
return !this.hasSearchInputText
|
||||||
|
},
|
||||||
queryParts () {
|
queryParts () {
|
||||||
return this.query.split(/\s+/).filter(part => part.length > 0)
|
return this.query.split(/\s+/).filter(part => part.length > 0)
|
||||||
},
|
},
|
||||||
|
|
@ -324,6 +349,16 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
},
|
||||||
|
nextPageUrl () {
|
||||||
|
if ( this.kindPage.nextPage.length === 0 ) return null
|
||||||
|
|
||||||
|
return this.kindPage.nextPage
|
||||||
|
},
|
||||||
|
previousPageUrl () {
|
||||||
|
if ( this.kindPage.previousPage.length === 0 ) return null
|
||||||
|
|
||||||
|
return this.kindPage.previousPage
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue