mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-08-31 12:01:15 +00:00
33 lines
557 B
Vue
33 lines
557 B
Vue
<template>
|
|
<span>{{ displayText }}</span>
|
|
</template>
|
|
|
|
<script>
|
|
import dayjs from "dayjs";
|
|
import relativeTime from "dayjs/plugin/relativeTime"
|
|
import utc from 'dayjs/plugin/utc'
|
|
import timezone from 'dayjs/plugin/timezone' // dependent on utc plugin
|
|
dayjs.extend(utc)
|
|
dayjs.extend(timezone)
|
|
dayjs.extend(relativeTime)
|
|
|
|
export default {
|
|
props: {
|
|
value: String,
|
|
},
|
|
|
|
computed: {
|
|
displayText() {
|
|
|
|
console.log(dayjs.tz.guess())
|
|
|
|
return this.value
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|