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 {
5656 const code =
5757 parseInt ( key , 10 ) || // number keyCode
5858 keyCodes [ key ] || // built-in alias
59- `_keyCode (${ JSON . stringify ( key ) } )` // custom alias
59+ `_k (${ JSON . stringify ( key ) } )` // custom alias
6060 if ( Array . isArray ( code ) ) {
6161 return `if(${ code . map ( c => `$event.keyCode!==${ c } ` ) . join ( '&&' ) } )return;`
6262 } else {
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ export function renderMixin (Vue: Class<Component>) {
154154 }
155155
156156 // expose v-on keyCodes
157- Vue . prototype . _keyCode = key => config . keyCodes [ key ]
157+ Vue . prototype . _k = key => config . keyCodes [ key ]
158158}
159159
160160function resolveSlots (
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ describe('codegen', () => {
231231 // custom keycode
232232 assertCodegen (
233233 '<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)}}}))}`
235235 )
236236 } )
237237
You can’t perform that action at this time.
0 commit comments