You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
32 lines
555 B
Vue
32 lines
555 B
Vue
<template>
|
|
<button @click="action" :aria-label="label" :title="label" class="action">
|
|
<i class="material-icons">{{ icon }}</i>
|
|
<span>{{ label }}</span>
|
|
<span v-if="counter > 0" class="counter">{{ counter }}</span>
|
|
</button>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'action',
|
|
props: [
|
|
'icon',
|
|
'label',
|
|
'counter',
|
|
'show'
|
|
],
|
|
methods: {
|
|
action: function () {
|
|
if (this.show) {
|
|
this.$store.commit('showHover', this.show)
|
|
}
|
|
|
|
this.$emit('action')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style> |