@lambo-design/shared 1.0.0-beta.211 → 1.0.0-beta.212

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.
Files changed (54) hide show
  1. package/config/themes/atrovirens/atrovirens.css +572 -572
  2. package/config/themes/atrovirens/atrovirens.less +6 -4
  3. package/config/themes/atrovirens/var.less +6 -3
  4. package/config/themes/blue/blue.css +572 -572
  5. package/config/themes/blue/blue.less +7 -5
  6. package/config/themes/blue/var.less +6 -3
  7. package/config/themes/blue-white/blue-white.css +572 -572
  8. package/config/themes/blue-white/blue-white.less +11 -9
  9. package/config/themes/blue-white/var.less +5 -3
  10. package/config/themes/blue-white-tight/blue-white-tight.css +573 -573
  11. package/config/themes/blue-white-tight/blue-white-tight.less +7 -4
  12. package/config/themes/blue-white-tight/var.less +5 -3
  13. package/config/themes/danqing/danqing.css +577 -573
  14. package/config/themes/danqing/danqing.less +6 -3
  15. package/config/themes/danqing/danqing.wxss +572 -0
  16. package/config/themes/danqing/var.less +9 -3
  17. package/config/themes/deep/deep.css +572 -572
  18. package/config/themes/deep/deep.less +7 -4
  19. package/config/themes/deep/var.less +6 -3
  20. package/config/themes/default/default.css +572 -572
  21. package/config/themes/default/default.less +8 -5
  22. package/config/themes/default/var.less +5 -3
  23. package/config/themes/eap/eap.css +572 -572
  24. package/config/themes/eap/eap.less +6 -3
  25. package/config/themes/eap/var.less +5 -3
  26. package/config/themes/gold/gold.css +572 -572
  27. package/config/themes/gold/gold.less +7 -4
  28. package/config/themes/gold/var.less +5 -3
  29. package/config/themes/lime/lime.css +572 -572
  30. package/config/themes/lime/lime.less +7 -4
  31. package/config/themes/lime/var.less +6 -3
  32. package/config/themes/orange/orange.css +572 -572
  33. package/config/themes/orange/orange.less +7 -4
  34. package/config/themes/orange/var.less +5 -3
  35. package/config/themes/red/red.css +572 -572
  36. package/config/themes/red/red.less +7 -4
  37. package/config/themes/red/var.less +5 -3
  38. package/config/themes/theme-atrovirens.js +3 -3
  39. package/config/themes/theme-blue.js +3 -3
  40. package/config/themes/theme-bw.js +3 -3
  41. package/config/themes/theme-bwt.js +3 -3
  42. package/config/themes/theme-danqing.js +5 -5
  43. package/config/themes/theme-deep.js +4 -4
  44. package/config/themes/theme-default.js +3 -3
  45. package/config/themes/theme-eap.js +3 -3
  46. package/config/themes/theme-gold.js +3 -3
  47. package/config/themes/theme-lime.js +3 -3
  48. package/config/themes/theme-orange.js +4 -4
  49. package/config/themes/theme-red.js +3 -3
  50. package/package.json +1 -1
  51. package/utils/crypto/aes.js +23 -0
  52. package/utils/crypto/rsa.js +16 -0
  53. package/utils/storage.js +198 -198
  54. package/utils/type.js +102 -102
@@ -84,7 +84,6 @@
84
84
  --font-size-base : @font-size-base;
85
85
  --font-size-small : @font-size-small;
86
86
  --font-size-large : @font-size-large;
87
- --page-container-title-font-size : @page-container-title-font-size;
88
87
  --line-height-base : @line-height-base;
89
88
  --line-height-computed : @line-height-computed;
90
89
  --border-radius-base : @border-radius-base;
@@ -117,8 +116,6 @@
117
116
  --menu-dark-subsidiary-color : @menu-dark-subsidiary-color;
118
117
  --menu-dark-group-title-color : @menu-dark-group-title-color;
119
118
  --date-picker-cell-hover-bg : @date-picker-cell-hover-bg;
120
- --content-header-bg-color : @content-header-bg-color;
121
- --content-font-weight-header : @content-font-weight-header;
122
119
 
123
120
 
124
121
  --shadow-color : @shadow-color;
@@ -379,7 +376,7 @@
379
376
  --form-item-label-text-color : @form-item-label-text-color;
380
377
  --form-item-detail-bg-color : @form-item-detail-bg-color;
381
378
  --form-item-error-tip-top : @form-item-error-tip-top;
382
-
379
+
383
380
  --input-wrapper-width : @input-wrapper-width;
384
381
  --select-width : @select-width;
385
382
  --date-picker-width : @date-picker-width;
@@ -662,4 +659,10 @@
662
659
 
663
660
  /*pulldown*/
664
661
  --vxe-pulldown-panel-background-color : @vxe-pulldown-panel-background-color;
662
+
663
+ --page-container-title-font-size : @page-container-title-font-size;
664
+
665
+ --content-header-bg-color : @content-header-bg-color;
666
+ --content-header-font-weight : @content-header-font-weight;
667
+
665
668
  }
@@ -80,7 +80,6 @@
80
80
  @font-size-base : 14px;
81
81
  @font-size-small : 12px;
82
82
  @font-size-large : @font-size-base + 2px;
83
- @page-container-title-font-size :16px;
84
83
  @line-height-base : 1.5;
85
84
  @line-height-computed : floor((@font-size-base * @line-height-base));
86
85
  @border-radius-base : 6px;
@@ -113,8 +112,6 @@
113
112
  @menu-dark-subsidiary-color : rgba(255,255,255,.7);
114
113
  @menu-dark-group-title-color : rgba(255,255,255,.36);
115
114
  @date-picker-cell-hover-bg : rgba(255, 52, 87, 0.3);
116
- @content-header-bg-color : #fff;
117
- @content-font-weight-header : 500;
118
115
 
119
116
  // Shadow
120
117
  @shadow-color : rgba(0, 0, 0, .2);
@@ -670,3 +667,8 @@ vxe-table
670
667
  /*pulldown*/
671
668
  @vxe-pulldown-panel-background-color : #fff;
672
669
 
670
+ @page-container-title-font-size :16px;
671
+
672
+ @content-header-bg-color : #fff;
673
+ @content-header-font-weight : 500;
674
+
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style: `
550
550
  html {
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:`
550
550
  html {
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:`
550
550
  html {
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -546,6 +543,9 @@ export default {
546
543
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
547
544
  /*pulldown*/
548
545
  --vxe-pulldown-panel-background-color: #fff;
546
+ --page-container-title-font-size: 16px;
547
+ --content-header-bg-color: #fff;
548
+ --content-header-font-weight: 500;
549
549
  `,
550
550
  style:`
551
551
  html {
@@ -67,8 +67,7 @@ export default {
67
67
  --heading-color-dark: #ffffff;
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
- --font-size-large: 18px;
71
- --page-container-title-font-size: 16px;
70
+ --font-size-large: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 12px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #F5F9F9;
99
- --content-font-weight-header: bold;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -115,7 +112,7 @@ export default {
115
112
  --btn-padding-large-icon: 6px 15px 6px 15px;
116
113
  --btn-padding-small-icon: 1px 7px 2px;
117
114
  --btn-font-size: 14px;
118
- --btn-font-size-large: 18px;
115
+ --btn-font-size-large: 16px;
119
116
  --btn-font-size-small: 14px;
120
117
  --btn-border-radius: 4px;
121
118
  --btn-border-radius-small: 3px;
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 18px;
546
+ --content-header-bg-color: #F5F9F9;
547
+ --content-header-font-weight: bold;
548
548
  `,
549
549
  style: `
550
550
  html {
@@ -3,7 +3,7 @@ export default {
3
3
  title: "深蓝",
4
4
  primaryColor: "#225bb0",
5
5
  vars: `
6
- --primary-color: #225bb0;
6
+ --primary-color: #225bb0;
7
7
  --primary-color-tint-20: #4e7cc0;
8
8
  --primary-color-tint-90: #e9eff7;
9
9
  --primary-color-tint-80: #d3deef;
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:`
550
550
  html {
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:`
550
550
  html {
@@ -68,13 +68,10 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
75
74
  --border-radius-small: 2px;
76
- --cursor-disabled: not-allowed;
77
- --content-font-weight-header: 500;
78
75
  --padding-lg: 24px;
79
76
  --padding-md: 16px;
80
77
  --padding-sm: 12px;
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --cursor-disabled: not-allowed;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:`
550
550
  html {
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:`
550
550
  html {
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: #e1f0fe;
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:`
550
550
  html {
@@ -3,7 +3,7 @@ export default {
3
3
  title: "魅力橙",
4
4
  primaryColor: "#ee5414",
5
5
  vars: `
6
- --primary-color: #ee5414;
6
+ --primary-color: #ee5414;
7
7
  --primary-color-tint-20: #f17643;
8
8
  --primary-color-tint-90: #fdeee8;
9
9
  --primary-color-tint-80: #fcddd0;
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: rgba(238, 84, 20, 0.3);
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style:
550
550
  `
@@ -68,7 +68,6 @@ export default {
68
68
  --font-size-base: 14px;
69
69
  --font-size-small: 12px;
70
70
  --font-size-large: 16px;
71
- --page-container-title-font-size: 16px;
72
71
  --line-height-base: 1.5;
73
72
  --line-height-computed: 21px;
74
73
  --border-radius-base: 6px;
@@ -95,8 +94,6 @@ export default {
95
94
  --menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
96
95
  --menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
97
96
  --date-picker-cell-hover-bg: rgba(255, 52, 87, 0.3);
98
- --content-header-bg-color: #fff;
99
- --content-font-weight-header: 500;
100
97
  --shadow-color: rgba(0, 0, 0, 0.2);
101
98
  --shadow-base: 0 1px 6px rgba(0, 0, 0, 0.2);
102
99
  --shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
@@ -545,6 +542,9 @@ export default {
545
542
  --vxe-switch-disabled-background-color: rgba(0, 0, 0, 0.15);
546
543
  /*pulldown*/
547
544
  --vxe-pulldown-panel-background-color: #fff;
545
+ --page-container-title-font-size: 16px;
546
+ --content-header-bg-color: #fff;
547
+ --content-header-font-weight: 500;
548
548
  `,
549
549
  style: `
550
550
  html {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.211",
3
+ "version": "1.0.0-beta.212",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -0,0 +1,23 @@
1
+ import * as CryptoJS from 'crypto-js';
2
+
3
+ const AES_KEY = 'gYj2iqBV5AzxC8H0';
4
+ const AES_IV = 'z5c8fSuHX1PxWtIg';
5
+
6
+ crypto.aes = {
7
+ encrypt(message) {
8
+ return CryptoJS.AES.encrypt(message, AES_KEY, {
9
+ mode: CryptoJS.mode.CBC,
10
+ padding: CryptoJS.pad.Pkcs7,
11
+ iv: AES_IV
12
+ })
13
+ },
14
+ decrypt(ciphertext) {
15
+ return CryptoJS.AES.decrypt(ciphertext, AES_KEY, {
16
+ mode: CryptoJS.mode.CBC,
17
+ padding: CryptoJS.pad.Pkcs7,
18
+ iv: AES_IV
19
+ }).toString(CryptoJS.enc.Utf8)
20
+ }
21
+ }
22
+
23
+ export default crypto.aes;
@@ -0,0 +1,16 @@
1
+ import NodeRSA from "node-rsa";
2
+
3
+ const publicKey = `-----BEGIN PUBLIC KEY-----
4
+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCyhhlApSAjPWRjzg+wSIfALbrC
5
+ Ti4GVBYYBjfMYKU0O9z6EGQAXSLPW+S4VYm4LKtKXuKoeF441KU2HvnGM63cTIYt
6
+ T4lGbTGeYfsbeWNs1u9G9J+DrfKK8HsVB1IZIqhbMf0x7KGMeoQ2SN4KtbaPIwhl
7
+ IPfXzuLZiCW90l+a/wIDAQAB
8
+ -----END PUBLIC KEY-----`;
9
+
10
+ // 创建NodeRSA实例并指定公钥格式
11
+ const key = new NodeRSA(publicKey, "pkcs8-public");
12
+
13
+ // 加密函数
14
+ function rsa(data) {
15
+ return key.encrypt(data, "base64");
16
+ }