UNPKG

fastlion-amis

Version:

一种MIS页面生成工具

17 lines (15 loc) 474 B
// 用于添加并合并多个className export const classNames = (...names: any[]) => { let currentNames: string[] = []; names.forEach((name) => { if (name) currentNames.push(name) }); return currentNames.join(' '); } // 用于生成唯一id以关联主从表 export const uuid = () => { const temp_url = URL.createObjectURL(new Blob()); const uuid = temp_url.toString(); URL.revokeObjectURL(temp_url); return uuid.substr(uuid.lastIndexOf("/") + 1); }