head
head copied to clipboard
dynamic data for title fetched by created()
how can i set my title after data fetched by created() in vue3. my structure is:
data () {
return {
article: null,
}
},
setup() {
const siteData = reactive({
title: this.article.title
})
useHead({
title: computed(() => _title??_)
})
},
async created () {
query({})
.then () = {
this.article = data.articleByID
}
}