import { UUID } from 'angular2-uuid'; let uuid = UUID.UUID().replace(/-/g, '').toLocaleUpperCase();
需要全局引入
参考:
https://www.cloudhadoop.com/2018/10/angular-uuid-generate-unique-identifier.html
https://www.npmjs.com/package/angular2-uuid