How is the "..." in nested activation actually working? (Vuetify)
Firstly, this is a JavaScript construct, not a Vue construct.
Consider the following, where tooltip
and menu
are both objects:
const obj = { ...tooltip, ...menu }
This creates a new object. The properties of tooltip
are copied across and then the properties of menu
. The net result is that it merges the two objects into a new object. Properties from menu
take precedence over those from tooltip
if they share the same name.
Contrast that with this:
const obj = { tooltip, menu }
That would just be a shorthand for this:
const obj = { tooltip: tooltip, menu: menu }
We're still creating a new object but this time it just has two properties, called tooltip
and menu
. The original two objects are used as the values for those properties.
The v-on
in your example works exactly the same way.