You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was talking with GPT to find solution about my case, but it fail.
when using Naive UI Image component in n-image-group > n-image v-for="(link, index) of photos" lazy
How can I use :render-toolbar="renderToolbar" or some other way to determine which image is active and how can I get a link to the image from renderToolbar?
GPT
To determine which image is active in the Naive UI n-image-group component and get a reference to that image in the render-toolbar, you can use several approaches. Here is one option:
Use active and onUpdate:active: You need to track the active image by adding active and onUpdate:active props to the n-image-group component. This will let you know which index is active.
Define renderToolbar: In this method, you can use the active index to get a reference to the current image.
I did not find any way to get the index of the active image in order to add the ability to delete an image and send the necessary data to the server in the toolbar - what exactly needs to be deleted.
Does anyone have any options for solving this problem?
An example of a logical but non-working implementation:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I was talking with GPT to find solution about my case, but it fail.
GPT
I did not find any way to get the index of the active image in order to add the ability to delete an image and send the necessary data to the server in the toolbar - what exactly needs to be deleted.
Does anyone have any options for solving this problem?
An example of a logical but non-working implementation:
JS
Beta Was this translation helpful? Give feedback.
All reactions