head icon indicating copy to clipboard operation
head copied to clipboard

dynamic data for title fetched by created()

Open thehatami opened this issue 2 years ago • 0 comments

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
}
}

thehatami avatar Mar 04 '22 15:03 thehatami