Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
Vue metaInfo indefinido en el reloj

Estoy insertando la lógica vue-meta dentro del código actual y parece haber un problema de que metaInfo aún no está disponible cuando se activa el watch .

 export default { metaInfo () { return { title: this.title, meta: [], } }, watch: { article() { if (this.article) { this.generatedHtml = this.applySnippets(); } }, }, computed: { article() { return this.$store.getters.CONTENT; }, title() { if (this.article !== null) { return this.article.info.caption; } return ''; }, } created() { this.$store.commit('CLEAR_CONTENT'); this.$store.dispatch('FETCH_CONTENT', { slug: this.slug, component: this }); }, methods: { applySnippets() { if (!this.article.snippets || this.article.snippets.length === 0) { return this.article.data.content; } this.article.snippets.forEach(snippet => { if (snippet.type === 'meta') this.metaInfo.meta.push(snippet.object); }); },

Falla que this.metaInfo no esté definido durante esta fase del ciclo de vida de Vue. ¿Qué hacer?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Para acceder al resultado de metaInfo en la API de opciones, use this.$metaInfo (tenga en cuenta el prefijo $ ):

 if (snippet.type === 'meta') this.$metaInfo.meta.push(snippet.object); 👆

manifestación

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!