前端,node生成uuid

Others 2021-07-27 09:12:41 2021-07-27 09:12:41 1536 次浏览

npm install uuid --save

import { v4 as uuidv4 } from 'uuid';
function render(){
    for(var i=0;i<20;i++){
        console.log(uuidv4())
    }
}
render();