UNPKG
view-design-hi
Version:
latest (4.7.0-80)
4.7.0-80
4.7.0-79
4.7.0-78
4.7.0-77
4.7.0-76
4.7.0-75
4.7.0-74
4.7.0-73
4.7.0-72
4.7.0-71
4.7.0-70
4.7.0-69
4.7.0-68
4.7.0-67
4.7.0-66
4.7.0-65
4.7.0-64
4.7.0-63
4.7.0-62
4.7.0-61
4.7.0-60
4.7.0-59
4.7.0-58
4.7.0-57
4.7.0-56
4.7.0-55
4.7.0-54
4.7.0-53
4.7.0-52
4.7.0-51
4.7.0-50
4.7.0-49
4.7.0-48
4.7.0-47
4.7.0-46
4.7.0-45
4.7.0-44
4.7.0-43
4.7.0-42
4.7.0-41
4.7.0-40
4.7.0-39
4.7.0-38
4.7.0-37
4.7.0-36
4.7.0-35
4.7.0-34
4.7.0-33
4.7.0-32
4.7.0-31
4.7.0-30
4.7.0-29
4.7.0-28
4.7.0-27
4.7.0-26
4.7.0-25
4.7.0-24
4.7.0-23
4.7.0-22
4.7.0-21
4.7.0-20
4.7.0-19
4.7.0-18
4.7.0-17
4.7.0-16
4.7.0-15
4.7.0-14
4.7.0-13
4.7.0-12
4.7.0-11
4.7.0-10
4.7.0-9
4.7.0-8
4.7.0-7
4.7.0-6
4.7.0-5
4.7.0-4
4.7.0-3
4.7.0-2
4.7.0-1
4.6.1-11
4.6.1-10
4.6.1-9
4.6.1-8
4.6.1-7
4.6.1-6
4.6.1-5
4.6.1-4
4.6.1-3
4.6.1-2
4.6.1-1
4.5.0-12
4.5.0-11
4.5.0-10
4.5.0-9
4.5.0-8
4.5.0-7
4.5.0-6
4.5.0-5
4.5.0-4
4.5.0-3
4.5.0-2
4.5.0-1
A high quality UI components Library with Vue.js
www.iviewui.com
view-design/ViewUI
view-design-hi
/
src
/
utils
/
random_str.js
11 lines
(10 loc)
•
325 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
// 生成随机字符串
export
default
function
(
len =
32
) {
const
$chars =
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
;
const
maxPos = $chars.
length
;
let
str =
''
;
for
(
let
i =
0
; i < len; i++) { str += $chars.
charAt
(
Math
.
floor
(
Math
.
random
() * maxPos)); }
return
str; }