A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue-next/issues/3566 below:

Mixins are not merged correctly for built-in options in `this.$options` · Issue #3566 · vuejs/core · GitHub

Version

3.0.11

Reproduction link

SFC Playground

Steps to reproduce

Define a component with options API:

{
  mixins: [
    { computed: { bar: () => 2 } }
  ],
  computed: {
    foo: () => 1
  }
}
What is expected?

this.$options.computed should contain both foo and bar as keys:

this.$options.computed // { foo: () => 1, bar: () => 2 }
What is actually happening?
this.$options.computed // { foo: () => 1 }

It seems to affect all built-in options: https://github.com/vuejs/vue-next/blob/870f2a7ba35245fd8c008d2ff666ea130a7e4704/packages/runtime-core/src/componentOptions.ts#L973

This also makes Devtools unable to show data/computed/... defined in mixins as it relies on this.$options.


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