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>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { computed, onMounted, ref } from "vue";
|
||||||
import type { entities } from "firefish-js";
|
import type { entities } from "firefish-js";
|
||||||
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
||||||
import PhotoSwipe from "photoswipe";
|
import PhotoSwipe from "photoswipe";
|
||||||
|
@ -207,9 +207,9 @@ const isModule = (file: entities.DriveFile): boolean => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const previewableCount = props.mediaList.filter((media) =>
|
const previewableCount = computed(
|
||||||
previewable(media),
|
() => props.mediaList.filter((media) => previewable(media)).length,
|
||||||
).length;
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in a new issue