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
Vue allows you to set both HTML attributes and Element properties through the template. By default, it check is an element has a property of the same name, and if yes, it sets the value from the template as the element property, not as an HTML attribute. If there's no element property of that name, it sets it as an attribute
Activity
zhangenming commentedon Jun 12, 2025
i use
scroll
as a tailwind css propLinusBorg commentedon Jun 12, 2025
Vue allows you to set both HTML attributes and Element properties through the template. By default, it check is an element has a property of the same name, and if yes, it sets the value from the template as the element property, not as an HTML attribute. If there's no element property of that name, it sets it as an attribute
Now,
scroll
is a property/method on Elements:https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll
So possible solutions:
A) use a different name that does not conflict with a known HTML element property
B) Force Vue to set it as an attribute: