nice
This commit is contained in:
13
app/meta.ts
Normal file
13
app/meta.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { useSSRContext, toValue, type MaybeRefOrGetter } from 'vue';
|
||||
|
||||
export default function useHead(params: {
|
||||
title: MaybeRefOrGetter<string>,
|
||||
}) {
|
||||
const context = useSSRContext();
|
||||
if (context) {
|
||||
context.meta ??= {
|
||||
title: toValue(params.title),
|
||||
meta: {},
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user