orion-design 0.1.1 → 0.1.2
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/components/Flex/Col.d.ts +25 -0
- package/dist/components/Flex/Item.d.ts +25 -0
- package/dist/components/Flex/Row.d.ts +25 -0
- package/dist/components/Flex/index.d.ts +10 -0
- package/dist/components/Flex/index.js +151 -0
- package/dist/components/Modal/Modal.d.ts +2 -0
- package/dist/components/Space/index.d.ts +76 -0
- package/dist/components/_util/classNames.d.ts +2 -0
- package/dist/components/_util/classNames.js +31 -0
- package/dist/components/_util/isValid.d.ts +2 -0
- package/dist/components/_util/isValid.js +5 -0
- package/dist/components/_util/props-util/index.d.ts +6 -0
- package/dist/components/_util/props-util/index.js +53 -0
- package/dist/components/_util/props-util/initDefaultProps.d.ts +6 -0
- package/dist/components/_util/props-util/initDefaultProps.js +25 -0
- package/dist/components/_util/type.d.ts +62 -0
- package/dist/components/_util/type.js +66 -0
- package/dist/components/_util/util.d.ts +18 -0
- package/dist/components/_util/util.js +83 -0
- package/dist/components/_util/vue-types/index.d.ts +12 -0
- package/dist/components/_util/vue-types/index.js +473 -0
- package/dist/components/components.d.ts +4 -0
- package/dist/components/components.js +10 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +23 -0
- package/dist/components-O4L3qYfM.js +61 -0
- package/dist/error/OrionError.js +9 -7
- package/dist/index.css +44 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +11 -0
- package/dist/print/LodopFuncs.js +109 -140
- package/dist/print/index.js +204 -199
- package/dist/request/ErrorHandlerChain.js +13 -13
- package/dist/request/RequestFilterChain.js +13 -13
- package/dist/request/ResponseParserChain.js +13 -13
- package/dist/request/disivion/DateSerializer.js +43 -51
- package/dist/request/disivion/DivisionErrorHandler.js +42 -42
- package/dist/request/disivion/DivisionResponseParser.js +22 -18
- package/dist/request/disivion/index.d.ts +21 -1
- package/dist/request/disivion/index.js +174 -153
- package/dist/request/error/BizExceptionResponseError.js +10 -10
- package/dist/request/error/ExceptionResponseError.js +10 -10
- package/dist/request/error/ResponseError.js +11 -9
- package/dist/request/error/SessionExceptionResponseError.js +10 -10
- package/dist/request/index.d.ts +3 -0
- package/dist/request/index.js +3 -2
- package/dist/style/index.d.ts +3 -0
- package/dist/style/index.js +1 -0
- package/dist/utils/DateUtil.js +46 -50
- package/dist/utils/NumberUtil.js +5 -5
- package/dist/utils/cloneDeep.js +1 -2255
- package/dist/utils/delay.js +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/md5.js +215 -271
- package/dist/version/index.d.ts +2 -0
- package/dist/version/index.js +6 -0
- package/dist/version/version.d.ts +2 -0
- package/dist/version/version.js +3 -0
- package/global.d.ts +9 -0
- package/package.json +25 -9
- package/dist/bignumber-upqAL281.js +0 -2907
- package/dist/request/disivion/request.d.ts +0 -21
- package/dist/request/disivion/request.js +0 -476
- package/dist/request/postByOpenNewWindow.d.ts +0 -1
- package/dist/request/postByOpenNewWindow.js +0 -41
package/dist/request/index.js
CHANGED
@@ -3,9 +3,10 @@ export { default as BizExceptionResponseError } from './error/BizExceptionRespon
|
|
3
3
|
export { default as SessionExceptionResponseError } from './error/SessionExceptionResponseError.js';
|
4
4
|
export { default as ExceptionResponseError } from './error/ExceptionResponseError.js';
|
5
5
|
import 'axios';
|
6
|
+
import 'lodash-es';
|
6
7
|
import 'dayjs';
|
7
8
|
import '../utils/md5.js';
|
8
|
-
import '
|
9
|
+
import 'decimal.js';
|
9
10
|
import './ResponseParserChain.js';
|
10
11
|
import './ErrorHandlerChain.js';
|
11
12
|
import './RequestFilterChain.js';
|
@@ -13,4 +14,4 @@ import './disivion/DateSerializer.js';
|
|
13
14
|
import './disivion/DivisionResponseParser.js';
|
14
15
|
import './disivion/DivisionErrorHandler.js';
|
15
16
|
import './error/ResponseError.js';
|
16
|
-
import '
|
17
|
+
import 'element-plus';
|
@@ -0,0 +1 @@
|
|
1
|
+
|
package/dist/utils/DateUtil.js
CHANGED
@@ -2,56 +2,52 @@ import dayjs from 'dayjs';
|
|
2
2
|
import OrionError from '../error/OrionError.js';
|
3
3
|
|
4
4
|
const DateUtil = {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
else {
|
52
|
-
throw new OrionError(`日期[${value}]与格式[${format}]不匹配。`);
|
53
|
-
}
|
54
|
-
},
|
5
|
+
format(p1, p2, p3) {
|
6
|
+
if (p1 instanceof Date && typeof p2 === 'string') {
|
7
|
+
const value = p1;
|
8
|
+
const format = p2;
|
9
|
+
if (!value) {
|
10
|
+
throw new OrionError('value is null.');
|
11
|
+
}
|
12
|
+
if (!format) {
|
13
|
+
throw new OrionError('format is null.');
|
14
|
+
}
|
15
|
+
return dayjs(value).format(format);
|
16
|
+
} else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {
|
17
|
+
const value = p1;
|
18
|
+
const sourceFormat = p2;
|
19
|
+
const targetFormat = p3;
|
20
|
+
if (!value || !sourceFormat || !targetFormat) {
|
21
|
+
throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`);
|
22
|
+
}
|
23
|
+
if (dayjs(value, sourceFormat, true).isValid()) {
|
24
|
+
return dayjs(value, sourceFormat).format(targetFormat);
|
25
|
+
} else {
|
26
|
+
throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`);
|
27
|
+
}
|
28
|
+
} else {
|
29
|
+
throw new OrionError(`入参数量[${arguments.length}]不正确。`);
|
30
|
+
}
|
31
|
+
},
|
32
|
+
stringToDate(value, format) {
|
33
|
+
if (!value) {
|
34
|
+
throw new OrionError('value is null.');
|
35
|
+
}
|
36
|
+
if (!format) {
|
37
|
+
throw new OrionError('format is null.');
|
38
|
+
}
|
39
|
+
if (typeof value !== 'string') {
|
40
|
+
throw new OrionError('value is not a string.');
|
41
|
+
}
|
42
|
+
if (typeof format !== 'string') {
|
43
|
+
throw new OrionError('format is not a string.');
|
44
|
+
}
|
45
|
+
if (dayjs(value, format, true).isValid()) {
|
46
|
+
return dayjs(value, format).toDate();
|
47
|
+
} else {
|
48
|
+
throw new OrionError(`日期[${value}]与格式[${format}]不匹配。`);
|
49
|
+
}
|
50
|
+
}
|
55
51
|
};
|
56
52
|
|
57
53
|
export { DateUtil as default };
|
package/dist/utils/NumberUtil.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import Decimal from 'decimal.js';
|
2
2
|
|
3
3
|
const NumberUtil = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
round: (value, how) => {
|
5
|
+
const dec = new Decimal(value);
|
6
|
+
return Number(dec.toFixed(how, 4));
|
7
|
+
}
|
8
8
|
};
|
9
9
|
|
10
10
|
export { NumberUtil as default };
|