The Wayback Machine - https://web.archive.org/web/20220309204607/https://github.com/vuejs/vue/issues/9577
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

Deep object as dynamic argument in custom directive [RFC-0003] #9577

Closed
drozdzynski opened this issue Feb 26, 2019 · 2 comments
Closed

Deep object as dynamic argument in custom directive [RFC-0003] #9577

drozdzynski opened this issue Feb 26, 2019 · 2 comments

Comments

@drozdzynski
Copy link

@drozdzynski drozdzynski commented Feb 26, 2019

Version

2.6.7

Reproduction link

https://jsfiddle.net/3qbky0z7/4/

Steps to reproduce

Create custom directive with a dynamic argument:
v-test:[deep.arg]="value"

What is expected?

It should get the value from path deep.arg.

What is actually happening?

Inside the binding object of a custom directive, arg key have value [deep.

@posva
Copy link
Member

@posva posva commented Feb 26, 2019

For the moment use a computed property to get the nested value or use v-test:[deep['arg']]="value"

@yyx990803 yyx990803 added this to To do in Maintenance via automation Feb 26, 2019
@shasharoman
Copy link
Contributor

@shasharoman shasharoman commented Feb 27, 2019

The workaround: v-test:[deep['arg']]="value" @posva mentioned will cause the console to print warn message:

image

shasharoman added a commit to shasharoman/vue that referenced this issue Feb 27, 2019
Maintenance automation moved this from To do to Done Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Maintenance
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants