hardlounge/client/components/LinkPreviewFileSize.vue

23 lines
423 B
Vue
Raw Normal View History

2019-08-09 20:20:08 +00:00
<template>
<span class="preview-size">({{ previewSize }})</span>
</template>
<script lang="ts">
import {defineComponent} from "vue";
import friendlysize from "../js/helpers/friendlysize";
2019-08-09 20:20:08 +00:00
export default defineComponent({
2019-08-09 20:20:08 +00:00
name: "LinkPreviewFileSize",
props: {
size: {type: Number, required: true},
2019-08-09 20:20:08 +00:00
},
setup(props) {
const previewSize = friendlysize(props.size);
return {
previewSize,
};
2019-08-09 20:20:08 +00:00
},
});
2019-08-09 20:20:08 +00:00
</script>