id 生成 npm i nanoid 官网:https://www.npmjs.com/package/nanoid 导入 import { nanoid } from 'nanoid' console.log(nanoid()) console.log(nanoid())