fast-vue-multi-pages 1.0.21 → 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.
@@ -13,8 +13,9 @@ 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
- * FastVueMultiTool 手机APP功能工具类
18
+ * FastVueMultiTool 工具类
18
19
  */
19
20
  export declare class FastVueMultiTool {
20
21
  /**
@@ -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,8 +17,9 @@ 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
- * FastVueMultiTool 手机APP功能工具类
22
+ * FastVueMultiTool 工具类
22
23
  */
23
24
  class FastVueMultiTool {
24
25
  /**
@@ -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;
@@ -32,6 +32,10 @@ class FastVueMultiObject {
32
32
  if (value.toString().length === 0) {
33
33
  return false;
34
34
  }
35
+ if (value.toString().toLowerCase() === "null"
36
+ || value.toString().toLowerCase() === "undefined") {
37
+ return true;
38
+ }
35
39
  }
36
40
  return true;
37
41
  }
@@ -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,8 +13,9 @@ 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
- * FastVueMultiTool 手机APP功能工具类
18
+ * FastVueMultiTool 工具类
18
19
  */
19
20
  export declare class FastVueMultiTool {
20
21
  /**
@@ -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,10 +1,10 @@
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;
5
5
  lodash_1 = tslib_1.__importDefault(lodash_1);
6
6
  /**
7
- * FastVueMultiTool 手机APP功能工具类
7
+ * FastVueMultiTool 工具类
8
8
  */
9
9
  var FastVueMultiTool = /** @class */ (function () {
10
10
  function FastVueMultiTool() {
@@ -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;
@@ -34,6 +34,10 @@ define(["require", "exports", "tslib", "lodash"], function (require, exports, ts
34
34
  if (value.toString().length === 0) {
35
35
  return false;
36
36
  }
37
+ if (value.toString().toLowerCase() === "null"
38
+ || value.toString().toLowerCase() === "undefined") {
39
+ return true;
40
+ }
37
41
  }
38
42
  return true;
39
43
  };
@@ -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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-vue-multi-pages",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "author": "janesen",
5
5
  "description": "快速搭建VUE项目工具类的基本库,主要用于每个功能页面独立生成html",
6
6
  "main": "./dist/cjs/index.js",
@@ -35,7 +35,8 @@
35
35
  "ip": "^2.0.1",
36
36
  "file64": "^1.0.3",
37
37
  "crypto-js": "^4.2.0",
38
- "vue": "^3.2.13"
38
+ "vue": "^3.2.13",
39
+ "js-cookie": "^3.0.5"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@typescript-eslint/eslint-plugin": "^7.16.0",