-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
v-el behaviour #2248
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
Comments
@jbrialon would be a great feature ! 👍 |
👍 |
I don't quite get why this is useful. Any convincing use case? |
In my case I was animating different elements using Tweenmax and using v-el was pretty convenient then I had to use the stagger function from Tweenmax and I thought it would have been great if we could retrieve an array that's one example of course but there would be other applications for the functionality |
Yes could be great for massive animation stuff. |
@jbrialon Vue.js the |
@AnyGong of course but why implementing v-el if you could use document.getElementById in the first place then |
It seems useful. Might I suggest this syntax: Instead of <span v-el:message>hello</span> <!-- this.$els.message -->
<span v-el:messages.list>world 1</span> <!-- this.$els.messages[0] -->
<span v-el:messages.list>world 2</span><!-- this.$els.messages[1] --> |
v-els was a suggestion but .list is a good idea too ! 👍 |
I like the modifier as my preference but either will suffice. |
I have a requirement that make the window scroll to the nth row of a table rendered by If array of <table>
<tbody>
<tr v-for="" v-el:row></tr>
</tbody>
</table> exports.methods.scrollToRow = function (index) {
this.$els.row[index].scrollIntoView()
} But now I must make tr a component and use |
I'm not convinced by the benefits of this suggestion - it introduces extra syntax on Vue's part (increases both implementation complexity and learning cost) while the same can simply be achieved with |
Hello,
right now when we use v-el we are able to register a reference to a DOM element on its owner Vue instance’s $els object for easier access.
it could be great if it could retrieve an array of object by using v-els for example
The text was updated successfully, but these errors were encountered: