0👍
I believe the issue is because you’re trying to mutate a prop. Try the following instead:
<template>
<textarea
v-model="description"
placeholder="The description for the box"
></textarea>
</template>
<script lang="tsx">
import { Component, Prop, Watch, Vue } from 'vue-property-decorator';
export default class BoxScreen extends Vue {
@Prop() private box!: Box;
description: string;
@Watch('box.description', { immediate: true })
onChangeBoxDescription(): void {
this.description = this.box.description;
}
public created() {
// init box with an Axios request
}
}
</script>
- [Vuejs]-Best approach to save token in vue with laravel sanctum
- [Vuejs]-How to prompt category specified form in vue js
Source:stackexchange.com