3.0.4
Reproduction linkhttps://jsfiddle.net/6k3nod2c/
Steps to reproduceCreate a component / app with a mixin that adds to this.$options.computed
.
const mixin = { beforeCreate() { if (!this.$options.computed) { this.$options.computed = {}; } this.$options.computed.value = () => { return 'works'; } } } Vue.createApp({ mixins: [mixin], // computed: {} // Uncommenting this line makes it work }).mount('#app')What is expected?
Expect this.value
to be "works"
.
this.value
is undefined
.
In vue 2 this worked.
In vue 3 this only works if the computed
option is already defined.
lovetingyuan, SeregPie and valq7711
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4