|
@@ -1,6 +1,10 @@
|
|
|
-import { kebabCase, debounce, isNumeric } from '../utils'
|
|
|
+import { kebabCase, camelCase, debounce, isNumeric } from '../utils'
|
|
|
|
|
|
export function registerListener(component, el, event, modifiers, expression, extraVars = {}) {
|
|
|
+ if (modifiers.includes('camel')) {
|
|
|
+ event = camelCase(event);
|
|
|
+ }
|
|
|
+
|
|
|
if (modifiers.includes('away')) {
|
|
|
let handler = e => {
|
|
|
// Don't do anything if the click came form the element or within it.
|