Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

361
Visualizações
This expression is not callable. Type 'Boolean' has no call signatures. Error in Vue3 computed property

I am trying to create a computed property where it checks item is in the array. So i created this function that returns boolean value and takes one parameter which is the item i will check.

isSelected: function (item: MediaGalleryItemTypes) {
  return this.selectedItems.some(e => e._id === item._id)
}

In the template section i have to send the variable to another component, here is how i use it

 DocumentCard(:is-selected="isSelected(document)")

The code gives error as

chunk-common.js:5918 Uncaught (in promise) TypeError: _ctx.isSelected is not a function

and in vscode it gives the error as:

This expression is not callable. Type 'Boolean' has no call signatures.

How can i fix this and make a computed property to get a parameter?

about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

You can't pass parameters to computed properties (unless the computed return a function). You can use with the standard method

Can I pass parameters in computed properties in Vue.Js

about 4 years ago · Santiago Gelvez Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda