mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-04 20:39:28 +00:00
refactor(Paginatino.js): makes the pagionation component responsive on mobile displays
This commit is contained in:
@@ -37,7 +37,8 @@ export default {
|
||||
template: /*html*/ `
|
||||
<h2 >News</h2>
|
||||
<hr/>
|
||||
<pagination :page_size="page_size" @page="loadNewPageContent" :maxPageCount="maxPageCount">
|
||||
<pagination :page_size="page_size" @page="loadNewPageContent" :maxPageCount="maxPageCount">
|
||||
</pagination>
|
||||
<div v-html="content"></div>
|
||||
</pagination>`,
|
||||
`,
|
||||
};
|
||||
|
||||
@@ -23,11 +23,15 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
template: /*html*/ `
|
||||
|
||||
<paginator v-model:rows="page_size" @page="(data)=>$emit('page',{...data, page:data.page+1})" :rows="page_size" :totalRecords="maxPageCount" :rowsPerPageOptions="[10, 20, 30]" ></paginator>
|
||||
<slot>
|
||||
Placeholder
|
||||
</slot>
|
||||
|
||||
<!-- Desktop -->
|
||||
<div class="d-none d-md-block">
|
||||
<paginator v-model:rows="page_size" @page="(data)=>$emit('page',{...data, page:data.page+1})" :rows="page_size" :totalRecords="maxPageCount" :rowsPerPageOptions="[10, 20, 30]" >
|
||||
</paginator>
|
||||
</div>
|
||||
<!-- Mobile -->
|
||||
<div class="d-block d-md-none">
|
||||
<paginator v-model:rows="page_size" @page="(data)=>$emit('page',{...data, page:data.page+1})" :rows="page_size" :totalRecords="maxPageCount" :rowsPerPageOptions="[10, 20, 30]" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink RowsPerPageDropdown">
|
||||
</paginator>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user