Typeerror: Cannot read Property '_wrapper' of Undefined

Asked

Viewed 27 times

1

I am trying to send data via Emit to the parent component with the data to update my chart data, however the console gave this title error

child component:

  refreshDados (){
      var params = {};
      for (var key in this.filters) {
        if (this.filters.hasOwnProperty(key)) {
          if (
            this.filters[key] == 0 ||
            this.filters[key] == false ||
            (this.filters[key] && this.filters[key] !== '')
          ) {
            params[key] = mapFilter(this.filters[key]);
          }
        }
      }
      this.$axios.get("/Operacional/SearchGraficos", {params: {...params, arrayFormat: 'repeat'}})
        .then(res => { 
            this.dadosgrafico = res.data
            console.log(this.dadosgrafico)
            this.$emit('refreshData', this.dadosgrafico);
          })
        .catch(err => {
      });
 },

html tags

  <table class="data-table-2" style="min-width: 800px">
     <graficos v-if=" url == 'OrdemServico'"/>
     <data-graf ref="graficos" @refreshData="getRefreshdata"/>
  </table>

parent component:

 methods: {
   getRefreshdata(res){
       if(res){
         this.data = res;
         this.$refs.chart1.updateSeries([{
            name: 'NO PRAZO',
            data: [this.dados.noPrazo, this.dados.emDia, this.dados.atrasadas]
        }])
      }  
   },

error:

inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.