valaxy 0.8.1 → 0.9.0
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/client/composables/comments/index.ts +2 -1
- package/client/config.ts +11 -0
- package/dist/{chunk-VGABMGJA.js → chunk-6SOT7TNG.js} +206 -206
- package/dist/{chunk-ER6SQ4ZW.mjs → chunk-ORY7PPZG.mjs} +206 -206
- package/dist/node/cli.js +7 -7
- package/dist/node/cli.mjs +7 -7
- package/dist/node/index.d.ts +12 -6
- package/dist/node/index.js +1 -1
- package/dist/node/index.mjs +1 -1
- package/package.json +1 -2
package/client/config.ts
CHANGED
|
@@ -63,6 +63,17 @@ export function useConfig<ThemeConfig = any>() {
|
|
|
63
63
|
return config!
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* You can use like this: import { useThemeConfig } from 'valaxy-theme-xxx'
|
|
68
|
+
* if you want to: import { useThemeConfig } from 'valaxy'
|
|
69
|
+
* you need pass themeConfig by yourself
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
export function useThemeConfig<T = Record<string, any>>() {
|
|
73
|
+
const config = useConfig<T>()
|
|
74
|
+
return computed(() => config!.value.themeConfig)
|
|
75
|
+
}
|
|
76
|
+
|
|
66
77
|
export interface ValaxyData<T = any> {
|
|
67
78
|
page: Ref<PageData>
|
|
68
79
|
theme: Ref<T>
|