valaxy-theme-yun 0.14.12 → 0.14.13
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.
- package/components/YunPostList.vue +5 -5
- package/layouts/home.vue +2 -1
- package/package.json +2 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import { computed
|
3
|
-
import { useSiteStore } from 'valaxy'
|
4
|
-
import type { Post } from 'valaxy'
|
2
|
+
import { computed } from 'vue'
|
3
|
+
import { useSiteConfig, useSiteStore } from 'valaxy'
|
4
|
+
import type { Post } from 'valaxy/types'
|
5
5
|
|
6
6
|
const props = withDefaults(defineProps<{
|
7
7
|
type?: string
|
@@ -12,8 +12,8 @@ const props = withDefaults(defineProps<{
|
|
12
12
|
})
|
13
13
|
|
14
14
|
const site = useSiteStore()
|
15
|
-
|
16
|
-
const pageSize =
|
15
|
+
const siteConfig = useSiteConfig()
|
16
|
+
const pageSize = computed(() => siteConfig.value.pageSize)
|
17
17
|
|
18
18
|
const posts = computed(() => props.posts || site.postList)
|
19
19
|
const displayedPosts = computed(() => posts.value.slice((props.curPage - 1) * pageSize.value, props.curPage * pageSize.value))
|
package/layouts/home.vue
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { useAppStore, useLayout } from 'valaxy'
|
3
|
+
import { computed } from 'vue'
|
3
4
|
import { useRoute } from 'vue-router'
|
4
5
|
import { useThemeConfig } from '../composables'
|
5
6
|
|
@@ -8,7 +9,7 @@ const isHome = useLayout('home')
|
|
8
9
|
const themeConfig = useThemeConfig()
|
9
10
|
|
10
11
|
const route = useRoute()
|
11
|
-
const isPage = route.path.startsWith('/page')
|
12
|
+
const isPage = computed(() => route.path.startsWith('/page'))
|
12
13
|
</script>
|
13
14
|
|
14
15
|
<template>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.14.
|
3
|
+
"version": "0.14.13",
|
4
4
|
"author": {
|
5
5
|
"email": "me@yunyoujun.cn",
|
6
6
|
"name": "YunYouJun",
|
@@ -22,6 +22,6 @@
|
|
22
22
|
"valaxy-addon-waline": "0.1.0"
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
|
-
"valaxy": "0.14.
|
25
|
+
"valaxy": "0.14.13"
|
26
26
|
}
|
27
27
|
}
|