mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 23:10:18 +08:00
feat(projects): 添加常用组件、composables函数
This commit is contained in:
10
src/utils/common/number.ts
Normal file
10
src/utils/common/number.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 获取指定整数范围内的随机整数
|
||||
* @param start - 开始范围
|
||||
* @param end - 结束范围
|
||||
*/
|
||||
export function getRandomInterger(end: number, start: number = 0) {
|
||||
const range = end - start;
|
||||
const random = Math.floor(Math.random() * range + start);
|
||||
return random;
|
||||
}
|
||||
Reference in New Issue
Block a user