Nuxt/test/fixtures/basic/pages/vueuse-head.vue
Daniel Roe c1ddb359e3
chore: update to use @nuxt/eslint-config (#24209)
Co-authored-by: Damian Głowala <damian.glowala.rebkow@gmail.com>
2023-11-09 18:01:13 +01:00

26 lines
483 B
Vue

<script lang="ts" setup>
function useLegacyUseHead () {
useHead({
titleTemplate: '%s - VueUse head polyfill test'
})
}
function useLegacyVueUseHead () {
// get vm
const vm = getCurrentInstance()
const head = vm?.appContext.provides.usehead
head.addHeadObjs({
title: 'using provides usehead and updateDOM'
})
head.updateDOM()
}
useLegacyUseHead()
useLegacyVueUseHead()
</script>
<template>
<div>
<h1>VueUse head polyfill test</h1>
</div>
</template>