Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Props destructure with rest operator doesn't seem to work on 3.5.0-alpha.2 #10885

Closed
ByScripts opened this issue May 7, 2024 · 0 comments · Fixed by #10888
Closed

Props destructure with rest operator doesn't seem to work on 3.5.0-alpha.2 #10885

ByScripts opened this issue May 7, 2024 · 0 comments · Fixed by #10888
Labels
🐞 bug Something isn't working scope: script-setup

Comments

@ByScripts
Copy link

Vue version

3.5.0-alpha.2

Link to minimal reproduction

https://play.vuejs.org/#eNqVUk1P4zAQ/SsjX2ilrrvaai/dtBJddaXlAAg4WkImnaQBx7Zsp1Sq8t+ZSQkEBEjc7Hlvvt6bgzj1Xu4aFHORJay90QmXymZ/Xe2hcG6hxKkScKcDvVb0mjI6HVDpG/NQ+QRG25JYKRItYmo8oVXtXUhwLBdcDSdyyh/uefKHSx2TiSomlJo7W1SlvI/O0kgHZQGUyCmhMhgufKqcpfJz6BDGtDHu8ayLpdDgpI/nW8wfPojfxz3HlLgMGDHsUIkXLOlQYjrC6+tz3NP7BazdpjHE/gK8wuhMwzMeaavGbmjsAa+b9n+nSWXLm7jeJ7SxX4oHZWbb8ZUgjVirz1Z/HXcmZ12esi2p2Ov7zlNOyjbVbvnPOapyYHuhbbMpxwbwSocOJn2SJOMHnO8bf4BHnfLtuigwT9A+38Cz+cqS3ZFJNMoEpJTck1gL2GBRWbwMzsesW5gYc4gpkGyUCXyR/Z+2Xo7GXG7QazQaw2IJ3MAZlMaVo36hMXHf3t3tDgO7QIrN5G/584c2fqvlL9E+Ae+UCm8=

Steps to reproduce

Just take a look at Comp.vue

What is expected?

Output should be:

Foo: A
Bar: B

What is actually happening?

rest doesn't exist in the template (Cannot read properties of undefined (reading 'bar'))

But console.log(rest.bar) works in <script setup>

System Info

No response

Any additional comments?

No response

@edison1105 edison1105 added 🐞 bug Something isn't working scope: script-setup labels May 8, 2024
yyx990803 pushed a commit that referenced this issue May 8, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
buqiyuan pushed a commit to buqiyuan/core that referenced this issue May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: script-setup
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants