@lm_fe/components 0.1.201 → 0.2.5
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/README.md +1 -1
- package/dist/keep-alive/common.d.ts +46 -0
- package/dist/keep-alive/components/AsyncComponent.d.ts +27 -0
- package/dist/keep-alive/components/Comment.d.ts +18 -0
- package/dist/keep-alive/components/Consumer.d.ts +20 -0
- package/dist/keep-alive/components/keepAlive.d.ts +4 -0
- package/dist/keep-alive/components/provider.d.ts +31 -0
- package/dist/keep-alive/contexts/IdentificationContext.d.ts +12 -0
- package/dist/keep-alive/contexts/KeepAliveContext.d.ts +5 -0
- package/dist/keep-alive/index.d.ts +7 -0
- package/dist/keep-alive/index.js +1901 -0
- package/dist/keep-alive/utils/bindLifecycle.d.ts +3 -0
- package/dist/keep-alive/utils/changePositionByComment.d.ts +1 -0
- package/dist/keep-alive/utils/createEventEmitter.d.ts +11 -0
- package/dist/keep-alive/utils/createStoreElement.d.ts +1 -0
- package/dist/keep-alive/utils/createUniqueIdentification.d.ts +8 -0
- package/dist/keep-alive/utils/debug.d.ts +3 -0
- package/dist/keep-alive/utils/getDisplayName.d.ts +2 -0
- package/dist/keep-alive/utils/getKeepAlive.d.ts +3 -0
- package/dist/keep-alive/utils/getKeyByFiberNode.d.ts +1 -0
- package/dist/keep-alive/utils/isRegExp.d.ts +1 -0
- package/dist/keep-alive/utils/keepAliveDecorator.d.ts +17 -0
- package/dist/keep-alive/utils/md5.d.ts +1 -0
- package/dist/keep-alive/utils/noop.d.ts +2 -0
- package/dist/keep-alive/utils/shallowEqual.d.ts +2 -0
- package/dist/keep-alive/utils/useKeepAliveEffect.d.ts +2 -0
- package/dist/keep-alive/utils/withIdentificationContextConsumer.d.ts +10 -0
- package/dist/keep-alive/utils/withKeepAliveContextConsumer.d.ts +10 -0
- package/dist/src/ArraySingle/Inner.d.ts +3 -0
- package/dist/src/ArraySingle/index.d.ts +2 -0
- package/dist/src/CaseTempleteEdit/Inner.d.ts +4 -0
- package/dist/src/CaseTempleteEdit/config.d.ts +20 -0
- package/dist/src/CaseTempleteEdit/index.d.ts +4 -0
- package/dist/src/CaseTempleteEdit/types.d.ts +19 -0
- package/dist/src/CaseTempleteEdit/utils.d.ts +2 -0
- package/dist/src/CaseTempleteEditEmr/Inner.d.ts +3 -0
- package/dist/src/CaseTempleteEditEmr/demo_text.d.ts +1 -0
- package/dist/src/CaseTempleteEditEmr/index.d.ts +2 -0
- package/dist/src/CaseTempleteEditEmr/types.d.ts +6 -0
- package/dist/src/CaseTempleteEditEmr/utils.d.ts +3 -0
- package/dist/{GlobalModal → src/GlobalModal}/index.d.ts +2 -1
- package/dist/src/LazyAntd/index.d.ts +17 -0
- package/dist/{Monaco → src/Monaco}/Inner.d.ts +1 -1
- package/dist/src/MyAddress/Inner.d.ts +3 -0
- package/dist/{MyImageEditor → src/MyImageEditor}/Inner.d.ts +1 -1
- package/dist/{MyImageEditor → src/MyImageEditor}/utils.d.ts +1 -1
- package/dist/{MyInput → src/MyInput}/index.d.ts +2 -2
- package/dist/{PDF_Frame_View → src/PDF_Frame_View}/utils.d.ts +1 -1
- package/dist/src/PatientSelect/Inner.d.ts +16 -0
- package/dist/src/PatientSelect/index.d.ts +3 -0
- package/dist/src/SimpleForm/Inner.d.ts +5 -0
- package/dist/{SimpleForm → src/SimpleForm}/components/TabForm/index.d.ts +3 -2
- package/dist/{SimpleForm → src/SimpleForm}/components/extra/Custom.d.ts +2 -1
- package/dist/{SimpleForm → src/SimpleForm}/components/index.d.ts +3 -6
- package/dist/src/SimpleForm/index.d.ts +17 -0
- package/dist/{SimpleForm/index.d.ts → src/SimpleForm/types.d.ts} +0 -14
- package/dist/src/a_chunks/ArraySingle.Inner.js +19 -0
- package/dist/src/a_chunks/CaseTempleteEdit.Inner.js +622 -0
- package/dist/src/a_chunks/CaseTempleteEditEmr.Inner.js +235 -0
- package/dist/{a_chunks/.root6.js → src/a_chunks/MyAddress.Inner.js} +38 -89
- package/dist/{a_chunks/.root4.js → src/a_chunks/MyImageEditor.Inner.js} +128 -179
- package/dist/{a_chunks/.root5.js → src/a_chunks/Old.InnerOld.js} +20 -59
- package/dist/{a_chunks/.root2.js → src/a_chunks/PDF_Frame_View.Inner.js} +11 -51
- package/dist/src/a_chunks/PatientSelect.Inner.js +281 -0
- package/dist/src/a_chunks/SimpleForm.Inner.js +318 -0
- package/dist/src/a_chunks/index.js +550 -0
- package/dist/src/a_chunks/style-inject.es.js +25 -0
- package/dist/src/config.d.ts +1 -0
- package/dist/{hooks → src/hooks}/index.d.ts +1 -0
- package/dist/src/hooks/use_fuck.d.ts +5 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.js +10 -0
- package/dist/src/pack_components.d.ts +213 -0
- package/dist/src/utils/getInputStyle.d.ts +1 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/other.d.ts +3 -0
- package/package.json +30 -26
- package/dist/ContainerDimensions2/index.d.ts +0 -10
- package/dist/LazyAntd/AutoComplete/Inner.d.ts +0 -4
- package/dist/LazyAntd/AutoComplete/index.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/Base/Calendar.d.ts +0 -3
- package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +0 -11
- package/dist/LazyAntd/DatePicker/Base/index.d.ts +0 -12
- package/dist/LazyAntd/DatePicker/Base/props.d.ts +0 -14
- package/dist/LazyAntd/DatePicker/Calendar.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/DatePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/MonthPicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/RangePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/TimePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/index.d.ts +0 -5
- package/dist/LazyAntd/Dropdown/Button.d.ts +0 -2
- package/dist/LazyAntd/Dropdown/Inner.d.ts +0 -3
- package/dist/LazyAntd/Dropdown/index.d.ts +0 -10
- package/dist/LazyAntd/Form/FormItemInner.d.ts +0 -2
- package/dist/LazyAntd/Form/Inner.d.ts +0 -3
- package/dist/LazyAntd/Form/index.d.ts +0 -9
- package/dist/LazyAntd/Modal/Inner.d.ts +0 -4
- package/dist/LazyAntd/Modal/index.d.ts +0 -3
- package/dist/LazyAntd/Pagination/Inner.d.ts +0 -3
- package/dist/LazyAntd/Pagination/index.d.ts +0 -3
- package/dist/LazyAntd/Select/Inner.d.ts +0 -3
- package/dist/LazyAntd/Select/OptionInner.d.ts +0 -2
- package/dist/LazyAntd/Select/index.d.ts +0 -10
- package/dist/LazyAntd/Table/Inner.d.ts +0 -3
- package/dist/LazyAntd/Table/index.d.ts +0 -3
- package/dist/LazyAntd/Tree/DirectoryTreeInner.d.ts +0 -3
- package/dist/LazyAntd/Tree/Inner.d.ts +0 -3
- package/dist/LazyAntd/Tree/TreeNodeInner.d.ts +0 -4
- package/dist/LazyAntd/Tree/index.d.ts +0 -12
- package/dist/LazyAntd/TreeSelect/Inner.d.ts +0 -3
- package/dist/LazyAntd/TreeSelect/index.d.ts +0 -3
- package/dist/LazyAntd/index.d.ts +0 -25
- package/dist/MyAddress/Inner.d.ts +0 -3
- package/dist/QRCode/Inner.d.ts +0 -3
- package/dist/QRCode/index.d.ts +0 -2
- package/dist/QRCode/types.d.ts +0 -68
- package/dist/a_chunks/.root.js +0 -805
- package/dist/a_chunks/.root.js.map +0 -1
- package/dist/a_chunks/.root10.js +0 -8
- package/dist/a_chunks/.root10.js.map +0 -1
- package/dist/a_chunks/.root11.js +0 -7
- package/dist/a_chunks/.root11.js.map +0 -1
- package/dist/a_chunks/.root12.js +0 -8
- package/dist/a_chunks/.root12.js.map +0 -1
- package/dist/a_chunks/.root13.js +0 -4
- package/dist/a_chunks/.root13.js.map +0 -1
- package/dist/a_chunks/.root14.js +0 -8
- package/dist/a_chunks/.root14.js.map +0 -1
- package/dist/a_chunks/.root15.js +0 -7
- package/dist/a_chunks/.root15.js.map +0 -1
- package/dist/a_chunks/.root16.js +0 -8
- package/dist/a_chunks/.root16.js.map +0 -1
- package/dist/a_chunks/.root17.js +0 -8
- package/dist/a_chunks/.root17.js.map +0 -1
- package/dist/a_chunks/.root18.js +0 -8
- package/dist/a_chunks/.root18.js.map +0 -1
- package/dist/a_chunks/.root19.js +0 -8
- package/dist/a_chunks/.root19.js.map +0 -1
- package/dist/a_chunks/.root2.js.map +0 -1
- package/dist/a_chunks/.root20.js +0 -6
- package/dist/a_chunks/.root20.js.map +0 -1
- package/dist/a_chunks/.root21.js +0 -5
- package/dist/a_chunks/.root21.js.map +0 -1
- package/dist/a_chunks/.root3.js +0 -7
- package/dist/a_chunks/.root3.js.map +0 -1
- package/dist/a_chunks/.root4.js.map +0 -1
- package/dist/a_chunks/.root5.js.map +0 -1
- package/dist/a_chunks/.root6.js.map +0 -1
- package/dist/a_chunks/.root7.js +0 -8
- package/dist/a_chunks/.root7.js.map +0 -1
- package/dist/a_chunks/.root8.js +0 -8
- package/dist/a_chunks/.root8.js.map +0 -1
- package/dist/a_chunks/.root9.js +0 -7
- package/dist/a_chunks/.root9.js.map +0 -1
- package/dist/a_chunks/index.js +0 -1238
- package/dist/a_chunks/index.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -45
- package/dist/index.js.map +0 -1
- package/dist/pack_components.d.ts +0 -17
- package/dist/utils/getInputStyle.d.ts +0 -11
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/other.d.ts +0 -4
- /package/dist/{ContainerDimensions → src/ContainerDimensions}/index.d.ts +0 -0
- /package/dist/{GlobalModal → src/GlobalModal}/utils.d.ts +0 -0
- /package/dist/{Monaco → src/Monaco}/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/InnerOld.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/options.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/type.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/utils.d.ts +0 -0
- /package/dist/{MyImageEditor → src/MyImageEditor}/index.d.ts +0 -0
- /package/dist/{MyImageEditor → src/MyImageEditor}/init_delete_control.d.ts +0 -0
- /package/dist/{MyInput → src/MyInput}/types.d.ts +0 -0
- /package/dist/{MyLazyComponent → src/MyLazyComponent}/index.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/Inner.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/index.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/types.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/MultiInput.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SimpleSelect.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SwitchSelect.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/types/help.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/types/metaTypes.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMchcDriverStatus.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMyEffect.d.ts +0 -0
- /package/dist/{style → src/style}/index.d.ts +0 -0
|
@@ -4,85 +4,19 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
import '
|
|
8
|
-
import _Popover from 'antd/es/popover';
|
|
9
|
-
import 'antd/es/button/style';
|
|
10
|
-
import _Button from 'antd/es/button';
|
|
11
|
-
import 'antd/es/switch/style';
|
|
12
|
-
import _Switch from 'antd/es/switch';
|
|
13
|
-
import 'antd/es/slider/style';
|
|
14
|
-
import _Slider from 'antd/es/slider';
|
|
15
|
-
import 'antd/es/layout/style';
|
|
16
|
-
import _Layout from 'antd/es/layout';
|
|
17
|
-
import _isString from 'lodash/isString';
|
|
18
|
-
import _get from 'lodash/get';
|
|
19
|
-
import { ClearOutlined } from '@ant-design/icons';
|
|
20
|
-
import { mchcLogger, mchcEvent } from '@lm_fe/env';
|
|
7
|
+
import { mchcEnv, mchcLogger, mchcEvent } from '@lm_fe/env';
|
|
21
8
|
import { safe_json_parse, base64_to_image } from '@lm_fe/utils';
|
|
9
|
+
import { MyIcon, MyColor } from '@noah-libjs/components';
|
|
10
|
+
import { Switch, Layout, Popover, Button, Slider } from 'antd';
|
|
22
11
|
import classnames from 'classnames';
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import '
|
|
27
|
-
import 'antd/es/input';
|
|
28
|
-
import 'antd/es/skeleton/style';
|
|
29
|
-
import 'antd/es/skeleton';
|
|
30
|
-
import 'fabric';
|
|
31
|
-
import 'lodash/map';
|
|
32
|
-
import 'antd/es/modal/style';
|
|
33
|
-
import 'antd/es/modal';
|
|
34
|
-
import 'lodash/isNil';
|
|
35
|
-
import 'antd/es/row/style';
|
|
36
|
-
import 'antd/es/row';
|
|
37
|
-
import 'antd/es/col/style';
|
|
38
|
-
import 'antd/es/col';
|
|
39
|
-
import 'antd/es/form/style';
|
|
40
|
-
import 'antd/es/form';
|
|
41
|
-
import 'antd/es/divider/style';
|
|
42
|
-
import 'antd/es/divider';
|
|
43
|
-
import 'antd/es/rate/style';
|
|
44
|
-
import 'antd/es/rate';
|
|
45
|
-
import 'antd/es/time-picker/style';
|
|
46
|
-
import 'antd/es/time-picker';
|
|
47
|
-
import 'antd/es/checkbox/style';
|
|
48
|
-
import 'antd/es/checkbox';
|
|
49
|
-
import 'antd/es/input-number/style';
|
|
50
|
-
import 'antd/es/input-number';
|
|
51
|
-
import 'antd/es/radio/style';
|
|
52
|
-
import 'antd/es/radio';
|
|
53
|
-
import 'antd/es/date-picker/style';
|
|
54
|
-
import 'antd/es/date-picker';
|
|
55
|
-
import 'rc-tree/es/TreeNode';
|
|
56
|
-
import 'antd/es/tabs/style';
|
|
57
|
-
import 'antd/es/tabs';
|
|
12
|
+
import { isString, get } from 'lodash';
|
|
13
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
14
|
+
import { s as styleInject } from './style-inject.es.js';
|
|
15
|
+
import { r as real_fabric, M as MyImageEditorEvents, e as event_process, f as default_legends } from './index.js';
|
|
58
16
|
import '@lm_fe/static';
|
|
59
17
|
import '@lm_fe/service';
|
|
60
|
-
import '
|
|
61
|
-
|
|
62
|
-
if (ref === void 0) ref = {};
|
|
63
|
-
var insertAt = ref.insertAt;
|
|
64
|
-
if (!css || typeof document === 'undefined') {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
68
|
-
var style = document.createElement('style');
|
|
69
|
-
style.type = 'text/css';
|
|
70
|
-
if (insertAt === 'top') {
|
|
71
|
-
if (head.firstChild) {
|
|
72
|
-
head.insertBefore(style, head.firstChild);
|
|
73
|
-
} else {
|
|
74
|
-
head.appendChild(style);
|
|
75
|
-
}
|
|
76
|
-
} else {
|
|
77
|
-
head.appendChild(style);
|
|
78
|
-
}
|
|
79
|
-
if (style.styleSheet) {
|
|
80
|
-
style.styleSheet.cssText = css;
|
|
81
|
-
} else {
|
|
82
|
-
style.appendChild(document.createTextNode(css));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
var css_248z = ".index-module_custom-image-editor__RK-wE {\n width: 100%;\n overflow: hidden;\n margin-top: -460px;\n position: relative;\n border: 1px solid #eee;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-container__RYAxl,\n.index-module_custom-image-editor__RK-wE .index-module_konvajs-content__6WYGJ,\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor__8luIM {\n width: 100% !important;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-palette__Xvk4K {\n background: #fff;\n}\n.index-module_custom-image-editor-save__eA0OC {\n position: absolute;\n right: 20px;\n bottom: 30px;\n}\n.index-module_custom-image-editor__RK-wE .index-module_custom-image-editor-null__52KxO {\n width: 100%;\n height: 460px;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-toolbar__ps2nI {\n margin-left: -200px;\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n height: auto;\n width: 36px !important;\n display: block;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-toolbar-separator__GTqg8 {\n display: none;\n}\n.index-module_gy-image-editor__2PgAg {\n margin: 4px;\n background-color: #fff;\n}\n.index-module_gy-image-editor__2PgAg .index-module_box-img__f2Nx9 {\n width: 90px;\n height: 90px;\n border: 1px solid #d7dce7;\n position: relative;\n margin-top: 8px;\n margin-left: 7px;\n cursor: move;\n}\n.index-module_gy-image-editor__2PgAg .index-module_box-img__f2Nx9 img {\n width: auto;\n max-width: 100%;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.index-module_gy-image-editor__2PgAg .index-module_box-text__valN7 {\n font-size: 12px;\n font-weight: 400;\n color: #828c99;\n line-height: 17px;\n text-align: center;\n}\n.index-module_gy-image-editor__2PgAg .ant-layout-sider {\n background: #fff;\n}\n.index-module_gy-image-editor__2PgAg .ant-layout {\n background: #fff;\n}\n.index-module_gy-image-editor__2PgAg #index-module_images__pRZ9O {\n overflow: hidden;\n clear: both;\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_gy-image-editor__2PgAg #index-module_canvas-container__PuYZw {\n position: relative;\n}\n.index-module_gy-image-editor__2PgAg #index-module_canvas-container__PuYZw .index-module_tool-bar__kAiyj {\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 32px;\n height: auto;\n}\n.index-module_gy-image-editor__2PgAg #index-module_canvas-container__PuYZw .index-module_tool-bar__kAiyj .ant-btn {\n width: 20px;\n height: 20px;\n padding: 6px 0;\n border: none;\n}\n.index-module_gy-image-editor__2PgAg .index-module_button-icon__463Ga {\n width: 16px;\n height: 16px;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.index-module_gy-image-editor__2PgAg .index-module_back__MY6Kt {\n background-image: url(/lm_imgs/mie/back.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_forward__IDKoN {\n background-image: url(/lm_imgs/mie/forward.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_pen__GyJzG {\n background-image: url(/lm_imgs/mie/pen.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_text__LVtw7 {\n background-image: url(/lm_imgs/mie/text.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_rect__K6T6d {\n background-image: url(/lm_imgs/mie/rect.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_circle-icon2__XjPuI {\n background-image: url(/lm_imgs/mie/circle.svg);\n background-color: none;\n}\n.index-module_gy-image-editor__2PgAg .index-module_triangle__-PP0Y {\n background-image: url(/lm_imgs/mie/triangle.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_line__9-WZE {\n background-image: url(/lm_imgs/mie/line.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_clear__mXP-m {\n background-image: url(/lm_imgs/mie/clear.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_export__h9hhf {\n background-image: url(/lm_imgs/mie/export.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_selected__eAmsn {\n background-image: url(/lm_imgs/mie/selected.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_noselected__xuC3A {\n background-image: url(/lm_imgs/mie/no.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_save__rtkNk {\n background-image: url(/lm_imgs/mie/save.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_back__MY6Kt {\n background-image: url(/lm_imgs/mie/back-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_forward__IDKoN {\n background-image: url(/lm_imgs/mie/forward-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_pen__GyJzG {\n background-image: url(/lm_imgs/mie/pen-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_text__LVtw7 {\n background-image: url(/lm_imgs/mie/text-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_rect__K6T6d {\n background-image: url(/lm_imgs/mie/rect-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_circle-icon2__XjPuI {\n background-image: url(/lm_imgs/mie/circle-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_triangle__-PP0Y {\n background-image: url(/lm_imgs/mie/triangle-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_line__9-WZE {\n background-image: url(/lm_imgs/mie/line-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_clear__mXP-m {\n background-image: url(/lm_imgs/mie/clear-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_export__h9hhf {\n background-image: url(/lm_imgs/mie/export-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_selected__eAmsn {\n background-image: url(/lm_imgs/mie/selected-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_noselected__xuC3A {\n background-image: url(/lm_imgs/mie/no-hover.svg);\n}\n.ant-btn:hover\n .ant-btn:focus .index-module_save__rtkNk {\n background-image: url(/lm_imgs/mie/save-hover.svg);\n}\n";
|
|
18
|
+
import '@lm_fe/provoke';
|
|
19
|
+
var css_248z = ".index-module_custom-image-editor__RK-wE {\n width: 100%;\n overflow: hidden;\n margin-top: -460px;\n position: relative;\n border: 1px solid #eee;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-container__RYAxl,\n.index-module_custom-image-editor__RK-wE .index-module_konvajs-content__6WYGJ,\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor__8luIM {\n width: 100% !important;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-palette__Xvk4K {\n background: #fff;\n}\n.index-module_custom-image-editor-save__eA0OC {\n position: absolute;\n right: 20px;\n bottom: 30px;\n}\n.index-module_custom-image-editor__RK-wE .index-module_custom-image-editor-null__52KxO {\n width: 100%;\n height: 460px;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-toolbar__ps2nI {\n margin-left: -200px;\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n height: auto;\n width: 36px !important;\n display: block;\n}\n.index-module_custom-image-editor__RK-wE .index-module_react-img-editor-toolbar-separator__GTqg8 {\n display: none;\n}\n.index-module_gy-image-editor__2PgAg {\n margin: 4px;\n background-color: #fff;\n}\n.index-module_gy-image-editor__2PgAg .index-module_box-img__f2Nx9 {\n width: 90px;\n height: 90px;\n border: 1px solid #d7dce7;\n position: relative;\n margin-top: 8px;\n margin-left: 7px;\n cursor: move;\n}\n.index-module_gy-image-editor__2PgAg .index-module_box-img__f2Nx9 img {\n width: auto;\n max-width: 100%;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.index-module_gy-image-editor__2PgAg .index-module_box-text__valN7 {\n font-size: 12px;\n font-weight: 400;\n color: #828c99;\n line-height: 17px;\n text-align: center;\n}\n.index-module_gy-image-editor__2PgAg .ant-layout-sider {\n background: #fff;\n}\n.index-module_gy-image-editor__2PgAg .ant-layout {\n background: #fff;\n}\n.index-module_gy-image-editor__2PgAg #index-module_images__pRZ9O {\n overflow: hidden;\n clear: both;\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_gy-image-editor__2PgAg #index-module_canvas-container__PuYZw {\n position: relative;\n}\n.index-module_gy-image-editor__2PgAg #index-module_canvas-container__PuYZw .index-module_tool-bar__kAiyj {\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 32px;\n height: auto;\n}\n.index-module_gy-image-editor__2PgAg #index-module_canvas-container__PuYZw .index-module_tool-bar__kAiyj .ant-btn {\n width: 24px;\n height: 24px;\n padding: 14px 0;\n border: none;\n}\n.index-module_gy-image-editor__2PgAg .index-module_button-icon__463Ga {\n display: inline-block;\n width: 18px;\n height: 18px;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.index-module_gy-image-editor__2PgAg .index-module_back__MY6Kt {\n background-image: url(/lm_imgs/mie/back.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_forward__IDKoN {\n background-image: url(/lm_imgs/mie/forward.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_pen__GyJzG {\n background-image: url(/lm_imgs/mie/pen.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_text__LVtw7 {\n background-image: url(/lm_imgs/mie/text.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_rect__K6T6d {\n background-image: url(/lm_imgs/mie/rect.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_circle-icon2__XjPuI {\n background-image: url(/lm_imgs/mie/circle.svg);\n background-color: none;\n}\n.index-module_gy-image-editor__2PgAg .index-module_triangle__-PP0Y {\n background-image: url(/lm_imgs/mie/triangle.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_line__9-WZE {\n background-image: url(/lm_imgs/mie/line.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_clear__mXP-m {\n background-image: url(/lm_imgs/mie/clear.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_export__h9hhf {\n background-image: url(/lm_imgs/mie/export.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_selected__eAmsn {\n background-image: url(/lm_imgs/mie/selected.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_noselected__xuC3A {\n background-image: url(/lm_imgs/mie/no.svg);\n}\n.index-module_gy-image-editor__2PgAg .index-module_save__rtkNk {\n background-image: url(/lm_imgs/mie/save.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_back__MY6Kt {\n background-image: url(/lm_imgs/mie/back-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_forward__IDKoN {\n background-image: url(/lm_imgs/mie/forward-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_pen__GyJzG {\n background-image: url(/lm_imgs/mie/pen-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_text__LVtw7 {\n background-image: url(/lm_imgs/mie/text-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_rect__K6T6d {\n background-image: url(/lm_imgs/mie/rect-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_circle-icon2__XjPuI {\n background-image: url(/lm_imgs/mie/circle-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_triangle__-PP0Y {\n background-image: url(/lm_imgs/mie/triangle-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_line__9-WZE {\n background-image: url(/lm_imgs/mie/line-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_clear__mXP-m {\n background-image: url(/lm_imgs/mie/clear-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_export__h9hhf {\n background-image: url(/lm_imgs/mie/export-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_selected__eAmsn {\n background-image: url(/lm_imgs/mie/selected-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_noselected__xuC3A {\n background-image: url(/lm_imgs/mie/no-hover.svg);\n}\n.ant-btn:hover .ant-btn:focus .index-module_save__rtkNk {\n background-image: url(/lm_imgs/mie/save-hover.svg);\n}\n";
|
|
86
20
|
var styles = {
|
|
87
21
|
"custom-image-editor": "index-module_custom-image-editor__RK-wE",
|
|
88
22
|
"react-img-editor-container": "index-module_react-img-editor-container__RYAxl",
|
|
@@ -120,10 +54,10 @@ function init_delete_control() {
|
|
|
120
54
|
var deleteIcon = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Ebene_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='595.275px' height='595.275px' viewBox='200 215 230 470' xml:space='preserve'%3E%3Ccircle style='fill:%23F44336;' cx='299.76' cy='439.067' r='218.516'/%3E%3Cg%3E%3Crect x='267.162' y='307.978' transform='matrix(0.7071 -0.7071 0.7071 0.7071 -222.6202 340.6915)' style='fill:white;' width='65.545' height='262.18'/%3E%3Crect x='266.988' y='308.153' transform='matrix(0.7071 0.7071 -0.7071 0.7071 398.3889 -83.3116)' style='fill:white;' width='65.544' height='262.179'/%3E%3C/g%3E%3C/svg%3E";
|
|
121
55
|
var img = document.createElement('img');
|
|
122
56
|
img.src = deleteIcon;
|
|
123
|
-
// real_fabric.Object.prototype.transparentCorners = false;
|
|
124
|
-
// real_fabric.Object.prototype.cornerColor = 'blue';
|
|
125
|
-
// real_fabric.Object.prototype.cornerStyle = 'circle';
|
|
126
|
-
real_fabric.Object.prototype.controls.deleteControl = new real_fabric.Control({
|
|
57
|
+
// real_fabric().Object.prototype.transparentCorners = false;
|
|
58
|
+
// real_fabric().Object.prototype.cornerColor = 'blue';
|
|
59
|
+
// real_fabric().Object.prototype.cornerStyle = 'circle';
|
|
60
|
+
real_fabric().Object.prototype.controls.deleteControl = new (real_fabric().Control)({
|
|
127
61
|
x: 0.5,
|
|
128
62
|
y: -0.5,
|
|
129
63
|
offsetY: 16,
|
|
@@ -140,17 +74,17 @@ function init_delete_control() {
|
|
|
140
74
|
var size = 16;
|
|
141
75
|
ctx.save();
|
|
142
76
|
ctx.translate(left, top);
|
|
143
|
-
ctx.rotate(real_fabric.util.degreesToRadians(fabricObject.angle));
|
|
77
|
+
ctx.rotate(real_fabric().util.degreesToRadians(fabricObject.angle));
|
|
144
78
|
ctx.drawImage(img, -size / 2, -size / 2, size, size);
|
|
145
79
|
ctx.restore();
|
|
146
80
|
}
|
|
147
81
|
// cornerSize: 24
|
|
148
82
|
});
|
|
149
83
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Content = _Layout.Content;
|
|
84
|
+
var Sider = Layout.Sider,
|
|
85
|
+
Content = Layout.Content;
|
|
153
86
|
function MyImageEditor_Inner(props) {
|
|
87
|
+
var _real_fabric;
|
|
154
88
|
var value = props.value,
|
|
155
89
|
onChange = props.onChange,
|
|
156
90
|
canvasOptions = props.canvasOptions,
|
|
@@ -196,12 +130,26 @@ function MyImageEditor_Inner(props) {
|
|
|
196
130
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
197
131
|
__checked = _useState8[0],
|
|
198
132
|
set_checked = _useState8[1];
|
|
133
|
+
var _useState9 = useState(false),
|
|
134
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
135
|
+
loaded = _useState10[0],
|
|
136
|
+
set_loaded = _useState10[1];
|
|
199
137
|
useEffect(function () {
|
|
200
|
-
|
|
138
|
+
mchcEnv.ds([function (s) {
|
|
139
|
+
return s.lm_libs.fabric_5_2_0['fabric.min.js'];
|
|
140
|
+
}]).then(function () {
|
|
141
|
+
return set_loaded(true);
|
|
142
|
+
});
|
|
201
143
|
}, []);
|
|
202
144
|
useEffect(function () {
|
|
203
|
-
initCanvas();
|
|
204
|
-
}, [value]);
|
|
145
|
+
loaded && initCanvas();
|
|
146
|
+
}, [value, loaded]);
|
|
147
|
+
useEffect(function () {
|
|
148
|
+
if (loaded) {
|
|
149
|
+
init_delete_control();
|
|
150
|
+
createContainner();
|
|
151
|
+
}
|
|
152
|
+
}, [loaded]);
|
|
205
153
|
useEffect(function () {
|
|
206
154
|
return initEvent();
|
|
207
155
|
}, [colors, strokeWidth, fontSize, value]);
|
|
@@ -220,7 +168,7 @@ function MyImageEditor_Inner(props) {
|
|
|
220
168
|
var _legends$length, _gyImageEditorRef$cur2;
|
|
221
169
|
var count = (_legends$length = legends.length) !== null && _legends$length !== void 0 ? _legends$length : 0;
|
|
222
170
|
var len = count ? 200 : 0;
|
|
223
|
-
containner.current = new real_fabric.Canvas('c', _objectSpread({
|
|
171
|
+
containner.current = new (real_fabric().Canvas)('c', _objectSpread({
|
|
224
172
|
backgroundColor: '#fff',
|
|
225
173
|
width: (gyImageEditorRef === null || gyImageEditorRef === void 0 || (_gyImageEditorRef$cur2 = gyImageEditorRef.current) === null || _gyImageEditorRef$cur2 === void 0 ? void 0 : _gyImageEditorRef$cur2.clientWidth) - len,
|
|
226
174
|
height: 460
|
|
@@ -240,7 +188,7 @@ function MyImageEditor_Inner(props) {
|
|
|
240
188
|
mchcLogger.log('initCanvas', {
|
|
241
189
|
value: value
|
|
242
190
|
});
|
|
243
|
-
if (!(value &&
|
|
191
|
+
if (!(value && isString(value))) {
|
|
244
192
|
_context.next = 12;
|
|
245
193
|
break;
|
|
246
194
|
}
|
|
@@ -264,7 +212,7 @@ function MyImageEditor_Inner(props) {
|
|
|
264
212
|
case 10:
|
|
265
213
|
img_el = _context.sent;
|
|
266
214
|
if (img_el) {
|
|
267
|
-
img = new real_fabric.Image(img_el);
|
|
215
|
+
img = new (real_fabric().Image)(img_el);
|
|
268
216
|
(_containner$current20 = containner.current) === null || _containner$current20 === void 0 || _containner$current20.add(img);
|
|
269
217
|
}
|
|
270
218
|
case 12:
|
|
@@ -286,14 +234,14 @@ function MyImageEditor_Inner(props) {
|
|
|
286
234
|
var __events = {
|
|
287
235
|
drop: function drop(options) {
|
|
288
236
|
var item = legend_item.current;
|
|
289
|
-
real_fabric.util.loadImage(
|
|
290
|
-
var legimg = new real_fabric.Image(img, {
|
|
237
|
+
real_fabric().util.loadImage(get(item, 'img'), function (img) {
|
|
238
|
+
var legimg = new (real_fabric().Image)(img, {
|
|
291
239
|
left: options.e.offsetX,
|
|
292
240
|
top: options.e.offsetY,
|
|
293
|
-
width:
|
|
294
|
-
height:
|
|
241
|
+
width: get(item, 'width'),
|
|
242
|
+
height: get(item, 'height'),
|
|
295
243
|
// @ts-ignore
|
|
296
|
-
id:
|
|
244
|
+
id: get(item, 'id')
|
|
297
245
|
});
|
|
298
246
|
con.add(legimg);
|
|
299
247
|
handleSelectDraw();
|
|
@@ -360,7 +308,7 @@ function MyImageEditor_Inner(props) {
|
|
|
360
308
|
createContainner();
|
|
361
309
|
containner.current.isDrawingMode = false;
|
|
362
310
|
containner.current.selection = false;
|
|
363
|
-
textObject.current = new real_fabric.Textbox('', {
|
|
311
|
+
textObject.current = new (real_fabric().Textbox)('', {
|
|
364
312
|
left: mouseFrom.current.x,
|
|
365
313
|
top: mouseFrom.current.y,
|
|
366
314
|
fontSize: fontSize,
|
|
@@ -377,7 +325,7 @@ function MyImageEditor_Inner(props) {
|
|
|
377
325
|
var top = mouseFrom.current.y;
|
|
378
326
|
var width = mouseTo.current.x - mouseFrom.current.x;
|
|
379
327
|
var height = mouseTo.current.y - mouseFrom.current.y;
|
|
380
|
-
var canvasObject = new real_fabric.Rect({
|
|
328
|
+
var canvasObject = new (real_fabric().Rect)({
|
|
381
329
|
left: left,
|
|
382
330
|
top: top,
|
|
383
331
|
width: width,
|
|
@@ -393,7 +341,7 @@ function MyImageEditor_Inner(props) {
|
|
|
393
341
|
var left = mouseFrom.current.x;
|
|
394
342
|
var top = mouseFrom.current.y;
|
|
395
343
|
var radius = Math.sqrt((mouseTo.current.x - left) * (mouseTo.current.x - left) + (mouseTo.current.y - top) * (mouseTo.current.y - top)) / 2;
|
|
396
|
-
var canvasObject = new real_fabric.Circle({
|
|
344
|
+
var canvasObject = new (real_fabric().Circle)({
|
|
397
345
|
left: left,
|
|
398
346
|
top: top,
|
|
399
347
|
stroke: colors,
|
|
@@ -409,7 +357,7 @@ function MyImageEditor_Inner(props) {
|
|
|
409
357
|
var top = mouseFrom.current.y;
|
|
410
358
|
var height = mouseTo.current.y - mouseFrom.current.y;
|
|
411
359
|
var width = Math.sqrt(Math.pow(height, 2) + Math.pow(height / 2.0, 2));
|
|
412
|
-
var canvasObject = new real_fabric.Triangle({
|
|
360
|
+
var canvasObject = new (real_fabric().Triangle)({
|
|
413
361
|
left: left,
|
|
414
362
|
top: top,
|
|
415
363
|
width: width,
|
|
@@ -422,7 +370,7 @@ function MyImageEditor_Inner(props) {
|
|
|
422
370
|
}
|
|
423
371
|
function ininLine() {
|
|
424
372
|
createContainner();
|
|
425
|
-
var canvasObject = new real_fabric.Line([mouseFrom.current.x, mouseFrom.current.y, mouseTo.current.x, mouseTo.current.y], {
|
|
373
|
+
var canvasObject = new (real_fabric().Line)([mouseFrom.current.x, mouseFrom.current.y, mouseTo.current.x, mouseTo.current.y], {
|
|
426
374
|
fill: colors,
|
|
427
375
|
stroke: colors,
|
|
428
376
|
strokeWidth: strokeWidth
|
|
@@ -489,7 +437,7 @@ function MyImageEditor_Inner(props) {
|
|
|
489
437
|
}
|
|
490
438
|
//擦除
|
|
491
439
|
function handleFreeErase() {
|
|
492
|
-
if (!real_fabric.EraserBrush) return;
|
|
440
|
+
if (!real_fabric().EraserBrush) return;
|
|
493
441
|
if (freeErase.current) {
|
|
494
442
|
freeErase.current = false;
|
|
495
443
|
containner.current.isDrawingMode = false;
|
|
@@ -505,7 +453,7 @@ function MyImageEditor_Inner(props) {
|
|
|
505
453
|
// 开启画布自由绘画模式
|
|
506
454
|
containner.current.isDrawingMode = true;
|
|
507
455
|
// 设置自由绘画模式 画笔颜色与画笔线条大小
|
|
508
|
-
containner.current.freeDrawingBrush = new real_fabric.EraserBrush(containner.current);
|
|
456
|
+
containner.current.freeDrawingBrush = new (real_fabric().EraserBrush)(containner.current);
|
|
509
457
|
containner.current.freeDrawingBrush.width = 20;
|
|
510
458
|
currentType.current = 'free';
|
|
511
459
|
}
|
|
@@ -523,8 +471,8 @@ function MyImageEditor_Inner(props) {
|
|
|
523
471
|
circleFlag.current = false;
|
|
524
472
|
triangleFlag.current = false;
|
|
525
473
|
lineFlag.current = false;
|
|
526
|
-
if (real_fabric.PencilBrush) {
|
|
527
|
-
containner.current.freeDrawingBrush = new real_fabric.PencilBrush(containner.current);
|
|
474
|
+
if (real_fabric().PencilBrush) {
|
|
475
|
+
containner.current.freeDrawingBrush = new (real_fabric().PencilBrush)(containner.current);
|
|
528
476
|
}
|
|
529
477
|
removeTextObject();
|
|
530
478
|
// 开启画布自由绘画模式
|
|
@@ -656,10 +604,9 @@ function MyImageEditor_Inner(props) {
|
|
|
656
604
|
}
|
|
657
605
|
}
|
|
658
606
|
//颜色设置
|
|
659
|
-
function handleGradePicker(
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
set_colors(colors);
|
|
607
|
+
function handleGradePicker(css) {
|
|
608
|
+
containner.current.freeDrawingBrush.color = css;
|
|
609
|
+
set_colors(css);
|
|
663
610
|
}
|
|
664
611
|
//粗细设置
|
|
665
612
|
function handleSlider(value) {
|
|
@@ -709,70 +656,71 @@ function MyImageEditor_Inner(props) {
|
|
|
709
656
|
set_checked(checked);
|
|
710
657
|
}
|
|
711
658
|
function renderSetUp() {
|
|
712
|
-
return /*#__PURE__*/
|
|
659
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
713
660
|
className: styles["slider"],
|
|
714
661
|
style: {
|
|
715
662
|
width: 300
|
|
716
663
|
}
|
|
717
|
-
}, /*#__PURE__*/
|
|
664
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u7C97\u7EC6"), /*#__PURE__*/React.createElement(Slider, {
|
|
718
665
|
onChange: handleSlider,
|
|
719
666
|
value: strokeWidth
|
|
720
|
-
})), /*#__PURE__*/
|
|
667
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
721
668
|
className: styles["picker"],
|
|
722
669
|
style: {
|
|
723
670
|
width: 300
|
|
724
671
|
}
|
|
725
|
-
}, /*#__PURE__*/
|
|
672
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u989C\u8272"), /*#__PURE__*/React.createElement(MyColor, {
|
|
726
673
|
width: '300',
|
|
727
674
|
color: colors,
|
|
728
675
|
onChange: handleGradePicker
|
|
729
676
|
})));
|
|
730
677
|
}
|
|
731
678
|
function renderTextSetUp() {
|
|
732
|
-
return /*#__PURE__*/
|
|
679
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
733
680
|
className: styles["slider"],
|
|
734
681
|
style: {
|
|
735
682
|
width: 300
|
|
736
683
|
}
|
|
737
|
-
}, /*#__PURE__*/
|
|
684
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u5927\u5C0F"), /*#__PURE__*/React.createElement(Slider, {
|
|
738
685
|
onChange: handleTextSlider,
|
|
739
686
|
value: fontSize
|
|
740
|
-
})), /*#__PURE__*/
|
|
687
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
741
688
|
className: styles["picker"],
|
|
742
689
|
style: {
|
|
743
690
|
width: 300
|
|
744
691
|
}
|
|
745
|
-
}, /*#__PURE__*/
|
|
692
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u989C\u8272"), /*#__PURE__*/React.createElement(MyColor, {
|
|
746
693
|
width: '300',
|
|
747
694
|
color: colors,
|
|
748
695
|
onChange: handleGradePicker
|
|
749
696
|
})));
|
|
750
697
|
}
|
|
751
|
-
|
|
698
|
+
if (!loaded) return '加载中...';
|
|
699
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
752
700
|
className: styles["switch"],
|
|
753
701
|
style: {
|
|
754
702
|
margin: '13px 0 16px 58px'
|
|
755
703
|
}
|
|
756
|
-
}, /*#__PURE__*/
|
|
704
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u7535\u5B50\u753B\u677F\uFF1A"), /*#__PURE__*/React.createElement(Switch, {
|
|
757
705
|
checkedChildren: "\u5F00\u542F",
|
|
758
706
|
unCheckedChildren: "\u5173\u95ED",
|
|
759
707
|
checked: __checked,
|
|
760
708
|
onChange: handleSwitch
|
|
761
|
-
})), /*#__PURE__*/
|
|
709
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
762
710
|
className: styles["gy-image-editor"],
|
|
763
711
|
ref: gyImageEditorRef
|
|
764
|
-
}, /*#__PURE__*/
|
|
712
|
+
}, /*#__PURE__*/React.createElement(Layout, {
|
|
765
713
|
hidden: !__checked
|
|
766
|
-
}, legends.length ? /*#__PURE__*/
|
|
714
|
+
}, legends.length ? /*#__PURE__*/React.createElement(Sider, {
|
|
767
715
|
style: {
|
|
768
716
|
borderTop: '1px solid #d7dce7'
|
|
769
717
|
}
|
|
770
|
-
}, /*#__PURE__*/
|
|
718
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
771
719
|
id: styles["images"]
|
|
772
720
|
}, legends.map(function (l, idx) {
|
|
773
|
-
return /*#__PURE__*/
|
|
721
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
774
722
|
className: styles["box-img"]
|
|
775
|
-
}, /*#__PURE__*/
|
|
723
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
776
724
|
draggable: "true",
|
|
777
725
|
onDragStart: function onDragStart(e) {
|
|
778
726
|
return handleDragStart(e, _objectSpread(_objectSpread({}, l), {}, {
|
|
@@ -780,139 +728,140 @@ function MyImageEditor_Inner(props) {
|
|
|
780
728
|
}));
|
|
781
729
|
},
|
|
782
730
|
src: l.img
|
|
783
|
-
})), /*#__PURE__*/
|
|
731
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
784
732
|
className: styles["box-text"]
|
|
785
733
|
}, l.label));
|
|
786
|
-
}))) : null, /*#__PURE__*/
|
|
734
|
+
}))) : null, /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement("div", {
|
|
787
735
|
id: styles['canvas-container']
|
|
788
|
-
}, /*#__PURE__*/
|
|
736
|
+
}, /*#__PURE__*/React.createElement("canvas", {
|
|
789
737
|
// width={canvasWidth}
|
|
790
738
|
// height="460"
|
|
791
739
|
id: "c",
|
|
792
740
|
style: {
|
|
793
741
|
border: '1px solid #d7dce7'
|
|
794
742
|
}
|
|
795
|
-
}), /*#__PURE__*/
|
|
743
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
796
744
|
className: styles["tool-bar"]
|
|
797
|
-
}, /*#__PURE__*/
|
|
745
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
798
746
|
className: styles["tool-bar-container"]
|
|
799
|
-
}, /*#__PURE__*/
|
|
747
|
+
}, /*#__PURE__*/React.createElement(Popover, {
|
|
800
748
|
placement: "left",
|
|
801
|
-
content: /*#__PURE__*/
|
|
802
|
-
}, /*#__PURE__*/
|
|
749
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u540E\u9000")
|
|
750
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
803
751
|
onClick: handleRevoke,
|
|
804
|
-
icon: /*#__PURE__*/
|
|
752
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
805
753
|
className: classnames(styles["button-icon"], styles["back"])
|
|
806
754
|
})
|
|
807
|
-
})), /*#__PURE__*/
|
|
755
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
808
756
|
placement: "left",
|
|
809
|
-
content: /*#__PURE__*/
|
|
810
|
-
}, /*#__PURE__*/
|
|
757
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u524D\u8FDB")
|
|
758
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
811
759
|
onClick: handleRedo,
|
|
812
|
-
icon: /*#__PURE__*/
|
|
760
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
813
761
|
className: classnames(styles["button-icon"], styles["forward"])
|
|
814
762
|
})
|
|
815
|
-
})), real_fabric.EraserBrush ? /*#__PURE__*/
|
|
763
|
+
})), (_real_fabric = real_fabric()) !== null && _real_fabric !== void 0 && _real_fabric.EraserBrush ? /*#__PURE__*/React.createElement(Popover, {
|
|
816
764
|
placement: "left",
|
|
817
|
-
content: /*#__PURE__*/
|
|
818
|
-
}, /*#__PURE__*/
|
|
765
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u64E6\u9664")
|
|
766
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
819
767
|
onClick: handleFreeErase,
|
|
820
|
-
icon: /*#__PURE__*/
|
|
821
|
-
|
|
768
|
+
icon: /*#__PURE__*/React.createElement(MyIcon, {
|
|
769
|
+
value: 'ClearOutlined'
|
|
770
|
+
})
|
|
771
|
+
})) : null, /*#__PURE__*/React.createElement(Popover, {
|
|
822
772
|
placement: "left",
|
|
823
773
|
content: renderSetUp(),
|
|
824
774
|
title: "\u8BBE\u7F6E"
|
|
825
|
-
}, /*#__PURE__*/
|
|
775
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
826
776
|
onClick: handleFreeDraw,
|
|
827
|
-
icon: /*#__PURE__*/
|
|
777
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
828
778
|
className: classnames(styles["button-icon"], styles["pen"])
|
|
829
779
|
})
|
|
830
|
-
})), /*#__PURE__*/
|
|
780
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
831
781
|
placement: "left",
|
|
832
782
|
content: renderTextSetUp(),
|
|
833
783
|
title: "\u8BBE\u7F6E"
|
|
834
|
-
}, /*#__PURE__*/
|
|
784
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
835
785
|
onClick: handleTextDraw,
|
|
836
|
-
icon: /*#__PURE__*/
|
|
786
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
837
787
|
className: classnames(styles["button-icon"], styles["text"])
|
|
838
788
|
})
|
|
839
|
-
})), /*#__PURE__*/
|
|
789
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
840
790
|
placement: "left",
|
|
841
791
|
content: renderSetUp(),
|
|
842
792
|
title: "\u8BBE\u7F6E"
|
|
843
|
-
}, /*#__PURE__*/
|
|
793
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
844
794
|
onClick: handleRectDraw,
|
|
845
|
-
icon: /*#__PURE__*/
|
|
795
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
846
796
|
className: classnames(styles["button-icon"], styles["rect"])
|
|
847
797
|
})
|
|
848
|
-
})), /*#__PURE__*/
|
|
798
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
849
799
|
placement: "left",
|
|
850
800
|
content: renderSetUp(),
|
|
851
801
|
title: "\u8BBE\u7F6E"
|
|
852
|
-
}, /*#__PURE__*/
|
|
802
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
853
803
|
onClick: handleCircleDraw,
|
|
854
|
-
icon: /*#__PURE__*/
|
|
804
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
855
805
|
className: classnames(styles["button-icon"], styles["circle-icon2"])
|
|
856
806
|
})
|
|
857
|
-
})), /*#__PURE__*/
|
|
807
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
858
808
|
placement: "left",
|
|
859
809
|
content: renderSetUp(),
|
|
860
810
|
title: "\u8BBE\u7F6E"
|
|
861
|
-
}, /*#__PURE__*/
|
|
811
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
862
812
|
onClick: handleTriangleDraw,
|
|
863
|
-
icon: /*#__PURE__*/
|
|
813
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
864
814
|
className: classnames(styles["button-icon"], styles["triangle"])
|
|
865
815
|
})
|
|
866
|
-
})), /*#__PURE__*/
|
|
816
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
867
817
|
placement: "left",
|
|
868
818
|
content: renderSetUp(),
|
|
869
819
|
title: "\u8BBE\u7F6E"
|
|
870
|
-
}, /*#__PURE__*/
|
|
820
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
871
821
|
onClick: handleLineDraw,
|
|
872
|
-
icon: /*#__PURE__*/
|
|
822
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
873
823
|
className: classnames(styles["button-icon"], styles["line"])
|
|
874
824
|
})
|
|
875
|
-
})), /*#__PURE__*/
|
|
825
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
876
826
|
placement: "left",
|
|
877
|
-
content: /*#__PURE__*/
|
|
878
|
-
}, /*#__PURE__*/
|
|
827
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u6E05\u9664")
|
|
828
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
879
829
|
onClick: handleClear,
|
|
880
|
-
icon: /*#__PURE__*/
|
|
830
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
881
831
|
className: classnames(styles["button-icon"], styles["clear"])
|
|
882
832
|
})
|
|
883
|
-
})), /*#__PURE__*/
|
|
833
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
884
834
|
placement: "left",
|
|
885
|
-
content: /*#__PURE__*/
|
|
886
|
-
}, /*#__PURE__*/
|
|
835
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u5BFC\u51FA")
|
|
836
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
887
837
|
onClick: handleExport,
|
|
888
|
-
icon: /*#__PURE__*/
|
|
838
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
889
839
|
className: classnames(styles["button-icon"], styles["export"])
|
|
890
840
|
})
|
|
891
|
-
})), /*#__PURE__*/
|
|
841
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
892
842
|
placement: "left",
|
|
893
|
-
content: /*#__PURE__*/
|
|
894
|
-
}, /*#__PURE__*/
|
|
843
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u53EF\u9009\u4E2D")
|
|
844
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
895
845
|
onClick: handleSelectDraw,
|
|
896
|
-
icon: /*#__PURE__*/
|
|
846
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
897
847
|
className: classnames(styles["button-icon"], styles["selected"])
|
|
898
848
|
})
|
|
899
|
-
})), /*#__PURE__*/
|
|
849
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
900
850
|
placement: "left",
|
|
901
|
-
content: /*#__PURE__*/
|
|
902
|
-
}, /*#__PURE__*/
|
|
851
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u4E0D\u53EF\u9009\u4E2D")
|
|
852
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
903
853
|
onClick: handleUnselectDraw,
|
|
904
|
-
icon: /*#__PURE__*/
|
|
854
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
905
855
|
className: classnames(styles["button-icon"], styles["noselected"])
|
|
906
856
|
})
|
|
907
|
-
})), /*#__PURE__*/
|
|
857
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
908
858
|
placement: "left",
|
|
909
|
-
content: /*#__PURE__*/
|
|
910
|
-
}, /*#__PURE__*/
|
|
859
|
+
content: /*#__PURE__*/React.createElement("span", null, "\u4FDD\u5B58")
|
|
860
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
911
861
|
onClick: handleImgSave,
|
|
912
|
-
icon: /*#__PURE__*/
|
|
862
|
+
icon: /*#__PURE__*/React.createElement("span", {
|
|
913
863
|
className: classnames(styles["button-icon"], styles["save"])
|
|
914
864
|
})
|
|
915
865
|
})))))))));
|
|
916
866
|
}
|
|
917
867
|
export { MyImageEditor_Inner as default };
|
|
918
|
-
//# sourceMappingURL=.root4.js.map
|