fixed admin refresh button with loading

This commit is contained in:
lonetrinity
2018-07-19 10:11:31 +08:00
parent 31ee05cbe9
commit 37fdf32af1
3 changed files with 91 additions and 49 deletions
+11 -3
View File
@@ -1,7 +1,11 @@
<template>
<div>
<div align="right">
<el-button icon="el-icon-refresh" type="primary" size="mini" @click="RefreshBooking()">Refresh</el-button></div>
<el-button :loading="loading_btn" type="primary" size="mini" @click="RefreshBooking()">Refresh</el-button>
</div>
<!-- Booking Table -->
<el-row :gutter="20">
<div>
@@ -58,7 +62,9 @@ export default {
status: null,
bookingTable: [
],
url: 'api/admin/booking',
url: 'api/admin/booking',
loading_btn: false,
}
},
mounted () {
@@ -67,9 +73,11 @@ export default {
methods: {
RefreshBooking() {
let $this = this
this.loading_btn = true
axios.get(this.url).then(response => {
this.loading_btn = false;
this.bookingTable = response.data
console.log(this.bookingTable);
console.log(this.bookingTable)
})
},
filterTag (value, row) {