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

v-model value must be a valid JavaScript member expression #3891

Closed
RyzenPan opened this issue Jun 5, 2021 · 5 comments
Closed

v-model value must be a valid JavaScript member expression #3891

RyzenPan opened this issue Jun 5, 2021 · 5 comments

Comments

@RyzenPan
Copy link

RyzenPan commented Jun 5, 2021

Version

3.1.0-beta.7

Reproduction link

https://github.com/RyzenPan/vue3-element-plus-vite

Steps to reproduce

I set a v-model value is v-model="data[item.dataIndex[0]]"

data = {
startTime: ''
}
item.dataIndex[0] = 'startTime'

item.dataIndex[0] is String

but the console thorw error v-model value must be a valid JavaScript member expression

What is expected?

It is not error

What is actually happening?

v-model value must be a valid JavaScript member expression

@LinusBorg
Copy link
Member

the linked "reproduction" does not contain the code mentioned in the description.

Please open a new issue with a real reproduction.

@edison1105
Copy link
Member

make sure update @vue/complier-sfc to 3.1.0-beta.7.
It will work.

@MrJuliuss
Copy link

MrJuliuss commented Jun 8, 2021

Hi, i got the same error since @vue/compiler-sfc 3.1.1. It works fine with 3.0.11

VueCompilerError: v-model value must be a valid JavaScript member expression.

v-model="selectedFilters[index][value]"

@caxerx
Copy link

caxerx commented Jun 8, 2021

Same here, I got the same error on @vue/compiler-sfc 3.1.0 and 3.1.1

VueCompilerError: v-model value must be a valid JavaScript member expression.
v-model="translations['zh-CN'][propName]"

@LinusBorg
Copy link
Member

Posting "same here" on a closed issue without providing a reproduction won't help us to solve this.

please open a new issue and provide a real reproduction

@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants