This commit is contained in:
Vanessa 2022-09-14 11:18:44 +08:00
parent 829b7d40d4
commit 6b4af527e1
4 changed files with 26 additions and 26 deletions

View file

@ -4,7 +4,7 @@ export const isMobile = () => {
export const isArrayEqual = (arr1: string[], arr2: string[]) => {
return arr1.length === arr2.length && arr1.every((item) => arr2.includes(item));
}
};
export const getRandom = (min: number, max: number) => {
return Math.floor(Math.random() * (max - min + 1)) + min; //含最大值,含最小值