Nuxt/test/fixtures/basic/pages/vueuse-head.vue
2023-03-08 07:32:24 -08:00

25 lines
482 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>