mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 13:48:13 +00:00
test(nuxt3): add test case for computed head (#4361)
This commit is contained in:
parent
5fef9e8db2
commit
3e7d6dafa1
4
test/fixtures/basic/pages/head.vue
vendored
4
test/fixtures/basic/pages/head.vue
vendored
@ -1,12 +1,14 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
const a = ref('')
|
||||||
useHead({
|
useHead({
|
||||||
bodyAttrs: {
|
bodyAttrs: {
|
||||||
class: 'body-attrs-test'
|
class: 'body-attrs-test'
|
||||||
},
|
},
|
||||||
meta: [{ name: 'description', content: 'first' }]
|
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")' }] })
|
useMeta({ script: [{ children: 'console.log("works with useMeta too")' }] })
|
||||||
|
a.value = 'overriding'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
Reference in New Issue
Block a user