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

226
Views
"Error en la operación de escritura: la propiedad calculada "publicaciones" es de solo lectura"

Intento eliminar la publicación de PostList, pero obtengo un error

 <PostList :posts="sortedAndSearchedPosts" @remove="removePost" v-if="!isPostsLoading" />

eliminar la función de publicación

 removePost(post) { this.posts = this.posts.filter((p) => p.id !== post.id); },

publicaciones inicializadas aquí

 computed: { ...mapState({ posts: (state) => state.post.posts, }), ...mapGetters({ sortedPosts: "post/sortedPosts", sortedAndSearchedPosts: "post/sortedAndSearchedPosts", }), },
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No está claro dónde se configuran inicialmente this.posts . Si adivino bien tu arquitectura, veo 2 opciones para ti:

  • elimine directamente la publicación en su tienda para que sortedAndSearchedPosts refleje el cambio directamente
  • si no desea actualizar el estado global, cree una copia local cuando inicie las posts :
 data () { return { posts: [...this.sortedAndSearchedPosts], ... } },

y actualice su código para usar la lista local de publicaciones:

 <PostList :posts="posts" ... />

¡Espero que esto ayude!

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!