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

how to write the arguments of the custom directives? #193

Closed
JE-lee opened this issue Feb 14, 2020 · 2 comments
Closed

how to write the arguments of the custom directives? #193

JE-lee opened this issue Feb 14, 2020 · 2 comments

Comments

@JE-lee
Copy link

JE-lee commented Feb 14, 2020

when i use the vue template like below, it works fine with the argument '#srcoll-target'

<v-container id="scroll-target" style="max-height: 400px" >
      <v-row
        v-scroll:#scroll-target="handleScroll"
        style="height: 1000px"
      ></v-row>
</v-container>

unfortunately, it can't work with the another way in jsx。 I'm sure about that the problem is the wrong delivering the arguments. is it true ? or how can i transmit the arguments 0f directives in perspective. thank you

 const directives= [
      {
        name: 'scroll',
        value: this.handleScroll.bind(this),
        arguments: {
          ['#scroll-target']: true
        }
      }
 ];
<v-container id="scroll-target" style="max-height: 400px" >
      <v-row
        {...{ directives }}
        style="height: 1000px"
      ></v-row>
</v-container>
@sodatea sodatea closed this as completed Mar 3, 2020
@sodatea
Copy link
Member

sodatea commented Mar 3, 2020

It should be arg: "#scroll-target" rather than arguments: { ['#scroll-target']: true }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants