Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[docs]: improve slot scope auto exposing "params" behaviour#1924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@renatodeleao
Copy link
Contributor

@renatodeleaorenatodeleao commentedDec 27, 2022
edited
Loading

Hello again 👋
I had a bunch of specs that rely on the previous VTU1 behaviour, where slot scope was auto-exposed as aprops object for string templates and realised that in VTU2 they are exposed asparams

if(!hasWrappingTemplate){
template=`<template #default="params">${template}</template>`
}

While VTU1 docsmention that behaviour, VTU2 docsdidn'texplicitly do it as the only example provided used an<template #scope="params"> which doesn't document the implicit behaviour if not providing a wrapping<template> tag.

Update both main docs and migration guide, since I believe this is a commonbump in the road while migrating codebases.

As always feel free to edit the writing style and examples to suite the rest of the docs.
Cheers ✌️

https://github.com/vuejs/test-utils/blob/39d86ad5abe71bac8d76c5b82f11f30225cf8673/src/utils/compileSlots.ts#L10The only example provided used an explicit #default="params", but it doesn't mention that if you don't explicitly wrap it, the slot scope becomes also available as params. In VTU1, they were exposed as props, so i think it's better to be explicit about it.
@netlify
Copy link

netlifybot commentedDec 27, 2022
edited
Loading

Deploy Preview forvue-test-utils-docs ready!

NameLink
🔨 Latest commitdfce58e
🔍 Latest deploy loghttps://app.netlify.com/sites/vue-test-utils-docs/deploys/63ab1473388f9e00082d05fd
😎 Deploy Previewhttps://deploy-preview-1924--vue-test-utils-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site settings.

Copy link
Member

@cexbrayatcexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks@renatodeleao 👍

renatodeleao reacted with thumbs up emoji
@cexbrayatcexbrayat merged commit802c7e4 intovuejs:mainDec 28, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cexbrayatcexbrayatcexbrayat approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@renatodeleao@cexbrayat

[8]ページ先頭

©2009-2025 Movatter.jp