-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: the last column is not display when column sum is 6
- Loading branch information
Showing
3 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
export function checkIsPC() { | ||
export function checkIsPC(): boolean { | ||
return !navigator.userAgent | ||
.toLowerCase() | ||
.match( | ||
/ipad|iphone os|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/ | ||
); | ||
} | ||
|
||
/** | ||
* 获取向下取整的小数 | ||
* @param num 待处理的数 e.g. 16.999 | ||
* @param digits 保留位数 2 | ||
* @returns '16.99' | ||
*/ | ||
export function getFloorFloatStr(num: number, digits = 2): string { | ||
return (Math.floor(num * 100) / 100).toFixed(digits); | ||
} |