@zgfe/modules-dm 1.0.57-zhongyuan.31 → 1.0.57-zhongyuan.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,5 @@
1
+ /**随机id */
2
+ export declare const generateUniqueId: () => string;
1
3
  /**
2
4
  * 虚拟事件编辑 判断内容是否有改动;有改动返回true
3
5
  */
package/es/utils/index.js CHANGED
@@ -1,3 +1,12 @@
1
+ /**随机id */
2
+ export var generateUniqueId = function generateUniqueId() {
3
+ // 时间戳(毫秒级,确保随时间递增)
4
+ var timestamp = Date.now().toString(36); // 转为36进制,缩短长度
5
+ // 随机数(36进制,6位,约100万种可能)
6
+ var random = Math.random().toString(36).substring(2, 8);
7
+ // 拼接为唯一ID(如:"1h8z5a-xyz789")
8
+ return "".concat(timestamp, "-").concat(random);
9
+ };
1
10
  /**
2
11
  * 虚拟事件编辑 判断内容是否有改动;有改动返回true
3
12
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.57-zhongyuan.31",
3
+ "version": "1.0.57-zhongyuan.33",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -57,7 +57,7 @@
57
57
  "umi-request": "^1.4.0",
58
58
  "yorkie": "^2.0.0"
59
59
  },
60
- "gitHead": "868c4935a6fb1b93dc07d3d1472fe41ce11cfe22",
60
+ "gitHead": "92fe6f7abd411a4968d9268c23357acfd86ea6a0",
61
61
  "gitHooks": {
62
62
  "pre-commit": "lint-staged"
63
63
  }