vuejs / vuejs/docs

v-on event listener name mangling nuance

Open
#3,127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
3.2k
Forks
5k
Avg merge
14d 17h
Merged PRs (30d)
1

Description

https://github.com/vuejs/docs/blob/fe96839c9fe1ce82150e5a4396235cb3d1fb76e2/src/guide/components/attrs.md?plain=1#L109

This does not make it entirely clear that the conventional kebab casing of event names would be camel cased i.e. @my-event would result in an attr named onMyEvent.
And it also does not document how any uppercase letter makes it simply prefix on: to the name with no transform, like @My-event yields on:My-event

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The relevant passage is in src/guide/components/attrs.md around line 109; read the linked section on v-on event listener casing. Update the documentation to cover both the camel-casing of conventional kebab-case names and the unchanged name prefixed with on: when an uppercase letter is present, using the issue's examples to verify the wording.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.