├── .gitignore
├── LICENSE
├── README.md
├── examples
├── input.html
├── menu.html
├── pagination.html
└── tooltip.html
├── package.json
└── src
└── index.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 | /demo
5 | /lib
6 | /es
7 | .package-lock.json
8 |
9 | # local env files
10 | .env.local
11 | .env.*.local
12 |
13 | # Log files
14 | npm-debug.log*
15 | yarn-debug.log*
16 | yarn-error.log*
17 |
18 | # Editor directories and files
19 | .idea
20 | .vscode
21 | *.suo
22 | *.ntvs*
23 | *.njsproj
24 | *.sln
25 | *.sw*
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 wangxueliang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-dash-event
2 | The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase)
3 |
4 | [](https://npmjs.org/package/vue-dash-event) [](https://npmjs.org/package/vue-dash-event)
5 | [](https://www.jsdelivr.com/package/npm/vue-dash-event)
6 |
7 | ## Usage
8 |
9 | ```js
10 |
11 |
14 | ```
15 | ## Why
16 |
17 | ### If you not use DOM templates, You don't need this plugin.
18 |
19 | 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:
20 |
21 | ```js
22 | this.$emit('myEvent')
23 | ```
24 | Listening to the kebab-cased version will have no effect:
25 |
26 | ```html
27 |
28 | ```
29 | 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), so `v-on:myEvent` would become `v-on:myevent` – making `myEvent` impossible to listen to.
30 |
31 | But ant-design-vue use camelCase for event names. In order to properly monitor the internal camelCase events of the component.
32 | If you use DOM templates, you must use `` and `Vue.use(window['vue-dash-event'])`. Then component will monitor the internal camelCase events of the component.
33 |
--------------------------------------------------------------------------------
/examples/input.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |