epic-designer
Version:
基于vue3的设计器,可视化开发页面表单
25 lines (24 loc) • 588 B
JavaScript
function f(t = 6, e = "string") {
if (e === "string") {
const r = [];
for (let i = 0; i < t; i++) {
const o = Math.floor(Math.random() * 36);
r.push(o < 10 ? o.toString() : String.fromCodePoint(87 + o));
}
return r.join("");
}
const n = 10 ** (t - 1);
return (n + Math.floor(Math.random() * 9 * n)).toString();
}
function c(t) {
return t.charAt(0).toUpperCase() + t.slice(1);
}
function l(t) {
const e = t.lastIndexOf("/");
return e === -1 ? t : t.slice(e + 1);
}
export {
c as capitalizeFirstLetter,
l as getFileNameByUrl,
f as getUUID
};