valaxy-theme-press 0.22.13 → 0.22.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,10 +3,11 @@ import { useData } from 'valaxy'
|
|
|
3
3
|
import { computed, onMounted, ref, watchEffect } from 'vue'
|
|
4
4
|
import { useI18n } from 'vue-i18n'
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const { t } = useI18n()
|
|
7
|
+
const { page } = useData()
|
|
7
8
|
|
|
8
|
-
const date = computed(() => new Date(
|
|
9
|
-
const isoDatetime = computed(() => date.value
|
|
9
|
+
const date = computed(() => new Date(page.value.lastUpdated!))
|
|
10
|
+
const isoDatetime = computed(() => date.value?.toISOString())
|
|
10
11
|
const datetime = ref('')
|
|
11
12
|
|
|
12
13
|
// set time on mounted hook because the locale string might be different
|
|
@@ -17,7 +18,6 @@ onMounted(() => {
|
|
|
17
18
|
datetime.value = date.value.toLocaleString(window.navigator.language)
|
|
18
19
|
})
|
|
19
20
|
})
|
|
20
|
-
const { t } = useI18n()
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
package/composables/index.ts
CHANGED
|
@@ -4,10 +4,11 @@ import { useThemeConfig } from '.'
|
|
|
4
4
|
|
|
5
5
|
export function useEditLink() {
|
|
6
6
|
const themeConfig = useThemeConfig()
|
|
7
|
+
const { page } = useData()
|
|
8
|
+
|
|
7
9
|
return computed(() => {
|
|
8
10
|
const { text, pattern } = themeConfig.value.editLink || {}
|
|
9
|
-
const
|
|
10
|
-
const url = pattern.replace(/:path/g, relativePath)
|
|
11
|
+
const url = pattern.replace(/:path/g, page.value.relativePath)
|
|
11
12
|
|
|
12
13
|
return { url, text }
|
|
13
14
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy-theme-press",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.14",
|
|
4
4
|
"description": "Docs Theme for Valaxy",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "me@yunyoujun.cn",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"@docsearch/js": "^3.9.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"valaxy": "0.22.
|
|
29
|
+
"valaxy": "0.22.14"
|
|
30
30
|
}
|
|
31
31
|
}
|