Skip to content

Commit

Permalink
fix: pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
Xelzs committed Mar 6, 2024
1 parent 5fb2994 commit fd2cc59
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.20.3 - 2024-03-06

- ADDED
- REMOVED
- IMPROVED
- BUGFIXES
- Pagination `v-model` not working properly

# 0.20.2 - 2023-07-06

- ADDED
Expand Down
8 changes: 8 additions & 0 deletions dev/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@

<div class="mt-5"></div>

<ax-pagination v-model="pagination" :max-visible="5" :per-page="15" :total="100"></ax-pagination>

<div class="mt-5"></div>

<ax-tab
v-model="currentTab"
class="shadow-1"
Expand Down Expand Up @@ -365,6 +369,7 @@ export default {
tableTotal: 20,
radio: 'Yes',
checked: true,
pagination: 2,
items: ['Voiture', 'Moto', 'Bus', 'Velo', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
// items: [],
// items: [
Expand Down Expand Up @@ -546,6 +551,9 @@ export default {
multipleSelectedValue(val) {
console.log('multipleSelectedValue', val);
},
pagination(val) {
console.log('pagination', val);
},
},
methods: {
selectAll(toggle) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axentix/vue",
"version": "0.20.2",
"version": "0.20.3",
"description": "Vue Axentix is the Axentix integration for the VueJS framework.",
"license": "MIT",
"author": "Axel SIMONET, Vincent LEVEQUE",
Expand Down Expand Up @@ -78,4 +78,4 @@
"optional": true
}
}
}
}
2 changes: 1 addition & 1 deletion src/components/pagination/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
setup(props, ctx) {
const pageCount = ref(Math.ceil(props.total / props.perPage)),
vmodel = toRefs(props)[getVModelKey()],
current = ref(1);
current = ref(vmodel.value || 1);
let shownCount = 1,
rest = 0;
Expand Down

0 comments on commit fd2cc59

Please sign in to comment.