vue-table-dynamic icon indicating copy to clipboard operation
vue-table-dynamic copied to clipboard

Duplication on unique id generation

Open fengbinzhu opened this issue 4 years ago • 0 comments

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.

image

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.

fengbinzhu avatar Aug 23 '20 02:08 fengbinzhu