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
For what version of Nuxt UI are you suggesting this?
v2.17.0
Description
I want to set styles for other elements based on the activation state of the ULink component, but it was unexpectedly difficult. First, I didn't find relevant content in the documentation of the ULink component. It wasn't until I found this issue that I learned that I could get the activation state through v-slot={isActive}. Secondly, I can't directly set the data-* attribute for the ULink component to save the value of isActive, because this will prompt a ts error and the rendered a tag will not contain attributes, so I have to add another HTML tag as a child element of the ULink component to indirectly add the data-* attribute.
Additional context
No response
The text was updated successfully, but these errors were encountered:
I'm confused, is this an issue for v3 or v2? You mentioned v3.0.0-alpha.x and a link to the Nuxt UI v2 docs 🤔我有点困惑,这是 v3 还是 v2 的问题?你提到了v3.0.0-alpha.x,并附上了 Nuxt UI v2 文档的链接 🤔
I'm sorry, this is a v2 problem. I meant that this feature can be implemented in v3. I browsed the v3 documentation and found that it was mentioned that the activation state can be accessed using { active: boolean; }, but I didn't find the function I expected to save the activation state in the form of data-*
I changed the version mentioned to v2.17.0, which is the version I use. But my point is still that this feature can be implemented in v3, if possible 😄
For what version of Nuxt UI are you suggesting this?
v2.17.0
Description
I want to set styles for other elements based on the activation state of the
ULink
component, but it was unexpectedly difficult. First, I didn't find relevant content in the documentation of theULink
component. It wasn't until I found this issue that I learned that I could get the activation state throughv-slot={isActive}
. Secondly, I can't directly set thedata-*
attribute for theULink
component to save the value of isActive, because this will prompt a ts error and the rendereda
tag will not contain attributes, so I have to add another HTML tag as a child element of theULink
component to indirectly add thedata-*
attribute.Additional context
No response
The text was updated successfully, but these errors were encountered: