fix: use reactive previewableCount
This commit is contained in:
parent
1d0ea11eea
commit
42886f054d
1 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import type { entities } from "firefish-js";
|
||||
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
||||
import PhotoSwipe from "photoswipe";
|
||||
|
@ -207,9 +207,9 @@ const isModule = (file: entities.DriveFile): boolean => {
|
|||
);
|
||||
};
|
||||
|
||||
const previewableCount = props.mediaList.filter((media) =>
|
||||
previewable(media),
|
||||
).length;
|
||||
const previewableCount = computed(
|
||||
() => props.mediaList.filter((media) => previewable(media)).length,
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in a new issue