File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
test/unit/modules/compiler Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ function genKeyFilter (key: string): string {
56
56
const code =
57
57
parseInt ( key , 10 ) || // number keyCode
58
58
keyCodes [ key ] || // built-in alias
59
- `_keyCode (${ JSON . stringify ( key ) } )` // custom alias
59
+ `_k (${ JSON . stringify ( key ) } )` // custom alias
60
60
if ( Array . isArray ( code ) ) {
61
61
return `if(${ code . map ( c => `$event.keyCode!==${ c } ` ) . join ( '&&' ) } )return;`
62
62
} else {
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ export function renderMixin (Vue: Class<Component>) {
154
154
}
155
155
156
156
// expose v-on keyCodes
157
- Vue . prototype . _keyCode = key => config . keyCodes [ key ]
157
+ Vue . prototype . _k = key => config . keyCodes [ key ]
158
158
}
159
159
160
160
function resolveSlots (
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ describe('codegen', () => {
231
231
// custom keycode
232
232
assertCodegen (
233
233
'<input @input.custom="onInput">' ,
234
- `with(this){return _h(_e('input',{on:{"input":function($event){if($event.keyCode!==_keyCode ("custom"))return;onInput($event)}}}))}`
234
+ `with(this){return _h(_e('input',{on:{"input":function($event){if($event.keyCode!==_k ("custom"))return;onInput($event)}}}))}`
235
235
)
236
236
} )
237
237
You can’t perform that action at this time.
0 commit comments