From 21aac4eda8b445896387ea10afbdbb49455159c3 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sat, 7 Apr 2018 13:41:15 +0800 Subject: [PATCH] Update docs. --- README-zh.md | 79 ++++++++++++++++++++++++++++++++++++++------------ README.md | 65 +++++++++++++++++++++++++++++++---------- website/doc.md | 58 +++++++++++++++++++++++++++--------- 3 files changed, 154 insertions(+), 48 deletions(-) diff --git a/README-zh.md b/README-zh.md index 7eea62c..8a59010 100644 --- a/README-zh.md +++ b/README-zh.md @@ -28,6 +28,32 @@ $ npm run build # 编译 $ npm run watch # 开发模式 ``` +```js +import hotkeys from 'hotkeys-js'; + +hotkeys('f5', function(event, handler){ + // Prevent the default refresh event under WIDNOWS system + event.preventDefault() + alert('you pressed F5!') +}); +``` + +或者在您的HTML中手动下载并引入** hotkeys.js **: + +```html + + + +