ince 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: "adRotbotForm" found in ---> <AddDialog> at
时间: 2024-01-10 22:05:07 浏览: 109
This warning message is related to Vue.js framework and it means that you are trying to directly mutate a prop value in a child component. This is not allowed in Vue.js because props are meant to be read-only.
To fix this issue, you should create a copy of the prop value in the child component's data or computed property and mutate that copy instead of the original prop. This way, the changes made in the child component will not affect the original prop value in the parent component.
For example, instead of directly using the prop value in your child component like this:
```
<template>
<div>
{{ adRotbotForm }}
</div>
</template>
<script>
export default {
props: {
adRotbotForm: Object
}
}
</script>
```
You should create a copy of the prop value in the child component's data or computed property like this:
```
<template>
<div>
{{ adRotbotFormCopy }}
</div>
</template>
<script>
export default {
props: {
adRotbotForm: Object
},
data() {
return {
adRotbotFormCopy: this.adRotbotForm
}
}
}
</script>
```
Then, you can safely mutate the `adRotbotFormCopy` in the child component without affecting the original prop value in the parent component.
阅读全文