mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
Fix issues from FilePreview v0.2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="filteredFiles.length > 1">
|
||||
<chevron-left-icon
|
||||
class="prev"
|
||||
@click.prevent="prev"
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
<script>
|
||||
import { events } from '@/bus';
|
||||
import { mapGetters } from "vuex";
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from 'vue-feather-icons';
|
||||
|
||||
export default {
|
||||
@@ -23,6 +24,19 @@ export default {
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["fileInfoDetail", "data"]),
|
||||
|
||||
filteredFiles() {
|
||||
let filteredData = []
|
||||
this.data.filter((element) => {
|
||||
if (element.type == this.fileInfoDetail.type) {
|
||||
filteredData.push(element);
|
||||
}
|
||||
});
|
||||
return filteredData
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
next: function() {
|
||||
@@ -59,9 +73,11 @@ export default {
|
||||
}
|
||||
.next {
|
||||
right: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.prev {
|
||||
left: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
Reference in New Issue
Block a user