优点:比uuid更轻量 js库 安装:npm i nanoid -S 或 yarn add nanoid 使用: 第一步 引入 import ‘nanoid’ from 'nanoid'第二步 调用即可生成唯一的id id:nanoid()