fast-vue-multi-pages 1.0.22 → 1.0.23
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.
- package/dist/cjs/FastVueMultiTool.d.ts +5 -0
- package/dist/cjs/FastVueMultiTool.js +5 -0
- package/dist/cjs/other/FastVueMultiUUID.d.ts +29 -0
- package/dist/cjs/other/FastVueMultiUUID.js +49 -0
- package/dist/esm/FastVueMultiTool.d.ts +5 -0
- package/dist/esm/FastVueMultiTool.js +5 -1
- package/dist/esm/other/FastVueMultiUUID.d.ts +29 -0
- package/dist/esm/other/FastVueMultiUUID.js +54 -0
- package/package.json +1 -1
@@ -13,6 +13,7 @@ import { FastVueMultiFile } from "./other/FastVueMultiFile";
|
|
13
13
|
import { FastVueMultiBase64 } from "./other/FastVueMultiBase64";
|
14
14
|
import { FastVueMultiEventBus } from "./other/FastVueMultiEventBus";
|
15
15
|
import { FastVueMultiObject } from "./other/FastVueMultiObject";
|
16
|
+
import { FastVueMultiUUID } from "./other/FastVueMultiUUID";
|
16
17
|
/**
|
17
18
|
* FastVueMultiTool 工具类
|
18
19
|
*/
|
@@ -89,4 +90,8 @@ export declare class FastVueMultiTool {
|
|
89
90
|
* 对象相关操作
|
90
91
|
*/
|
91
92
|
static Object: typeof FastVueMultiObject;
|
93
|
+
/**
|
94
|
+
* UUID操作
|
95
|
+
*/
|
96
|
+
static UUID: typeof FastVueMultiUUID;
|
92
97
|
}
|
@@ -17,6 +17,7 @@ const FastVueMultiFile_1 = require("./other/FastVueMultiFile");
|
|
17
17
|
const FastVueMultiBase64_1 = require("./other/FastVueMultiBase64");
|
18
18
|
const FastVueMultiEventBus_1 = require("./other/FastVueMultiEventBus");
|
19
19
|
const FastVueMultiObject_1 = require("./other/FastVueMultiObject");
|
20
|
+
const FastVueMultiUUID_1 = require("./other/FastVueMultiUUID");
|
20
21
|
/**
|
21
22
|
* FastVueMultiTool 工具类
|
22
23
|
*/
|
@@ -93,5 +94,9 @@ class FastVueMultiTool {
|
|
93
94
|
* 对象相关操作
|
94
95
|
*/
|
95
96
|
static Object = FastVueMultiObject_1.FastVueMultiObject;
|
97
|
+
/**
|
98
|
+
* UUID操作
|
99
|
+
*/
|
100
|
+
static UUID = FastVueMultiUUID_1.FastVueMultiUUID;
|
96
101
|
}
|
97
102
|
exports.FastVueMultiTool = FastVueMultiTool;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export declare class FastVueMultiUUID {
|
2
|
+
static onlyIterator: number;
|
3
|
+
/**
|
4
|
+
* 构建唯一标识符号
|
5
|
+
* @param prefix 唯一标识的前缀
|
6
|
+
*/
|
7
|
+
static buildOnlyCode(prefix: string): string;
|
8
|
+
/**
|
9
|
+
* 构建唯一标识符号
|
10
|
+
* @param prefix 唯一标识的前缀
|
11
|
+
*/
|
12
|
+
static buildOnlyNumber(prefix: string): string;
|
13
|
+
/**
|
14
|
+
* 构建uuid4的唯一编号
|
15
|
+
*/
|
16
|
+
static buildUUID4(): string;
|
17
|
+
/**
|
18
|
+
* 构建uuid8的唯一编号
|
19
|
+
*/
|
20
|
+
static buildUUID8(): string;
|
21
|
+
/**
|
22
|
+
* 构建uuid12的唯一编号
|
23
|
+
*/
|
24
|
+
static buildUUID12(): string;
|
25
|
+
/**
|
26
|
+
* 构建uuid16的唯一编号
|
27
|
+
*/
|
28
|
+
static buildUUID16(): string;
|
29
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FastVueMultiUUID = void 0;
|
4
|
+
class FastVueMultiUUID {
|
5
|
+
static onlyIterator = 1;
|
6
|
+
/**
|
7
|
+
* 构建唯一标识符号
|
8
|
+
* @param prefix 唯一标识的前缀
|
9
|
+
*/
|
10
|
+
static buildOnlyCode(prefix) {
|
11
|
+
let crypto = require("crypto-js");
|
12
|
+
return prefix + crypto.MD5(this.buildUUID8()).toString();
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* 构建唯一标识符号
|
16
|
+
* @param prefix 唯一标识的前缀
|
17
|
+
*/
|
18
|
+
static buildOnlyNumber(prefix) {
|
19
|
+
if (FastVueMultiUUID.onlyIterator > 99) {
|
20
|
+
FastVueMultiUUID.onlyIterator = 1;
|
21
|
+
}
|
22
|
+
return prefix + new Date().getTime() + (FastVueMultiUUID.onlyIterator++);
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* 构建uuid4的唯一编号
|
26
|
+
*/
|
27
|
+
static buildUUID4() {
|
28
|
+
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* 构建uuid8的唯一编号
|
32
|
+
*/
|
33
|
+
static buildUUID8() {
|
34
|
+
return (((1 + Math.random()) * 0x100000000) | 0).toString(16).substring(1);
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* 构建uuid12的唯一编号
|
38
|
+
*/
|
39
|
+
static buildUUID12() {
|
40
|
+
return FastVueMultiUUID.buildUUID4() + FastVueMultiUUID.buildUUID8();
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* 构建uuid16的唯一编号
|
44
|
+
*/
|
45
|
+
static buildUUID16() {
|
46
|
+
return FastVueMultiUUID.buildUUID8() + FastVueMultiUUID.buildUUID8();
|
47
|
+
}
|
48
|
+
}
|
49
|
+
exports.FastVueMultiUUID = FastVueMultiUUID;
|
@@ -13,6 +13,7 @@ import { FastVueMultiFile } from "./other/FastVueMultiFile";
|
|
13
13
|
import { FastVueMultiBase64 } from "./other/FastVueMultiBase64";
|
14
14
|
import { FastVueMultiEventBus } from "./other/FastVueMultiEventBus";
|
15
15
|
import { FastVueMultiObject } from "./other/FastVueMultiObject";
|
16
|
+
import { FastVueMultiUUID } from "./other/FastVueMultiUUID";
|
16
17
|
/**
|
17
18
|
* FastVueMultiTool 工具类
|
18
19
|
*/
|
@@ -89,4 +90,8 @@ export declare class FastVueMultiTool {
|
|
89
90
|
* 对象相关操作
|
90
91
|
*/
|
91
92
|
static Object: typeof FastVueMultiObject;
|
93
|
+
/**
|
94
|
+
* UUID操作
|
95
|
+
*/
|
96
|
+
static UUID: typeof FastVueMultiUUID;
|
92
97
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
define(["require", "exports", "tslib", "lodash", "./http/FastVueMultiHttp", "./other/FastVueMultiStore", "./vue/FastVueMultiConfig", "./http/FastVueMultiCookie", "./other/FastVueMultiClipboard", "./other/FastVueMultiDate", "./other/FastVueMultiBoolean", "./other/FastVueMultiFunction", "./other/FastVueMultiElement", "./other/FastVueMultiWindow", "./other/FastVueMultiFile", "./other/FastVueMultiBase64", "./other/FastVueMultiEventBus", "./other/FastVueMultiObject"], function (require, exports, tslib_1, lodash_1, FastVueMultiHttp_1, FastVueMultiStore_1, FastVueMultiConfig_1, FastVueMultiCookie_1, FastVueMultiClipboard_1, FastVueMultiDate_1, FastVueMultiBoolean_1, FastVueMultiFunction_1, FastVueMultiElement_1, FastVueMultiWindow_1, FastVueMultiFile_1, FastVueMultiBase64_1, FastVueMultiEventBus_1, FastVueMultiObject_1) {
|
1
|
+
define(["require", "exports", "tslib", "lodash", "./http/FastVueMultiHttp", "./other/FastVueMultiStore", "./vue/FastVueMultiConfig", "./http/FastVueMultiCookie", "./other/FastVueMultiClipboard", "./other/FastVueMultiDate", "./other/FastVueMultiBoolean", "./other/FastVueMultiFunction", "./other/FastVueMultiElement", "./other/FastVueMultiWindow", "./other/FastVueMultiFile", "./other/FastVueMultiBase64", "./other/FastVueMultiEventBus", "./other/FastVueMultiObject", "./other/FastVueMultiUUID"], function (require, exports, tslib_1, lodash_1, FastVueMultiHttp_1, FastVueMultiStore_1, FastVueMultiConfig_1, FastVueMultiCookie_1, FastVueMultiClipboard_1, FastVueMultiDate_1, FastVueMultiBoolean_1, FastVueMultiFunction_1, FastVueMultiElement_1, FastVueMultiWindow_1, FastVueMultiFile_1, FastVueMultiBase64_1, FastVueMultiEventBus_1, FastVueMultiObject_1, FastVueMultiUUID_1) {
|
2
2
|
"use strict";
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.FastVueMultiTool = void 0;
|
@@ -81,6 +81,10 @@ define(["require", "exports", "tslib", "lodash", "./http/FastVueMultiHttp", "./o
|
|
81
81
|
* 对象相关操作
|
82
82
|
*/
|
83
83
|
FastVueMultiTool.Object = FastVueMultiObject_1.FastVueMultiObject;
|
84
|
+
/**
|
85
|
+
* UUID操作
|
86
|
+
*/
|
87
|
+
FastVueMultiTool.UUID = FastVueMultiUUID_1.FastVueMultiUUID;
|
84
88
|
return FastVueMultiTool;
|
85
89
|
}());
|
86
90
|
exports.FastVueMultiTool = FastVueMultiTool;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export declare class FastVueMultiUUID {
|
2
|
+
static onlyIterator: number;
|
3
|
+
/**
|
4
|
+
* 构建唯一标识符号
|
5
|
+
* @param prefix 唯一标识的前缀
|
6
|
+
*/
|
7
|
+
static buildOnlyCode(prefix: string): string;
|
8
|
+
/**
|
9
|
+
* 构建唯一标识符号
|
10
|
+
* @param prefix 唯一标识的前缀
|
11
|
+
*/
|
12
|
+
static buildOnlyNumber(prefix: string): string;
|
13
|
+
/**
|
14
|
+
* 构建uuid4的唯一编号
|
15
|
+
*/
|
16
|
+
static buildUUID4(): string;
|
17
|
+
/**
|
18
|
+
* 构建uuid8的唯一编号
|
19
|
+
*/
|
20
|
+
static buildUUID8(): string;
|
21
|
+
/**
|
22
|
+
* 构建uuid12的唯一编号
|
23
|
+
*/
|
24
|
+
static buildUUID12(): string;
|
25
|
+
/**
|
26
|
+
* 构建uuid16的唯一编号
|
27
|
+
*/
|
28
|
+
static buildUUID16(): string;
|
29
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
define(["require", "exports"], function (require, exports) {
|
2
|
+
"use strict";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.FastVueMultiUUID = void 0;
|
5
|
+
var FastVueMultiUUID = /** @class */ (function () {
|
6
|
+
function FastVueMultiUUID() {
|
7
|
+
}
|
8
|
+
/**
|
9
|
+
* 构建唯一标识符号
|
10
|
+
* @param prefix 唯一标识的前缀
|
11
|
+
*/
|
12
|
+
FastVueMultiUUID.buildOnlyCode = function (prefix) {
|
13
|
+
var crypto = require("crypto-js");
|
14
|
+
return prefix + crypto.MD5(this.buildUUID8()).toString();
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* 构建唯一标识符号
|
18
|
+
* @param prefix 唯一标识的前缀
|
19
|
+
*/
|
20
|
+
FastVueMultiUUID.buildOnlyNumber = function (prefix) {
|
21
|
+
if (FastVueMultiUUID.onlyIterator > 99) {
|
22
|
+
FastVueMultiUUID.onlyIterator = 1;
|
23
|
+
}
|
24
|
+
return prefix + new Date().getTime() + (FastVueMultiUUID.onlyIterator++);
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* 构建uuid4的唯一编号
|
28
|
+
*/
|
29
|
+
FastVueMultiUUID.buildUUID4 = function () {
|
30
|
+
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
31
|
+
};
|
32
|
+
/**
|
33
|
+
* 构建uuid8的唯一编号
|
34
|
+
*/
|
35
|
+
FastVueMultiUUID.buildUUID8 = function () {
|
36
|
+
return (((1 + Math.random()) * 0x100000000) | 0).toString(16).substring(1);
|
37
|
+
};
|
38
|
+
/**
|
39
|
+
* 构建uuid12的唯一编号
|
40
|
+
*/
|
41
|
+
FastVueMultiUUID.buildUUID12 = function () {
|
42
|
+
return FastVueMultiUUID.buildUUID4() + FastVueMultiUUID.buildUUID8();
|
43
|
+
};
|
44
|
+
/**
|
45
|
+
* 构建uuid16的唯一编号
|
46
|
+
*/
|
47
|
+
FastVueMultiUUID.buildUUID16 = function () {
|
48
|
+
return FastVueMultiUUID.buildUUID8() + FastVueMultiUUID.buildUUID8();
|
49
|
+
};
|
50
|
+
FastVueMultiUUID.onlyIterator = 1;
|
51
|
+
return FastVueMultiUUID;
|
52
|
+
}());
|
53
|
+
exports.FastVueMultiUUID = FastVueMultiUUID;
|
54
|
+
});
|