This commit is contained in:
2020-11-04 17:01:07 +00:00
parent 7f982fc4b8
commit 98ac083107
4 changed files with 16 additions and 13 deletions

View File

@@ -2,8 +2,8 @@
<v-sheet color="white" elevation="4" height="300px" style="overflow: hidden;">
<slot name="dash-title">
<v-toolbar flat dense>
<template v-if="hasMoreUrl">
<v-btn text icon :to="moreUrl">
<template v-if="showMoreButton">
<v-btn text icon @click="$emit('dash-more-click', id)">
<template v-if="count > 0">
<v-badge overlap>
<template v-slot:badge>
@@ -30,7 +30,7 @@
<v-icon class="mr-4">{{ icon }}</v-icon>
</template>
</template>
<v-toolbar-title> {{ title }}</v-toolbar-title>
<v-toolbar-title> {{ translatedTitle }} </v-toolbar-title>
<v-spacer></v-spacer>
@@ -131,7 +131,7 @@ export default {
required: true
},
title: String,
moreUrl: String,
showMoreButton: { type: Boolean, default: false },
addUrl: String,
count: { type: Number, default: 0 },
updateFrequency: { type: Number, default: 60000 },
@@ -150,11 +150,11 @@ export default {
clearInterval(this.timer);
},
computed: {
hasMoreUrl: function() {
return this.moreUrl && this.moreUrl != "";
},
hasAddUrl: function() {
return this.addUrl && this.addUrl != "";
},
translatedTitle() {
return this.$ay.t(this.title);
}
},
methods: {