vue-table-dynamic
vue-table-dynamic copied to clipboard
Duplication on unique id generation
I found that the tablecell.key
for all cells in a table are generated with the same value when I start my node app using express.js or http-server, as shown in the image below.
But when I start my app just using node run dev
, it works well.
The id generator in this lib is unique.js
, the code , i also paste them here,
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
}
Does anyone know the reason? Thank you.