@lambo-design/shared 1.0.0-beta.240 → 1.0.0-beta.241

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 (171) hide show
  1. package/config/config.js +51 -51
  2. package/config/env.js +4 -4
  3. package/config/index.js +7 -7
  4. package/config/themes/atrovirens/atrovirens.less +667 -667
  5. package/config/themes/atrovirens/var.less +674 -674
  6. package/config/themes/blue/blue.less +669 -669
  7. package/config/themes/blue/var.less +677 -677
  8. package/config/themes/blue-white/blue-white.less +669 -669
  9. package/config/themes/blue-white/var.less +676 -676
  10. package/config/themes/blue-white-tight/blue-white-tight.less +672 -672
  11. package/config/themes/blue-white-tight/var.less +677 -677
  12. package/config/themes/danqing/danqing.less +668 -668
  13. package/config/themes/danqing/danqing.wxss +572 -572
  14. package/config/themes/danqing/var.less +679 -679
  15. package/config/themes/deep/deep.less +669 -669
  16. package/config/themes/deep/var.less +677 -677
  17. package/config/themes/default/default.less +671 -671
  18. package/config/themes/default/var.less +677 -677
  19. package/config/themes/eap/eap.less +671 -671
  20. package/config/themes/eap/var.less +677 -677
  21. package/config/themes/gold/gold.less +671 -671
  22. package/config/themes/gold/var.less +677 -677
  23. package/config/themes/index.js +28 -28
  24. package/config/themes/lime/lime.less +671 -671
  25. package/config/themes/lime/var.less +678 -678
  26. package/config/themes/orange/orange.less +671 -671
  27. package/config/themes/orange/var.less +678 -678
  28. package/config/themes/red/red.less +671 -671
  29. package/config/themes/red/var.less +677 -677
  30. package/config/themes/theme-atrovirens.js +558 -558
  31. package/config/themes/theme-blue.js +558 -558
  32. package/config/themes/theme-bw.js +558 -558
  33. package/config/themes/theme-bwt.js +559 -559
  34. package/config/themes/theme-danqing.js +558 -558
  35. package/config/themes/theme-deep.js +558 -558
  36. package/config/themes/theme-default.js +558 -558
  37. package/config/themes/theme-eap.js +558 -558
  38. package/config/themes/theme-gold.js +558 -558
  39. package/config/themes/theme-lime.js +558 -558
  40. package/config/themes/theme-orange.js +559 -559
  41. package/config/themes/theme-red.js +558 -558
  42. package/config/themes/theme-white.js +557 -557
  43. package/config/themes/white/var.less +675 -675
  44. package/config/themes/white/white.less +668 -668
  45. package/directives/index.js +23 -23
  46. package/directives/module/draggable.js +56 -56
  47. package/directives/module/permission.js +49 -49
  48. package/directives/module/print.js +1 -1
  49. package/directives/module/vue-print-nb/README.md +63 -63
  50. package/directives/module/vue-print-nb/print.js +94 -94
  51. package/directives/module/vue-print-nb/printarea.js +532 -532
  52. package/index.js +10 -10
  53. package/nstyles/common.less +197 -197
  54. package/nstyles/components/404.less +46 -46
  55. package/nstyles/components/button.less +34 -34
  56. package/nstyles/components/date-picker.less +37 -37
  57. package/nstyles/components/drawer.less +20 -20
  58. package/nstyles/components/dropdown.less +18 -18
  59. package/nstyles/components/excel-flow.less +72 -72
  60. package/nstyles/components/form.less +313 -313
  61. package/nstyles/components/index.less +23 -23
  62. package/nstyles/components/layout/collect.less +10 -10
  63. package/nstyles/components/layout/detail-view.less +107 -107
  64. package/nstyles/components/layout/full-screen.less +7 -7
  65. package/nstyles/components/layout/index.less +7 -7
  66. package/nstyles/components/layout/other-menu.less +142 -142
  67. package/nstyles/components/layout/page-view.less +101 -101
  68. package/nstyles/components/layout/sider-trigger.less +41 -41
  69. package/nstyles/components/layout/tags-nav.less +113 -113
  70. package/nstyles/components/modal.less +85 -85
  71. package/nstyles/components/n-button.less +131 -131
  72. package/nstyles/components/n-image-preview.less +131 -131
  73. package/nstyles/components/n-model/index.less +19 -19
  74. package/nstyles/components/n-model/report-index.less +43 -43
  75. package/nstyles/components/n-panel.less +40 -40
  76. package/nstyles/components/n-picker.less +37 -37
  77. package/nstyles/components/n-sign.less +17 -17
  78. package/nstyles/components/n-tooltip.less +10 -10
  79. package/nstyles/components/panel.less +31 -31
  80. package/nstyles/components/select.less +3 -3
  81. package/nstyles/components/sign.less +27 -27
  82. package/nstyles/components/table.less +315 -315
  83. package/nstyles/components/tree.less +158 -158
  84. package/nstyles/components/upload.less +164 -164
  85. package/nstyles/index.less +5 -5
  86. package/nstyles/reset.less +65 -65
  87. package/nstyles/third/ag.less +174 -174
  88. package/nstyles/third/index.less +11 -11
  89. package/nstyles/third/view-design.less +366 -366
  90. package/nstyles/variables/base.less +143 -143
  91. package/nstyles/variables/index.less +4 -4
  92. package/nstyles/variables/theme/default/button.less +7 -7
  93. package/nstyles/variables/theme/default/common.less +57 -57
  94. package/nstyles/variables/theme/default/index.less +7 -7
  95. package/nstyles/variables/theme/default/layout.less +40 -40
  96. package/nstyles/variables/theme/default/table.less +37 -37
  97. package/nstyles/variables/theme/default/tag.less +3 -3
  98. package/nstyles/variables/theme/default/upload.less +3 -3
  99. package/nstyles/variables/theme/index.less +13 -13
  100. package/nstyles/variables/theme/small/button.less +7 -7
  101. package/nstyles/variables/theme/small/common.less +39 -39
  102. package/nstyles/variables/theme/small/index.less +5 -5
  103. package/nstyles/variables/theme/small/layout.less +21 -21
  104. package/nstyles/variables/theme/small/table.less +17 -17
  105. package/nstyles/variables/theme/small/tag.less +3 -3
  106. package/package.json +1 -1
  107. package/plugin/index.js +12 -12
  108. package/plugin/module/date-format.js +30 -30
  109. package/plugin/module/loading.js +26 -26
  110. package/plugin/module/warn-handler.js +11 -11
  111. package/styles/variables.less +21 -21
  112. package/utils/ajax/cacheconf.js +19 -19
  113. package/utils/ajax/content-type.js +30 -30
  114. package/utils/ajax/index.js +12 -12
  115. package/utils/ajax/interceptors.js +97 -97
  116. package/utils/ajax/sseFetchUtil.js +71 -0
  117. package/utils/assist.js +147 -147
  118. package/utils/base64.js +126 -126
  119. package/utils/blob.js +47 -47
  120. package/utils/bus.js +3 -3
  121. package/utils/crypto/index.js +48 -48
  122. package/utils/crypto/md5.js +152 -152
  123. package/utils/crypto/sm3.js +235 -235
  124. package/utils/date.js +381 -381
  125. package/utils/dict/built-in-dict.js +20 -20
  126. package/utils/dict/index.js +167 -167
  127. package/utils/dom.js +38 -38
  128. package/utils/event.js +72 -72
  129. package/utils/excel.js +655 -655
  130. package/utils/file.js +19 -19
  131. package/utils/form/validate.js +29 -29
  132. package/utils/half-year.js +68 -68
  133. package/utils/index.js +41 -41
  134. package/utils/json.js +29 -29
  135. package/utils/lodop.js +165 -165
  136. package/utils/menu/before-close.js +17 -17
  137. package/utils/menu/index.js +395 -395
  138. package/utils/mime_type.js +67 -67
  139. package/utils/modelerUtil.js +227 -227
  140. package/utils/n/api.js +22 -22
  141. package/utils/n/date.js +57 -57
  142. package/utils/n/index.js +9 -9
  143. package/utils/n/is-type.js +176 -176
  144. package/utils/n/number.js +144 -144
  145. package/utils/n/permission-cache.js +11 -11
  146. package/utils/n/reuqest/axiosN.js +17 -17
  147. package/utils/n/reuqest/content-type.js +19 -19
  148. package/utils/n/reuqest/interceptors.js +95 -95
  149. package/utils/n/reuqest/url-params.js +12 -12
  150. package/utils/n/storage.js +51 -51
  151. package/utils/n/token.js +51 -51
  152. package/utils/n/user-cache.js +11 -11
  153. package/utils/n/user.js +34 -34
  154. package/utils/n/uuid.js +16 -16
  155. package/utils/n-generator-routers.js +208 -208
  156. package/utils/n-router.js +205 -205
  157. package/utils/n-theme.js +30 -30
  158. package/utils/number.js +180 -180
  159. package/utils/oss.js +57 -57
  160. package/utils/platform.js +1334 -1334
  161. package/utils/quarter.js +58 -58
  162. package/utils/storage.js +198 -198
  163. package/utils/style.js +24 -24
  164. package/utils/theme.js +138 -138
  165. package/utils/transfer-queue.js +7 -7
  166. package/utils/transform.js +204 -205
  167. package/utils/type.js +102 -102
  168. package/utils/util.js +795 -795
  169. package/utils/validator.js +181 -181
  170. package/utils/vxetable/index.js +25 -25
  171. package/utils/zoomScroll.js +9 -9
package/utils/file.js CHANGED
@@ -1,19 +1,19 @@
1
- /**
2
- * 文件大小计算
3
- * @param size
4
- * @returns {string}
5
- */
6
- export const formatterSizeUnit = function (size) {
7
- if (size) {
8
- let result = parseInt(size);
9
- if (result < 1024) {
10
- return result + " B";
11
- } else if (result < 1024 * 1024) {
12
- return parseInt(result / 1024) + " KB";
13
- } else if (result < 1024 * 1024 * 1024) {
14
- return parseInt(result / (1024 * 1024)) + " MB";
15
- } else {
16
- return parseInt(result / (1024 * 1024 * 1024)) + " GB";
17
- }
18
- }
19
- };
1
+ /**
2
+ * 文件大小计算
3
+ * @param size
4
+ * @returns {string}
5
+ */
6
+ export const formatterSizeUnit = function (size) {
7
+ if (size) {
8
+ let result = parseInt(size);
9
+ if (result < 1024) {
10
+ return result + " B";
11
+ } else if (result < 1024 * 1024) {
12
+ return parseInt(result / 1024) + " KB";
13
+ } else if (result < 1024 * 1024 * 1024) {
14
+ return parseInt(result / (1024 * 1024)) + " MB";
15
+ } else {
16
+ return parseInt(result / (1024 * 1024 * 1024)) + " GB";
17
+ }
18
+ }
19
+ };
@@ -1,29 +1,29 @@
1
- import ajax from '../ajax'
2
-
3
- export const checkSingle = async (rule, value, callback, {url, formKey, formName}) => {
4
- if (!formName) {
5
- formName = "参数";
6
- }
7
- if (value) {
8
- if (url) {
9
- let params = {};
10
- if (formKey) {
11
- params[formKey] = value
12
- }
13
- const { data } = await ajax.get(url, {params: params});
14
- if (data.code == 1 && data.data) {
15
- callback(formName + "已存在");
16
- } else {
17
- callback();
18
- }
19
- } else {
20
- callback();
21
- }
22
- } else {
23
- callback(formName + "不能为空");
24
- }
25
- }
26
-
27
- export default {
28
- checkSingle
29
- }
1
+ import ajax from '../ajax'
2
+
3
+ export const checkSingle = async (rule, value, callback, {url, formKey, formName}) => {
4
+ if (!formName) {
5
+ formName = "参数";
6
+ }
7
+ if (value) {
8
+ if (url) {
9
+ let params = {};
10
+ if (formKey) {
11
+ params[formKey] = value
12
+ }
13
+ const { data } = await ajax.get(url, {params: params});
14
+ if (data.code == 1 && data.data) {
15
+ callback(formName + "已存在");
16
+ } else {
17
+ callback();
18
+ }
19
+ } else {
20
+ callback();
21
+ }
22
+ } else {
23
+ callback(formName + "不能为空");
24
+ }
25
+ }
26
+
27
+ export default {
28
+ checkSingle
29
+ }
@@ -1,68 +1,68 @@
1
- // 获取半年
2
- export function getHalfYear(date) {
3
- if (!date || date.length < 4) {
4
- return ''
5
- }
6
-
7
- const year = date.substring(0, 4)
8
- const month = date.substring(4, 6)
9
- const halfYear = getHalfYearNum(parseInt(month))
10
- if (!month) {
11
- return `${year}`
12
- }
13
- return `${year}H${halfYear}`
14
- }
15
-
16
- export function getHalfYearNum(month) {
17
- if (typeof month === 'string') {
18
- if (isNaN(parseInt(month))) return 0
19
- month = parseInt(month)
20
- }
21
-
22
- return month <= 6 ? 1 : 2
23
- }
24
-
25
- export function formatHalfYear(halfYear) {
26
- if (!halfYear || halfYear.length < 4) {
27
- return halfYear
28
- }
29
-
30
- const year = halfYear.substring(0, 4)
31
- const month = halfYear.substring(4, 6)
32
- if (!month) {
33
- return `${year}全年`
34
- }
35
- const halfYearNum = parseInt(halfYear.substring(5))
36
- const halfStr = halfYearNum === 1 ? '上半年' : '下半年'
37
- return `${year}${halfStr}`
38
- }
39
-
40
- export function getHalfYearBeginMonth(halfYear) {
41
- if (!halfYear || halfYear.length < 4) {
42
- return halfYear
43
- }
44
- const year = halfYear.substring(0, 4)
45
- const month = halfYear.substring(4, 6)
46
- if (!month) {
47
- return `${year}01`
48
- }
49
- const halfYearNum = parseInt(halfYear.substring(5))
50
- const beginMonth = halfYearNum * 6 - 5
51
- const monthStr = beginMonth < 10 ? `0${beginMonth}` : `${beginMonth}`
52
- return `${year}${monthStr}`
53
- }
54
-
55
- export function getHalfYearEndMonth(halfYear) {
56
- if (!halfYear || halfYear.length < 4) {
57
- return halfYear
58
- }
59
- const year = halfYear.substring(0, 4)
60
- const month = halfYear.substring(4, 6)
61
- if (!month) {
62
- return `${year}12`
63
- }
64
- const halfYearNum = parseInt(halfYear.substring(5))
65
- const endMonth = halfYearNum * 2
66
- const monthStr = endMonth < 10 ? `0${endMonth}` : `${endMonth}`
67
- return `${year}${monthStr}`
68
- }
1
+ // 获取半年
2
+ export function getHalfYear(date) {
3
+ if (!date || date.length < 4) {
4
+ return ''
5
+ }
6
+
7
+ const year = date.substring(0, 4)
8
+ const month = date.substring(4, 6)
9
+ const halfYear = getHalfYearNum(parseInt(month))
10
+ if (!month) {
11
+ return `${year}`
12
+ }
13
+ return `${year}H${halfYear}`
14
+ }
15
+
16
+ export function getHalfYearNum(month) {
17
+ if (typeof month === 'string') {
18
+ if (isNaN(parseInt(month))) return 0
19
+ month = parseInt(month)
20
+ }
21
+
22
+ return month <= 6 ? 1 : 2
23
+ }
24
+
25
+ export function formatHalfYear(halfYear) {
26
+ if (!halfYear || halfYear.length < 4) {
27
+ return halfYear
28
+ }
29
+
30
+ const year = halfYear.substring(0, 4)
31
+ const month = halfYear.substring(4, 6)
32
+ if (!month) {
33
+ return `${year}全年`
34
+ }
35
+ const halfYearNum = parseInt(halfYear.substring(5))
36
+ const halfStr = halfYearNum === 1 ? '上半年' : '下半年'
37
+ return `${year}${halfStr}`
38
+ }
39
+
40
+ export function getHalfYearBeginMonth(halfYear) {
41
+ if (!halfYear || halfYear.length < 4) {
42
+ return halfYear
43
+ }
44
+ const year = halfYear.substring(0, 4)
45
+ const month = halfYear.substring(4, 6)
46
+ if (!month) {
47
+ return `${year}01`
48
+ }
49
+ const halfYearNum = parseInt(halfYear.substring(5))
50
+ const beginMonth = halfYearNum * 6 - 5
51
+ const monthStr = beginMonth < 10 ? `0${beginMonth}` : `${beginMonth}`
52
+ return `${year}${monthStr}`
53
+ }
54
+
55
+ export function getHalfYearEndMonth(halfYear) {
56
+ if (!halfYear || halfYear.length < 4) {
57
+ return halfYear
58
+ }
59
+ const year = halfYear.substring(0, 4)
60
+ const month = halfYear.substring(4, 6)
61
+ if (!month) {
62
+ return `${year}12`
63
+ }
64
+ const halfYearNum = parseInt(halfYear.substring(5))
65
+ const endMonth = halfYearNum * 2
66
+ const monthStr = endMonth < 10 ? `0${endMonth}` : `${endMonth}`
67
+ return `${year}${monthStr}`
68
+ }
package/utils/index.js CHANGED
@@ -1,42 +1,42 @@
1
- const sum = (a, b) => {
2
- return a + b;
3
- };
4
-
5
- export { sum };
6
- import ajax from './ajax'
7
-
8
- export {ajax as axios}
9
- // export * from './crypto'
10
- // export * from './dict'
11
- // export * from './form/validate'
12
- // export * from './menu'
13
- // export * from './vxetable'
14
- // export * from './n'
15
- // export * from './date'
16
- // export * from './assist'
17
- // export * from './base64'
18
- // export * from './bus'
19
- // export * from './dom'
20
- // export * from './event'
21
- // export * from './excel'
22
- // export * from './file'
23
- // export * from './half-year'
24
- // export * from './json'
25
- // export * from './lodop'
26
- // export * from './mime_type'
27
- // export * from './modelerUtil'
28
- // export * from './n-generator-routers'
29
- // export * from './n-router'
30
- // export * from './n-theme'
31
- // export * from './number'
32
- // export * from './oss'
33
- // export * from './platform'
34
- // export * from './quarter'
35
- // export * from './storage'
36
- // export * from './style'
37
- // export * from './theme'
38
- // export * from './transfer-queue'
39
- // export * from './type'
40
- // export * from './util'
41
- // export * from './validator'
1
+ const sum = (a, b) => {
2
+ return a + b;
3
+ };
4
+
5
+ export { sum };
6
+ import ajax from './ajax'
7
+
8
+ export {ajax as axios}
9
+ // export * from './crypto'
10
+ // export * from './dict'
11
+ // export * from './form/validate'
12
+ // export * from './menu'
13
+ // export * from './vxetable'
14
+ // export * from './n'
15
+ // export * from './date'
16
+ // export * from './assist'
17
+ // export * from './base64'
18
+ // export * from './bus'
19
+ // export * from './dom'
20
+ // export * from './event'
21
+ // export * from './excel'
22
+ // export * from './file'
23
+ // export * from './half-year'
24
+ // export * from './json'
25
+ // export * from './lodop'
26
+ // export * from './mime_type'
27
+ // export * from './modelerUtil'
28
+ // export * from './n-generator-routers'
29
+ // export * from './n-router'
30
+ // export * from './n-theme'
31
+ // export * from './number'
32
+ // export * from './oss'
33
+ // export * from './platform'
34
+ // export * from './quarter'
35
+ // export * from './storage'
36
+ // export * from './style'
37
+ // export * from './theme'
38
+ // export * from './transfer-queue'
39
+ // export * from './type'
40
+ // export * from './util'
41
+ // export * from './validator'
42
42
  // export * from './zoomScroll'
package/utils/json.js CHANGED
@@ -1,29 +1,29 @@
1
- let json = {};
2
- /**
3
- * Json(带函数)转字符串
4
- * @param value Json对象
5
- * @returns {string} 字符串
6
- */
7
- json.stringify = function (value) {
8
- return JSON.stringify(value, function(key, val) {
9
- if (typeof val === 'function') {
10
- return val + '';
11
- }
12
- return val;
13
- });
14
- }
15
- /**
16
- * 字符串(带函数)转Object(函数可调用)
17
- * @param value
18
- * @returns {any}
19
- */
20
- json.parse = function (value) {
21
- return JSON.parse(value,function(k,v){
22
- if(v.indexOf&&v.indexOf('function')>-1){
23
- return eval("(function(){return "+v+" })()")
24
- }
25
- return v;
26
- });
27
- }
28
-
29
- export default json;
1
+ let json = {};
2
+ /**
3
+ * Json(带函数)转字符串
4
+ * @param value Json对象
5
+ * @returns {string} 字符串
6
+ */
7
+ json.stringify = function (value) {
8
+ return JSON.stringify(value, function(key, val) {
9
+ if (typeof val === 'function') {
10
+ return val + '';
11
+ }
12
+ return val;
13
+ });
14
+ }
15
+ /**
16
+ * 字符串(带函数)转Object(函数可调用)
17
+ * @param value
18
+ * @returns {any}
19
+ */
20
+ json.parse = function (value) {
21
+ return JSON.parse(value,function(k,v){
22
+ if(v.indexOf&&v.indexOf('function')>-1){
23
+ return eval("(function(){return "+v+" })()")
24
+ }
25
+ return v;
26
+ });
27
+ }
28
+
29
+ export default json;