@yilianjituan/yilian_dgerm 0.0.1-alpha.31 → 0.0.1-alpha.33
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/.eslintrc.js +0 -0
- package/LICENSE +0 -0
- package/README.md +8 -6
- package/dist/business/Entry/index.d.ts +0 -0
- package/dist/business/Entry/index.interface.d.ts +0 -0
- package/dist/business/Entry/index.interface.js +0 -0
- package/dist/business/Entry/index.js +0 -0
- package/dist/business/Entry/index.scss +0 -0
- package/dist/business/TestBtn/index.d.ts +0 -0
- package/dist/business/TestBtn/index.interface.d.ts +0 -0
- package/dist/business/TestBtn/index.interface.js +0 -0
- package/dist/business/TestBtn/index.js +0 -0
- package/dist/commonAxios/Axios.d.ts +0 -0
- package/dist/commonAxios/Axios.js +0 -0
- package/dist/commonAxios/http.d.ts +0 -0
- package/dist/commonAxios/http.js +0 -0
- package/dist/commonAxios/index.d.ts +0 -0
- package/dist/commonAxios/index.js +0 -0
- package/dist/commonAxios/juicer.d.ts +0 -0
- package/dist/commonAxios/juicer.js +0 -0
- package/dist/commonData/address.d.ts +0 -0
- package/dist/commonData/address.js +0 -0
- package/dist/commonImg/ic_im_no_archives_new.png +0 -0
- package/dist/commonType/globalEnum.d.ts +0 -0
- package/dist/commonType/globalEnum.js +0 -0
- package/dist/commonType/globalFun.d.ts +0 -0
- package/dist/commonType/globalFun.js +0 -0
- package/dist/components/BigImage/index.d.ts +0 -0
- package/dist/components/BigImage/index.interface.d.ts +0 -0
- package/dist/components/BigImage/index.interface.js +0 -0
- package/dist/components/BigImage/index.js +0 -0
- package/dist/components/CustomButtonModal/index.d.ts +4 -0
- package/dist/components/CustomButtonModal/index.interface.d.ts +14 -0
- package/dist/components/CustomButtonModal/index.interface.js +1 -0
- package/dist/components/CustomButtonModal/index.js +69 -0
- package/dist/components/DateTimePicker/index.d.ts +4 -0
- package/dist/components/DateTimePicker/index.interface.d.ts +6 -0
- package/dist/components/DateTimePicker/index.interface.js +1 -0
- package/dist/components/DateTimePicker/index.js +100 -0
- package/dist/components/DropDownSelect/index.d.ts +0 -0
- package/dist/components/DropDownSelect/index.interface.d.ts +4 -0
- package/dist/components/DropDownSelect/index.interface.js +0 -0
- package/dist/components/DropDownSelect/index.js +4 -2
- package/dist/components/EmptyDom/index.d.ts +0 -0
- package/dist/components/EmptyDom/index.interface.d.ts +0 -0
- package/dist/components/EmptyDom/index.interface.js +0 -0
- package/dist/components/EmptyDom/index.js +0 -0
- package/dist/components/Entry/index.d.ts +0 -0
- package/dist/components/Entry/index.interface.d.ts +0 -0
- package/dist/components/Entry/index.interface.js +0 -0
- package/dist/components/Entry/index.js +0 -0
- package/dist/components/Entry/index.scss +0 -0
- package/dist/components/ExportExcels/ExportExcels.scss +0 -0
- package/dist/components/ExportExcels/index.d.ts +0 -0
- package/dist/components/ExportExcels/index.interface.d.ts +0 -0
- package/dist/components/ExportExcels/index.interface.js +0 -0
- package/dist/components/ExportExcels/index.js +0 -0
- package/dist/components/FileUpload/fileUtil.d.ts +0 -0
- package/dist/components/FileUpload/fileUtil.js +0 -0
- package/dist/components/FileUpload/index.d.ts +0 -0
- package/dist/components/FileUpload/index.interface.d.ts +0 -0
- package/dist/components/FileUpload/index.interface.js +0 -0
- package/dist/components/FileUpload/index.js +0 -0
- package/dist/components/FileUpload/index.scss +0 -0
- package/dist/components/FilterRadio/index.d.ts +0 -0
- package/dist/components/FilterRadio/index.interface.d.ts +0 -0
- package/dist/components/FilterRadio/index.interface.js +0 -0
- package/dist/components/FilterRadio/index.js +0 -0
- package/dist/components/FilterRadio/index.scss +0 -0
- package/dist/components/MyBtn/index.d.ts +0 -0
- package/dist/components/MyBtn/index.interface.d.ts +0 -0
- package/dist/components/MyBtn/index.interface.js +0 -0
- package/dist/components/MyBtn/index.js +0 -0
- package/dist/components/NumberInput/index.d.ts +0 -0
- package/dist/components/NumberInput/index.interface.d.ts +0 -0
- package/dist/components/NumberInput/index.interface.js +0 -0
- package/dist/components/NumberInput/index.js +0 -0
- package/dist/components/NumberInput/index.scss +0 -0
- package/dist/components/OcrCommon/index.config.d.ts +18 -0
- package/dist/components/OcrCommon/index.config.js +67 -0
- package/dist/components/OcrCommon/index.d.ts +5 -0
- package/dist/components/OcrCommon/index.interface.d.ts +22 -0
- package/dist/components/OcrCommon/index.interface.js +1 -0
- package/dist/components/OcrCommon/index.js +479 -0
- package/dist/components/OcrCommon/index.scss +128 -0
- package/dist/components/PageTemplate/index.d.ts +0 -0
- package/dist/components/PageTemplate/index.interface.d.ts +0 -0
- package/dist/components/PageTemplate/index.interface.js +0 -0
- package/dist/components/PageTemplate/index.js +0 -0
- package/dist/components/PageTemplate/index.scss +0 -0
- package/dist/components/ReactEcharts/index.d.ts +0 -0
- package/dist/components/ReactEcharts/index.interface.d.ts +0 -0
- package/dist/components/ReactEcharts/index.interface.js +0 -0
- package/dist/components/ReactEcharts/index.js +0 -0
- package/dist/components/SelectMax/index.d.ts +0 -0
- package/dist/components/SelectMax/index.interface.d.ts +0 -0
- package/dist/components/SelectMax/index.interface.js +0 -0
- package/dist/components/SelectMax/index.js +0 -0
- package/dist/components/SelectPosition/index.d.ts +5 -0
- package/dist/components/SelectPosition/index.interface.d.ts +65 -0
- package/dist/components/SelectPosition/index.interface.js +1 -0
- package/dist/components/SelectPosition/index.js +353 -0
- package/dist/components/SelectPosition/index.scss +19 -0
- package/dist/components/SuperCascader/index.d.ts +0 -0
- package/dist/components/SuperCascader/index.interface.d.ts +0 -0
- package/dist/components/SuperCascader/index.interface.js +0 -0
- package/dist/components/SuperCascader/index.js +0 -0
- package/dist/components/SuperInput/index.d.ts +0 -0
- package/dist/components/SuperInput/index.interface.d.ts +0 -0
- package/dist/components/SuperInput/index.interface.js +0 -0
- package/dist/components/SuperInput/index.js +0 -0
- package/dist/components/TabsMode/index.d.ts +0 -0
- package/dist/components/TabsMode/index.interface.d.ts +0 -0
- package/dist/components/TabsMode/index.interface.js +0 -0
- package/dist/components/TabsMode/index.js +0 -0
- package/dist/components/TypographyText/index.d.ts +5 -0
- package/dist/components/TypographyText/index.interface.d.ts +13 -0
- package/dist/components/TypographyText/index.interface.js +1 -0
- package/dist/components/TypographyText/index.js +67 -0
- package/dist/components/TypographyText/index.scss +9 -0
- package/dist/components/VideoProgressModal/index.d.ts +0 -0
- package/dist/components/VideoProgressModal/index.interface.d.ts +0 -0
- package/dist/components/VideoProgressModal/index.interface.js +0 -0
- package/dist/components/VideoProgressModal/index.js +0 -0
- package/dist/components/VideoProgressModal/index.scss +0 -0
- package/dist/components/YLModal/drag.d.ts +0 -0
- package/dist/components/YLModal/drag.js +0 -0
- package/dist/components/YLModal/index.d.ts +0 -0
- package/dist/components/YLModal/index.interface.d.ts +0 -0
- package/dist/components/YLModal/index.interface.js +0 -0
- package/dist/components/YLModal/index.js +0 -0
- package/dist/index.d.ts +17 -12
- package/dist/index.js +17 -12
- package/dist/react-app-env.d.ts +0 -0
- package/dist/utils/common.d.ts +0 -0
- package/dist/utils/common.js +0 -0
- package/dist/utils/index.d.ts +0 -0
- package/dist/utils/index.js +0 -0
- package/dist/utils/notificationHelper.d.ts +0 -0
- package/dist/utils/notificationHelper.js +0 -0
- package/dist/utils/responseMessage.d.ts +0 -0
- package/dist/utils/responseMessage.js +0 -0
- package/dist/utils/userSessionActions.d.ts +0 -0
- package/dist/utils/userSessionActions.js +0 -0
- package/package.json +28 -27
package/.eslintrc.js
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -120,9 +120,11 @@ MIT
|
|
|
120
120
|
2、DropDownSelect 参数调试:传入http
|
|
121
121
|
3、组件适配:PageTemplate 差异适配
|
|
122
122
|
4、添加执行命令 build-copy 支持本地打包调试
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
|
|
124
|
+
# 2024.10.31 更新日志
|
|
125
|
+
1、SelectPosition 组件封装
|
|
126
|
+
2、SelectPosition 宿主引用与调试
|
|
127
|
+
3、全局样式调整
|
|
128
|
+
|
|
129
|
+
# 2024.11.07 更新日志
|
|
130
|
+
1、组件调整:DropDownSelect添加查询控制参数changeNoSearch
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/commonAxios/http.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ModalProps } from 'antd';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
trigger: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
onClick?: (callback?: (action: boolean) => void) => void;
|
|
7
|
+
};
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
modalProps: Omit<ModalProps, 'onOk' | 'onCancel' | 'open' | 'confirmLoading'> & {
|
|
10
|
+
handleOk: (close: (action: boolean) => void) => void;
|
|
11
|
+
handleCancel?: () => void;
|
|
12
|
+
};
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
import { Modal } from 'antd';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
var Index = function Index(props) {
|
|
11
|
+
var trigger = props.trigger,
|
|
12
|
+
onOpenChange = props.onOpenChange,
|
|
13
|
+
modalProps = props.modalProps,
|
|
14
|
+
children = props.children;
|
|
15
|
+
var _React$useState = React.useState(false),
|
|
16
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
17
|
+
open = _React$useState2[0],
|
|
18
|
+
setOpen = _React$useState2[1]; // 本地 open 状态
|
|
19
|
+
var _React$useState3 = React.useState(false),
|
|
20
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
21
|
+
confirmLoading = _React$useState4[0],
|
|
22
|
+
setConfirmLoading = _React$useState4[1]; // 本地 confirmLoading 状态
|
|
23
|
+
|
|
24
|
+
// 自定义的内部点击逻辑
|
|
25
|
+
var handleClick = function handleClick() {
|
|
26
|
+
var _trigger$onClick;
|
|
27
|
+
var _boolean;
|
|
28
|
+
trigger === null || trigger === void 0 || (_trigger$onClick = trigger.onClick) === null || _trigger$onClick === void 0 || _trigger$onClick.call(trigger, function (action) {
|
|
29
|
+
if (action === false) {
|
|
30
|
+
_boolean = false;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
if (_boolean === false) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
openFunChange(true);
|
|
37
|
+
};
|
|
38
|
+
var handleOk = function handleOk() {
|
|
39
|
+
setConfirmLoading(true);
|
|
40
|
+
modalProps === null || modalProps === void 0 || modalProps.handleOk(function (action) {
|
|
41
|
+
if (action) {
|
|
42
|
+
openFunChange(false);
|
|
43
|
+
}
|
|
44
|
+
setConfirmLoading(false);
|
|
45
|
+
}); // 执行 onOk 并获取返回值
|
|
46
|
+
};
|
|
47
|
+
var handleCancel = function handleCancel() {
|
|
48
|
+
var _modalProps$handleCan;
|
|
49
|
+
openFunChange(false);
|
|
50
|
+
modalProps === null || modalProps === void 0 || (_modalProps$handleCan = modalProps.handleCancel) === null || _modalProps$handleCan === void 0 || _modalProps$handleCan.call(modalProps); // 如果 modalProps 传递了 onCancel 回调,执行它
|
|
51
|
+
};
|
|
52
|
+
var openFunChange = function openFunChange(status) {
|
|
53
|
+
setOpen(status); // 设置 Modal 打开还是关闭
|
|
54
|
+
onOpenChange === null || onOpenChange === void 0 || onOpenChange(status); // 通知外部状态改变
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(trigger === null || trigger === void 0 ? void 0 : trigger.children, {
|
|
57
|
+
onClick: handleClick
|
|
58
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: "custom_modal__box"
|
|
60
|
+
}, open && /*#__PURE__*/React.createElement(Modal, _extends({
|
|
61
|
+
open: true,
|
|
62
|
+
onOk: handleOk,
|
|
63
|
+
onCancel: handleCancel,
|
|
64
|
+
confirmLoading: confirmLoading,
|
|
65
|
+
destroyOnClose: true,
|
|
66
|
+
maskClosable: false
|
|
67
|
+
}, modalProps), children && children, " ")));
|
|
68
|
+
};
|
|
69
|
+
export default Index;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
var _excluded = ["type", "tlTimeLimit", "format"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { DatePicker, TimePicker } from "antd";
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
|
+
console.log('❗️❌❗️ ~ dayjs:', dayjs);
|
|
9
|
+
var RangePicker = DatePicker.RangePicker;
|
|
10
|
+
// 基于antd,具体参照antd
|
|
11
|
+
var Index = function Index(props) {
|
|
12
|
+
var _props$type = props.type,
|
|
13
|
+
type = _props$type === void 0 ? 'date' : _props$type,
|
|
14
|
+
tlTimeLimit = props.tlTimeLimit,
|
|
15
|
+
_props$format = props.format,
|
|
16
|
+
format = _props$format === void 0 ? 'HH:mm' : _props$format,
|
|
17
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
18
|
+
|
|
19
|
+
// 日期范围处理
|
|
20
|
+
var range = function range(start, end) {
|
|
21
|
+
var result = [];
|
|
22
|
+
for (var i = start; i < end; i++) {
|
|
23
|
+
result.push(i);
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// 日期禁用
|
|
29
|
+
var disabledDate = function disabledDate(current) {
|
|
30
|
+
if (tlTimeLimit === 'before') {
|
|
31
|
+
// 禁用当前时间之前
|
|
32
|
+
return current && current < dayjs().startOf('days');
|
|
33
|
+
} else if (tlTimeLimit === 'after') {
|
|
34
|
+
// 禁用当前时间之后
|
|
35
|
+
return current && current > dayjs().endOf('days');
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// 时间禁用
|
|
41
|
+
var disabledTime = function disabledTime(current) {
|
|
42
|
+
// 判断日期是否是今天
|
|
43
|
+
if (!current || !current.isSame(dayjs(), 'day')) {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
var currentHour = dayjs().hour(); // 当前时间
|
|
47
|
+
var currentMinute = dayjs().minute(); // 当前分钟
|
|
48
|
+
var currentSecond = dayjs().second(); // 当前秒
|
|
49
|
+
|
|
50
|
+
if (tlTimeLimit === 'before') {
|
|
51
|
+
// 严格限制只能选择当前时间之前的时间
|
|
52
|
+
return {
|
|
53
|
+
disabledHours: function disabledHours() {
|
|
54
|
+
return range(0, currentHour);
|
|
55
|
+
},
|
|
56
|
+
disabledMinutes: function disabledMinutes(hour) {
|
|
57
|
+
return hour === currentHour ? range(0, currentMinute) : [];
|
|
58
|
+
},
|
|
59
|
+
disabledSeconds: function disabledSeconds(hour, minute) {
|
|
60
|
+
return hour === currentHour && minute === currentMinute ? range(0, currentSecond) : [];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
} else if (tlTimeLimit === 'after') {
|
|
64
|
+
// 严格限制只能选择当前时间之后的时间
|
|
65
|
+
return {
|
|
66
|
+
disabledHours: function disabledHours() {
|
|
67
|
+
return range(currentHour + 1, 24);
|
|
68
|
+
},
|
|
69
|
+
disabledMinutes: function disabledMinutes(hour) {
|
|
70
|
+
return hour === currentHour ? range(currentMinute + 1, 60) : [];
|
|
71
|
+
},
|
|
72
|
+
disabledSeconds: function disabledSeconds(hour, minute) {
|
|
73
|
+
return hour === currentHour && minute === currentMinute ? range(currentSecond + 1, 60) : [];
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {};
|
|
78
|
+
};
|
|
79
|
+
var typeComponentMap = {
|
|
80
|
+
date: /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
81
|
+
disabledDate: disabledDate
|
|
82
|
+
}, otherProps)),
|
|
83
|
+
time: /*#__PURE__*/React.createElement(TimePicker, _extends({
|
|
84
|
+
format: format,
|
|
85
|
+
disabledTime: disabledTime
|
|
86
|
+
}, otherProps)),
|
|
87
|
+
dateTime: /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
88
|
+
showTime: true,
|
|
89
|
+
format: format,
|
|
90
|
+
disabledTime: disabledTime,
|
|
91
|
+
disabledDate: disabledDate
|
|
92
|
+
}, otherProps)),
|
|
93
|
+
range: /*#__PURE__*/React.createElement(RangePicker, _extends({
|
|
94
|
+
disabledTime: disabledTime,
|
|
95
|
+
disabledDate: disabledDate
|
|
96
|
+
}, otherProps))
|
|
97
|
+
};
|
|
98
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, typeComponentMap[type], " ");
|
|
99
|
+
};
|
|
100
|
+
export default Index;
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["http", "url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "mode"];
|
|
2
|
+
var _excluded = ["http", "url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "changeNoSearch", "mode"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
5
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -41,6 +41,8 @@ var Index = function Index(props) {
|
|
|
41
41
|
beforeSearch = props.beforeSearch,
|
|
42
42
|
filterOptionsCallback = props.filterOptionsCallback,
|
|
43
43
|
_onChange = props.onChange,
|
|
44
|
+
_props$changeNoSearch = props.changeNoSearch,
|
|
45
|
+
changeNoSearch = _props$changeNoSearch === void 0 ? true : _props$changeNoSearch,
|
|
44
46
|
_props$mode = props.mode,
|
|
45
47
|
mode = _props$mode === void 0 ? undefined : _props$mode,
|
|
46
48
|
prop = _objectWithoutProperties(props, _excluded);
|
|
@@ -135,7 +137,7 @@ var Index = function Index(props) {
|
|
|
135
137
|
// 选择
|
|
136
138
|
var onChangeSelect = function onChangeSelect(value, option) {
|
|
137
139
|
var _selectRef$current;
|
|
138
|
-
if (typeof value === 'string') {
|
|
140
|
+
if (changeNoSearch && typeof value === 'string') {
|
|
139
141
|
paramsRef.current = value;
|
|
140
142
|
}
|
|
141
143
|
mode === undefined && ((_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.blur());
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const fontSizeOpt: {
|
|
2
|
+
label: string;
|
|
3
|
+
value: number;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const imgSizeOpt: {
|
|
6
|
+
label: string;
|
|
7
|
+
value: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const imgRotateOpt: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: number;
|
|
12
|
+
}[];
|
|
13
|
+
export declare const ocrDirection: {
|
|
14
|
+
0: string;
|
|
15
|
+
1: string;
|
|
16
|
+
2: string;
|
|
17
|
+
3: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export var fontSizeOpt = [{
|
|
2
|
+
label: 'x0.25',
|
|
3
|
+
value: 0.25
|
|
4
|
+
}, {
|
|
5
|
+
label: 'x0.5',
|
|
6
|
+
value: 0.5
|
|
7
|
+
}, {
|
|
8
|
+
label: 'x0.75',
|
|
9
|
+
value: 0.75
|
|
10
|
+
}, {
|
|
11
|
+
label: 'x1',
|
|
12
|
+
value: 1
|
|
13
|
+
}, {
|
|
14
|
+
label: 'x1.25',
|
|
15
|
+
value: 1.25
|
|
16
|
+
}, {
|
|
17
|
+
label: 'x1.5',
|
|
18
|
+
value: 1.5
|
|
19
|
+
}, {
|
|
20
|
+
label: 'x1.75',
|
|
21
|
+
value: 1.75
|
|
22
|
+
}, {
|
|
23
|
+
label: 'x2',
|
|
24
|
+
value: 2
|
|
25
|
+
}];
|
|
26
|
+
export var imgSizeOpt = [{
|
|
27
|
+
label: 'x0.25',
|
|
28
|
+
value: 0.25
|
|
29
|
+
}, {
|
|
30
|
+
label: 'x0.5',
|
|
31
|
+
value: 0.5
|
|
32
|
+
}, {
|
|
33
|
+
label: 'x0.75',
|
|
34
|
+
value: 0.75
|
|
35
|
+
}, {
|
|
36
|
+
label: 'x1',
|
|
37
|
+
value: 1
|
|
38
|
+
}];
|
|
39
|
+
|
|
40
|
+
// 图片旋转方向
|
|
41
|
+
export var imgRotateOpt = [{
|
|
42
|
+
label: '0',
|
|
43
|
+
value: 0
|
|
44
|
+
}, {
|
|
45
|
+
label: '90',
|
|
46
|
+
value: 1
|
|
47
|
+
}, {
|
|
48
|
+
label: '180',
|
|
49
|
+
value: 2
|
|
50
|
+
}, {
|
|
51
|
+
label: '270',
|
|
52
|
+
value: 3
|
|
53
|
+
}];
|
|
54
|
+
|
|
55
|
+
// ocr识别角度校验
|
|
56
|
+
// 图像方向,当 detect_direction=true 时返回该字段。
|
|
57
|
+
// - - 1:未定义,
|
|
58
|
+
// - 0:正向,
|
|
59
|
+
// - 1:逆时针90度,
|
|
60
|
+
// - 2:逆时针180度,
|
|
61
|
+
// - 3:逆时针270度
|
|
62
|
+
export var ocrDirection = {
|
|
63
|
+
0: '0',
|
|
64
|
+
1: '90',
|
|
65
|
+
2: '180',
|
|
66
|
+
3: '270'
|
|
67
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MethodEnum } from "../../commonType/globalEnum";
|
|
2
|
+
export interface IUrl {
|
|
3
|
+
url: string;
|
|
4
|
+
method: MethodEnum;
|
|
5
|
+
}
|
|
6
|
+
export interface CommonOcrModalProps {
|
|
7
|
+
open: boolean;
|
|
8
|
+
modalProps?: any;
|
|
9
|
+
showHandleBtn?: boolean;
|
|
10
|
+
url?: IUrl;
|
|
11
|
+
http: any;
|
|
12
|
+
params: any;
|
|
13
|
+
minWidth?: number;
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
afterRequest?: (params: any) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type DirectionEnum = 0 | 1 | 2 | 3;
|
|
19
|
+
export interface OcrResult {
|
|
20
|
+
direction: DirectionEnum;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|