mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
33 lines
633 B
Vue
33 lines
633 B
Vue
<script setup>
|
|
const a = ref('')
|
|
useHead({
|
|
bodyAttrs: {
|
|
class: 'body-attrs-test'
|
|
},
|
|
meta: [{ name: 'description', content: 'first' }]
|
|
})
|
|
useHead({ charset: 'utf-16', meta: [{ name: 'description', content: computed(() => `${a.value} with an inline useHead call`) }] })
|
|
useMeta({ script: [{ children: 'console.log("works with useMeta too")' }] })
|
|
a.value = 'overriding'
|
|
</script>
|
|
|
|
<script>
|
|
export default {
|
|
head () {
|
|
return {
|
|
htmlAttrs: {
|
|
class: 'html-attrs-test'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<Head>
|
|
<Title>Using a dynamic component</Title>
|
|
</Head>
|
|
</div>
|
|
</template>
|