perf(webui): reduce duplicate api calls for components with datatables

This commit is contained in:
Gauthier Roebroeck 2022-02-18 16:35:13 +08:00
parent 50af68ccb8
commit 1a8249732d
4 changed files with 1 additions and 11 deletions

View file

@ -73,9 +73,6 @@ export default Vue.extend({
return headers
},
},
async mounted() {
this.loadData()
},
methods: {
async loadData() {
this.loading = true

View file

@ -68,13 +68,12 @@ export default Vue.extend({
},
deep: true,
},
hash(val) {
hash() {
this.options.page = 1
this.options.sortBy = []
this.options.sortDesc = []
this.elements = []
this.totalElements = 0
this.loadData(val)
},
},
computed: {

View file

@ -77,9 +77,6 @@ export default Vue.extend({
]
},
},
async mounted() {
this.loadBooks()
},
methods: {
async loadBooks() {
this.loading = true

View file

@ -78,9 +78,6 @@ export default Vue.extend({
}))
},
},
async mounted() {
this.loadBooks()
},
methods: {
async loadBooks() {
this.loading = true