-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Invalid parenthesized assignment pattern #6088
Comments
You can use like this😉. <script setup lang="ts">
import { ref } from 'vue'
const stacks = ref([
{
name: 'jack'
},{
name: 'apple'
}
])
</script>
<template>
<div v-for="{name: Name}, i of stacks">
{{ Name }} {{ i }}
</div>
</template>
|
Interestingly parenthesis seem to be kind of optional even for iterations with index:
|
Would this be merged back into Vue 2.7? |
Vue version
@bdffc14
Link to minimal reproduction
From VItest Ui
Minimal I can find (edit to trigger error)
Steps to reproduce
The error comes from this line:
If I remove
file: efile
, then everything works. This bug is only reproducible in DEV.What is expected?
No Error
What is actually happening?
Error: Invalid parenthesized assignment pattern
System Info
Any additional comments?
The file comes from Vitest ui package.
Also, if you remove
import from vue
in the second minimal reproduction, it suddenly works 👀The text was updated successfully, but these errors were encountered: