Vanessa 2022-09-13 23:31:12 +08:00
parent c9887449b1
commit a6f82f2901
4 changed files with 155 additions and 34 deletions

View file

@ -2,6 +2,10 @@ export const isMobile = () => {
return !document.getElementById("dockBottom");
};
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; //含最大值,含最小值
};