Skip to content

Commit

Permalink
docs(migration): slots scope being exposed as "params" instead of "props
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodeleao committed Dec 27, 2022
1 parent 39d86ad commit 97a87e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,20 @@ Vue 3 renamed the `vm.$destroy` to `vm.$unmount`. Vue Test Utils has followed su
Vue 3 united the `slot` and `scoped-slot` syntax under a single syntax, `v-slot`, which you can read about in the [the docs](https://v3.vuejs.org/guide/migration/slots-unification.html#overview). Since `slot` and `scoped-slot` are now merged, the `scopedSlots` mounting option is now deprecated - just use the `slots` mounting option for everything.
### `slots`‘s scope is now exposed as `params`
When using string templates for slot content, if not explicitly defined using a wrapping `<template #slot-name="scopeVar">` tag, slot scope becomes available as a `params` object when the slot is evaluated.
```diff
shallowMount(Component, {
- scopedSlots: {
+ slots: {
- default: '<p>{{props.index}},{{props.text}}</p>'
+ default: '<p>{{params.index}},{{params.text}}</p>'
}
})
````

### `findAll().at()` removed

`findAll()` now returns an array of DOMWrappers.
Expand Down

0 comments on commit 97a87e2

Please sign in to comment.