Skip to content

Commit 8fa6bf4

Browse files
云水云水
authored andcommitted
fix: guid not exprot
1 parent ec73dc5 commit 8fa6bf4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/util.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ export const isObject = val => val !== null && typeof val === 'object';
6262
// }, {});
6363
// }
6464

65-
// const guid = () => {
66-
// const s4 = () => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
67-
// return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;
68-
// };
65+
export const guid = () => {
66+
const s4 = () => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
67+
return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;
68+
};
6969

7070
// export { isOn, cacheStringFunction, camelize, hyphenate, capitalize };

0 commit comments

Comments
 (0)