Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase)

License

NotificationsYou must be signed in to change notification settings

vueComponent/vue-dash-event

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase)

NPM versionNPM downloads

Usage

<scriptsrc="https://cdn.jsdelivr.net/npm/vue-dash-event@1.0.1/dist/index.min.js"></script><script>Vue.use(window['vue-dash-event'])</script>

Why

If you not use DOM templates, You don't need this plugin.

Unlike components and props, event names don’t provide any automatic case transformation. Instead, the name of an emitted event must exactly match the name used to listen to that event. For example, if emitting a camelCased event name:

this.$emit('myEvent')

Listening to the kebab-cased version will have no effect:

<my-componentv-on:my-event="doSomething"></my-component>

Unlike components and props, event names will never be used as variable or property names in JavaScript, so there’s no reason to use camelCase or PascalCase. Additionally,v-on event listeners inside DOM templates will be automatically transformed to lowercase (due to HTML’s case-insensitivity), sov-on:myEvent would becomev-on:myevent – makingmyEvent impossible to listen to.

But ant-design-vue use camelCase for event names. In order to properly monitor the internal camelCase events of the component.If you use DOM templates, you must use<my-component v-on:my-event="doSomething"></my-component> andVue.use(window['vue-dash-event']). Then component will monitor the internal camelCase events of the component.

About

The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp