blob: 61bd421c0f956f4b9aa8bda505a99023bf5ff7f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<script setup>
import { computed } from 'vue'
import dayjs from 'dayjs/esm'
import utc from 'dayjs/esm/plugin/utc'
dayjs.extend(utc)
const props = defineProps({
unix: {
type: Number,
default: 0
}
});
// compute hours, minutes and seconds from unix-seconds whenever data changes
const progressTime = computed(() => dayjs.utc(props.unix * 1000).format("HH:mm:ss"));
</script>
<template>
{{ progressTime }}
</template>
<style scoped>
</style>
|