-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
window.BuilderAmisObject.AmisLib.uuidv4() steedos/steedos-platform#6855
- Loading branch information
1 parent
32bda6c
commit 12c2666
Showing
2 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/* | ||
* @Author: [email protected] | ||
* @Date: 2022-09-01 09:09:12 | ||
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com | ||
* @LastEditTime: 2023-11-16 10:10:42 | ||
* @LastEditors: baozhoutao@steedos.com | ||
* @LastEditTime: 2024-05-20 13:46:04 | ||
* @Description: | ||
*/ | ||
export * from './lib/amis' | ||
|
@@ -42,4 +42,6 @@ export * from './workflow'; | |
|
||
export * from './lib/router' | ||
|
||
export * from './i18n' | ||
export * from './i18n' | ||
|
||
export * from './utils/uuid'; |
6 changes: 3 additions & 3 deletions
6
.../@steedos-widgets/amis-lib/src/utils/uuid → ...teedos-widgets/amis-lib/src/utils/uuid.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/* | ||
* @Author: 殷亮辉 [email protected] | ||
* @Date: 2024-01-18 15:12:41 | ||
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com | ||
* @LastEditTime: 2024-01-18 15:12:49 | ||
* @LastEditors: baozhoutao@steedos.com | ||
* @LastEditTime: 2024-05-20 13:46:41 | ||
*/ | ||
/** | ||
* 生成符合标准uuid格式的36位满足唯一性的随机串 | ||
* @returns uuid | ||
*/ | ||
export function uuidv4() { | ||
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c => | ||
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c: any) => | ||
(c ^ window.crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) | ||
); | ||
} |