79155607

Date: 2024-11-04 13:26:40
Score: 1.5
Natty:
Report link

The problem is that, in Vue, prop names are automatically camelCased, so :on-double-click in the parent component is passed as onDoubleClick to the child. In Vue's template syntax, though, on- prefixed props are treated as event listeners, not as regular props, hence it's not passed down to the child component as you've expected. To fix this change the following in the parent component: change :on-double-click="goToDevicePage" to :onDoubleClick="goToDevicePage" - to avoid event-listener interpretation. By renaming on-double-click to onDoubleClick in the parent, Vue will pass it as a standard prop instead of treating it as an event.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: s.gkce