How to fix Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "show" problem?
my SnackbarComponent.vue:
<template>
<v-snackbar
v-model="show"
:top="pinY === 'top'"
:right="pinX === 'right'"
:bottom="pinY === 'bottom'"
:left="pinX === 'left'"
:color="variant"
:timeout="timeout"
:vertical="mode === 'vertical'"
:multi-line="mode === 'multi-line'"
>
{{ message }}
<v-btn fab @click="show = false" color="transparent" depressed>
close
</v-btn>
</v-snackbar>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
required: true,
default: false
},
},
data() {
return {
}
}
}
</script>