Skip to content

Commit

Permalink
chore: Code format.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 21, 2018
1 parent 6fe1c72 commit 35da6d4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
8 changes: 6 additions & 2 deletions dist/hotkeys.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,17 @@ function dispatch(event) {
// 将特殊字符的key注册到 hotkeys 上
for (var k in _modifier) {
if (_modifier[k] === key) hotkeys[k] = true;
}if (!asterisk) return;
}

if (!asterisk) return;
}

// 将modifierMap里面的修饰键绑定到event中
for (var e in _mods) {
_mods[e] = event[modifierMap[e]];
} // 表单控件过滤 默认表单控件不触发快捷键
}

// 表单控件过滤 默认表单控件不触发快捷键
if (!hotkeys.filter.call(this, event)) return;

// 获取范围 默认为all
Expand Down
8 changes: 6 additions & 2 deletions dist/hotkeys.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,17 @@ function dispatch(event) {
// 将特殊字符的key注册到 hotkeys 上
for (var k in _modifier) {
if (_modifier[k] === key) hotkeys[k] = true;
}if (!asterisk) return;
}

if (!asterisk) return;
}

// 将modifierMap里面的修饰键绑定到event中
for (var e in _mods) {
_mods[e] = event[modifierMap[e]];
} // 表单控件过滤 默认表单控件不触发快捷键
}

// 表单控件过滤 默认表单控件不触发快捷键
if (!hotkeys.filter.call(this, event)) return;

// 获取范围 默认为all
Expand Down
8 changes: 6 additions & 2 deletions dist/hotkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,17 @@ function dispatch(event) {
// 将特殊字符的key注册到 hotkeys 上
for (var k in _modifier) {
if (_modifier[k] === key) hotkeys[k] = true;
}if (!asterisk) return;
}

if (!asterisk) return;
}

// 将modifierMap里面的修饰键绑定到event中
for (var e in _mods) {
_mods[e] = event[modifierMap[e]];
} // 表单控件过滤 默认表单控件不触发快捷键
}

// 表单控件过滤 默认表单控件不触发快捷键
if (!hotkeys.filter.call(this, event)) return;

// 获取范围 默认为all
Expand Down
8 changes: 6 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,17 @@ function dispatch(event) {
_mods[key] = true;

// 将特殊字符的key注册到 hotkeys 上
for (var k in _modifier) if (_modifier[k] === key) hotkeys[k] = true;
for (var k in _modifier) {
if (_modifier[k] === key) hotkeys[k] = true;
}

if (!asterisk) return;
}

// 将modifierMap里面的修饰键绑定到event中
for (var e in _mods) _mods[e] = event[modifierMap[e]];
for (var e in _mods) {
_mods[e] = event[modifierMap[e]];
}

// 表单控件过滤 默认表单控件不触发快捷键
if (!hotkeys.filter.call(this, event)) return;
Expand Down

0 comments on commit 35da6d4

Please sign in to comment.