wip: Table component developing

This commit is contained in:
kailong321200875
2022-02-07 17:32:37 +08:00
parent 9b4b317817
commit 7b7fcfef59
16 changed files with 1358 additions and 1136 deletions

View File

@@ -95,3 +95,15 @@ export function formatTime(time: Date | number | string, fmt: string) {
return fmt
}
}
/**
* 生成随机字符串
*/
export function toAnyString() {
const str: string = 'xxxxx-xxxxx-4xxxx-yxxxx-xxxxx'.replace(/[xy]/g, (c: string) => {
const r: number = (Math.random() * 16) | 0
const v: number = c === 'x' ? r : (r & 0x3) | 0x8
return v.toString()
})
return str
}