Compare commits
2 Commits
409ad85356
...
51b6cf9608
| Author | SHA1 | Date | |
|---|---|---|---|
| 51b6cf9608 | |||
| 7b1642c0c2 |
@ -82,7 +82,7 @@
|
||||
<!-- Row의 Index를 이용한 번호 출력 -->
|
||||
<template #cell(id)="row">
|
||||
<b-link ref="edit/{{row.item.id}}">
|
||||
{{ total - (currentPage * perPage + row.index) + perPage }}
|
||||
{{ total - (currentPage * perPage + row.index) + perPage }} :
|
||||
</b-link>
|
||||
</template>
|
||||
<!-- 제목부분 출력용 -->
|
||||
@ -117,17 +117,15 @@
|
||||
<p>{{ selectedRows }}</p>
|
||||
</b-col>
|
||||
<b-col>
|
||||
<template>
|
||||
<b-pagination
|
||||
v-model="currentPage"
|
||||
:total-rows="total"
|
||||
:per-page="perPage"
|
||||
@page-click="pageClick"
|
||||
aria-controls="todoTable"
|
||||
size="lg"
|
||||
class="justify-content-center"
|
||||
></b-pagination>
|
||||
</template>
|
||||
<b-pagination
|
||||
:total-rows="total"
|
||||
:per-page="perPage"
|
||||
@page-click="pageClick"
|
||||
last-number
|
||||
aria-controls="todoTable"
|
||||
class="justify-content-center"
|
||||
>
|
||||
</b-pagination>
|
||||
</b-col>
|
||||
<b-col>
|
||||
<b-input-group class="justify-content-end">
|
||||
@ -231,11 +229,11 @@ export default {
|
||||
setup: function () {},
|
||||
created: function () {},
|
||||
mounted: function () {
|
||||
this.getDatas()
|
||||
this.getDatas(1)
|
||||
},
|
||||
unmounted() {},
|
||||
methods: {
|
||||
async getDatas() {
|
||||
async getDatas(page) {
|
||||
this.isBusy = true
|
||||
const results = await this.callAPI('/todo', {
|
||||
params: {
|
||||
@ -243,7 +241,7 @@ export default {
|
||||
sortDirection: this.sortDirection,
|
||||
searchFields: this.searchFields,
|
||||
search: this.search,
|
||||
page: this.currentPage,
|
||||
page: page,
|
||||
perPage: this.perPage
|
||||
}
|
||||
})
|
||||
@ -256,20 +254,18 @@ export default {
|
||||
this.isBusy = false
|
||||
},
|
||||
searchClick() {
|
||||
this.currentPage = 1
|
||||
this.getDatas()
|
||||
this.getDatas(1)
|
||||
},
|
||||
pageClick(bvEvent, page) {
|
||||
console.log(bvEvent)
|
||||
this.currentPage = page
|
||||
this.getDatas()
|
||||
bvEvent.preventDefault()
|
||||
// this.currentPage = page
|
||||
this.getDatas(page)
|
||||
// bvEvent.preventDefault()
|
||||
},
|
||||
perPageClick(perPage) {
|
||||
this.currentPage = 1
|
||||
this.perPage = perPage
|
||||
console.log(this.perPage)
|
||||
this.getDatas()
|
||||
this.getDatas(1)
|
||||
},
|
||||
busyToggle() {
|
||||
this.isBusy = !this.isBusy
|
||||
|
||||
Loading…
Reference in New Issue
Block a user