Skip to content

Commit

Permalink
Merge branch 'SHITianhao-mac_select_all'
Browse files Browse the repository at this point in the history
  • Loading branch information
HFO4 committed Apr 29, 2020
2 parents 19138ac + 80e0b6e commit d752e26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/component/FileManager/Explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import SadIcon from "@material-ui/icons/SentimentVeryDissatisfied";
import classNames from "classnames";
import ImgPreivew from "./ImgPreview";
import pathHelper from "../../utils/page";
import { isMac } from "../../utils"
import { withRouter } from "react-router-dom";
import {
Table,
Expand Down Expand Up @@ -177,7 +178,7 @@ class ExplorerCompoment extends Component {
super();
this.keyMap = {
DELETE_FILE: "del",
SELECT_ALL: "ctrl+a"
SELECT_ALL: `${isMac() ? 'command' : 'ctrl'}+a`
};

this.handlers = {
Expand Down
4 changes: 4 additions & 0 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,8 @@ export function getNumber(base,conditions){
}
})
return base
}

export const isMac = () => {
return "MACINTEL" === navigator.platform.toUpperCase()
}

0 comments on commit d752e26

Please sign in to comment.