[Vuejs]-Prop value not changing in child

0👍

The value is being copied into the local data object when the component is first created, but it is never being updated. It looks like you can skip that data object entirely though and use the prop directly:

<template>
     <v-card>
  <v-card-title class="headline red lighten-2" >
  Oh No 
  </v-card-title>
   <v-card-text>

         <b> {{err}} </b>
   </v-card-text>

     <v-card-actions>
          <v-spacer></v-spacer>

            <v-btn color="#9da4cf" text @click="cancel">Ok</v-btn>

        </v-card-actions>

  </v-card>
</template>


<script>
export default {

    props:{
      err:{
        type: String,
        required: true,
      }
    },

    methods:{
      cancel(){
        this.$emit('cancel-ErrorDialog');
      }
    }

}
</script>

Leave a comment