Replies: 3 comments
-
Create a child component with the image and a |
Beta Was this translation helpful? Give feedback.
-
Let me know if I understand this correctly: that would mean creating a method that would inject html, and passing a prop in order to set the image src, isn't it? |
Beta Was this translation helpful? Give feedback.
-
@Akryum & @Jesus82 I opened issue #173, which may be a duplicate of this one. I am trying to do the same thing, and I would like to pass the This way, I only have one observer, on the list element, that will pass the Here is how I currently have it setup and working with out passing a prop: Parent component
|
Beta Was this translation helpful? Give feedback.
-
I have a long list of elements created with v-for, and each one has a photo. I would like to just show the photo when onscreen.
Is there any way to tell directly to v-show that the element is onscreen?
So far the only way I could make it work is by adding each id in the screen to an array, and then check with the v-show if the id of the element is in the array.
While it works, it is not very responsive (it lags a bit to update the
visibleItems
array), which makes it non usable. So if somebody has a better method, it would be very helpful. Thanks!Beta Was this translation helpful? Give feedback.
All reactions