vue-table-dynamic
Version:
A vue component of dynamic table
19 lines (16 loc) • 310 B
JavaScript
/**
* Unique ID Generator
* TheoXiong
*/
const now = () => {
let current = Date.now()
let last = now.last || current
now.last = current > last ? current : last + 1
return now.last
}
const unique = (prefix = '', suffix = '') => {
return prefix + now().toString(16) + suffix
}
export {
unique
}