mirror of
https://github.com/dataease/dataease.git
synced 2026-05-19 10:18:11 +08:00
fix: 增加公共链接密码强度
This commit is contained in:
@@ -5,3 +5,14 @@ export function pdfTemplateReplaceAll(content, source, target) {
|
||||
return content
|
||||
}
|
||||
|
||||
export function randomRange(min, max) {
|
||||
let returnStr = ''
|
||||
const range = (max ? Math.round(Math.random() * (max - min)) + min : min)
|
||||
const charStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
||||
|
||||
for (var i = 0; i < range; i++) {
|
||||
var index = Math.round(Math.random() * (charStr.length - 1))
|
||||
returnStr += charStr.substring(index, index + 1)
|
||||
}
|
||||
return returnStr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user