nanoid 函数产生唯一id //首先安装npm i nanoid import {nanoid} from 'nanoid' {id:nanoid(),name,age} //nanoid 是js自带的函数用来产生唯一id值 不停学习,热爱是源源不断的动力。