test(nuxt3): add test case for computed head (#4361)

This commit is contained in:
Daniel Roe 2022-04-14 16:27:31 +01:00 committed by GitHub
parent 5fef9e8db2
commit 3e7d6dafa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,14 @@
<script setup>
const a = ref('')
useHead({
bodyAttrs: {
class: 'body-attrs-test'
},
meta: [{ name: 'description', content: 'first' }]
})
useHead({ charset: 'utf-16', meta: [{ name: 'description', content: 'overriding with an inline useHead call' }] })
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>