Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit780a9eb

Browse files
committed
📝 fix props (component/Pagination)
사이트를 참고하면서 `coerce` PropOption을 사용했었는데,Vue 1.x에서 사용하던 옵션으로 이제는 사용되지 않아서 제거함.
1 parent6c6e923 commit780a9eb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/components/menus/Pagination.vue‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ export default {
2929
// Visible Pages
3030
visiblePages: {
3131
type:Number,
32-
default:5,
33-
coerce:val=>parseInt(val)
32+
default:5
3433
}
3534
},
3635
computed: {
37-
lastPage() {
36+
lastPage() {
3837
if (this.totalPages) {
3938
returnthis.totalPages
4039
}else {
@@ -43,11 +42,12 @@ export default {
4342
:Math.floor(this.totalItems/this.itemsPerPage)+1
4443
}
4544
},
46-
paginationRange() {
45+
paginationRange() {
4746
constpage=this.lastPage-this.visiblePages+1
4847
conststart=
4948
this.currentPage-this.visiblePages/2<=0
50-
?1:this.currentPage+this.visiblePages/2>this.lastPage
49+
?1
50+
:this.currentPage+this.visiblePages/2>this.lastPage
5151
? page>=1? page:1
5252
:Math.ceil(this.currentPage-this.visiblePages/2)
5353

‎src/pages/menus/Pagination.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</template>
99

1010
<sample>
11-
<pagination:current-page="curPage":total-pages="6"@page-changed="pageChanged"visiblePages="10"></pagination>
11+
<pagination:current-page="curPage":total-pages="6"@page-changed="pageChanged":visiblePages="10"></pagination>
1212
</sample>
1313

1414
<template slot="examples">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp