@para-ui/core 3.0.41 → 3.0.43
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/Button/SplitButton.d.ts +2 -0
- package/Button/index.js +9 -2
- package/DragVerify/index.d.ts +9 -23
- package/DragVerify/index.js +158 -38
- package/Drawer/index.js +21 -6
- package/Form/index.js +1 -1
- package/FormItem/index.js +1 -1
- package/FunctionModal/index.js +2 -2
- package/README.md +13 -0
- package/Table/index.js +38 -11
- package/Table/interface.d.ts +21 -1
- package/Transfer/index.js +8 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/umd/AutoBox.js +7 -7
- package/umd/AutoTips.js +3 -3
- package/umd/Breadcrumbs.js +4 -4
- package/umd/Button.js +3 -3
- package/umd/ButtonGroup.js +5 -5
- package/umd/Checkbox.js +3 -3
- package/umd/CheckboxGroup.js +2 -2
- package/umd/ComboSelect.js +3 -3
- package/umd/DatePicker.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +15 -16
- package/umd/Drawer.js +4 -4
- package/umd/DynamicMultiBox.js +2 -2
- package/umd/Form.js +2 -2
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +4 -4
- package/umd/Help.js +5 -5
- package/umd/InputLang.js +2 -2
- package/umd/InputNumber.js +4 -4
- package/umd/Label.js +3 -3
- package/umd/Modal.js +4 -4
- package/umd/MultiBox.js +2 -2
- package/umd/OperateBtn.js +4 -4
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +4 -4
- package/umd/PopConfirm.js +4 -4
- package/umd/Popover.js +3 -3
- package/umd/Radio.js +6 -6
- package/umd/RadioGroup.js +4 -4
- package/umd/Search.js +2 -2
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +2 -2
- package/umd/SelectorPicker.js +4 -4
- package/umd/SingleBox.js +4 -4
- package/umd/Slider.js +2 -2
- package/umd/Switch.js +3 -3
- package/umd/Table.js +5 -5
- package/umd/Tabs.js +2 -2
- package/umd/Tag.js +2 -2
- package/umd/TextEditor.js +2 -2
- package/umd/TextField.js +4 -4
- package/umd/TimePicker.js +3 -3
- package/umd/ToggleButton.js +3 -3
- package/umd/Tooltip.js +2 -2
- package/umd/Transfer.js +5 -5
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +8 -8
- /package/_verture/{index-95dffbeb.js → index-694b816f.js} +0 -0
- /package/_verture/{modalContext-44e0b3ea.js → modalContext-d01400f6.js} +0 -0
package/Button/SplitButton.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ export interface SplitButtonProps {
|
|
|
57
57
|
optionRender?: (option: Option) => React.ReactNode;
|
|
58
58
|
/** 图标按钮 */
|
|
59
59
|
iconButton?: boolean;
|
|
60
|
+
/** 浮层渲染容器,默认body */
|
|
61
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
60
62
|
}
|
|
61
63
|
export default function SplitButton(props: SplitButtonProps): JSX.Element;
|
|
62
64
|
export {};
|
package/Button/index.js
CHANGED
|
@@ -51,7 +51,11 @@ function SplitButton(props) {
|
|
|
51
51
|
placement = _props$placement === void 0 ? 'bottomRight' : _props$placement,
|
|
52
52
|
buttonProps = props.buttonProps,
|
|
53
53
|
_props$iconButton = props.iconButton,
|
|
54
|
-
iconButton = _props$iconButton === void 0 ? false : _props$iconButton
|
|
54
|
+
iconButton = _props$iconButton === void 0 ? false : _props$iconButton,
|
|
55
|
+
popperStyle = props.popperStyle,
|
|
56
|
+
_props$popperClassNam = props.popperClassName,
|
|
57
|
+
popperClassName = _props$popperClassNam === void 0 ? '' : _props$popperClassNam,
|
|
58
|
+
getPopupContainer = props.getPopupContainer;
|
|
55
59
|
var intl = useFormatMessage('Button', localeJson);
|
|
56
60
|
var btnRef = useRef();
|
|
57
61
|
var _useState = useState(),
|
|
@@ -140,7 +144,10 @@ function SplitButton(props) {
|
|
|
140
144
|
}, {
|
|
141
145
|
children: jsx(Dropdown, Object.assign({
|
|
142
146
|
overlay: renderButtonList(),
|
|
143
|
-
placement: placement
|
|
147
|
+
placement: placement,
|
|
148
|
+
overlayStyle: popperStyle,
|
|
149
|
+
overlayClassName: popperClassName,
|
|
150
|
+
getPopupContainer: getPopupContainer
|
|
144
151
|
}, {
|
|
145
152
|
children: renderButton()
|
|
146
153
|
}))
|
package/DragVerify/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface DragVerifyImgProps {
|
|
|
11
11
|
/** 移动图 */
|
|
12
12
|
newImage?: string;
|
|
13
13
|
/** Y轴位置 */
|
|
14
|
-
|
|
14
|
+
y?: number;
|
|
15
15
|
[name: string]: any;
|
|
16
16
|
}
|
|
17
17
|
export interface DragVerifyProps {
|
|
@@ -19,32 +19,18 @@ export interface DragVerifyProps {
|
|
|
19
19
|
className?: string;
|
|
20
20
|
/** 样式 */
|
|
21
21
|
style?: React.CSSProperties;
|
|
22
|
+
width?: number | string;
|
|
23
|
+
/** 图片高 */
|
|
24
|
+
height?: number | string;
|
|
22
25
|
/** 刷新 */
|
|
23
26
|
refresh?: any;
|
|
24
27
|
/** 获取图片接口 */
|
|
25
|
-
getImgInfo: () => (Promise<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
data?: DragVerifyImgProps;
|
|
30
|
-
err?: any;
|
|
31
|
-
});
|
|
32
|
-
/** 提交校验接口 xPos: x轴坐标,imgInfo:图片信息 */
|
|
33
|
-
verifyData: (xPos: number, imgInfo: DragVerifyImgProps) => (Promise<{
|
|
34
|
-
err?: any;
|
|
35
|
-
data?: any;
|
|
36
|
-
}> | {
|
|
37
|
-
err?: any;
|
|
38
|
-
data?: any;
|
|
39
|
-
});
|
|
40
|
-
/** 完成校验事件
|
|
41
|
-
* bol: true通过
|
|
42
|
-
* result: 提交校验事件返回值
|
|
28
|
+
getImgInfo: () => (Promise<DragVerifyImgProps> | DragVerifyImgProps);
|
|
29
|
+
/** 提交校验接口 xPos: x轴坐标,imgInfo:图片信息
|
|
30
|
+
* true 通过
|
|
31
|
+
* false 不通过
|
|
43
32
|
* */
|
|
44
|
-
|
|
45
|
-
err?: any;
|
|
46
|
-
data?: any;
|
|
47
|
-
}) => void;
|
|
33
|
+
verify: (xPos: number, imgInfo: DragVerifyImgProps) => Promise<boolean> | boolean;
|
|
48
34
|
}
|
|
49
35
|
export declare const DragVerify: FunctionComponent<DragVerifyProps>;
|
|
50
36
|
export default DragVerify;
|
package/DragVerify/index.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-708dbb18.js';
|
|
1
2
|
import { r as regenerator } from '../_verture/index-beef914f.js';
|
|
2
3
|
import { a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { useRef, useEffect } from 'react';
|
|
5
|
+
import { useState, useRef, useEffect } from 'react';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
7
|
import DoubleRight from '@para-ui/icons/DoubleRight';
|
|
7
8
|
import CloseIcon from '@para-ui/icons/Close';
|
|
8
9
|
import Check from '@para-ui/icons/Check';
|
|
9
10
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
10
11
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
12
|
+
import { Loading } from '../Loading/index.js';
|
|
11
13
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
14
|
import '@para-ui/core/GlobalContext';
|
|
15
|
+
import '@para-ui/icons/LoadingF';
|
|
13
16
|
|
|
14
17
|
var en = {
|
|
15
18
|
tryAgain: 'Try again',
|
|
@@ -26,7 +29,7 @@ var localeJson = {
|
|
|
26
29
|
en: en
|
|
27
30
|
};
|
|
28
31
|
|
|
29
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drag-verify {\n width: 100%;\n position: relative;\n}\n.paraui-v3-drag-verify > .slider-img {\n position: relative;\n border-radius: 4px;\n overflow: hidden;\n line-height: 0;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-bg {\n width: 100%;\n height: auto;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-move {\n position: absolute;\n left: 0;\n height: auto;\n}\n.paraui-v3-drag-verify > .slider-move {\n position: relative;\n text-align: center;\n line-height: 32px;\n height: 32px;\n margin-top: 12px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-bg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n background-color: rgba(171, 176, 185, 0.12);\n height: 32px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask {\n position: absolute;\n left: 0;\n top: 0;\n height: 32px;\n width: 2px;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box {\n position: absolute;\n top: 0;\n left: -1px;\n width: 32px;\n height: 32px;\n background: #fff;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box:hover .svg-right {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: inline-block;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-text {\n color: rgba(46, 55, 67, 0.4);\n font-size: 14px;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask {\n border: 1px solid rgb(54, 102, 214);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(54, 102, 214);\n border-top: 1px solid rgb(54, 102, 214);\n border-bottom: 1px solid rgb(54, 102, 214);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask {\n border: 1px solid rgb(235, 96, 84);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(235, 96, 84);\n border-top: 1px solid rgb(235, 96, 84);\n border-bottom: 1px solid rgb(235, 96, 84);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-close {\n display: inline-block;\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask {\n border: 1px solid rgb(83, 195, 27);\n border-width: 1px 0 1px 1px;\n background-color: rgba(83, 195, 27, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(83, 195, 27);\n border-top: 1px solid rgb(83, 195, 27);\n border-bottom: 1px solid rgb(83, 195, 27);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: inline-block;\n color: #fff;\n}";
|
|
32
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drag-verify {\n width: 100%;\n position: relative;\n}\n.paraui-v3-drag-verify > svg {\n position: absolute;\n right: 4px;\n top: 4px;\n z-index: 10;\n cursor: pointer;\n display: none;\n}\n.paraui-v3-drag-verify > .slider-img {\n position: relative;\n border-radius: 4px;\n overflow: hidden;\n line-height: 0;\n min-height: 60px;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-bg {\n width: 100%;\n height: auto;\n border-radius: 4px;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-move {\n position: absolute;\n left: 0;\n height: auto;\n}\n.paraui-v3-drag-verify > .slider-move {\n position: relative;\n text-align: center;\n line-height: 32px;\n height: 32px;\n margin-top: 12px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-bg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n background-color: rgba(171, 176, 185, 0.12);\n height: 32px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask {\n position: absolute;\n left: 0;\n top: 0;\n height: 32px;\n width: 2px;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box {\n position: absolute;\n top: 0;\n left: -1px;\n width: 32px;\n height: 32px;\n background: #fff;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box:hover .svg-right {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: inline-block;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-text {\n color: rgba(46, 55, 67, 0.4);\n font-size: 14px;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask {\n border: 1px solid rgb(54, 102, 214);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(54, 102, 214);\n border-top: 1px solid rgb(54, 102, 214);\n border-bottom: 1px solid rgb(54, 102, 214);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask {\n border: 1px solid rgb(235, 96, 84);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(235, 96, 84);\n border-top: 1px solid rgb(235, 96, 84);\n border-bottom: 1px solid rgb(235, 96, 84);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-close {\n display: inline-block;\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask {\n border: 1px solid rgb(83, 195, 27);\n border-width: 1px 0 1px 1px;\n background-color: rgba(83, 195, 27, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(83, 195, 27);\n border-top: 1px solid rgb(83, 195, 27);\n border-bottom: 1px solid rgb(83, 195, 27);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: inline-block;\n color: #fff;\n}";
|
|
30
33
|
styleInject(css_248z);
|
|
31
34
|
|
|
32
35
|
var DragVerify = function DragVerify(props) {
|
|
@@ -34,19 +37,26 @@ var DragVerify = function DragVerify(props) {
|
|
|
34
37
|
style = props.style,
|
|
35
38
|
refresh = props.refresh,
|
|
36
39
|
getImgInfo = props.getImgInfo,
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
verify = props.verify,
|
|
41
|
+
width = props.width,
|
|
42
|
+
height = props.height;
|
|
39
43
|
var intl = useFormatMessage('DragVerify', localeJson);
|
|
44
|
+
var _useState = useState(),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
refreshCom = _useState2[0],
|
|
47
|
+
setRefreshCom = _useState2[1];
|
|
48
|
+
var _useState3 = useState(false),
|
|
49
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
|
+
loading = _useState4[0],
|
|
51
|
+
setLoading = _useState4[1];
|
|
40
52
|
var refDom = useRef(null);
|
|
41
53
|
var constData = useRef({
|
|
42
54
|
getImgInfo: getImgInfo,
|
|
43
|
-
|
|
44
|
-
finishVerify: finishVerify
|
|
55
|
+
verify: verify
|
|
45
56
|
});
|
|
46
57
|
var prefixCls = $prefixCls + '-drag-verify';
|
|
47
58
|
constData.current.getImgInfo = getImgInfo;
|
|
48
|
-
constData.current.
|
|
49
|
-
constData.current.finishVerify = finishVerify;
|
|
59
|
+
constData.current.verify = verify;
|
|
50
60
|
useEffect(function () {
|
|
51
61
|
reset();
|
|
52
62
|
getImgInfoReq();
|
|
@@ -54,30 +64,23 @@ var DragVerify = function DragVerify(props) {
|
|
|
54
64
|
clearTimeout(constData.current.timerError);
|
|
55
65
|
clearTimeout(constData.current.timerSuccess);
|
|
56
66
|
};
|
|
57
|
-
}, [refresh]);
|
|
67
|
+
}, [refresh, refreshCom]);
|
|
58
68
|
/** 获取图片信息 */
|
|
59
69
|
var getImgInfoReq = function getImgInfoReq() {
|
|
60
70
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
|
|
61
|
-
var
|
|
71
|
+
var result;
|
|
62
72
|
return regenerator.wrap(function _callee$(_context) {
|
|
63
73
|
while (1) switch (_context.prev = _context.next) {
|
|
64
74
|
case 0:
|
|
65
75
|
constData.current.padding = true;
|
|
66
|
-
|
|
76
|
+
setLoading(true);
|
|
77
|
+
_context.next = 4;
|
|
67
78
|
return constData.current.getImgInfo();
|
|
68
|
-
case
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
err = _yield$constData$curr.err;
|
|
72
|
-
if (!err) {
|
|
73
|
-
_context.next = 8;
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
return _context.abrupt("return", constData.current.padding = false);
|
|
77
|
-
case 8:
|
|
78
|
-
constData.current.imgInfo = (data === null || data === void 0 ? void 0 : data.data) || {};
|
|
79
|
+
case 4:
|
|
80
|
+
result = _context.sent;
|
|
81
|
+
constData.current.imgInfo = result;
|
|
79
82
|
initImg();
|
|
80
|
-
case
|
|
83
|
+
case 7:
|
|
81
84
|
case "end":
|
|
82
85
|
return _context.stop();
|
|
83
86
|
}
|
|
@@ -92,10 +95,10 @@ var DragVerify = function DragVerify(props) {
|
|
|
92
95
|
while (1) switch (_context2.prev = _context2.next) {
|
|
93
96
|
case 0:
|
|
94
97
|
_context2.next = 2;
|
|
95
|
-
return constData.current.
|
|
98
|
+
return constData.current.verify(x, constData.current.verify);
|
|
96
99
|
case 2:
|
|
97
100
|
result = _context2.sent;
|
|
98
|
-
callback(result
|
|
101
|
+
callback(result);
|
|
99
102
|
case 4:
|
|
100
103
|
case "end":
|
|
101
104
|
return _context2.stop();
|
|
@@ -117,7 +120,9 @@ var DragVerify = function DragVerify(props) {
|
|
|
117
120
|
imgMove.className = 'slider-img-move';
|
|
118
121
|
imgMove.style.display = 'none';
|
|
119
122
|
var sliderImgEle = refDom.current.querySelector('.slider-img');
|
|
120
|
-
|
|
123
|
+
var refreshEle = refDom.current.querySelector('.refresh');
|
|
124
|
+
if (!sliderImgEle || !refreshEle) return;
|
|
125
|
+
refreshEle.style.display = 'none';
|
|
121
126
|
sliderImgEle.innerHTML = '';
|
|
122
127
|
sliderImgEle.append(imgBg);
|
|
123
128
|
imgBg.onload = function () {
|
|
@@ -137,8 +142,10 @@ var DragVerify = function DragVerify(props) {
|
|
|
137
142
|
var _a;
|
|
138
143
|
constData.current.padding = false;
|
|
139
144
|
imgMove.style.display = 'inline-block'; // 必须先显示图片,要不然ie10获取不到图片
|
|
145
|
+
refreshEle.style.display = 'inline-block';
|
|
140
146
|
imgMove.width = imgMove.width / constData.current.imgScale;
|
|
141
|
-
imgMove.style.top = ((_a = constData.current.imgInfo) === null || _a === void 0 ? void 0 : _a.
|
|
147
|
+
imgMove.style.top = ((_a = constData.current.imgInfo) === null || _a === void 0 ? void 0 : _a.y) / constData.current.imgScale + 'px';
|
|
148
|
+
setLoading(false);
|
|
142
149
|
};
|
|
143
150
|
};
|
|
144
151
|
registerEvents(imgBg, imgMove);
|
|
@@ -180,8 +187,7 @@ var DragVerify = function DragVerify(props) {
|
|
|
180
187
|
var X = parseFloat(imgMove.style.left);
|
|
181
188
|
var handX = X * constData.current.imgScale;
|
|
182
189
|
sliderPosiCheck(handX, function (result) {
|
|
183
|
-
|
|
184
|
-
if (err) {
|
|
190
|
+
if (!result) {
|
|
185
191
|
// 错误
|
|
186
192
|
sliderBox.classList.add(prefixCls + '-error');
|
|
187
193
|
constData.current.timerError = setTimeout(function () {
|
|
@@ -190,17 +196,15 @@ var DragVerify = function DragVerify(props) {
|
|
|
190
196
|
sliderText.innerHTML = intl({
|
|
191
197
|
id: 'tryAgain'
|
|
192
198
|
}); // 再试一次
|
|
193
|
-
constData.current.finishVerify(false, result);
|
|
194
199
|
getImgInfoReq();
|
|
195
200
|
}, 1000);
|
|
196
201
|
return;
|
|
197
202
|
}
|
|
198
203
|
sliderBox.classList.add(prefixCls + '-success');
|
|
199
|
-
constData.current.timerSuccess = setTimeout(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}, 1000);
|
|
204
|
+
/*constData.current.timerSuccess = setTimeout(() => {
|
|
205
|
+
//constData.current.padding = false;
|
|
206
|
+
//sliderBox.classList.remove(prefixCls + '-success');
|
|
207
|
+
}, 1000);*/
|
|
204
208
|
});
|
|
205
209
|
};
|
|
206
210
|
};
|
|
@@ -221,6 +225,25 @@ var DragVerify = function DragVerify(props) {
|
|
|
221
225
|
moveProgress.style.width = '0px';
|
|
222
226
|
if (constData.current.imgMove) constData.current.imgMove.style.left = '0px';
|
|
223
227
|
};
|
|
228
|
+
/* 刷新 */
|
|
229
|
+
var clickRefresh = function clickRefresh() {
|
|
230
|
+
setRefreshCom(Math.random());
|
|
231
|
+
};
|
|
232
|
+
/* 处理标签内容 */
|
|
233
|
+
var handStyle = function handStyle() {
|
|
234
|
+
var obj = {};
|
|
235
|
+
if (width) {
|
|
236
|
+
var widthHand = width;
|
|
237
|
+
if (typeof width === 'number') widthHand = width + 'px';
|
|
238
|
+
obj.width = widthHand;
|
|
239
|
+
}
|
|
240
|
+
if (height) {
|
|
241
|
+
var heightHand = height;
|
|
242
|
+
if (typeof height === 'number') heightHand = height + 'px';
|
|
243
|
+
obj.height = heightHand;
|
|
244
|
+
}
|
|
245
|
+
return obj;
|
|
246
|
+
};
|
|
224
247
|
var makeCls = function makeCls() {
|
|
225
248
|
return clsx(prefixCls, className);
|
|
226
249
|
};
|
|
@@ -229,8 +252,105 @@ var DragVerify = function DragVerify(props) {
|
|
|
229
252
|
style: style,
|
|
230
253
|
ref: refDom
|
|
231
254
|
}, {
|
|
232
|
-
children: [
|
|
233
|
-
|
|
255
|
+
children: [jsxs("svg", Object.assign({
|
|
256
|
+
onClick: clickRefresh,
|
|
257
|
+
className: 'refresh',
|
|
258
|
+
width: "26.529",
|
|
259
|
+
height: "26.017",
|
|
260
|
+
viewBox: "0 0 26.529 26.017"
|
|
261
|
+
}, {
|
|
262
|
+
children: [jsxs("defs", {
|
|
263
|
+
children: [jsxs("filter", Object.assign({
|
|
264
|
+
id: "a",
|
|
265
|
+
x: "0",
|
|
266
|
+
y: "0",
|
|
267
|
+
width: "26.529",
|
|
268
|
+
height: "17",
|
|
269
|
+
filterUnits: "userSpaceOnUse"
|
|
270
|
+
}, {
|
|
271
|
+
children: [jsx("feOffset", {
|
|
272
|
+
dy: "1"
|
|
273
|
+
}), jsx("feGaussianBlur", {
|
|
274
|
+
stdDeviation: "1",
|
|
275
|
+
result: "b"
|
|
276
|
+
}), jsx("feFlood", {}), jsx("feComposite", {
|
|
277
|
+
operator: "in",
|
|
278
|
+
in2: "b"
|
|
279
|
+
}), jsx("feComposite", {
|
|
280
|
+
in: "SourceGraphic"
|
|
281
|
+
})]
|
|
282
|
+
})), jsxs("filter", Object.assign({
|
|
283
|
+
id: "c",
|
|
284
|
+
x: "0",
|
|
285
|
+
y: "9.017",
|
|
286
|
+
width: "26.529",
|
|
287
|
+
height: "17",
|
|
288
|
+
filterUnits: "userSpaceOnUse"
|
|
289
|
+
}, {
|
|
290
|
+
children: [jsx("feOffset", {
|
|
291
|
+
dy: "1"
|
|
292
|
+
}), jsx("feGaussianBlur", {
|
|
293
|
+
stdDeviation: "1",
|
|
294
|
+
result: "d"
|
|
295
|
+
}), jsx("feFlood", {}), jsx("feComposite", {
|
|
296
|
+
operator: "in",
|
|
297
|
+
in2: "d"
|
|
298
|
+
}), jsx("feComposite", {
|
|
299
|
+
in: "SourceGraphic"
|
|
300
|
+
})]
|
|
301
|
+
}))]
|
|
302
|
+
}), jsxs("g", Object.assign({
|
|
303
|
+
style: {
|
|
304
|
+
opacity: 0.7,
|
|
305
|
+
isolation: 'isolate'
|
|
306
|
+
},
|
|
307
|
+
transform: "translate(-286.735 -95.991)"
|
|
308
|
+
}, {
|
|
309
|
+
children: [jsx("g", Object.assign({
|
|
310
|
+
transform: "translate(288 96)"
|
|
311
|
+
}, {
|
|
312
|
+
children: jsx("rect", {
|
|
313
|
+
style: {
|
|
314
|
+
fill: 'none'
|
|
315
|
+
},
|
|
316
|
+
width: "24",
|
|
317
|
+
height: "24"
|
|
318
|
+
})
|
|
319
|
+
})), jsxs("g", Object.assign({
|
|
320
|
+
transform: "translate(289.735 97.991)"
|
|
321
|
+
}, {
|
|
322
|
+
children: [jsx("g", Object.assign({
|
|
323
|
+
style: {
|
|
324
|
+
filter: 'url(#a)'
|
|
325
|
+
},
|
|
326
|
+
transform: "matrix(1, 0, 0, 1, -3, -2)"
|
|
327
|
+
}, {
|
|
328
|
+
children: jsx("path", {
|
|
329
|
+
style: {
|
|
330
|
+
fill: '#FFFFFF'
|
|
331
|
+
},
|
|
332
|
+
d: "M577.409,536.791a1,1,0,0,0,1-1A8,8,0,0,1,592.817,531h0c.077.1.149.207.22.312l-1.911-.765a1,1,0,1,0-.743,1.856l3.7,1.483a1,1,0,0,0,1.3-.557l1.482-3.7a1,1,0,1,0-1.857-.744l-.448,1.12c-.048-.067-.093-.137-.143-.2h0a10,10,0,0,0-18.009,5.989A1,1,0,0,0,577.409,536.791Z",
|
|
333
|
+
transform: "translate(-573.41 -523.79)"
|
|
334
|
+
})
|
|
335
|
+
})), jsx("g", Object.assign({
|
|
336
|
+
style: {
|
|
337
|
+
filter: 'url(#c)'
|
|
338
|
+
},
|
|
339
|
+
transform: "matrix(1, 0, 0, 1, -3, -2)"
|
|
340
|
+
}, {
|
|
341
|
+
children: jsx("path", {
|
|
342
|
+
style: {
|
|
343
|
+
fill: '#FFFFFF'
|
|
344
|
+
},
|
|
345
|
+
d: "M595.938,534.808a1,1,0,0,0-1,1,8,8,0,0,1-14.409,4.79h0c-.076-.1-.148-.206-.219-.312l1.911.765a1,1,0,0,0,.743-1.857l-3.7-1.482a1,1,0,0,0-1.3.557l-1.482,3.7a1,1,0,0,0,1.856.743l.449-1.12c.047.067.093.136.142.2h0a10,10,0,0,0,18.009-5.989A1,1,0,0,0,595.938,534.808Z",
|
|
346
|
+
transform: "translate(-573.41 -523.79)"
|
|
347
|
+
})
|
|
348
|
+
}))]
|
|
349
|
+
}))]
|
|
350
|
+
}))]
|
|
351
|
+
})), jsx("div", {
|
|
352
|
+
className: "slider-img",
|
|
353
|
+
style: handStyle()
|
|
234
354
|
}), jsxs("div", Object.assign({
|
|
235
355
|
className: "slider-move"
|
|
236
356
|
}, {
|
|
@@ -257,7 +377,7 @@ var DragVerify = function DragVerify(props) {
|
|
|
257
377
|
id: 'swipe'
|
|
258
378
|
})
|
|
259
379
|
}))]
|
|
260
|
-
}))]
|
|
380
|
+
})), loading && jsx(Loading, {})]
|
|
261
381
|
}));
|
|
262
382
|
};
|
|
263
383
|
|
package/Drawer/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import RcDrawer from 'rc-drawer';
|
|
|
6
6
|
import { Button } from '../Button/index.js';
|
|
7
7
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
8
8
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
9
|
+
import AutoTips from '../AutoTips/index.js';
|
|
9
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
11
|
import '../_verture/typeof-498dd2b1.js';
|
|
11
12
|
import 'clsx';
|
|
@@ -37,7 +38,7 @@ var localeJson = {
|
|
|
37
38
|
en: en
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v3-drawer-inline {\n position: absolute;\n}\n\n.paraui-v3-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n background: rgba(0, 0, 0, 0.45);\n pointer-events: auto;\n}\n\n.paraui-v3-drawer-content-wrapper {\n position: absolute;\n z-index: 1000;\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-content-wrapper-hidden {\n display: none;\n}\n\n.paraui-v3-drawer-left > .paraui-v3-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-right > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-top > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n left: 0;\n box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-bottom > .paraui-v3-drawer-content-wrapper {\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-content {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: rgb(255, 255, 255);\n pointer-events: auto;\n}\n.paraui-v3-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: none;\n height: 60px;\n padding: 0 24px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(46, 55, 67);\n border-bottom: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-content {\n flex: 1;\n padding: 24px;\n overflow: auto;\n word-wrap: break-word;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n align-items: center;\n flex: none;\n padding: 16px 24px;\n font-size: 16px;\n color: rgb(46, 55, 67);\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n}\n\n.panel-motion-enter-start,\n.panel-motion-appear-start,\n.panel-motion-leave-start {\n transition: none;\n}\n\n.panel-motion-enter-active,\n.panel-motion-appear-active,\n.panel-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active,\n.paraui-v3-drawer-mask-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter,\n.paraui-v3-drawer-mask-motion-appear {\n opacity: 0;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave-active {\n opacity: 0;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start,\n.paraui-v3-drawer-panel-motion-left-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active,\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start {\n transform: translateX(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transform: translateX(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start,\n.paraui-v3-drawer-panel-motion-right-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active,\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start {\n transform: translateX(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transform: translateX(100%);\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start,\n.paraui-v3-drawer-panel-motion-top-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active,\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start {\n transform: translateY(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transform: translateY(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start,\n.paraui-v3-drawer-panel-motion-bottom-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active,\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start {\n transform: translateY(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transform: translateY(100%);\n}";
|
|
41
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v3-drawer-inline {\n position: absolute;\n}\n\n.paraui-v3-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n background: rgba(0, 0, 0, 0.45);\n pointer-events: auto;\n}\n\n.paraui-v3-drawer-content-wrapper {\n position: absolute;\n z-index: 1000;\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-content-wrapper-hidden {\n display: none;\n}\n\n.paraui-v3-drawer-left > .paraui-v3-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-right > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-top > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n left: 0;\n box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-bottom > .paraui-v3-drawer-content-wrapper {\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-content {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: rgb(255, 255, 255);\n pointer-events: auto;\n}\n.paraui-v3-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: none;\n height: 60px;\n padding: 0 24px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(46, 55, 67);\n border-bottom: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title-ellipsis {\n overflow: hidden;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra {\n margin-left: 30px;\n flex-shrink: 0;\n white-space: nowrap;\n text-align: right;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-content {\n flex: 1;\n padding: 24px;\n overflow: auto;\n word-wrap: break-word;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n align-items: center;\n flex: none;\n padding: 16px 24px;\n font-size: 16px;\n color: rgb(46, 55, 67);\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n}\n\n.panel-motion-enter-start,\n.panel-motion-appear-start,\n.panel-motion-leave-start {\n transition: none;\n}\n\n.panel-motion-enter-active,\n.panel-motion-appear-active,\n.panel-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active,\n.paraui-v3-drawer-mask-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter,\n.paraui-v3-drawer-mask-motion-appear {\n opacity: 0;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave-active {\n opacity: 0;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start,\n.paraui-v3-drawer-panel-motion-left-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active,\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start {\n transform: translateX(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transform: translateX(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start,\n.paraui-v3-drawer-panel-motion-right-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active,\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start {\n transform: translateX(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transform: translateX(100%);\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start,\n.paraui-v3-drawer-panel-motion-top-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active,\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start {\n transform: translateY(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transform: translateY(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start,\n.paraui-v3-drawer-panel-motion-bottom-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active,\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start {\n transform: translateY(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transform: translateY(100%);\n}";
|
|
41
42
|
styleInject(css_248z);
|
|
42
43
|
|
|
43
44
|
//drawer 抽屉
|
|
@@ -115,15 +116,29 @@ var Drawer = function Drawer(props) {
|
|
|
115
116
|
var handleCancel = function handleCancel() {
|
|
116
117
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
117
118
|
};
|
|
119
|
+
var handleTitle = function handleTitle(title) {
|
|
120
|
+
if (typeof title === 'string') {
|
|
121
|
+
return jsx("div", Object.assign({
|
|
122
|
+
className: 'drawer-header-title drawer-header-title-ellipsis'
|
|
123
|
+
}, {
|
|
124
|
+
children: jsx(AutoTips, {
|
|
125
|
+
children: title
|
|
126
|
+
})
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
return jsx("div", Object.assign({
|
|
130
|
+
className: 'drawer-header-title'
|
|
131
|
+
}, {
|
|
132
|
+
children: title
|
|
133
|
+
}));
|
|
134
|
+
};
|
|
118
135
|
//标题节点
|
|
119
136
|
var titleNode = jsxs("div", Object.assign({
|
|
120
137
|
className: 'drawer-body-header'
|
|
121
138
|
}, {
|
|
122
|
-
children: [jsx(
|
|
123
|
-
|
|
124
|
-
}, {
|
|
125
|
-
children: title
|
|
126
|
-
})), showExtra && jsx(Fragment, {
|
|
139
|
+
children: [jsx(Fragment, {
|
|
140
|
+
children: handleTitle(title)
|
|
141
|
+
}), showExtra && jsx(Fragment, {
|
|
127
142
|
children: jsx("div", Object.assign({
|
|
128
143
|
className: 'drawer-header-extra'
|
|
129
144
|
}, {
|
package/Form/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-708dbb18.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { DeepClone } from '@paraview/lib';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import { F as FormItem, v as validate } from '../_verture/index-
|
|
6
|
+
import { F as FormItem, v as validate } from '../_verture/index-694b816f.js';
|
|
7
7
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import '../TextField/index.js';
|
|
9
9
|
import '../_verture/typeof-498dd2b1.js';
|
package/FormItem/index.js
CHANGED
package/FunctionModal/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as useModal } from '../_verture/modalContext-
|
|
2
|
-
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-
|
|
1
|
+
import { u as useModal } from '../_verture/modalContext-d01400f6.js';
|
|
2
|
+
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-d01400f6.js';
|
|
3
3
|
import '../_verture/toConsumableArray-57dd2e23.js';
|
|
4
4
|
import '../_verture/slicedToArray-708dbb18.js';
|
|
5
5
|
import '../_verture/index-beef914f.js';
|
package/README.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## 版本: 3.0.43
|
|
2
|
+
|
|
3
|
+
para-ui/core@3.0.43 发布
|
|
4
|
+
【穿梭框-Transfer】修复穿梭框搜索框内数据未变更,搜索不到数据问题
|
|
5
|
+
【表格-Table】新增onError,onSort方法
|
|
6
|
+
【按钮-SplitButton】新增popperStyle, popperClassName, getPopupContainer参数
|
|
7
|
+
|
|
8
|
+
## 版本: 3.0.42
|
|
9
|
+
|
|
10
|
+
para-ui/core@3.0.42 发布
|
|
11
|
+
【抽屉-Drawer】title 传入 string 类型时,标题超出隐藏
|
|
12
|
+
【滑块验证-dragVerify】增加loading,图片width,height设置,修改参数getImgInfo,verify入参出参
|
|
13
|
+
|
|
1
14
|
## 版本: 3.0.41
|
|
2
15
|
|
|
3
16
|
para-ui/core@3.0.41 发布
|
package/Table/index.js
CHANGED
|
@@ -1742,7 +1742,9 @@ var Table = function Table(propsInit) {
|
|
|
1742
1742
|
filterSearchCallback = props.filterSearchCallback,
|
|
1743
1743
|
onClickRow = props.onClickRow,
|
|
1744
1744
|
rowClassMapping = props.rowClassMapping,
|
|
1745
|
-
getPopupContainer = props.getPopupContainer
|
|
1745
|
+
getPopupContainer = props.getPopupContainer,
|
|
1746
|
+
onSort = props.onSort,
|
|
1747
|
+
onError = props.onError;
|
|
1746
1748
|
var intl = useFormatMessage('Table', localeJson);
|
|
1747
1749
|
var dayNum = props.expirationTime ? props.expirationTime === 0 ? 100000000 : props.expirationTime : 7; // 过期天数
|
|
1748
1750
|
var _useState = useState(props.page !== undefined ? props.page : 1),
|
|
@@ -1855,6 +1857,7 @@ var Table = function Table(propsInit) {
|
|
|
1855
1857
|
constData.current.data = data;
|
|
1856
1858
|
constData.current.searchKeyName = searchKeyName;
|
|
1857
1859
|
constData.current.filterSearchCallback = filterSearchCallback;
|
|
1860
|
+
constData.current.onError = onError;
|
|
1858
1861
|
useEffect(function () {
|
|
1859
1862
|
window.addEventListener('resize', changeResize);
|
|
1860
1863
|
return function () {
|
|
@@ -2452,7 +2455,7 @@ var Table = function Table(propsInit) {
|
|
|
2452
2455
|
*/
|
|
2453
2456
|
var requestData = function requestData(obj) {
|
|
2454
2457
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
|
|
2455
|
-
var _yield$requestFunc, data, err;
|
|
2458
|
+
var _yield$requestFunc, data, err, onErrorFlag;
|
|
2456
2459
|
return regenerator.wrap(function _callee$(_context) {
|
|
2457
2460
|
while (1) switch (_context.prev = _context.next) {
|
|
2458
2461
|
case 0:
|
|
@@ -2471,18 +2474,37 @@ var Table = function Table(propsInit) {
|
|
|
2471
2474
|
return _context.abrupt("return");
|
|
2472
2475
|
case 9:
|
|
2473
2476
|
if (!err) {
|
|
2474
|
-
_context.next =
|
|
2477
|
+
_context.next = 23;
|
|
2475
2478
|
break;
|
|
2476
2479
|
}
|
|
2477
2480
|
if (props.loading === undefined) setLoadState(false);
|
|
2478
|
-
// cancel
|
|
2479
|
-
if (
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2481
|
+
// cancel的接口 不清除上次展示的数据
|
|
2482
|
+
if (err.__CANCEL__) {
|
|
2483
|
+
_context.next = 22;
|
|
2484
|
+
break;
|
|
2485
|
+
}
|
|
2486
|
+
onErrorFlag = false;
|
|
2487
|
+
if (!constData.current.onError) {
|
|
2488
|
+
_context.next = 17;
|
|
2489
|
+
break;
|
|
2483
2490
|
}
|
|
2491
|
+
_context.next = 16;
|
|
2492
|
+
return constData.current.onError(err);
|
|
2493
|
+
case 16:
|
|
2494
|
+
onErrorFlag = _context.sent;
|
|
2495
|
+
case 17:
|
|
2496
|
+
if (onErrorFlag) {
|
|
2497
|
+
_context.next = 19;
|
|
2498
|
+
break;
|
|
2499
|
+
}
|
|
2500
|
+
return _context.abrupt("return");
|
|
2501
|
+
case 19:
|
|
2502
|
+
setRowData([]);
|
|
2503
|
+
setTotal(0);
|
|
2504
|
+
setRowDataJson({});
|
|
2505
|
+
case 22:
|
|
2484
2506
|
return _context.abrupt("return", false);
|
|
2485
|
-
case
|
|
2507
|
+
case 23:
|
|
2486
2508
|
if (requestCallback) {
|
|
2487
2509
|
requestCallback(data, function (handData) {
|
|
2488
2510
|
if (handData) {
|
|
@@ -2496,7 +2518,7 @@ var Table = function Table(propsInit) {
|
|
|
2496
2518
|
handReqData(data);
|
|
2497
2519
|
if (props.loading === undefined) setLoadState(false);
|
|
2498
2520
|
}
|
|
2499
|
-
case
|
|
2521
|
+
case 24:
|
|
2500
2522
|
case "end":
|
|
2501
2523
|
return _context.stop();
|
|
2502
2524
|
}
|
|
@@ -2639,6 +2661,11 @@ var Table = function Table(propsInit) {
|
|
|
2639
2661
|
setOrderTypeArr(orderTypeArrHand);
|
|
2640
2662
|
constData.current.orderFieldArr = orderFieldArrHand;
|
|
2641
2663
|
constData.current.orderTypeArr = orderTypeArrHand;
|
|
2664
|
+
// 只试用与本地数据
|
|
2665
|
+
if (onSort) onSort({
|
|
2666
|
+
orderField: orderFieldArrHand,
|
|
2667
|
+
orderType: orderTypeArrHand
|
|
2668
|
+
});
|
|
2642
2669
|
if (constData.current.loadMoreUrl) {
|
|
2643
2670
|
constData.current.historyData = [];
|
|
2644
2671
|
handPage(1);
|
|
@@ -2816,7 +2843,7 @@ var Table = function Table(propsInit) {
|
|
|
2816
2843
|
changeColumnWidth: changeColumnWidth,
|
|
2817
2844
|
getPopupContainer: getPopupContainer
|
|
2818
2845
|
});
|
|
2819
|
-
}, [totalDataJson, showColumns, rowKey, rowData, checkJson, disabledJson, orderTypeArr, orderFieldArr, sortTable, filter, expandable, check, headSelectStatus, radio, align, showHeadList, headDataCom, selectFilterCom, operate, onClickColumns, sortTableRadio, fixedTable, posFixed, beyondText, fixedColumn, lineWidth, dragColumn, headDataConfig, getPopupContainer]);
|
|
2846
|
+
}, [totalDataJson, showColumns, rowKey, rowData, checkJson, disabledJson, orderTypeArr, orderFieldArr, sortTable, filter, expandable, check, headSelectStatus, radio, align, showHeadList, headDataCom, selectFilterCom, operate, onClickColumns, sortTableRadio, fixedTable, posFixed, beyondText, fixedColumn, lineWidth, dragColumn, headDataConfig, getPopupContainer, onSort]);
|
|
2820
2847
|
// 表格内容memo
|
|
2821
2848
|
var TableBodyMemo = useMemo(function () {
|
|
2822
2849
|
return jsx(TableBody, {
|