You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
593 B
JavaScript
24 lines
593 B
JavaScript
3 years ago
|
//封装字符串相关的方法
|
||
|
export function isBlank(value) {
|
||
|
if (value === "" || value === null || value === undefined) {
|
||
|
return true;
|
||
|
}
|
||
|
value = value + "";
|
||
|
value = value.trim();
|
||
|
if ("" === value || value === "string" || value === "undefined") {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
export function getUUID(tabName){
|
||
|
var str=[];
|
||
|
var Chars='0123456789abcdefghijklmnopqrstuvwxyz';
|
||
|
for(var i=0;i<36;i++){
|
||
|
str[i]=Chars.substr(Math.floor(Math.random()*16),1)
|
||
|
}
|
||
|
// str[0]=str[8]=str[13]=str[18]=str[23]='-';
|
||
|
return tabName+str.join("")
|
||
|
}
|