|
|
@ -5,39 +5,29 @@
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineComponent, ref, computed, onMounted } from 'vue'
|
|
|
|
import { ref, computed, onMounted } from 'vue'
|
|
|
|
import { useSiteDataByRoute, usePageData } from 'vitepress'
|
|
|
|
import { useSiteDataByRoute, usePageData } from 'vitepress'
|
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
const site = useSiteDataByRoute()
|
|
|
|
setup() {
|
|
|
|
const page = usePageData()
|
|
|
|
const site = useSiteDataByRoute()
|
|
|
|
|
|
|
|
const page = usePageData()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const datetime = ref('')
|
|
|
|
const datetime = ref('')
|
|
|
|
|
|
|
|
|
|
|
|
const hasLastUpdated = computed(() => {
|
|
|
|
const hasLastUpdated = computed(() => {
|
|
|
|
const lu = site.value.themeConfig.lastUpdated
|
|
|
|
const lu = site.value.themeConfig.lastUpdated
|
|
|
|
|
|
|
|
|
|
|
|
return lu !== undefined && lu !== false
|
|
|
|
return lu !== undefined && lu !== false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const prefix = computed(() => {
|
|
|
|
|
|
|
|
const p = site.value.themeConfig.lastUpdated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return p === true ? 'Last Updated' : p
|
|
|
|
const prefix = computed(() => {
|
|
|
|
})
|
|
|
|
const p = site.value.themeConfig.lastUpdated
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
return p === true ? 'Last Updated' : p
|
|
|
|
datetime.value = new Date(page.value.lastUpdated).toLocaleString('en-US')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
onMounted(() => {
|
|
|
|
hasLastUpdated,
|
|
|
|
datetime.value = new Date(page.value.lastUpdated).toLocaleString('en-US')
|
|
|
|
prefix,
|
|
|
|
|
|
|
|
datetime
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|