composition-api
composition-api copied to clipboard
fix: computed property write operation warning on just page component
🐛 The bug
I got this warning on just page component.
🛠️ To reproduce Steps to reproduce the behavior:
If define a computed property like this (array manipulate: map, find, filter etc):
const myComputed = computed(() => {
return [{ item: 'a' }, { item: 'b' }].map(item => item);
});
return { myComputed }
If not return in the setup() function, then not show the warning message....
ℹ️ Additional context In the options API, that working fine.