Vue.js Computed Property Warning: "organInfo" Has No Setter
This warning indicates that you have a computed property named "organInfo" in your Home.vue component, but you haven't defined a setter method for it. Computed properties are read-only by default. To assign a new value, you need to define a setter. You can either remove the assignment to "organInfo" if it shouldn't be changed or define a setter method. Here's how to define a setter: javascript computed: { organInfo: { get() { // Calculate and return the value of organInfo // ... }, set(value) { // Update the value of organInfo based on the new value // ... } } } By defining the setter, you can now assign a new value to "organInfo" without the warning.
原文地址: https://www.cveoy.top/t/topic/qbnQ 著作权归作者所有。请勿转载和采集!