mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 06:35:10 +00:00
c1ddb359e3
Co-authored-by: Damian Głowala <damian.glowala.rebkow@gmail.com>
26 lines
483 B
Vue
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>
|