Vue2_Frontend 수정1...
This commit is contained in:
parent
7b1642c0c2
commit
51b6cf9608
@ -82,7 +82,7 @@
|
|||||||
<!-- Row의 Index를 이용한 번호 출력 -->
|
<!-- Row의 Index를 이용한 번호 출력 -->
|
||||||
<template #cell(id)="row">
|
<template #cell(id)="row">
|
||||||
<b-link ref="edit/{{row.item.id}}">
|
<b-link ref="edit/{{row.item.id}}">
|
||||||
{{ total - (currentPage * perPage + row.index) + perPage }}
|
{{ total - (currentPage * perPage + row.index) + perPage }} :
|
||||||
</b-link>
|
</b-link>
|
||||||
</template>
|
</template>
|
||||||
<!-- 제목부분 출력용 -->
|
<!-- 제목부분 출력용 -->
|
||||||
@ -118,7 +118,6 @@
|
|||||||
</b-col>
|
</b-col>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-pagination
|
<b-pagination
|
||||||
v-model="currentPage"
|
|
||||||
:total-rows="total"
|
:total-rows="total"
|
||||||
:per-page="perPage"
|
:per-page="perPage"
|
||||||
@page-click="pageClick"
|
@page-click="pageClick"
|
||||||
@ -126,10 +125,6 @@
|
|||||||
aria-controls="todoTable"
|
aria-controls="todoTable"
|
||||||
class="justify-content-center"
|
class="justify-content-center"
|
||||||
>
|
>
|
||||||
<template #page="{ page, active }">
|
|
||||||
<b v-if="active">{{ page }}</b>
|
|
||||||
<i v-else>{{ page }}</i>
|
|
||||||
</template>
|
|
||||||
</b-pagination>
|
</b-pagination>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col>
|
<b-col>
|
||||||
@ -234,11 +229,11 @@ export default {
|
|||||||
setup: function () {},
|
setup: function () {},
|
||||||
created: function () {},
|
created: function () {},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
this.getDatas()
|
this.getDatas(1)
|
||||||
},
|
},
|
||||||
unmounted() {},
|
unmounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
async getDatas() {
|
async getDatas(page) {
|
||||||
this.isBusy = true
|
this.isBusy = true
|
||||||
const results = await this.callAPI('/todo', {
|
const results = await this.callAPI('/todo', {
|
||||||
params: {
|
params: {
|
||||||
@ -246,7 +241,7 @@ export default {
|
|||||||
sortDirection: this.sortDirection,
|
sortDirection: this.sortDirection,
|
||||||
searchFields: this.searchFields,
|
searchFields: this.searchFields,
|
||||||
search: this.search,
|
search: this.search,
|
||||||
page: this.currentPage,
|
page: page,
|
||||||
perPage: this.perPage
|
perPage: this.perPage
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -259,20 +254,18 @@ export default {
|
|||||||
this.isBusy = false
|
this.isBusy = false
|
||||||
},
|
},
|
||||||
searchClick() {
|
searchClick() {
|
||||||
this.currentPage = 1
|
this.getDatas(1)
|
||||||
this.getDatas()
|
|
||||||
},
|
},
|
||||||
pageClick(bvEvent, page) {
|
pageClick(bvEvent, page) {
|
||||||
console.log(bvEvent)
|
console.log(bvEvent)
|
||||||
this.currentPage = page
|
// this.currentPage = page
|
||||||
this.getDatas()
|
this.getDatas(page)
|
||||||
bvEvent.preventDefault()
|
// bvEvent.preventDefault()
|
||||||
},
|
},
|
||||||
perPageClick(perPage) {
|
perPageClick(perPage) {
|
||||||
this.currentPage = 1
|
|
||||||
this.perPage = perPage
|
this.perPage = perPage
|
||||||
console.log(this.perPage)
|
console.log(this.perPage)
|
||||||
this.getDatas()
|
this.getDatas(1)
|
||||||
},
|
},
|
||||||
busyToggle() {
|
busyToggle() {
|
||||||
this.isBusy = !this.isBusy
|
this.isBusy = !this.isBusy
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user