File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 250
250
251
251
252
252
// 移除判断
253
- const removeEventAction = function removeEventAction ( e ) {
253
+ const removeEventAction = ( e ) => {
254
254
_tempMap = [ ]
255
- } . bind ( this )
255
+ }
256
256
257
257
// 绑定动作函数
258
- const bindEventAction = function bindEventAction ( e ) {
258
+ const bindEventAction = ( e ) => {
259
259
const tempMapLength = _tempMap . length
260
260
if ( tempMapLength >= 0 && _tempMap [ tempMapLength - 1 ] !== e . keyCode ) {
261
261
_tempMap . push ( e . keyCode )
264
264
eventList && eventList . forEach ( v => {
265
265
v && v ( e )
266
266
} )
267
- } . bind ( this )
267
+ }
268
268
269
269
// 绑定存储事件回调
270
270
/**
271
271
* @param {String } keyCode 绑定组合键
272
272
* @param {function } callback 回调函数
273
273
*/
274
- const bindEvent = function binEvent ( keyCode , callback ) {
274
+ const bindEvent = ( keyCode , callback ) => {
275
275
const keyCodeList = keyCode . split ( ' ' )
276
276
const [ first , second ] = keyCodeList . map ( v => keyCodesChangeKV [ v ] )
277
277
const eventKeys = [ first , second ] . toString ( )
278
278
eventMap [ eventKeys ] = eventMap [ eventKeys ] || [ ]
279
279
eventMap [ eventKeys ] . push ( callback )
280
- } . bind ( this )
280
+ }
281
281
282
282
// 移除绑定存储事件回调
283
283
function removeListeners ( keyCode , callback ) {
You can’t perform that action at this time.
0 commit comments