Browse Source

Merge branch 'develop' of git.links123.net:Roxas/bilingo-ui into develop

# Conflicts:
#	stories/Payment.stories.tsx

dev: Modal Component Change
Roxas 4 years ago
parent
commit
df5264f139
74 changed files with 60764 additions and 83932 deletions
  1. 24
    27
      eslib/AllocWantedModal/index.d.ts
  2. 195
    317
      eslib/AllocWantedModal/index.js
  3. 3
    1
      eslib/BraftEditor/index.d.ts
  4. 29052
    39970
      eslib/BraftEditor/index.js
  5. 5
    5
      eslib/Common/index.js
  6. 21
    21
      eslib/ConsumeListView/index.d.ts
  7. 129
    168
      eslib/ConsumeListView/index.js
  8. 7
    7
      eslib/Editor/index.js
  9. 5
    5
      eslib/Modal/index.d.ts
  10. 53
    86
      eslib/Modal/index.js
  11. 1
    1
      eslib/Modal/index.js.map
  12. 18
    35
      eslib/PayPlatformOptions/index.d.ts
  13. 140
    223
      eslib/PayPlatformOptions/index.js
  14. 18
    18
      eslib/Payment/index.js
  15. 18
    33
      eslib/PriceOptions/index.d.ts
  16. 136
    192
      eslib/PriceOptions/index.js
  17. 8
    8
      eslib/WaitPayInfoView/index.d.ts
  18. 52
    100
      eslib/WaitPayInfoView/index.js
  19. 12
    18
      eslib/WantedPublishModal/index.d.ts
  20. 106
    140
      eslib/WantedPublishModal/index.js
  21. 1
    1
      eslib/WantedPublishModal/index.js.map
  22. 12
    23
      eslib/WantedPublishPopover/index.d.ts
  23. 129
    173
      eslib/WantedPublishPopover/index.js
  24. 1
    1
      eslib/WantedPublishPopover/index.js.map
  25. 13
    16
      eslib/WantedPublishView/index.d.ts
  26. 95
    155
      eslib/WantedPublishView/index.js
  27. 4
    15
      eslib/_commonjsHelpers-97e6d7b1.js
  28. 44
    43
      eslib/index-c9837619.js
  29. 18
    18
      eslib/index.js
  30. 10
    28
      eslib/inherits-6cb67931.js
  31. 3
    14
      eslib/slicedToArray-4cd9e6d3.js
  32. 6
    8
      eslib/style-inject.es-1f59c1d0.js
  33. 10
    23
      eslib/utils-6b513b37.d.ts
  34. 10
    16
      eslib/utils-6b513b37.js
  35. 24
    27
      lib/AllocWantedModal/index.d.ts
  36. 198
    316
      lib/AllocWantedModal/index.js
  37. 3
    1
      lib/BraftEditor/index.d.ts
  38. 28928
    39957
      lib/BraftEditor/index.js
  39. 9
    7
      lib/Common/index.js
  40. 21
    21
      lib/ConsumeListView/index.d.ts
  41. 130
    165
      lib/ConsumeListView/index.js
  42. 11
    9
      lib/Editor/index.js
  43. 5
    5
      lib/Modal/index.d.ts
  44. 56
    84
      lib/Modal/index.js
  45. 1
    1
      lib/Modal/index.js.map
  46. 18
    35
      lib/PayPlatformOptions/index.d.ts
  47. 143
    228
      lib/PayPlatformOptions/index.js
  48. 22
    20
      lib/Payment/index.js
  49. 18
    33
      lib/PriceOptions/index.d.ts
  50. 139
    201
      lib/PriceOptions/index.js
  51. 8
    8
      lib/WaitPayInfoView/index.d.ts
  52. 56
    107
      lib/WaitPayInfoView/index.js
  53. 12
    18
      lib/WantedPublishModal/index.d.ts
  54. 109
    139
      lib/WantedPublishModal/index.js
  55. 1
    1
      lib/WantedPublishModal/index.js.map
  56. 12
    23
      lib/WantedPublishPopover/index.d.ts
  57. 132
    172
      lib/WantedPublishPopover/index.js
  58. 1
    1
      lib/WantedPublishPopover/index.js.map
  59. 13
    16
      lib/WantedPublishView/index.d.ts
  60. 98
    162
      lib/WantedPublishView/index.js
  61. 5
    16
      lib/_commonjsHelpers-72d386ba.js
  62. 1
    1
      lib/defineProperty-ba7cd53d.js
  63. 45
    44
      lib/index-44e17595.js
  64. 22
    20
      lib/index.js
  65. 10
    21
      lib/inherits-c86d64c1.js
  66. 4
    15
      lib/slicedToArray-172f4624.js
  67. 7
    9
      lib/style-inject.es-dcee06b6.js
  68. 10
    23
      lib/utils-b800dc99.d.ts
  69. 12
    18
      lib/utils-b800dc99.js
  70. 25
    25
      src/components/Common/Modal/index.tsx
  71. 42
    43
      src/components/Payment/PriceOptions/PriceOptions.less
  72. 5
    1
      src/components/Payment/WantedPublishModal/index.tsx
  73. 48
    29
      src/components/Payment/WantedPublishPopover/index.tsx
  74. 1
    1
      stats.html

+ 24
- 27
eslib/AllocWantedModal/index.d.ts View File

@@ -3,35 +3,32 @@ import React from "react";
3 3
 import { RefObject } from "react";
4 4
 import { Input } from "antd";
5 5
 interface AllocWantedModalProps {
6
-  allocValue: string | number | null;
7
-  sendValueRange: Array<string | number>;
8
-  sendRequest: Function;
9
-  sendGiftData: {
10
-    answerId: string | number;
11
-    questionId: string | number;
12
-    toUserId: string | number;
13
-  };
14
-  handleVisibleChange: (visible: boolean) => void;
6
+    allocValue: string | number | null;
7
+    sendValueRange: Array<string | number>;
8
+    sendRequest: Function;
9
+    sendGiftData: {
10
+        answerId: string | number;
11
+        questionId: string | number;
12
+        toUserId: string | number;
13
+    };
14
+    handleVisibleChange: (visible: boolean) => void;
15 15
 }
16 16
 interface AllocWantedModalState {
17
-  visible: boolean;
18
-  outRangeTip: boolean;
19
-  sendValue: string | number;
17
+    visible: boolean;
18
+    outRangeTip: boolean;
19
+    sendValue: string | number;
20 20
 }
21
-declare class AllocWantedModal extends React.Component<
22
-  AllocWantedModalProps,
23
-  AllocWantedModalState
24
-> {
25
-  ModalInputRef: RefObject<Input>;
26
-  ModalContentRef: RefObject<any>;
27
-  constructor(props: AllocWantedModalProps);
28
-  handleSendValueChange: (v: React.ReactText) => void;
29
-  checkSendValue: () => boolean;
30
-  handleCloseAction: () => void;
31
-  handleShowAction: () => void;
32
-  handleConfirm: () => null | undefined;
33
-  renderCloseButton: () => JSX.Element;
34
-  renderModalContent: () => JSX.Element;
35
-  render(): JSX.Element;
21
+declare class AllocWantedModal extends React.Component<AllocWantedModalProps, AllocWantedModalState> {
22
+    ModalInputRef: RefObject<Input>;
23
+    ModalContentRef: RefObject<any>;
24
+    constructor(props: AllocWantedModalProps);
25
+    handleSendValueChange: (v: React.ReactText) => void;
26
+    checkSendValue: () => boolean;
27
+    handleCloseAction: () => void;
28
+    handleShowAction: () => void;
29
+    handleConfirm: () => null | undefined;
30
+    renderCloseButton: () => JSX.Element;
31
+    renderModalContent: () => JSX.Element;
32
+    render(): JSX.Element;
36 33
 }
37 34
 export { AllocWantedModal as default };

+ 195
- 317
eslib/AllocWantedModal/index.js View File

@@ -1,348 +1,226 @@
1
-import {
2
-  a as _inherits,
3
-  b as _classCallCheck,
4
-  c as _possibleConstructorReturn,
5
-  d as _getPrototypeOf,
6
-  e as _createClass
7
-} from "../inherits-6cb67931.js";
8
-import React from "react";
9
-import "react-dom";
10
-import { Modal } from "../Modal/index.js";
11
-import { s as styleInject } from "../style-inject.es-1f59c1d0.js";
12
-import { Tooltip, Input, Button, Popover } from "antd";
1
+import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _getPrototypeOf, e as _createClass } from '../inherits-6cb67931.js';
2
+import React from 'react';
3
+import 'react-dom';
4
+import { Modal } from '../Modal/index.js';
5
+import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
6
+import { Tooltip, Input, Button, Popover } from 'antd';
13 7
 
14
-var img =
15
-  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAACMUlEQVQ4T52Uz4tSURTHPxP9oCkKy0UuIqvZSAsrHHgLEaFSDCJoU0GpQaBgqOCmP6AWKrR5kIELNzZZUUQLlReFFowOboQK2oyLkgExsxqJoprixlx5yXs1dXbvnO/93HPPO+dM8WfbCuwANgNfgA/A0OzIlElgH3AIsBrEl4EXwEvguz4+CdsIHAV2/yVjEX4PVFez/SXXwzYAJ4GdawBJyWfggQTqYSKj/f8AklKR4V1gRcJ2rWY1Zvl8PqumaW8n4YFAwFqpVCb988BzCTsCzMiDDodjut1uX11YWGh4PJ470p/L5ZRIJHI+kUhcU1V1UXfRR+CWhF0ARPHHpqrqbCwWC7darXm32z2Xz+fdoVDobL1ef+z1eu8ZlOO2gIkeChrVKpPJHEylUhd7vd5rm822V9O0it/vf2hS16qAbQfOmBW+3W6HnU6nMhgMlux2+5XRaLRion0iYJuAsJGgWq2e8Pv9x5vN5lOXy6V0Op1XiqLkh8PhNwN9WdbsHLBFL6jVaqc8Hs+xYrE4FwwGnyWTyZl0On2p2+0uKopyo9/vf9XpfwA3JcwNHND/zUajcblUKpWj0WhT+qPRqD2bzUbi8fj1QqHwRgfrA/clbBtwGlgnBRaLZb3Rc0z8j4COfgJmgcP/MQEiw/LkbAqwGCmxMdZq7wDRKmI9/Tbo8ltk6NQ/2YTcAWrA+EeY7TPRewK4B5jWwcRB8Syxy5YmLzGD6XViQuSm/QSINjC0n/ltqZBTCKFgAAAAAElFTkSuQmCC";
8
+var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAACMUlEQVQ4T52Uz4tSURTHPxP9oCkKy0UuIqvZSAsrHHgLEaFSDCJoU0GpQaBgqOCmP6AWKrR5kIELNzZZUUQLlReFFowOboQK2oyLkgExsxqJoprixlx5yXs1dXbvnO/93HPPO+dM8WfbCuwANgNfgA/A0OzIlElgH3AIsBrEl4EXwEvguz4+CdsIHAV2/yVjEX4PVFez/SXXwzYAJ4GdawBJyWfggQTqYSKj/f8AklKR4V1gRcJ2rWY1Zvl8PqumaW8n4YFAwFqpVCb988BzCTsCzMiDDodjut1uX11YWGh4PJ470p/L5ZRIJHI+kUhcU1V1UXfRR+CWhF0ARPHHpqrqbCwWC7darXm32z2Xz+fdoVDobL1ef+z1eu8ZlOO2gIkeChrVKpPJHEylUhd7vd5rm822V9O0it/vf2hS16qAbQfOmBW+3W6HnU6nMhgMlux2+5XRaLRion0iYJuAsJGgWq2e8Pv9x5vN5lOXy6V0Op1XiqLkh8PhNwN9WdbsHLBFL6jVaqc8Hs+xYrE4FwwGnyWTyZl0On2p2+0uKopyo9/vf9XpfwA3JcwNHND/zUajcblUKpWj0WhT+qPRqD2bzUbi8fj1QqHwRgfrA/clbBtwGlgnBRaLZb3Rc0z8j4COfgJmgcP/MQEiw/LkbAqwGCmxMdZq7wDRKmI9/Tbo8ltk6NQ/2YTcAWrA+EeY7TPRewK4B5jWwcRB8Syxy5YmLzGD6XViQuSm/QSINjC0n/ltqZBTCKFgAAAAAElFTkSuQmCC";
16 9
 
17
-var css =
18
-  ".AllocWantedModal_wantedModalContent__1VodF {\n  background-color: white;\n  width: 360px;\n  height: 314px;\n  padding: 22px 28px;\n  border-radius: 7px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_title__31i9F {\n  font-size: 18px;\n  font-weight: 400;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueText___uNQe {\n  color: #565656;\n  margin-top: 48px;\n  font-size: 14px;\n  line-height: 20px;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 {\n  margin: 11px auto;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 .ant-input {\n  color: #FB4B56;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueTipBottom__3WBt0 {\n  margin: 0 auto;\n  font-size: 12px;\n  text-align: center;\n  width: 208px;\n  color: #9B9B9B;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-top: 23px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN {\n  color: white;\n  background-color: #71C135;\n  width: 170px;\n  height: 36px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:hover,\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:focus {\n  outline: none;\n  border-color: #8cd158;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw {\n  margin-left: 22px;\n  width: 20px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw .schedule {\n  font-size: 18px;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- {\n  position: absolute;\n  right: 10px;\n  top: 10px;\n  display: block;\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- img {\n  width: 100%;\n  height: 100%;\n}\n.AllocWantedModal_tipsView__3my0J h6 {\n  margin: 0;\n  font-size: 12px;\n  line-height: 22px;\n  color: #3D3D3D;\n}\n.AllocWantedModal_tipsView__3my0J div {\n  font-size: 12px;\n}\n.AllocWantedModal_outRangeTextTip__3R4mw .ant-tooltip-inner {\n  color: red;\n}\n";
10
+var css = ".AllocWantedModal_wantedModalContent__1VodF {\n  background-color: white;\n  width: 360px;\n  height: 314px;\n  padding: 22px 28px;\n  border-radius: 7px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_title__31i9F {\n  font-size: 18px;\n  font-weight: 400;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueText___uNQe {\n  color: #565656;\n  margin-top: 48px;\n  font-size: 14px;\n  line-height: 20px;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 {\n  margin: 11px auto;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 .ant-input {\n  color: #FB4B56;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueTipBottom__3WBt0 {\n  margin: 0 auto;\n  font-size: 12px;\n  text-align: center;\n  width: 208px;\n  color: #9B9B9B;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-top: 23px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN {\n  color: white;\n  background-color: #71C135;\n  width: 170px;\n  height: 36px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:hover,\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:focus {\n  outline: none;\n  border-color: #8cd158;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw {\n  margin-left: 22px;\n  width: 20px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw .schedule {\n  font-size: 18px;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- {\n  position: absolute;\n  right: 10px;\n  top: 10px;\n  display: block;\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- img {\n  width: 100%;\n  height: 100%;\n}\n.AllocWantedModal_tipsView__3my0J h6 {\n  margin: 0;\n  font-size: 12px;\n  line-height: 22px;\n  color: #3D3D3D;\n}\n.AllocWantedModal_tipsView__3my0J div {\n  font-size: 12px;\n}\n.AllocWantedModal_outRangeTextTip__3R4mw .ant-tooltip-inner {\n  color: red;\n}\n";
19 11
 var styles = {
20
-  wantedModalContent: "AllocWantedModal_wantedModalContent__1VodF",
21
-  title: "AllocWantedModal_title__31i9F",
22
-  wantedValueText: "AllocWantedModal_wantedValueText___uNQe",
23
-  wantedInputNumber: "AllocWantedModal_wantedInputNumber__3MyO5",
24
-  wantedValueTipBottom: "AllocWantedModal_wantedValueTipBottom__3WBt0",
25
-  buttonRow: "AllocWantedModal_buttonRow__FegZX",
26
-  confirmButton: "AllocWantedModal_confirmButton__1yXDN",
27
-  tipsButton: "AllocWantedModal_tipsButton__UmFpw",
28
-  closeButton: "AllocWantedModal_closeButton__1d4p-",
29
-  tipsView: "AllocWantedModal_tipsView__3my0J",
30
-  outRangeTextTip: "AllocWantedModal_outRangeTextTip__3R4mw"
12
+  "wantedModalContent": "AllocWantedModal_wantedModalContent__1VodF",
13
+  "title": "AllocWantedModal_title__31i9F",
14
+  "wantedValueText": "AllocWantedModal_wantedValueText___uNQe",
15
+  "wantedInputNumber": "AllocWantedModal_wantedInputNumber__3MyO5",
16
+  "wantedValueTipBottom": "AllocWantedModal_wantedValueTipBottom__3WBt0",
17
+  "buttonRow": "AllocWantedModal_buttonRow__FegZX",
18
+  "confirmButton": "AllocWantedModal_confirmButton__1yXDN",
19
+  "tipsButton": "AllocWantedModal_tipsButton__UmFpw",
20
+  "closeButton": "AllocWantedModal_closeButton__1d4p-",
21
+  "tipsView": "AllocWantedModal_tipsView__3my0J",
22
+  "outRangeTextTip": "AllocWantedModal_outRangeTextTip__3R4mw"
31 23
 };
32 24
 styleInject(css);
33 25
 
34 26
 var AllocWantedModal =
35
-  /*#__PURE__*/
36
-  (function(_React$Component) {
37
-    _inherits(AllocWantedModal, _React$Component);
27
+/*#__PURE__*/
28
+function (_React$Component) {
29
+  _inherits(AllocWantedModal, _React$Component);
38 30
 
39
-    function AllocWantedModal(props) {
40
-      var _this;
31
+  function AllocWantedModal(props) {
32
+    var _this;
41 33
 
42
-      _classCallCheck(this, AllocWantedModal);
34
+    _classCallCheck(this, AllocWantedModal);
43 35
 
44
-      _this = _possibleConstructorReturn(
45
-        this,
46
-        _getPrototypeOf(AllocWantedModal).call(this, props)
47
-      );
48
-
49
-      _this.handleSendValueChange = function(v) {
50
-        if (_this.state.outRangeTip) {
51
-          _this.setState({
52
-            outRangeTip: !_this.checkSendValue()
53
-          });
54
-        }
36
+    _this = _possibleConstructorReturn(this, _getPrototypeOf(AllocWantedModal).call(this, props));
55 37
 
38
+    _this.handleSendValueChange = function (v) {
39
+      if (_this.state.outRangeTip) {
56 40
         _this.setState({
57
-          sendValue: v
41
+          outRangeTip: !_this.checkSendValue()
58 42
         });
59
-      };
60
-
61
-      _this.checkSendValue = function() {
62
-        var sendValueRange = _this.props.sendValueRange;
63
-        var sendValue = _this.state.sendValue;
64
-        var min = 0;
65
-        var max = Number(_this.props.allocValue);
66
-
67
-        if (sendValueRange) {
68
-          min = Number(sendValueRange[0]);
69
-          max = Number(sendValueRange[1]);
70
-        }
71
-
72
-        if (sendValue > max) {
73
-          _this.setState({
74
-            outRangeTip: true
75
-          });
76
-
77
-          return false;
78
-        } else if (sendValue < min) {
79
-          _this.setState({
80
-            outRangeTip: true
81
-          });
82
-
83
-          return false;
84
-        }
85
-
86
-        return true;
87
-      };
88
-
89
-      _this.handleCloseAction = function() {
90
-        _this.setState(
91
-          {
92
-            visible: false,
93
-            sendValue: 0,
94
-            outRangeTip: false
95
-          },
96
-          function() {
97
-            _this.props.handleVisibleChange(false);
98
-          }
99
-        );
100
-      };
101
-
102
-      _this.handleShowAction = function() {
103
-        _this.setState(
104
-          {
105
-            visible: true
106
-          },
107
-          function() {
108
-            _this.props.handleVisibleChange(true);
109
-          }
110
-        );
111
-      };
43
+      }
112 44
 
113
-      _this.handleConfirm = function() {
114
-        var sendGiftData = _this.props.sendGiftData;
45
+      _this.setState({
46
+        sendValue: v
47
+      });
48
+    };
115 49
 
116
-        var checkResult = _this.checkSendValue();
50
+    _this.checkSendValue = function () {
51
+      var sendValueRange = _this.props.sendValueRange;
52
+      var sendValue = _this.state.sendValue;
53
+      var min = 0;
54
+      var max = Number(_this.props.allocValue);
117 55
 
118
-        if (!checkResult) {
119
-          return null;
120
-        }
56
+      if (sendValueRange) {
57
+        min = Number(sendValueRange[0]);
58
+        max = Number(sendValueRange[1]);
59
+      }
121 60
 
122
-        Promise.resolve(
123
-          _this.props.sendRequest({
124
-            business_type: 14,
125
-            ref_id: sendGiftData.answerId.toString(),
126
-            origin_id: sendGiftData.questionId,
127
-            to_user: sendGiftData.toUserId,
128
-            goods_id: 2,
129
-            num: Number(_this.state.sendValue)
130
-          })
131
-        ).then(function(res) {
132
-          console.log("res: ", res);
61
+      if (sendValue > max) {
62
+        _this.setState({
63
+          outRangeTip: true
64
+        });
133 65
 
134
-          if (res) {
135
-            _this.handleCloseAction();
136
-          } else {
137
-            _this.handleCloseAction();
138
-          }
66
+        return false;
67
+      } else if (sendValue < min) {
68
+        _this.setState({
69
+          outRangeTip: true
139 70
         });
140
-      };
141 71
 
142
-      _this.renderCloseButton = function() {
143
-        return React.createElement(
144
-          "div",
145
-          {
146
-            role: "button",
147
-            tabIndex: -1,
148
-            className: styles.closeButton,
149
-            onClick: function onClick() {
150
-              _this.handleCloseAction();
151
-            }
152
-          },
153
-          React.createElement("img", {
154
-            src: img,
155
-            alt: "close button for send wanted"
156
-          })
157
-        );
158
-      };
72
+        return false;
73
+      }
159 74
 
160
-      _this.renderModalContent = function() {
161
-        return React.createElement(
162
-          "div",
163
-          {
164
-            className: styles.wantedModalContent,
165
-            ref: _this.ModalContentRef
166
-          },
167
-          _this.renderCloseButton(),
168
-          React.createElement(
169
-            "h4",
170
-            {
171
-              className: styles.title
172
-            },
173
-            "\u5206\u914D\u60AC\u8D4F\u5956\u91D1"
174
-          ),
175
-          React.createElement(
176
-            "div",
177
-            {
178
-              className: styles.wantedValueText
179
-            },
180
-            "\u5269\u4F59\u53EF\u5206\u914D ".concat(
181
-              _this.props.allocValue,
182
-              "\u5143"
183
-            )
184
-          ),
185
-          React.createElement(
186
-            Tooltip,
187
-            {
188
-              visible: _this.state.outRangeTip,
189
-              title: "\u8D85\u8FC7\u8303\u56F4\u503C",
190
-              placement: "bottom",
191
-              overlayClassName: styles.outRangeTextTip,
192
-              getTooltipContainer: function getTooltipContainer() {
193
-                return _this.ModalContentRef && _this.ModalContentRef.current;
194
-              }
195
-            },
196
-            React.createElement(Input, {
197
-              ref: _this.ModalInputRef,
198
-              className: styles.wantedInputNumber,
199
-              suffix: "\u5143",
200
-              value: _this.state.sendValue,
201
-              onChange: function onChange(e) {
202
-                return _this.handleSendValueChange(e.target.value);
203
-              },
204
-              onFocus: function onFocus(e) {
205
-                return e.target.setSelectionRange(
206
-                  0,
207
-                  String(_this.state.sendValue).length
208
-                );
209
-              }
210
-            })
211
-          ),
212
-          React.createElement(
213
-            "div",
214
-            {
215
-              className: styles.wantedValueTipBottom
216
-            },
217
-            "\u9700\u8981\u5728\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\u5C06\u5956\u91D1\u5206\u914D\u5B8C\u6210, \u5426\u5219\u5C06\u6309\u7167\u89C4\u5219\u81EA\u52A8\u5206\u914D"
218
-          ),
219
-          React.createElement(
220
-            "div",
221
-            {
222
-              className: styles.buttonRow
223
-            },
224
-            React.createElement("div", {
225
-              className: styles.tipsButton
226
-            }),
227
-            React.createElement(
228
-              Button,
229
-              {
230
-                className: styles.confirmButton,
231
-                onClick: _this.handleConfirm
232
-              },
233
-              "\u786E\u8BA4"
234
-            ),
235
-            React.createElement(
236
-              "div",
237
-              {
238
-                className: styles.tipsButton
239
-              },
240
-              React.createElement(
241
-                Popover,
242
-                {
243
-                  placement: "bottom",
244
-                  trigger: "click",
245
-                  getPopupContainer: function getPopupContainer() {
246
-                    return (
247
-                      _this.ModalContentRef && _this.ModalContentRef.current
248
-                    );
249
-                  },
250
-                  overlayStyle: {
251
-                    width: "320px"
252
-                  },
253
-                  content: React.createElement(
254
-                    "div",
255
-                    {
256
-                      className: styles.tipsView
257
-                    },
258
-                    React.createElement(
259
-                      "h6",
260
-                      null,
261
-                      "1\u3001\u5982\u4F55\u53C2\u4E0E\u60AC\u8D4F\uFF1F"
262
-                    ),
263
-                    React.createElement(
264
-                      "div",
265
-                      null,
266
-                      "\u60AC\u8D4F\u95EE\u9898\u7686\u6709\u6709\u6548\u671F\uFF0C\u9ED8\u8BA4\u4E3A120\u5C0F\u65F6\uFF085\u5929\uFF09\uFF0C\u5728\u6709\u6548\u671F\u5185\u56DE\u590D\u7684\u7B54\u6848\uFF0C\u624D\u6709\u8D44\u683C\u88AB\u9009\u4E3A\u6700\u4F73\u7B54\u6848\uFF0C\u4EE5\u53CA\u5206\u5F97\u8D4F\u91D1\u3002"
267
-                    ),
268
-                    React.createElement(
269
-                      "h6",
270
-                      null,
271
-                      "2\u3001\u8D4F\u91D1\u5982\u4F55\u5206\uFF1F"
272
-                    ),
273
-                    React.createElement(
274
-                      "div",
275
-                      null,
276
-                      "\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\uFF0C\u63D0\u95EE\u8005\u53EF\u968F\u65F6\u9009\u51FA\u6700\u4F18\u7B54\u6848\uFF0C\u5E76\u5BF9\u8D4F\u91D1\u8FDB\u884C\u5206\u914D\uFF0C\u76F4\u81F3\u8D4F\u91D1\u88AB\u5206\u5B8C\u6216\u65F6\u95F4\u5230\u671F\u4E3A\u6B62\u3002\u82E5\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u4ECD\u672A\u5206\u914D\u8D4F\u91D1\uFF0C\u4E14\u56DE\u7B54\u6570\u5927\u4E8E\u7B49\u4E8E2\uFF0C\u7CFB\u7EDF\u5219\u9ED8\u8BA4\u5C06\u8D4F\u91D1\u5E73\u5206\u7ED9\u70B9\u8D5E\u6570\u524D3\u540D\u7684\u56DE\u7B54\u3002"
277
-                    ),
278
-                    React.createElement(
279
-                      "h6",
280
-                      null,
281
-                      "3\u3001\u8D4F\u91D1\u80FD\u9000\u6B3E\u5417\uFF1F"
282
-                    ),
283
-                    React.createElement(
284
-                      "div",
285
-                      null,
286
-                      "\u8D4F\u91D1\u53EA\u4F1A\u5728\u4EE5\u4E0B2\u79CD\u60C5\u51B5\u8FDB\u884C\u9000\u6B3E\uFF1A\u4E00\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u56DE\u7B54\u6570\u5C0F\u4E8E2\uFF0C\u8D4F\u91D1\u5C06\u81EA\u52A8\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\uFF1B\u4E8C\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u672A\u5206\u914D\u5B8C\u8D4F\u91D1\uFF0C\u7CFB\u7EDF\u81EA\u52A8\u5C06\u5269\u4F59\u7684\u8D4F\u91D1\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\u3002"
287
-                    )
288
-                  )
289
-                },
290
-                React.createElement("i", {
291
-                  className: "schedule schedule-icon_rewardtips"
292
-                })
293
-              )
294
-            )
295
-          )
296
-        );
297
-      };
75
+      return true;
76
+    };
298 77
 
299
-      _this.state = {
78
+    _this.handleCloseAction = function () {
79
+      _this.setState({
300 80
         visible: false,
301 81
         sendValue: 0,
302 82
         outRangeTip: false
303
-      };
304
-      _this.ModalContentRef = React.createRef();
305
-      _this.ModalInputRef = React.createRef();
306
-      return _this;
307
-    }
308
-
309
-    _createClass(AllocWantedModal, [
310
-      {
311
-        key: "render",
312
-        value: function render() {
313
-          var _this2 = this;
83
+      }, function () {
84
+        _this.props.handleVisibleChange(false);
85
+      });
86
+    };
87
+
88
+    _this.handleShowAction = function () {
89
+      _this.setState({
90
+        visible: true
91
+      }, function () {
92
+        _this.props.handleVisibleChange(true);
93
+      });
94
+    };
95
+
96
+    _this.handleConfirm = function () {
97
+      var sendGiftData = _this.props.sendGiftData;
98
+
99
+      var checkResult = _this.checkSendValue();
100
+
101
+      if (!checkResult) {
102
+        return null;
103
+      }
314 104
 
315
-          var children = this.props.children;
316
-          return React.createElement(
317
-            React.Fragment,
318
-            null,
319
-            React.createElement(
320
-              "div",
321
-              {
322
-                className: styles.wrapper,
323
-                onClick: function onClick() {
324
-                  return _this2.handleShowAction();
325
-                }
326
-              },
327
-              children
328
-            ),
329
-            React.createElement(
330
-              Modal,
331
-              {
332
-                visible: this.state.visible,
333
-                onCancel: function onCancel() {
334
-                  return _this2.handleCloseAction();
335
-                }
336
-              },
337
-              this.renderModalContent()
338
-            )
339
-          );
105
+      Promise.resolve(_this.props.sendRequest({
106
+        business_type: 14,
107
+        ref_id: sendGiftData.answerId.toString(),
108
+        origin_id: sendGiftData.questionId,
109
+        to_user: sendGiftData.toUserId,
110
+        goods_id: 2,
111
+        num: Number(_this.state.sendValue)
112
+      })).then(function (res) {
113
+        console.log("res: ", res);
114
+
115
+        if (res) {
116
+          _this.handleCloseAction();
117
+        } else {
118
+          _this.handleCloseAction();
340 119
         }
341
-      }
342
-    ]);
120
+      });
121
+    };
122
+
123
+    _this.renderCloseButton = function () {
124
+      return React.createElement("div", {
125
+        role: "button",
126
+        tabIndex: -1,
127
+        className: styles.closeButton,
128
+        onClick: function onClick() {
129
+          _this.handleCloseAction();
130
+        }
131
+      }, React.createElement("img", {
132
+        src: img,
133
+        alt: "close button for send wanted"
134
+      }));
135
+    };
136
+
137
+    _this.renderModalContent = function () {
138
+      return React.createElement("div", {
139
+        className: styles.wantedModalContent,
140
+        ref: _this.ModalContentRef
141
+      }, _this.renderCloseButton(), React.createElement("h4", {
142
+        className: styles.title
143
+      }, "\u5206\u914D\u60AC\u8D4F\u5956\u91D1"), React.createElement("div", {
144
+        className: styles.wantedValueText
145
+      }, "\u5269\u4F59\u53EF\u5206\u914D ".concat(_this.props.allocValue, "\u5143")), React.createElement(Tooltip, {
146
+        visible: _this.state.outRangeTip,
147
+        title: "\u8D85\u8FC7\u8303\u56F4\u503C",
148
+        placement: "bottom",
149
+        overlayClassName: styles.outRangeTextTip,
150
+        getTooltipContainer: function getTooltipContainer() {
151
+          return _this.ModalContentRef && _this.ModalContentRef.current;
152
+        }
153
+      }, React.createElement(Input, {
154
+        ref: _this.ModalInputRef,
155
+        className: styles.wantedInputNumber,
156
+        suffix: "\u5143",
157
+        value: _this.state.sendValue,
158
+        onChange: function onChange(e) {
159
+          return _this.handleSendValueChange(e.target.value);
160
+        },
161
+        onFocus: function onFocus(e) {
162
+          return e.target.setSelectionRange(0, String(_this.state.sendValue).length);
163
+        }
164
+      })), React.createElement("div", {
165
+        className: styles.wantedValueTipBottom
166
+      }, "\u9700\u8981\u5728\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\u5C06\u5956\u91D1\u5206\u914D\u5B8C\u6210, \u5426\u5219\u5C06\u6309\u7167\u89C4\u5219\u81EA\u52A8\u5206\u914D"), React.createElement("div", {
167
+        className: styles.buttonRow
168
+      }, React.createElement("div", {
169
+        className: styles.tipsButton
170
+      }), React.createElement(Button, {
171
+        className: styles.confirmButton,
172
+        onClick: _this.handleConfirm
173
+      }, "\u786E\u8BA4"), React.createElement("div", {
174
+        className: styles.tipsButton
175
+      }, React.createElement(Popover, {
176
+        placement: "bottom",
177
+        trigger: "click",
178
+        getPopupContainer: function getPopupContainer() {
179
+          return _this.ModalContentRef && _this.ModalContentRef.current;
180
+        },
181
+        overlayStyle: {
182
+          width: "320px"
183
+        },
184
+        content: React.createElement("div", {
185
+          className: styles.tipsView
186
+        }, React.createElement("h6", null, "1\u3001\u5982\u4F55\u53C2\u4E0E\u60AC\u8D4F\uFF1F"), React.createElement("div", null, "\u60AC\u8D4F\u95EE\u9898\u7686\u6709\u6709\u6548\u671F\uFF0C\u9ED8\u8BA4\u4E3A120\u5C0F\u65F6\uFF085\u5929\uFF09\uFF0C\u5728\u6709\u6548\u671F\u5185\u56DE\u590D\u7684\u7B54\u6848\uFF0C\u624D\u6709\u8D44\u683C\u88AB\u9009\u4E3A\u6700\u4F73\u7B54\u6848\uFF0C\u4EE5\u53CA\u5206\u5F97\u8D4F\u91D1\u3002"), React.createElement("h6", null, "2\u3001\u8D4F\u91D1\u5982\u4F55\u5206\uFF1F"), React.createElement("div", null, "\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\uFF0C\u63D0\u95EE\u8005\u53EF\u968F\u65F6\u9009\u51FA\u6700\u4F18\u7B54\u6848\uFF0C\u5E76\u5BF9\u8D4F\u91D1\u8FDB\u884C\u5206\u914D\uFF0C\u76F4\u81F3\u8D4F\u91D1\u88AB\u5206\u5B8C\u6216\u65F6\u95F4\u5230\u671F\u4E3A\u6B62\u3002\u82E5\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u4ECD\u672A\u5206\u914D\u8D4F\u91D1\uFF0C\u4E14\u56DE\u7B54\u6570\u5927\u4E8E\u7B49\u4E8E2\uFF0C\u7CFB\u7EDF\u5219\u9ED8\u8BA4\u5C06\u8D4F\u91D1\u5E73\u5206\u7ED9\u70B9\u8D5E\u6570\u524D3\u540D\u7684\u56DE\u7B54\u3002"), React.createElement("h6", null, "3\u3001\u8D4F\u91D1\u80FD\u9000\u6B3E\u5417\uFF1F"), React.createElement("div", null, "\u8D4F\u91D1\u53EA\u4F1A\u5728\u4EE5\u4E0B2\u79CD\u60C5\u51B5\u8FDB\u884C\u9000\u6B3E\uFF1A\u4E00\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u56DE\u7B54\u6570\u5C0F\u4E8E2\uFF0C\u8D4F\u91D1\u5C06\u81EA\u52A8\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\uFF1B\u4E8C\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u672A\u5206\u914D\u5B8C\u8D4F\u91D1\uFF0C\u7CFB\u7EDF\u81EA\u52A8\u5C06\u5269\u4F59\u7684\u8D4F\u91D1\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\u3002"))
187
+      }, React.createElement("i", {
188
+        className: "schedule schedule-icon_rewardtips"
189
+      })))));
190
+    };
191
+
192
+    _this.state = {
193
+      visible: false,
194
+      sendValue: 0,
195
+      outRangeTip: false
196
+    };
197
+    _this.ModalContentRef = React.createRef();
198
+    _this.ModalInputRef = React.createRef();
199
+    return _this;
200
+  }
201
+
202
+  _createClass(AllocWantedModal, [{
203
+    key: "render",
204
+    value: function render() {
205
+      var _this2 = this;
206
+
207
+      var children = this.props.children;
208
+      return React.createElement(React.Fragment, null, React.createElement("div", {
209
+        className: styles.wrapper,
210
+        onClick: function onClick() {
211
+          return _this2.handleShowAction();
212
+        }
213
+      }, children), React.createElement(Modal, {
214
+        visible: this.state.visible,
215
+        onCancel: function onCancel() {
216
+          return _this2.handleCloseAction();
217
+        }
218
+      }, this.renderModalContent()));
219
+    }
220
+  }]);
343 221
 
344
-    return AllocWantedModal;
345
-  })(React.Component);
222
+  return AllocWantedModal;
223
+}(React.Component);
346 224
 
347 225
 export default AllocWantedModal;
348 226
 //# sourceMappingURL=index.js.map

+ 3
- 1
eslib/BraftEditor/index.d.ts View File

@@ -1,3 +1,5 @@
1 1
 /// <reference types="react" />
2
-declare const BarftEditorPage: ({ value }: { value: string }) => JSX.Element;
2
+declare const BarftEditorPage: ({ value, }: {
3
+    value: string;
4
+}) => JSX.Element;
3 5
 export { BarftEditorPage as default, BarftEditorPage };

+ 29052
- 39970
eslib/BraftEditor/index.js
File diff suppressed because it is too large
View File


+ 5
- 5
eslib/Common/index.js View File

@@ -1,6 +1,6 @@
1
-import "../inherits-6cb67931.js";
2
-import "react";
3
-import "react-dom";
4
-export { default as Modal } from "../Modal/index.js";
5
-import "../style-inject.es-1f59c1d0.js";
1
+import '../inherits-6cb67931.js';
2
+import 'react';
3
+import 'react-dom';
4
+export { default as Modal } from '../Modal/index.js';
5
+import '../style-inject.es-1f59c1d0.js';
6 6
 //# sourceMappingURL=index.js.map

+ 21
- 21
eslib/ConsumeListView/index.d.ts View File

@@ -1,29 +1,29 @@
1 1
 /// <reference types="react" />
2
-import { Component, MouseEvent } from "react";
2
+import { Component, MouseEvent } from 'react';
3 3
 interface dataItem {
4
-  id?: string | number;
5
-  user_avatar?: string;
6
-  bill_price?: number;
4
+    id?: string | number;
5
+    user_avatar?: string;
6
+    bill_price?: number;
7 7
 }
8 8
 interface Props {
9
-  isToggle: boolean;
10
-  onToggleChange: Function;
11
-  onConsumeItemClick: (e: MouseEvent, clickData: any) => any;
12
-  dataSource: Array<dataItem>;
13
-  listLength: number;
14
-  showLength: number;
15
-  options: {
16
-    avatarSize: number;
17
-    avatarMarginLeftAndRight: number;
18
-    kingdomWidth: number;
19
-    kingdomHeight: number;
20
-    kingdomPosition: [number, number];
21
-  };
9
+    isToggle: boolean;
10
+    onToggleChange: Function;
11
+    onConsumeItemClick: (e: MouseEvent, clickData: any) => any;
12
+    dataSource: Array<dataItem>;
13
+    listLength: number;
14
+    showLength: number;
15
+    options: {
16
+        avatarSize: number;
17
+        avatarMarginLeftAndRight: number;
18
+        kingdomWidth: number;
19
+        kingdomHeight: number;
20
+        kingdomPosition: [number, number];
21
+    };
22 22
 }
23 23
 declare class ConsumeListView extends Component<Props, {}> {
24
-  static defaultProps: Props;
25
-  renderConsumeItem(): JSX.Element[];
26
-  renderToggleButton(): JSX.Element | null;
27
-  render(): JSX.Element;
24
+    static defaultProps: Props;
25
+    renderConsumeItem(): JSX.Element[];
26
+    renderToggleButton(): JSX.Element | null;
27
+    render(): JSX.Element;
28 28
 }
29 29
 export { ConsumeListView as default };

+ 129
- 168
eslib/ConsumeListView/index.js View File

@@ -1,189 +1,150 @@
1
-import {
2
-  a as _inherits,
3
-  b as _classCallCheck,
4
-  c as _possibleConstructorReturn,
5
-  d as _getPrototypeOf,
6
-  e as _createClass
7
-} from "../inherits-6cb67931.js";
8
-import React, { Component } from "react";
9
-import { s as styleInject } from "../style-inject.es-1f59c1d0.js";
10
-import { _ as _defineProperty } from "../defineProperty-18999f8e.js";
11
-import "../_commonjsHelpers-97e6d7b1.js";
12
-import { c as classnames } from "../index-c9837619.js";
13
-import { a as addImageProcess } from "../utils-6b513b37.js";
14
-
15
-var img =
16
-  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAABvklEQVQ4T62UTygEcRTHv29MIsqfk6OL5CYH5aKd9WfjwqxEnBzExYWTCEWJJGove5H8OTA1uwdCrOWAi83ZwUXJiSj5u+Z5s0msmd2SX81h+r33ee/7fW+G8E+H/srhqEcFCjphve1RzcaVK4j3mmoB5YxqQzdOxTji1wE2QZglb2jAEcT7/g4wr0rQugS1OYJ26nOg5nYDr4ZrR7yrl0FBAKBlqjEX3eRLwSXAmidvOJbSI47oF9LVKaCOkNc4/w7kSPOoFBqDwjpp4XA60LUkF8nzbsuERQt4ejtGdsYwiAYTYIV6STOD6UB3EpqXJC0u7zKxz0Mk3Zrj7lOLerJg5T9K+2lWhALiYx8xS9NbDZnUuPXy0wN/hYw3lnbPiNfE7HaSfTAloRqKWkya8WAnMrdmIBqfBqM/BehJAo+gKHMibdMGzUhqKUiZAHGVXJYLwPdpshPnRDRM4fl5+7uKL/0c1WXdOSie5Dh3wZcyoR7SQttO9z+M5MOWEsStFQmsTAoOwVK7qM64d5P6ayKJj9EqHBa5Q4kx2/ujqR1Exnsq493HH2muFN98oNtJ0g7s3Ul5/vwbSab+G+gDqFybE11pYkYAAAAASUVORK5CYII=";
17
-
18
-var css =
19
-  ".ConsumeListView_wrapper__wlJjh {\n  display: flex;\n  justify-content: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR {\n  padding: 0;\n  margin: 0;\n  display: flex;\n  flex-wrap: wrap;\n  padding-top: 10px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR li {\n  list-style: none;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ {\n  margin: 0 6px 10px;\n  text-align: center;\n  position: relative;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_kingdomIcon__1nBe5 {\n  position: absolute;\n  width: 24px;\n  height: 22px;\n  left: -6px;\n  top: -12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_avatar__1H-E5 {\n  margin: 0 auto 4px;\n  width: 36px;\n  height: 36px;\n  background-size: cover;\n  border-radius: 50%;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_gray__3do1I {\n  color: #9b9b9b;\n  font-size: 12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC {\n  margin: 0 6px 10px;\n  width: 36px;\n  height: 36px;\n  line-height: 36px;\n  background-color: #ececec;\n  border-radius: 50%;\n  color: #a8adb6;\n  cursor: pointer;\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAACv0lEQVRIS8WXTW8SURSGzzAYNSYCA7SCUEqBioLtohvjD9CN7ozG36AmXfsRafxYN9b+BqNx50r3GjddqEVRRgSRVr4GWmOsERjfOwEzVYa5lAokEwJzznnOe865d+4IxPFRVXVPrVY73Wq1TgmCMIffYbjZ2q4b+E/GfysWi+WZw+F4it+/zMIKvQwAszcajXnYXEIwl1kwdh8JVPC1bLVaF5FE3cjHEFytVs8hyH04jvMAu9gUkexlp9P5uJv/P2DABCi9hbJehUPPinAkpKL8d6H8BpJQ9fbbAjOooigP8H2BIyi3CaAPJUm6qIdvAwN6G0qvcUfswxDK7wB+vePyB9zu6aNdKK9ROioUn+/0XAOz6W02m6kBBolXe1EUxSibdg0MtQn09Sav9yB2UL0A1QmBbQ6VSmWNd50OAu2sc5fL5WVTfAYD9WTQgP34Y9DOClB7D05X+nHcBdslAf19jnKfNAr2cmWVDuzfR7HoFCFTUyaqR8lUhr7/2KITc/Gu9mjrC6a4iLtjRhHfvv9Ea1/L5JLsNBML94Qz6OukTBWlTt5Dbjp2JGgUtsTAW7i713DxqSql0jkqrJfIKdloNhbpCmfQV8k0VZUNOuwZo2gkQFBmFPanKVibRFxpOUefC0VyOmw0E4+QqCt7s8mgH0ipbdKEb5wiIUB7N0UD9yy13l/O5CmbXyfJfpBm49MkihbSoKuA1jdpcsJD4aDfdA5gUDIdrr+jZLIFyuQK5AD8+NEQvXknU63+jUKTPgoGvDxQ1gJtuPpeTkw1U8+mnPU2MuWngN/DBW0bLe14A8mj3x+zX7TS+ryGi6JrMtoGMrItk6VULpcTqPtQHhIQuuB2uxOjfSwy1SM5CHQmYCRHn/azcjSHvQ586Mdb/aIb+oFeD2eHQOxM87j6eoXBBrGMa2evMPoE/sdL22+mI4T0ou1LqAAAAABJRU5ErkJggg==);\n  background-position: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC.ConsumeListView_expand__3l80q {\n  transform: rotate(180deg);\n}\n";
1
+import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _getPrototypeOf, e as _createClass } from '../inherits-6cb67931.js';
2
+import React, { Component } from 'react';
3
+import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
4
+import { _ as _defineProperty } from '../defineProperty-18999f8e.js';
5
+import '../_commonjsHelpers-97e6d7b1.js';
6
+import { c as classnames } from '../index-c9837619.js';
7
+import { a as addImageProcess } from '../utils-6b513b37.js';
8
+
9
+var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAABvklEQVQ4T62UTygEcRTHv29MIsqfk6OL5CYH5aKd9WfjwqxEnBzExYWTCEWJJGove5H8OTA1uwdCrOWAi83ZwUXJiSj5u+Z5s0msmd2SX81h+r33ee/7fW+G8E+H/srhqEcFCjphve1RzcaVK4j3mmoB5YxqQzdOxTji1wE2QZglb2jAEcT7/g4wr0rQugS1OYJ26nOg5nYDr4ZrR7yrl0FBAKBlqjEX3eRLwSXAmidvOJbSI47oF9LVKaCOkNc4/w7kSPOoFBqDwjpp4XA60LUkF8nzbsuERQt4ejtGdsYwiAYTYIV6STOD6UB3EpqXJC0u7zKxz0Mk3Zrj7lOLerJg5T9K+2lWhALiYx8xS9NbDZnUuPXy0wN/hYw3lnbPiNfE7HaSfTAloRqKWkya8WAnMrdmIBqfBqM/BehJAo+gKHMibdMGzUhqKUiZAHGVXJYLwPdpshPnRDRM4fl5+7uKL/0c1WXdOSie5Dh3wZcyoR7SQttO9z+M5MOWEsStFQmsTAoOwVK7qM64d5P6ayKJj9EqHBa5Q4kx2/ujqR1Exnsq493HH2muFN98oNtJ0g7s3Ul5/vwbSab+G+gDqFybE11pYkYAAAAASUVORK5CYII=";
10
+
11
+var css = ".ConsumeListView_wrapper__wlJjh {\n  display: flex;\n  justify-content: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR {\n  padding: 0;\n  margin: 0;\n  display: flex;\n  flex-wrap: wrap;\n  padding-top: 10px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR li {\n  list-style: none;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ {\n  margin: 0 6px 10px;\n  text-align: center;\n  position: relative;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_kingdomIcon__1nBe5 {\n  position: absolute;\n  width: 24px;\n  height: 22px;\n  left: -6px;\n  top: -12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_avatar__1H-E5 {\n  margin: 0 auto 4px;\n  width: 36px;\n  height: 36px;\n  background-size: cover;\n  border-radius: 50%;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_gray__3do1I {\n  color: #9b9b9b;\n  font-size: 12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC {\n  margin: 0 6px 10px;\n  width: 36px;\n  height: 36px;\n  line-height: 36px;\n  background-color: #ececec;\n  border-radius: 50%;\n  color: #a8adb6;\n  cursor: pointer;\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAACv0lEQVRIS8WXTW8SURSGzzAYNSYCA7SCUEqBioLtohvjD9CN7ozG36AmXfsRafxYN9b+BqNx50r3GjddqEVRRgSRVr4GWmOsERjfOwEzVYa5lAokEwJzznnOe865d+4IxPFRVXVPrVY73Wq1TgmCMIffYbjZ2q4b+E/GfysWi+WZw+F4it+/zMIKvQwAszcajXnYXEIwl1kwdh8JVPC1bLVaF5FE3cjHEFytVs8hyH04jvMAu9gUkexlp9P5uJv/P2DABCi9hbJehUPPinAkpKL8d6H8BpJQ9fbbAjOooigP8H2BIyi3CaAPJUm6qIdvAwN6G0qvcUfswxDK7wB+vePyB9zu6aNdKK9ROioUn+/0XAOz6W02m6kBBolXe1EUxSibdg0MtQn09Sav9yB2UL0A1QmBbQ6VSmWNd50OAu2sc5fL5WVTfAYD9WTQgP34Y9DOClB7D05X+nHcBdslAf19jnKfNAr2cmWVDuzfR7HoFCFTUyaqR8lUhr7/2KITc/Gu9mjrC6a4iLtjRhHfvv9Ea1/L5JLsNBML94Qz6OukTBWlTt5Dbjp2JGgUtsTAW7i713DxqSql0jkqrJfIKdloNhbpCmfQV8k0VZUNOuwZo2gkQFBmFPanKVibRFxpOUefC0VyOmw0E4+QqCt7s8mgH0ipbdKEb5wiIUB7N0UD9yy13l/O5CmbXyfJfpBm49MkihbSoKuA1jdpcsJD4aDfdA5gUDIdrr+jZLIFyuQK5AD8+NEQvXknU63+jUKTPgoGvDxQ1gJtuPpeTkw1U8+mnPU2MuWngN/DBW0bLe14A8mj3x+zX7TS+ryGi6JrMtoGMrItk6VULpcTqPtQHhIQuuB2uxOjfSwy1SM5CHQmYCRHn/azcjSHvQ586Mdb/aIb+oFeD2eHQOxM87j6eoXBBrGMa2evMPoE/sdL22+mI4T0ou1LqAAAAABJRU5ErkJggg==);\n  background-position: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC.ConsumeListView_expand__3l80q {\n  transform: rotate(180deg);\n}\n";
20 12
 var styles = {
21
-  wrapper: "ConsumeListView_wrapper__wlJjh",
22
-  consumelist: "ConsumeListView_consumelist__2dMCR",
23
-  consumeItem: "ConsumeListView_consumeItem__1QGpJ",
24
-  kingdomIcon: "ConsumeListView_kingdomIcon__1nBe5",
25
-  avatar: "ConsumeListView_avatar__1H-E5",
26
-  gray: "ConsumeListView_gray__3do1I",
27
-  toggle: "ConsumeListView_toggle__3eBTC",
28
-  expand: "ConsumeListView_expand__3l80q"
13
+  "wrapper": "ConsumeListView_wrapper__wlJjh",
14
+  "consumelist": "ConsumeListView_consumelist__2dMCR",
15
+  "consumeItem": "ConsumeListView_consumeItem__1QGpJ",
16
+  "kingdomIcon": "ConsumeListView_kingdomIcon__1nBe5",
17
+  "avatar": "ConsumeListView_avatar__1H-E5",
18
+  "gray": "ConsumeListView_gray__3do1I",
19
+  "toggle": "ConsumeListView_toggle__3eBTC",
20
+  "expand": "ConsumeListView_expand__3l80q"
29 21
 };
30 22
 styleInject(css);
31 23
 
32
-var DEFAULT_AVATAR =
33
-  "//links-comment.oss-cn-beijing.aliyuncs.com/comment/20180820/Kgka4_oU1.jpeg";
24
+var DEFAULT_AVATAR = '//links-comment.oss-cn-beijing.aliyuncs.com/comment/20180820/Kgka4_oU1.jpeg';
34 25
 
35 26
 var ConsumeListView =
36
-  /*#__PURE__*/
37
-  (function(_Component) {
38
-    _inherits(ConsumeListView, _Component);
27
+/*#__PURE__*/
28
+function (_Component) {
29
+  _inherits(ConsumeListView, _Component);
39 30
 
40
-    function ConsumeListView() {
41
-      _classCallCheck(this, ConsumeListView);
31
+  function ConsumeListView() {
32
+    _classCallCheck(this, ConsumeListView);
42 33
 
43
-      return _possibleConstructorReturn(
44
-        this,
45
-        _getPrototypeOf(ConsumeListView).apply(this, arguments)
46
-      );
47
-    }
34
+    return _possibleConstructorReturn(this, _getPrototypeOf(ConsumeListView).apply(this, arguments));
35
+  }
48 36
 
49
-    _createClass(ConsumeListView, [
50
-      {
51
-        key: "renderConsumeItem",
52
-        value: function renderConsumeItem() {
53
-          var _this$props = this.props,
54
-            dataSource = _this$props.dataSource,
55
-            isToggle = _this$props.isToggle,
56
-            onConsumeItemClick = _this$props.onConsumeItemClick,
57
-            showLength = _this$props.showLength,
58
-            listLength = _this$props.listLength,
59
-            options = _this$props.options;
60
-          var kingdomWidth = options.kingdomWidth,
61
-            kingdomHeight = options.kingdomHeight,
62
-            kingdomPosition = options.kingdomPosition,
63
-            avatarSize = options.avatarSize,
64
-            avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
65
-          var renderData = dataSource;
66
-
67
-          if (!isToggle && listLength > showLength) {
68
-            renderData = dataSource.slice(0, showLength - 1);
69
-          }
37
+  _createClass(ConsumeListView, [{
38
+    key: "renderConsumeItem",
39
+    value: function renderConsumeItem() {
40
+      var _this$props = this.props,
41
+          dataSource = _this$props.dataSource,
42
+          isToggle = _this$props.isToggle,
43
+          onConsumeItemClick = _this$props.onConsumeItemClick,
44
+          showLength = _this$props.showLength,
45
+          listLength = _this$props.listLength,
46
+          options = _this$props.options;
47
+      var kingdomWidth = options.kingdomWidth,
48
+          kingdomHeight = options.kingdomHeight,
49
+          kingdomPosition = options.kingdomPosition,
50
+          avatarSize = options.avatarSize,
51
+          avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
52
+      var renderData = dataSource;
53
+
54
+      if (!isToggle && listLength > showLength) {
55
+        renderData = dataSource.slice(0, showLength - 1);
56
+      }
70 57
 
71
-          return renderData.map(function(v, i) {
72
-            var kingdom = null;
73
-
74
-            if (i === 0) {
75
-              kingdom = React.createElement("img", {
76
-                className: styles.kingdomIcon,
77
-                src: img,
78
-                alt: "reward top user",
79
-                style: {
80
-                  width: "".concat(kingdomWidth, "px"),
81
-                  height: "".concat(kingdomHeight, "px"),
82
-                  left: "".concat(kingdomPosition[0], "px"),
83
-                  top: "".concat(kingdomPosition[1], "px")
84
-                }
85
-              });
86
-            }
58
+      return renderData.map(function (v, i) {
59
+        var kingdom = null;
87 60
 
88
-            return React.createElement(
89
-              "li",
90
-              {
91
-                key: v.id,
92
-                className: styles.consumeItem,
93
-                style: {
94
-                  margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
95
-                }
96
-              },
97
-              kingdom,
98
-              React.createElement("div", {
99
-                className: styles.avatar,
100
-                onClick: function onClick(e) {
101
-                  return onConsumeItemClick(e, v);
102
-                },
103
-                style: {
104
-                  backgroundImage: "url(".concat(
105
-                    addImageProcess(v.user_avatar || DEFAULT_AVATAR, {
106
-                      small: true
107
-                    }),
108
-                    ")"
109
-                  ),
110
-                  width: "".concat(avatarSize, "px"),
111
-                  height: "".concat(avatarSize, "px")
112
-                }
113
-              }),
114
-              React.createElement("span", {
115
-                className: styles.gray
116
-              })
117
-            );
61
+        if (i === 0) {
62
+          kingdom = React.createElement("img", {
63
+            className: styles.kingdomIcon,
64
+            src: img,
65
+            alt: "reward top user",
66
+            style: {
67
+              width: "".concat(kingdomWidth, "px"),
68
+              height: "".concat(kingdomHeight, "px"),
69
+              left: "".concat(kingdomPosition[0], "px"),
70
+              top: "".concat(kingdomPosition[1], "px")
71
+            }
118 72
           });
119 73
         }
120
-      },
121
-      {
122
-        key: "renderToggleButton",
123
-        value: function renderToggleButton() {
124
-          var _this$props2 = this.props,
125
-            isToggle = _this$props2.isToggle,
126
-            onToggleChange = _this$props2.onToggleChange,
127
-            listLength = _this$props2.listLength,
128
-            showLength = _this$props2.showLength,
129
-            options = _this$props2.options;
130
-          var avatarSize = options.avatarSize,
131
-            avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
132
-
133
-          if (listLength <= showLength) {
134
-            return null;
74
+
75
+        return React.createElement("li", {
76
+          key: v.id,
77
+          className: styles.consumeItem,
78
+          style: {
79
+            margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
135 80
           }
81
+        }, kingdom, React.createElement("div", {
82
+          className: styles.avatar,
83
+          onClick: function onClick(e) {
84
+            return onConsumeItemClick(e, v);
85
+          },
86
+          style: {
87
+            backgroundImage: "url(".concat(addImageProcess(v.user_avatar || DEFAULT_AVATAR, {
88
+              small: true
89
+            }), ")"),
90
+            width: "".concat(avatarSize, "px"),
91
+            height: "".concat(avatarSize, "px")
92
+          }
93
+        }), React.createElement("span", {
94
+          className: styles.gray
95
+        }));
96
+      });
97
+    }
98
+  }, {
99
+    key: "renderToggleButton",
100
+    value: function renderToggleButton() {
101
+      var _this$props2 = this.props,
102
+          isToggle = _this$props2.isToggle,
103
+          onToggleChange = _this$props2.onToggleChange,
104
+          listLength = _this$props2.listLength,
105
+          showLength = _this$props2.showLength,
106
+          options = _this$props2.options;
107
+      var avatarSize = options.avatarSize,
108
+          avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
109
+
110
+      if (listLength <= showLength) {
111
+        return null;
112
+      }
136 113
 
137
-          return React.createElement("li", {
138
-            onClick: function onClick() {
139
-              return onToggleChange();
140
-            },
141
-            className: classnames(
142
-              styles.toggle,
143
-              _defineProperty({}, styles.expand, isToggle)
144
-            ),
145
-            style: {
146
-              width: "".concat(avatarSize, "px"),
147
-              height: "".concat(avatarSize, "px"),
148
-              lineHeight: "".concat(avatarSize, "px"),
149
-              margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
150
-            }
151
-          });
114
+      return React.createElement("li", {
115
+        onClick: function onClick() {
116
+          return onToggleChange();
117
+        },
118
+        className: classnames(styles.toggle, _defineProperty({}, styles.expand, isToggle)),
119
+        style: {
120
+          width: "".concat(avatarSize, "px"),
121
+          height: "".concat(avatarSize, "px"),
122
+          lineHeight: "".concat(avatarSize, "px"),
123
+          margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
152 124
         }
153
-      },
154
-      {
155
-        key: "render",
156
-        value: function render() {
157
-          var _this$props3 = this.props,
158
-            showLength = _this$props3.showLength,
159
-            options = _this$props3.options;
160
-          var avatarSize = options.avatarSize,
161
-            avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
162
-          return React.createElement(
163
-            "div",
164
-            {
165
-              className: styles.wrapper
166
-            },
167
-            React.createElement(
168
-              "ul",
169
-              {
170
-                className: styles.consumelist,
171
-                style: {
172
-                  width: "calc("
173
-                    .concat(avatarMarginLeftAndRight * 2 + avatarSize, "px * ")
174
-                    .concat(showLength, ")")
175
-                }
176
-              },
177
-              this.renderConsumeItem(),
178
-              this.renderToggleButton()
179
-            )
180
-          );
125
+      });
126
+    }
127
+  }, {
128
+    key: "render",
129
+    value: function render() {
130
+      var _this$props3 = this.props,
131
+          showLength = _this$props3.showLength,
132
+          options = _this$props3.options;
133
+      var avatarSize = options.avatarSize,
134
+          avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
135
+      return React.createElement("div", {
136
+        className: styles.wrapper
137
+      }, React.createElement("ul", {
138
+        className: styles.consumelist,
139
+        style: {
140
+          width: "calc(".concat(avatarMarginLeftAndRight * 2 + avatarSize, "px * ").concat(showLength, ")")
181 141
         }
182
-      }
183
-    ]);
142
+      }, this.renderConsumeItem(), this.renderToggleButton()));
143
+    }
144
+  }]);
184 145
 
185
-    return ConsumeListView;
186
-  })(Component);
146
+  return ConsumeListView;
147
+}(Component);
187 148
 
188 149
 ConsumeListView.defaultProps = {
189 150
   isToggle: false,

+ 7
- 7
eslib/Editor/index.js View File

@@ -1,8 +1,8 @@
1
-import "react";
2
-import "react-dom";
3
-import "../style-inject.es-1f59c1d0.js";
4
-import "../_commonjsHelpers-97e6d7b1.js";
5
-import "../slicedToArray-4cd9e6d3.js";
6
-export { default as BraftEditor } from "../BraftEditor/index.js";
7
-import "react-dom/server";
1
+import 'react';
2
+import 'react-dom';
3
+import '../style-inject.es-1f59c1d0.js';
4
+import '../_commonjsHelpers-97e6d7b1.js';
5
+import '../slicedToArray-4cd9e6d3.js';
6
+export { default as BraftEditor } from '../BraftEditor/index.js';
7
+import 'react-dom/server';
8 8
 //# sourceMappingURL=index.js.map

+ 5
- 5
eslib/Modal/index.d.ts View File

@@ -1,12 +1,12 @@
1 1
 /// <reference types="react" />
2 2
 import React from "react";
3 3
 interface ModalProps {
4
-  visible: boolean;
5
-  onCancel: (e: any) => void;
6
-  container?: HTMLElement | null;
4
+    visible: boolean;
5
+    onCancel: (e: any) => void;
6
+    container?: HTMLElement;
7 7
 }
8 8
 declare class Modal extends React.PureComponent<ModalProps> {
9
-  static hasShowWarning: boolean;
10
-  render(): false | React.ReactPortal | null;
9
+    static hasShowWarning: boolean;
10
+    render(): false | React.ReactPortal | null;
11 11
 }
12 12
 export { Modal as default, Modal, ModalProps };

+ 53
- 86
eslib/Modal/index.js View File

@@ -1,108 +1,75 @@
1
-import {
2
-  _ as _typeof,
3
-  a as _inherits,
4
-  b as _classCallCheck,
5
-  c as _possibleConstructorReturn,
6
-  d as _getPrototypeOf,
7
-  e as _createClass
8
-} from "../inherits-6cb67931.js";
9
-import React from "react";
10
-import { createPortal } from "react-dom";
11
-import { s as styleInject } from "../style-inject.es-1f59c1d0.js";
1
+import { _ as _typeof, a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _getPrototypeOf, e as _createClass } from '../inherits-6cb67931.js';
2
+import React from 'react';
3
+import { createPortal } from 'react-dom';
4
+import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
12 5
 
13 6
 function isBrowser() {
14
-  return !(
15
-    (typeof window === "undefined" ? "undefined" : _typeof(window)) ===
16
-    undefined
17
-  );
7
+  return !((typeof window === "undefined" ? "undefined" : _typeof(window)) === undefined);
18 8
 }
19 9
 
20
-var css =
21
-  ".Modal_wrapper__2hzaC {\n  position: fixed;\n  width: 100vw;\n  height: 100vh;\n  top: 0;\n  left: 0;\n  z-index: 1000;\n}\n.Modal_overlay__3iNdm {\n  width: 100vw;\n  height: 100vh;\n  background: #000;\n  animation: Modal_overlayer__1zSH9 0.3s forwards;\n}\n.Modal_container__2veos {\n  position: absolute;\n  top: 20%;\n  left: 50%;\n  animation: Modal_container__2veos 0.3s forwards;\n}\n@keyframes Modal_overlayer__1zSH9 {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 0.3;\n  }\n}\n@keyframes Modal_container__2veos {\n  from {\n    transform: translateX(-50%) scale(0, 0);\n  }\n  to {\n    transform: translateX(-50%) scale(1, 1);\n  }\n}\n";
10
+var css = ".Modal_wrapper__2hzaC {\n  position: fixed;\n  width: 100vw;\n  height: 100vh;\n  top: 0;\n  left: 0;\n  z-index: 1000;\n}\n.Modal_overlay__3iNdm {\n  width: 100vw;\n  height: 100vh;\n  background: #000;\n  animation: Modal_overlayer__1zSH9 0.3s forwards;\n}\n.Modal_container__2veos {\n  position: absolute;\n  top: 20%;\n  left: 50%;\n  animation: Modal_container__2veos 0.3s forwards;\n}\n@keyframes Modal_overlayer__1zSH9 {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 0.3;\n  }\n}\n@keyframes Modal_container__2veos {\n  from {\n    transform: translateX(-50%) scale(0, 0);\n  }\n  to {\n    transform: translateX(-50%) scale(1, 1);\n  }\n}\n";
22 11
 var styles = {
23
-  wrapper: "Modal_wrapper__2hzaC",
24
-  overlay: "Modal_overlay__3iNdm",
25
-  overlayer: "Modal_overlayer__1zSH9",
26
-  container: "Modal_container__2veos"
12
+  "wrapper": "Modal_wrapper__2hzaC",
13
+  "overlay": "Modal_overlay__3iNdm",
14
+  "overlayer": "Modal_overlayer__1zSH9",
15
+  "container": "Modal_container__2veos"
27 16
 };
28 17
 styleInject(css);
29 18
 
30 19
 var Modal =
31
-  /*#__PURE__*/
32
-  (function(_React$PureComponent) {
33
-    _inherits(Modal, _React$PureComponent);
20
+/*#__PURE__*/
21
+function (_React$PureComponent) {
22
+  _inherits(Modal, _React$PureComponent);
34 23
 
35
-    function Modal() {
36
-      _classCallCheck(this, Modal);
24
+  function Modal() {
25
+    _classCallCheck(this, Modal);
37 26
 
38
-      return _possibleConstructorReturn(
39
-        this,
40
-        _getPrototypeOf(Modal).apply(this, arguments)
41
-      );
42
-    }
43
-
44
-    _createClass(Modal, [
45
-      {
46
-        key: "render",
47
-        value: function render() {
48
-          if (!isBrowser()) return null;
49
-          var DEFAULT_CONTAINER = document.getElementById("container");
50
-          var _this$props = this.props,
51
-            children = _this$props.children,
52
-            visible = _this$props.visible,
53
-            onCancel = _this$props.onCancel,
54
-            _this$props$container = _this$props.container,
55
-            container =
56
-              _this$props$container === void 0
57
-                ? DEFAULT_CONTAINER
58
-                : _this$props$container;
59
-          var finalMountContainer = document.body;
27
+    return _possibleConstructorReturn(this, _getPrototypeOf(Modal).apply(this, arguments));
28
+  }
60 29
 
61
-          if (!container) {
62
-            if (!DEFAULT_CONTAINER) {
63
-              if (!Modal.hasShowWarning) {
64
-                Modal.hasShowWarning = true;
65
-              }
30
+  _createClass(Modal, [{
31
+    key: "render",
32
+    value: function render() {
33
+      if (!isBrowser()) return null;
34
+      var DEFAULT_CONTAINER = document.getElementById("container");
35
+      var _this$props = this.props,
36
+          children = _this$props.children,
37
+          visible = _this$props.visible,
38
+          onCancel = _this$props.onCancel,
39
+          container = _this$props.container;
40
+      var finalMountContainer;
66 41
 
67
-              finalMountContainer = document.body;
68
-            } else {
69
-              if (!Modal.hasShowWarning) {
70
-                Modal.hasShowWarning = true;
71
-              }
42
+      if (!container) {
43
+        if (!DEFAULT_CONTAINER) {
44
+          if (!Modal.hasShowWarning) {
45
+            Modal.hasShowWarning = true;
46
+          }
72 47
 
73
-              finalMountContainer = DEFAULT_CONTAINER;
74
-            }
48
+          finalMountContainer = document.body;
49
+        } else {
50
+          if (!Modal.hasShowWarning) {
51
+            Modal.hasShowWarning = true;
75 52
           }
76 53
 
77
-          return (
78
-            visible &&
79
-            createPortal(
80
-              React.createElement(
81
-                "div",
82
-                {
83
-                  className: styles.wrapper
84
-                },
85
-                React.createElement("div", {
86
-                  className: styles.overlay,
87
-                  onClick: onCancel
88
-                }),
89
-                React.createElement(
90
-                  "div",
91
-                  {
92
-                    className: styles.container
93
-                  },
94
-                  children
95
-                )
96
-              ),
97
-              finalMountContainer
98
-            )
99
-          );
54
+          finalMountContainer = DEFAULT_CONTAINER;
100 55
         }
56
+      } else {
57
+        finalMountContainer = container;
101 58
       }
102
-    ]);
103 59
 
104
-    return Modal;
105
-  })(React.PureComponent);
60
+      return visible && createPortal(React.createElement("div", {
61
+        className: styles.wrapper
62
+      }, React.createElement("div", {
63
+        className: styles.overlay,
64
+        onClick: onCancel
65
+      }), React.createElement("div", {
66
+        className: styles.container
67
+      }, children)), finalMountContainer);
68
+    }
69
+  }]);
70
+
71
+  return Modal;
72
+}(React.PureComponent);
106 73
 Modal.hasShowWarning = false;
107 74
 
108 75
 export default Modal;

+ 1
- 1
eslib/Modal/index.js.map View File

@@ -1 +1 @@
1
-{"version":3,"file":"index.js","sources":["../../src/components/Common/Utils/utils.ts","../../src/components/Common/Modal/index.tsx"],"sourcesContent":["export function isBrowser() {\n  return !(typeof window === undefined);\n}","import React from 'react';\nimport { createPortal } from 'react-dom';\nimport { isBrowser } from '../Utils/utils';\n\nimport styles from './Modal.less';\n\nexport interface ModalProps {\n  visible: boolean\n  onCancel: (e: any) => void\n  container?: HTMLElement | null\n}\n\nexport class Modal extends React.PureComponent<ModalProps> {\n  static hasShowWarning = false;\n\n  render() {\n    if (!isBrowser()) return null; // 服务端无需渲染下列代码,渲染也会出错\n    const DEFAULT_CONTAINER: HTMLElement | null = document.getElementById('container');\n    const { children, visible, onCancel, container = DEFAULT_CONTAINER } = this.props\n    let finalMountContainer: HTMLElement = document.body;\n    if (!container) {\n      if (!DEFAULT_CONTAINER) {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = document.body;\n      } else {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = DEFAULT_CONTAINER;\n      }\n    }\n    return visible && createPortal(\n      <div className={ styles.wrapper }>\n        <div\n          className={ styles.overlay }\n          onClick={ onCancel }\n        />\n        <div\n          className={ styles.container }\n        >\n          { children }\n        </div>\n      </div>,\n      finalMountContainer,\n    )\n  }\n}\n\nexport default Modal;"],"names":["isBrowser","window","undefined","Modal","DEFAULT_CONTAINER","document","getElementById","props","children","visible","onCancel","container","finalMountContainer","body","hasShowWarning","createPortal","React","createElement","className","styles","wrapper","overlay","onClick","PureComponent"],"mappings":";;;;;AAAM,SAAUA,SAAV,GAAmB;SAChB,EAAE,QAAOC,+CAAAA,OAAP,MAAkBC,SAApB;;;;;;;;;;;;ICWIC,KAAb;AAAA;AAAA,8BAAA;;;;;;;;;;;6BAGQ;UACA,CAACH,SAAS,IAAI,OAAO,IAAP;UACZI,iBAAiB,GAAuBC,QAAQ,CAACC,cAAT,CAAwB,WAAxB;wBACyB,KAAKC;UAApEC,QAHJ,eAGIA;UAAUC,OAHd,eAGcA;UAASC,QAHvB,eAGuBA;8CAAUC;UAAAA,SAHjC,sCAG6CP;UAC7CQ,mBAAmB,GAAgBP,QAAQ,CAACQ;;UAC5C,CAACF,WAAW;YACV,CAACP,mBAAmB;cAClB,CAACD,KAAK,CAACW,gBAAgB;AACzBX,YAAAA,KAAK,CAACW,cAAN,GAAuB,IAAvB;;;AAEFF,UAAAA,mBAAmB,GAAGP,QAAQ,CAACQ,IAA/B;AAJF,eAKO;cACD,CAACV,KAAK,CAACW,gBAAgB;AACzBX,YAAAA,KAAK,CAACW,cAAN,GAAuB,IAAvB;;;AAEFF,UAAAA,mBAAmB,GAAGR,iBAAtB;;;;aAGGK,OAAO,IAAIM,YAAY,CAC5BC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAGC,MAAM,CAACC;AAAxB,OAAA,EACEJ,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,QAAAA,SAAS,EAAGC,MAAM,CAACE,OADrB;AAEEC,QAAAA,OAAO,EAAGZ;AAFZ,OAAA,CADF,EAKEM,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,QAAAA,SAAS,EAAGC,MAAM,CAACR;AADrB,OAAA,EAGIH,QAHJ,CALF,CAD4B,EAY5BI,mBAZ4B;;;;;CArBlC,CAA2BI,KAAK,CAACO,aAAjC;AACSpB,KAAA,CAAAW,cAAA,GAAiB,KAAjB;;;;;"}
1
+{"version":3,"file":"index.js","sources":["../../src/components/Common/Utils/utils.ts","../../src/components/Common/Modal/index.tsx"],"sourcesContent":["export function isBrowser() {\n  return !(typeof window === undefined);\n}","import React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { isBrowser } from \"../Utils/utils\";\n\nimport styles from \"./Modal.less\";\n\nexport interface ModalProps {\n  visible: boolean;\n  onCancel: (e: any) => void;\n  container?: HTMLElement;\n}\n\nexport class Modal extends React.PureComponent<ModalProps> {\n  static hasShowWarning = false;\n\n  render() {\n    if (!isBrowser()) return null; // 服务端无需渲染下列代码,渲染也会出错\n    const DEFAULT_CONTAINER: HTMLElement | null = document.getElementById(\n      \"container\"\n    );\n    const { children, visible, onCancel, container } = this.props;\n    let finalMountContainer: HTMLElement;\n    if (!container) {\n      if (!DEFAULT_CONTAINER) {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = document.body;\n      } else {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = DEFAULT_CONTAINER;\n      }\n    } else {\n      finalMountContainer = container;\n    }\n    return (\n      visible &&\n      createPortal(\n        <div className={styles.wrapper}>\n          <div className={styles.overlay} onClick={onCancel} />\n          <div className={styles.container}>{children}</div>\n        </div>,\n        finalMountContainer\n      )\n    );\n  }\n}\n\nexport default Modal;\n"],"names":["isBrowser","window","undefined","Modal","DEFAULT_CONTAINER","document","getElementById","props","children","visible","onCancel","container","finalMountContainer","hasShowWarning","body","createPortal","React","createElement","className","styles","wrapper","overlay","onClick","PureComponent"],"mappings":";;;;;AAAM,SAAUA,SAAV,GAAmB;SAChB,EAAE,QAAOC,+CAAAA,OAAP,MAAkBC,SAApB;;;;;;;;;;;;ICWIC,KAAb;AAAA;AAAA,8BAAA;;;;;;;;;;;6BAGQ;UACA,CAACH,SAAS,IAAI,OAAO,IAAP;UACZI,iBAAiB,GAAuBC,QAAQ,CAACC,cAAT,CAC5C,WAD4C;wBAGK,KAAKC;UAAhDC,QALJ,eAKIA;UAAUC,OALd,eAKcA;UAASC,QALvB,eAKuBA;UAAUC,SALjC,eAKiCA;UACjCC;;UACA,CAACD,WAAW;YACV,CAACP,mBAAmB;cAClB,CAACD,KAAK,CAACU,gBAAgB;AACzBV,YAAAA,KAAK,CAACU,cAAN,GAAuB,IAAvB;;;AAEFD,UAAAA,mBAAmB,GAAGP,QAAQ,CAACS,IAA/B;AAJF,eAKO;cACD,CAACX,KAAK,CAACU,gBAAgB;AACzBV,YAAAA,KAAK,CAACU,cAAN,GAAuB,IAAvB;;;AAEFD,UAAAA,mBAAmB,GAAGR,iBAAtB;;AAVJ,aAYO;AACLQ,QAAAA,mBAAmB,GAAGD,SAAtB;;;aAGAF,OAAO,IACPM,YAAY,CACVC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAEC,MAAM,CAACC;AAAvB,OAAA,EACEJ,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAEC,MAAM,CAACE,OAAvB;AAAgCC,QAAAA,OAAO,EAAEZ;AAAzC,OAAA,CADF,EAEEM,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAEC,MAAM,CAACR;AAAvB,OAAA,EAAmCH,QAAnC,CAFF,CADU,EAKVI,mBALU;;;;;CA3BlB,CAA2BI,KAAK,CAACO,aAAjC;AACSpB,KAAA,CAAAU,cAAA,GAAiB,KAAjB;;;;;"}

+ 18
- 35
eslib/PayPlatformOptions/index.d.ts View File

@@ -1,45 +1,28 @@
1 1
 /// <reference types="react" />
2
-type PAY_CHANNEL_VALUE =
3
-  | "PAYPAL_PAYPAL"
4
-  | "ALI_WEB"
5
-  | "ALI_WAP"
6
-  | "WX_WAP"
7
-  | "WX_NATIVE";
2
+type PAY_CHANNEL_VALUE = "PAYPAL_PAYPAL" | "ALI_WEB" | "ALI_WAP" | "WX_WAP" | "WX_NATIVE";
8 3
 type PAY_CHANNEL_CATEGORY_VALUE = "Alipay" | "Wechat" | "Paypal";
9 4
 interface PAY_CHANNEL_TYPE {
10
-  PAYPAL: PAY_CHANNEL_VALUE;
11
-  ALI_WEB: PAY_CHANNEL_VALUE;
12
-  ALI_WAP: PAY_CHANNEL_VALUE;
13
-  WX_WAP: PAY_CHANNEL_VALUE;
14
-  WX_NATIVE: PAY_CHANNEL_VALUE;
5
+    PAYPAL: PAY_CHANNEL_VALUE;
6
+    ALI_WEB: PAY_CHANNEL_VALUE;
7
+    ALI_WAP: PAY_CHANNEL_VALUE;
8
+    WX_WAP: PAY_CHANNEL_VALUE;
9
+    WX_NATIVE: PAY_CHANNEL_VALUE;
15 10
 }
16 11
 interface PAY_CHANNEL_CATEGORY {
17
-  ALI: PAY_CHANNEL_CATEGORY_VALUE;
18
-  WX: PAY_CHANNEL_CATEGORY_VALUE;
19
-  PAYPAL: PAY_CHANNEL_CATEGORY_VALUE;
12
+    ALI: PAY_CHANNEL_CATEGORY_VALUE;
13
+    WX: PAY_CHANNEL_CATEGORY_VALUE;
14
+    PAYPAL: PAY_CHANNEL_CATEGORY_VALUE;
20 15
 }
21 16
 interface Props {
22
-  payChannel: PAY_CHANNEL_VALUE;
23
-  onPayChannelChange: (value: PAY_CHANNEL_VALUE) => void;
24
-  isMobile: boolean;
25
-  size: "small" | "normal" | "large";
26
-  withTitle: boolean;
27
-  titleText?: string;
28
-  locale: "zh" | "en";
17
+    payChannel: PAY_CHANNEL_VALUE;
18
+    onPayChannelChange: (value: PAY_CHANNEL_VALUE) => void;
19
+    isMobile: boolean;
20
+    size: "small" | "normal" | "large";
21
+    withTitle: boolean;
22
+    titleText?: string;
23
+    locale: "zh" | "en";
29 24
 }
30 25
 declare const PAY_CHANNEL: PAY_CHANNEL_TYPE;
31 26
 declare const PAY_CHANNEL_CATEGORY$0: PAY_CHANNEL_CATEGORY;
32
-declare const PayPlatformOptions: ({
33
-  payChannel,
34
-  onPayChannelChange,
35
-  size,
36
-  isMobile,
37
-  withTitle,
38
-  titleText,
39
-  locale
40
-}: Props) => JSX.Element;
41
-export {
42
-  PayPlatformOptions as default,
43
-  PAY_CHANNEL,
44
-  PAY_CHANNEL_CATEGORY$0 as PAY_CHANNEL_CATEGORY
45
-};
27
+declare const PayPlatformOptions: ({ payChannel, onPayChannelChange, size, isMobile, withTitle, titleText, locale }: Props) => JSX.Element;
28
+export { PayPlatformOptions as default, PAY_CHANNEL, PAY_CHANNEL_CATEGORY$0 as PAY_CHANNEL_CATEGORY };

+ 140
- 223
eslib/PayPlatformOptions/index.js
File diff suppressed because it is too large
View File


+ 18
- 18
eslib/Payment/index.js View File

@@ -1,19 +1,19 @@
1
-import "../inherits-6cb67931.js";
2
-import "react";
3
-import "react-dom";
4
-import "../Modal/index.js";
5
-import "../style-inject.es-1f59c1d0.js";
6
-import "../defineProperty-18999f8e.js";
7
-import "../_commonjsHelpers-97e6d7b1.js";
8
-import "../index-c9837619.js";
9
-import "../utils-6b513b37.js";
10
-export { default as ConsumeListView } from "../ConsumeListView/index.js";
11
-export { default as PayPlatformOptions } from "../PayPlatformOptions/index.js";
12
-import "../slicedToArray-4cd9e6d3.js";
13
-import "antd";
14
-export { default as PriceOptions } from "../PriceOptions/index.js";
15
-export { default as WaitPayInfoView } from "../WaitPayInfoView/index.js";
16
-export { default as AllocWantedModal } from "../AllocWantedModal/index.js";
17
-export { default as WantedPublishView } from "../WantedPublishView/index.js";
18
-export { default as WantedPublishPopover } from "../WantedPublishPopover/index.js";
1
+import '../inherits-6cb67931.js';
2
+import 'react';
3
+import 'react-dom';
4
+import '../Modal/index.js';
5
+import '../style-inject.es-1f59c1d0.js';
6
+import '../defineProperty-18999f8e.js';
7
+import '../_commonjsHelpers-97e6d7b1.js';
8
+import '../index-c9837619.js';
9
+import '../utils-6b513b37.js';
10
+export { default as ConsumeListView } from '../ConsumeListView/index.js';
11
+export { default as PayPlatformOptions } from '../PayPlatformOptions/index.js';
12
+import '../slicedToArray-4cd9e6d3.js';
13
+import 'antd';
14
+export { default as PriceOptions } from '../PriceOptions/index.js';
15
+export { default as WaitPayInfoView } from '../WaitPayInfoView/index.js';
16
+export { default as AllocWantedModal } from '../AllocWantedModal/index.js';
17
+export { default as WantedPublishView } from '../WantedPublishView/index.js';
18
+export { default as WantedPublishPopover } from '../WantedPublishPopover/index.js';
19 19
 //# sourceMappingURL=index.js.map

+ 18
- 33
eslib/PriceOptions/index.d.ts View File

@@ -1,38 +1,23 @@
1 1
 /// <reference types="react" />
2 2
 import React from "react";
3 3
 interface Props {
4
-  rowMode: "single" | "multi";
5
-  price: number;
6
-  onPriceChange: (v: number) => void;
7
-  size: "small" | "normal" | "large";
8
-  focusScroll: boolean;
9
-  withTitle: boolean;
10
-  titleText?: string | JSX.Element[] | JSX.Element;
11
-  inputPlaceholderText?: string;
12
-  priceOptions?: Array<any>;
13
-  priceRender?: Function;
14
-  inputPriceRender?: Function;
15
-  inputSuffix?: string | JSX.Element[] | JSX.Element;
16
-  injectOptions?: {
17
-    priceBtnClass: (isActive: boolean) => any;
18
-    priceInputClass: Function;
19
-  };
20
-  inputRef: React.RefObject<any>;
4
+    rowMode: "single" | "multi";
5
+    price: number;
6
+    onPriceChange: (v: number) => void;
7
+    size: "small" | "normal" | "large";
8
+    focusScroll: boolean;
9
+    withTitle: boolean;
10
+    titleText?: string | JSX.Element[] | JSX.Element;
11
+    inputPlaceholderText?: string;
12
+    priceOptions?: Array<any>;
13
+    priceRender?: Function;
14
+    inputPriceRender?: Function;
15
+    inputSuffix?: string | JSX.Element[] | JSX.Element;
16
+    injectOptions?: {
17
+        priceBtnClass: (isActive: boolean) => any;
18
+        priceInputClass: Function;
19
+    };
20
+    inputRef: React.RefObject<any>;
21 21
 }
22
-declare const PriceOptions: ({
23
-  price,
24
-  onPriceChange,
25
-  rowMode,
26
-  size,
27
-  focusScroll,
28
-  withTitle,
29
-  titleText,
30
-  inputPlaceholderText,
31
-  priceOptions,
32
-  priceRender,
33
-  inputPriceRender,
34
-  inputSuffix,
35
-  injectOptions,
36
-  inputRef
37
-}: Props) => JSX.Element;
22
+declare const PriceOptions: ({ price, onPriceChange, rowMode, size, focusScroll, withTitle, titleText, inputPlaceholderText, priceOptions, priceRender, inputPriceRender, inputSuffix, injectOptions, inputRef }: Props) => JSX.Element;
38 23
 export { PriceOptions as default };

+ 136
- 192
eslib/PriceOptions/index.js View File

@@ -1,23 +1,22 @@
1
-import React, { useState } from "react";
2
-import { s as styleInject } from "../style-inject.es-1f59c1d0.js";
3
-import { _ as _defineProperty } from "../defineProperty-18999f8e.js";
4
-import "../_commonjsHelpers-97e6d7b1.js";
5
-import { c as classnames } from "../index-c9837619.js";
6
-import { e as exportStyleSizeClass } from "../utils-6b513b37.js";
7
-import { _ as _slicedToArray } from "../slicedToArray-4cd9e6d3.js";
8
-import { Input } from "antd";
9
-
10
-var css =
11
-  ".PriceOptions_options__ifYbC p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n  margin-bottom: 20px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  background: rgba(243, 243, 243, 0.14);\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n  font-size: 14px;\n  font-weight: 600;\n  color: #616a79;\n  display: inline-block;\n  text-align: center;\n  vertical-align: top;\n  height: 30px;\n  width: 70px;\n  line-height: 30px;\n  cursor: pointer;\n  margin: 6px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background: rgba(255, 50, 102, 0.1);\n  border-radius: 4px;\n  border: 1px solid #ff3266;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  display: inline-block;\n  min-width: 70px;\n  height: 72px;\n  width: auto;\n  margin: 6px;\n  text-align: center;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx button {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  height: 30px;\n  width: 50px;\n  vertical-align: top;\n  padding: 0 5px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 {\n  margin-left: 10px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 i {\n  margin-right: 5px;\n  color: #1790FF;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceBtn__1UaE8 {\n  display: flex;\n  justify-content: space-between;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  display: inline-block;\n  background-color: #fff;\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background-color: #fff;\n  color: #FF3266FF;\n  border: 1px solid #ff3266;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  width: 222px;\n  width: auto;\n}\n";
1
+import React, { useState } from 'react';
2
+import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
3
+import { _ as _defineProperty } from '../defineProperty-18999f8e.js';
4
+import '../_commonjsHelpers-97e6d7b1.js';
5
+import { c as classnames } from '../index-c9837619.js';
6
+import { e as exportStyleSizeClass } from '../utils-6b513b37.js';
7
+import { _ as _slicedToArray } from '../slicedToArray-4cd9e6d3.js';
8
+import { Input } from 'antd';
9
+
10
+var css = ".PriceOptions_options__ifYbC p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n  margin-bottom: 20px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  background: rgba(243, 243, 243, 0.14);\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n  font-size: 14px;\n  font-weight: 600;\n  color: #616a79;\n  display: inline-block;\n  text-align: center;\n  vertical-align: top;\n  height: 30px;\n  width: 70px;\n  line-height: 30px;\n  cursor: pointer;\n  margin: 6px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background: rgba(255, 50, 102, 0.1);\n  border-radius: 4px;\n  border: 1px solid #ff3266;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  display: inline-block;\n  min-width: 70px;\n  width: auto;\n  margin: 6px;\n  text-align: center;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx button {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  height: 30px;\n  width: 50px;\n  vertical-align: top;\n  padding: 0 5px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 {\n  margin-left: 10px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 i {\n  margin-right: 5px;\n  color: #1790ff;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceBtn__1UaE8 {\n  display: flex;\n  justify-content: space-between;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  display: inline-block;\n  background-color: #fff;\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background-color: #fff;\n  color: #ff3266ff;\n  border: 1px solid #ff3266;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  width: 222px;\n  width: auto;\n}\n";
12 11
 var styles = {
13
-  options: "PriceOptions_options__ifYbC",
14
-  infoItem: "PriceOptions_infoItem__246mx",
15
-  priceItem: "PriceOptions_priceItem__3CPe3",
16
-  active: "PriceOptions_active__154by",
17
-  priceInput: "PriceOptions_priceInput__2JFc0",
18
-  rate: "PriceOptions_rate__17U-9",
19
-  multi: "PriceOptions_multi__2fM8z",
20
-  priceBtn: "PriceOptions_priceBtn__1UaE8"
12
+  "options": "PriceOptions_options__ifYbC",
13
+  "infoItem": "PriceOptions_infoItem__246mx",
14
+  "priceItem": "PriceOptions_priceItem__3CPe3",
15
+  "active": "PriceOptions_active__154by",
16
+  "priceInput": "PriceOptions_priceInput__2JFc0",
17
+  "rate": "PriceOptions_rate__17U-9",
18
+  "multi": "PriceOptions_multi__2fM8z",
19
+  "priceBtn": "PriceOptions_priceBtn__1UaE8"
21 20
 };
22 21
 styleInject(css);
23 22
 
@@ -26,10 +25,9 @@ function ownKeys(object, enumerableOnly) {
26 25
 
27 26
   if (Object.getOwnPropertySymbols) {
28 27
     var symbols = Object.getOwnPropertySymbols(object);
29
-    if (enumerableOnly)
30
-      symbols = symbols.filter(function(sym) {
31
-        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
32
-      });
28
+    if (enumerableOnly) symbols = symbols.filter(function (sym) {
29
+      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
30
+    });
33 31
     keys.push.apply(keys, symbols);
34 32
   }
35 33
 
@@ -41,18 +39,14 @@ function _objectSpread(target) {
41 39
     var source = arguments[i] != null ? arguments[i] : {};
42 40
 
43 41
     if (i % 2) {
44
-      ownKeys(Object(source), true).forEach(function(key) {
42
+      ownKeys(Object(source), true).forEach(function (key) {
45 43
         _defineProperty(target, key, source[key]);
46 44
       });
47 45
     } else if (Object.getOwnPropertyDescriptors) {
48 46
       Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
49 47
     } else {
50
-      ownKeys(Object(source)).forEach(function(key) {
51
-        Object.defineProperty(
52
-          target,
53
-          key,
54
-          Object.getOwnPropertyDescriptor(source, key)
55
-        );
48
+      ownKeys(Object(source)).forEach(function (key) {
49
+        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
56 50
       });
57 51
     }
58 52
   }
@@ -62,172 +56,122 @@ function _objectSpread(target) {
62 56
 
63 57
 var PriceOptions = function PriceOptions(_ref) {
64 58
   var price = _ref.price,
65
-    onPriceChange = _ref.onPriceChange,
66
-    _ref$rowMode = _ref.rowMode,
67
-    rowMode = _ref$rowMode === void 0 ? "single" : _ref$rowMode,
68
-    _ref$size = _ref.size,
69
-    size = _ref$size === void 0 ? "normal" : _ref$size,
70
-    _ref$focusScroll = _ref.focusScroll,
71
-    focusScroll = _ref$focusScroll === void 0 ? true : _ref$focusScroll,
72
-    _ref$withTitle = _ref.withTitle,
73
-    withTitle = _ref$withTitle === void 0 ? true : _ref$withTitle,
74
-    _ref$titleText = _ref.titleText,
75
-    titleText = _ref$titleText === void 0 ? "Price" : _ref$titleText,
76
-    _ref$inputPlaceholder = _ref.inputPlaceholderText,
77
-    inputPlaceholderText =
78
-      _ref$inputPlaceholder === void 0 ? "Others" : _ref$inputPlaceholder,
79
-    _ref$priceOptions = _ref.priceOptions,
80
-    priceOptions =
81
-      _ref$priceOptions === void 0 ? [100, 600, 800] : _ref$priceOptions,
82
-    _ref$priceRender = _ref.priceRender,
83
-    priceRender =
84
-      _ref$priceRender === void 0
85
-        ? function(i) {
86
-            return i / 100;
87
-          }
88
-        : _ref$priceRender,
89
-    _ref$inputPriceRender = _ref.inputPriceRender,
90
-    inputPriceRender =
91
-      _ref$inputPriceRender === void 0
92
-        ? function(i) {
93
-            return i ? i / 100 : "";
94
-          }
95
-        : _ref$inputPriceRender,
96
-    _ref$inputSuffix = _ref.inputSuffix,
97
-    inputSuffix = _ref$inputSuffix === void 0 ? "¥" : _ref$inputSuffix,
98
-    _ref$injectOptions = _ref.injectOptions,
99
-    injectOptions =
100
-      _ref$injectOptions === void 0
101
-        ? {
102
-            priceBtnClass: function priceBtnClass() {
103
-              return undefined;
104
-            },
105
-            priceInputClass: function priceInputClass() {
106
-              return undefined;
107
-            }
108
-          }
109
-        : _ref$injectOptions,
110
-    inputRef = _ref.inputRef;
59
+      onPriceChange = _ref.onPriceChange,
60
+      _ref$rowMode = _ref.rowMode,
61
+      rowMode = _ref$rowMode === void 0 ? "single" : _ref$rowMode,
62
+      _ref$size = _ref.size,
63
+      size = _ref$size === void 0 ? "normal" : _ref$size,
64
+      _ref$focusScroll = _ref.focusScroll,
65
+      focusScroll = _ref$focusScroll === void 0 ? true : _ref$focusScroll,
66
+      _ref$withTitle = _ref.withTitle,
67
+      withTitle = _ref$withTitle === void 0 ? true : _ref$withTitle,
68
+      _ref$titleText = _ref.titleText,
69
+      titleText = _ref$titleText === void 0 ? "Price" : _ref$titleText,
70
+      _ref$inputPlaceholder = _ref.inputPlaceholderText,
71
+      inputPlaceholderText = _ref$inputPlaceholder === void 0 ? "Others" : _ref$inputPlaceholder,
72
+      _ref$priceOptions = _ref.priceOptions,
73
+      priceOptions = _ref$priceOptions === void 0 ? [100, 600, 800] : _ref$priceOptions,
74
+      _ref$priceRender = _ref.priceRender,
75
+      priceRender = _ref$priceRender === void 0 ? function (i) {
76
+    return i / 100;
77
+  } : _ref$priceRender,
78
+      _ref$inputPriceRender = _ref.inputPriceRender,
79
+      inputPriceRender = _ref$inputPriceRender === void 0 ? function (i) {
80
+    return i ? i / 100 : "";
81
+  } : _ref$inputPriceRender,
82
+      _ref$inputSuffix = _ref.inputSuffix,
83
+      inputSuffix = _ref$inputSuffix === void 0 ? "¥" : _ref$inputSuffix,
84
+      _ref$injectOptions = _ref.injectOptions,
85
+      injectOptions = _ref$injectOptions === void 0 ? {
86
+    priceBtnClass: function priceBtnClass() {
87
+      return undefined;
88
+    },
89
+    priceInputClass: function priceInputClass() {
90
+      return undefined;
91
+    }
92
+  } : _ref$injectOptions,
93
+      inputRef = _ref.inputRef;
111 94
   var defaultOptions = priceOptions;
112 95
 
113 96
   var _useState = useState(false),
114
-    _useState2 = _slicedToArray(_useState, 2),
115
-    inputStatus = _useState2[0],
116
-    setInputStatus = _useState2[1];
117
-
118
-  var _useState3 = useState(""),
119
-    _useState4 = _slicedToArray(_useState3, 2),
120
-    inputPrice = _useState4[0],
121
-    setInputPrice = _useState4[1];
122
-
123
-  return React.createElement(
124
-    "div",
125
-    {
126
-      className: classnames(
127
-        styles.options,
128
-        _objectSpread(
129
-          _defineProperty({}, styles.multi, rowMode === "multi"),
130
-          exportStyleSizeClass(styles, size)
131
-        )
132
-      )
97
+      _useState2 = _slicedToArray(_useState, 2),
98
+      inputStatus = _useState2[0],
99
+      setInputStatus = _useState2[1];
100
+
101
+  var _useState3 = useState(''),
102
+      _useState4 = _slicedToArray(_useState3, 2),
103
+      inputPrice = _useState4[0],
104
+      setInputPrice = _useState4[1];
105
+
106
+  return React.createElement("div", {
107
+    className: classnames(styles.options, _objectSpread(_defineProperty({}, styles.multi, rowMode === "multi"), exportStyleSizeClass(styles, size)))
108
+  }, withTitle ? titleText || null : null, React.createElement("div", {
109
+    className: styles.infoItem
110
+  }, React.createElement("span", {
111
+    className: styles.priceBtn
112
+  }, defaultOptions.map(function (item) {
113
+    var _objectSpread3;
114
+
115
+    return React.createElement("span", {
116
+      className: classnames(_objectSpread((_objectSpread3 = {}, _defineProperty(_objectSpread3, styles.priceItem, true), _defineProperty(_objectSpread3, styles.active, price === item && !inputStatus), _objectSpread3), injectOptions.priceBtnClass(price === item && !inputStatus))),
117
+      key: item,
118
+      onClick: function onClick() {
119
+        onPriceChange(item);
120
+        setInputStatus(false);
121
+      }
122
+    }, priceRender(item));
123
+  })), React.createElement(Input, {
124
+    ref: inputRef,
125
+    className: classnames(styles.priceInput, _objectSpread({}, injectOptions.priceInputClass())),
126
+    onMouseEnter: function onMouseEnter() {
127
+      if (inputStatus && inputRef && inputRef.current) {
128
+        inputRef.current.focus();
129
+        inputRef.current.select();
130
+      }
131
+    },
132
+    suffix: inputSuffix,
133
+    value: inputStatus ? inputPriceRender(inputPrice) : "",
134
+    placeholder: inputPlaceholderText,
135
+    onChange: function onChange(e) {
136
+      var n = +e.target.value;
137
+
138
+      if (Number.isNaN(n)) {
139
+        return;
140
+      }
141
+
142
+      setInputPrice("".concat(n * 100));
143
+      onPriceChange(n * 100);
133 144
     },
134
-    withTitle ? titleText || null : null,
135
-    React.createElement(
136
-      "div",
137
-      {
138
-        className: styles.infoItem
139
-      },
140
-      React.createElement(
141
-        "span",
142
-        {
143
-          className: styles.priceBtn
144
-        },
145
-        defaultOptions.map(function(item) {
146
-          var _objectSpread3;
147
-
148
-          return React.createElement(
149
-            "span",
150
-            {
151
-              className: classnames(
152
-                _objectSpread(
153
-                  ((_objectSpread3 = {}),
154
-                  _defineProperty(_objectSpread3, styles.priceItem, true),
155
-                  _defineProperty(
156
-                    _objectSpread3,
157
-                    styles.active,
158
-                    price === item && !inputStatus
159
-                  ),
160
-                  _objectSpread3),
161
-                  injectOptions.priceBtnClass(price === item && !inputStatus)
162
-                )
163
-              ),
164
-              key: item,
165
-              onClick: function onClick() {
166
-                onPriceChange(item);
167
-                setInputStatus(false);
168
-              }
169
-            },
170
-            priceRender(item)
171
-          );
172
-        })
173
-      ),
174
-      React.createElement(Input, {
175
-        ref: inputRef,
176
-        className: classnames(
177
-          styles.priceInput,
178
-          _objectSpread({}, injectOptions.priceInputClass())
179
-        ),
180
-        onMouseEnter: function onMouseEnter() {
181
-          if (inputStatus && inputRef && inputRef.current) {
182
-            inputRef.current.focus();
183
-            inputRef.current.select();
184
-          }
185
-        },
186
-        suffix: inputSuffix,
187
-        value: inputStatus ? inputPriceRender(inputPrice) : "",
188
-        placeholder: inputPlaceholderText,
189
-        onChange: function onChange(e) {
190
-          var n = +e.target.value;
191
-
192
-          if (Number.isNaN(n)) {
193
-            return;
194
-          }
195
-
196
-          setInputPrice("".concat(n * 100));
197
-          onPriceChange(n * 100);
198
-        },
199
-        onClick: function onClick(e) {
200
-          if (!inputStatus) {
201
-            setInputPrice("");
202
-            setInputStatus(true);
203
-          }
204
-        },
205
-        onFocus: function onFocus(e) {
206
-          e.target.placeholder = "";
207
-
208
-          if (inputStatus) {
209
-            setInputPrice("".concat(price));
210
-          } else {
211
-            setInputPrice("");
212
-            setInputStatus(true);
213
-          }
214
-
215
-          if (focusScroll) {
216
-            e.target.scrollIntoView();
217
-          }
218
-        },
219
-        onBlur: function onBlur(e) {
220
-          e.target.placeholder = inputPlaceholderText;
221
-
222
-          if (inputPrice) {
223
-            setInputStatus(true);
224
-          } else {
225
-            setInputStatus(false);
226
-          }
227
-        }
228
-      })
229
-    )
230
-  );
145
+    onClick: function onClick(e) {
146
+      if (!inputStatus) {
147
+        setInputPrice('');
148
+        setInputStatus(true);
149
+      }
150
+    },
151
+    onFocus: function onFocus(e) {
152
+      e.target.placeholder = "";
153
+
154
+      if (inputStatus) {
155
+        setInputPrice("".concat(price));
156
+      } else {
157
+        setInputPrice('');
158
+        setInputStatus(true);
159
+      }
160
+
161
+      if (focusScroll) {
162
+        e.target.scrollIntoView();
163
+      }
164
+    },
165
+    onBlur: function onBlur(e) {
166
+      e.target.placeholder = inputPlaceholderText;
167
+
168
+      if (inputPrice) {
169
+        setInputStatus(true);
170
+      } else {
171
+        setInputStatus(false);
172
+      }
173
+    }
174
+  })));
231 175
 };
232 176
 
233 177
 export default PriceOptions;

+ 8
- 8
eslib/WaitPayInfoView/index.d.ts View File

@@ -1,14 +1,14 @@
1 1
 /// <reference types="react" />
2
-import { Component } from "react";
2
+import { Component } from 'react';
3 3
 interface Props {
4
-  onClickPayed?: Function;
5
-  onClickProblem?: Function;
4
+    onClickPayed?: Function;
5
+    onClickProblem?: Function;
6 6
 }
7 7
 declare class WaitPayInfoView extends Component<Props, {}> {
8
-  static defaultProps: {
9
-    onClickPayed: () => void;
10
-    onClickProblem: () => void;
11
-  };
12
-  render(): JSX.Element;
8
+    static defaultProps: {
9
+        onClickPayed: () => void;
10
+        onClickProblem: () => void;
11
+    };
12
+    render(): JSX.Element;
13 13
 }
14 14
 export { WaitPayInfoView as default, WaitPayInfoView };

+ 52
- 100
eslib/WaitPayInfoView/index.js View File

@@ -1,31 +1,19 @@
1
-import {
2
-  a as _inherits,
3
-  b as _classCallCheck,
4
-  c as _possibleConstructorReturn,
5
-  d as _getPrototypeOf,
6
-  e as _createClass
7
-} from "../inherits-6cb67931.js";
8
-import React, { Component } from "react";
9
-import { s as styleInject } from "../style-inject.es-1f59c1d0.js";
10
-import "../_commonjsHelpers-97e6d7b1.js";
11
-import { c as classnames } from "../index-c9837619.js";
1
+import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _getPrototypeOf, e as _createClass } from '../inherits-6cb67931.js';
2
+import React, { Component } from 'react';
3
+import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
4
+import '../_commonjsHelpers-97e6d7b1.js';
5
+import { c as classnames } from '../index-c9837619.js';
12 6
 
13
-var css =
14
-  ".WaitPayInfoView_waitingContainer__3pU2F {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n}\n";
7
+var css = ".WaitPayInfoView_waitingContainer__3pU2F {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n}\n";
15 8
 var styles = {
16
-  waitingContainer: "WaitPayInfoView_waitingContainer__3pU2F"
9
+  "waitingContainer": "WaitPayInfoView_waitingContainer__3pU2F"
17 10
 };
18 11
 styleInject(css);
19 12
 
20
-var img =
21
-  "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='48px' height='43px' viewBox='0 0 48 43' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3c!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch --%3e %3ctitle%3ekcxq_popovers_icon_tanhao%3c/title%3e %3cdesc%3eCreated with Sketch.%3c/desc%3e %3cdefs%3e%3c/defs%3e %3cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e %3cg id='%e5%8f%a6%e5%ae%a2%e7%bd%91_%e7%9b%b4%e6%92%ad%e8%af%be_%e8%af%be%e7%a8%8b%e4%bb%8b%e7%bb%8d%e8%af%a6%e6%83%85_%e8%b4%ad%e4%b9%b0%e6%8f%90%e7%a4%ba%e5%bc%b9%e7%aa%97' transform='translate(-936.000000%2c -190.000000)' fill-rule='nonzero'%3e %3cg id='Group-22' transform='translate(690.000000%2c 110.000000)'%3e %3cg id='kcxq_popovers_icon_tanhao' transform='translate(246.000000%2c 80.000000)'%3e %3cpath d='M48%2c21.5 C48%2c33.3736626 38.3645756%2c43 26.4797048%2c43 C21.1306273%2c43 17.0391144%2c42.1506173 13.2841328%2c38.9300412 C11.8140221%2c37.6736626 1.700369%2c43.2123457 0.177121771%2c39.2839506 C-1.06273063%2c36.0987654 5.95129151%2c29.2506173 5.31365314%2c27.0740741 C4.76457565%2c25.1806584 4.95940959%2c23.5703704 4.95940959%2c21.5 C4.95940959%2c9.62633745 14.5948339%2c0 26.4797048%2c0 C38.3645756%2c0 48%2c9.62633745 48%2c21.5 Z' id='Shape' fill='%231790FF'%3e%3c/path%3e %3cg id='Group' transform='translate(23.848708%2c 8.193416)' fill='white'%3e %3cpath d='M2.5%2c27.4971098 C1.13235294%2c27.4971098 0%2c26.3794628 0%2c24.9971098 C0%2c23.6147569 1.13235294%2c22.4971098 2.5%2c22.4971098 C3.86764706%2c22.4971098 5%2c23.6147569 5%2c24.9971098 C5%2c26.3794628 3.86764706%2c27.4971098 2.5%2c27.4971098 Z M2.5%2c19.4219653 C1.13235294%2c19.4219653 0%2c18.1919075 0%2c16.6705202 L0%2c2.75144509 C0%2c1.24624277 1.13235294%2c0 2.5%2c0 C3.86764706%2c0 5%2c1.2300578 5%2c2.75144509 L5%2c16.6705202 C5%2c18.1919075 3.86764706%2c19.4219653 2.5%2c19.4219653 Z' id='Shape'%3e%3c/path%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
13
+var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='48px' height='43px' viewBox='0 0 48 43' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3c!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch --%3e %3ctitle%3ekcxq_popovers_icon_tanhao%3c/title%3e %3cdesc%3eCreated with Sketch.%3c/desc%3e %3cdefs%3e%3c/defs%3e %3cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e %3cg id='%e5%8f%a6%e5%ae%a2%e7%bd%91_%e7%9b%b4%e6%92%ad%e8%af%be_%e8%af%be%e7%a8%8b%e4%bb%8b%e7%bb%8d%e8%af%a6%e6%83%85_%e8%b4%ad%e4%b9%b0%e6%8f%90%e7%a4%ba%e5%bc%b9%e7%aa%97' transform='translate(-936.000000%2c -190.000000)' fill-rule='nonzero'%3e %3cg id='Group-22' transform='translate(690.000000%2c 110.000000)'%3e %3cg id='kcxq_popovers_icon_tanhao' transform='translate(246.000000%2c 80.000000)'%3e %3cpath d='M48%2c21.5 C48%2c33.3736626 38.3645756%2c43 26.4797048%2c43 C21.1306273%2c43 17.0391144%2c42.1506173 13.2841328%2c38.9300412 C11.8140221%2c37.6736626 1.700369%2c43.2123457 0.177121771%2c39.2839506 C-1.06273063%2c36.0987654 5.95129151%2c29.2506173 5.31365314%2c27.0740741 C4.76457565%2c25.1806584 4.95940959%2c23.5703704 4.95940959%2c21.5 C4.95940959%2c9.62633745 14.5948339%2c0 26.4797048%2c0 C38.3645756%2c0 48%2c9.62633745 48%2c21.5 Z' id='Shape' fill='%231790FF'%3e%3c/path%3e %3cg id='Group' transform='translate(23.848708%2c 8.193416)' fill='white'%3e %3cpath d='M2.5%2c27.4971098 C1.13235294%2c27.4971098 0%2c26.3794628 0%2c24.9971098 C0%2c23.6147569 1.13235294%2c22.4971098 2.5%2c22.4971098 C3.86764706%2c22.4971098 5%2c23.6147569 5%2c24.9971098 C5%2c26.3794628 3.86764706%2c27.4971098 2.5%2c27.4971098 Z M2.5%2c19.4219653 C1.13235294%2c19.4219653 0%2c18.1919075 0%2c16.6705202 L0%2c2.75144509 C0%2c1.24624277 1.13235294%2c0 2.5%2c0 C3.86764706%2c0 5%2c1.2300578 5%2c2.75144509 L5%2c16.6705202 C5%2c18.1919075 3.86764706%2c19.4219653 2.5%2c19.4219653 Z' id='Shape'%3e%3c/path%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
22 14
 
23 15
 var Button = function Button() {
24
-  for (
25
-    var _len = arguments.length, props = new Array(_len), _key = 0;
26
-    _key < _len;
27
-    _key++
28
-  ) {
16
+  for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
29 17
     props[_key] = arguments[_key];
30 18
   }
31 19
 
@@ -33,90 +21,54 @@ var Button = function Button() {
33 21
 };
34 22
 
35 23
 var WaitPayInfoView =
36
-  /*#__PURE__*/
37
-  (function(_Component) {
38
-    _inherits(WaitPayInfoView, _Component);
24
+/*#__PURE__*/
25
+function (_Component) {
26
+  _inherits(WaitPayInfoView, _Component);
39 27
 
40
-    function WaitPayInfoView() {
41
-      _classCallCheck(this, WaitPayInfoView);
28
+  function WaitPayInfoView() {
29
+    _classCallCheck(this, WaitPayInfoView);
42 30
 
43
-      return _possibleConstructorReturn(
44
-        this,
45
-        _getPrototypeOf(WaitPayInfoView).apply(this, arguments)
46
-      );
47
-    }
31
+    return _possibleConstructorReturn(this, _getPrototypeOf(WaitPayInfoView).apply(this, arguments));
32
+  }
48 33
 
49
-    _createClass(WaitPayInfoView, [
50
-      {
51
-        key: "render",
52
-        value: function render() {
53
-          var _this$props = this.props,
54
-            onClickPayed = _this$props.onClickPayed,
55
-            onClickProblem = _this$props.onClickProblem;
56
-          return React.createElement(
57
-            "div",
58
-            {
59
-              className: styles.waitingContainer
60
-            },
61
-            React.createElement(
62
-              "div",
63
-              {
64
-                className: styles.infoIconImgContainer
65
-              },
66
-              React.createElement("img", {
67
-                src: img,
68
-                alt: "info label icon"
69
-              })
70
-            ),
71
-            React.createElement(
72
-              "div",
73
-              null,
74
-              React.createElement(
75
-                "div",
76
-                {
77
-                  className: styles.pay_text
78
-                },
79
-                "live.course_info.pay.notification"
80
-              ),
81
-              React.createElement(
82
-                "div",
83
-                {
84
-                  className: styles.btn_row
85
-                },
86
-                React.createElement(
87
-                  Button,
88
-                  {
89
-                    className: classnames(styles.pay_btn, styles.btn_default),
90
-                    size: "small",
91
-                    onClick: function onClick() {
92
-                      onClickPayed && onClickPayed();
93
-                    }
94
-                  },
95
-                  "live.course_info.pay.payed"
96
-                ),
97
-                React.createElement(
98
-                  Button,
99
-                  {
100
-                    className: styles.btn_default,
101
-                    size: "small",
102
-                    style: {
103
-                      marginLeft: "16px"
104
-                    },
105
-                    onClick: function onClick() {
106
-                      onClickProblem && onClickProblem();
107
-                    }
108
-                  },
109
-                  "live.course_info.pay.help"
110
-                )
111
-              )
112
-            )
113
-          );
34
+  _createClass(WaitPayInfoView, [{
35
+    key: "render",
36
+    value: function render() {
37
+      var _this$props = this.props,
38
+          onClickPayed = _this$props.onClickPayed,
39
+          onClickProblem = _this$props.onClickProblem;
40
+      return React.createElement("div", {
41
+        className: styles.waitingContainer
42
+      }, React.createElement("div", {
43
+        className: styles.infoIconImgContainer
44
+      }, React.createElement("img", {
45
+        src: img,
46
+        alt: "info label icon"
47
+      })), React.createElement("div", null, React.createElement("div", {
48
+        className: styles.pay_text
49
+      }, "live.course_info.pay.notification"), React.createElement("div", {
50
+        className: styles.btn_row
51
+      }, React.createElement(Button, {
52
+        className: classnames(styles.pay_btn, styles.btn_default),
53
+        size: "small",
54
+        onClick: function onClick() {
55
+          onClickPayed && onClickPayed();
114 56
         }
115
-      }
116
-    ]);
57
+      }, "live.course_info.pay.payed"), React.createElement(Button, {
58
+        className: styles.btn_default,
59
+        size: "small",
60
+        style: {
61
+          marginLeft: '16px'
62
+        },
63
+        onClick: function onClick() {
64
+          onClickProblem && onClickProblem();
65
+        }
66
+      }, "live.course_info.pay.help"))));
67
+    }
68
+  }]);
117 69
 
118
-    return WaitPayInfoView;
119
-  })(Component);
70
+  return WaitPayInfoView;
71
+}(Component);
120 72
 WaitPayInfoView.defaultProps = {
121 73
   onClickPayed: function onClickPayed() {
122 74
     console.log("onClickPayed");

+ 12
- 18
eslib/WantedPublishModal/index.d.ts View File

@@ -2,26 +2,20 @@
2 2
 import { Component } from "react";
3 3
 import { ModalProps } from "../Modal/index";
4 4
 interface WantedPublishModalProps {
5
-  modalConfig?: ModalProps;
6
-  handleConfirm?: Function;
5
+    modalConfig?: ModalProps;
6
+    handleConfirm?: Function;
7 7
 }
8 8
 interface WantedPublishModalState {
9
-  modalVisible: boolean;
10
-  current_wanted: number | string | null;
9
+    modalVisible: boolean;
10
+    current_wanted: number | string | null;
11 11
 }
12
-declare class WantedPublishModal extends Component<
13
-  WantedPublishModalProps,
14
-  WantedPublishModalState
15
-> {
16
-  constructor(props: WantedPublishModalProps);
17
-  handleModalShow: () => void;
18
-  handleClose: () => void;
19
-  handleUpdateCurrentWanted: (
20
-    value: string | number | null,
21
-    afterUpdate?: Function | undefined
22
-  ) => void;
23
-  clearCurrentWanted: (cb: Function) => void;
24
-  renderMain(): JSX.Element;
25
-  render(): JSX.Element;
12
+declare class WantedPublishModal extends Component<WantedPublishModalProps, WantedPublishModalState> {
13
+    constructor(props: WantedPublishModalProps);
14
+    handleModalShow: () => void;
15
+    handleClose: () => void;
16
+    handleUpdateCurrentWanted: (value: string | number | null, afterUpdate?: Function | undefined) => void;
17
+    clearCurrentWanted: (cb: Function) => void;
18
+    renderMain(): JSX.Element;
19
+    render(): JSX.Element;
26 20
 }
27 21
 export { WantedPublishModal as default, WantedPublishModal };

+ 106
- 140
eslib/WantedPublishModal/index.js View File

@@ -1,163 +1,129 @@
1
-import {
2
-  a as _inherits,
3
-  b as _classCallCheck,
4
-  c as _possibleConstructorReturn,
5
-  d as _getPrototypeOf,
6
-  e as _createClass
7
-} from "../inherits-6cb67931.js";
8
-import React, { Component } from "react";
9
-import "react-dom";
10
-import Modal from "../Modal/index.js";
11
-import { s as styleInject } from "../style-inject.es-1f59c1d0.js";
12
-import "../defineProperty-18999f8e.js";
13
-import "../_commonjsHelpers-97e6d7b1.js";
14
-import "../index-c9837619.js";
15
-import "antd";
16
-import WantedPublishView from "../WantedPublishView/index.js";
17
-
18
-var css =
19
-  ".WantedPublishModal_modalBg__3OlNh {\n  background: white;\n  display: flex;\n  justify-content: center;\n  flex-direction: column;\n  align-items: center;\n  padding: 16px;\n  text-align: center;\n  border-radius: 4px;\n}\n";
1
+import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _getPrototypeOf, e as _createClass } from '../inherits-6cb67931.js';
2
+import React, { Component } from 'react';
3
+import 'react-dom';
4
+import Modal from '../Modal/index.js';
5
+import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
6
+import '../defineProperty-18999f8e.js';
7
+import '../_commonjsHelpers-97e6d7b1.js';
8
+import '../index-c9837619.js';
9
+import 'antd';
10
+import WantedPublishView from '../WantedPublishView/index.js';
11
+
12
+var css = ".WantedPublishModal_modalBg__3OlNh {\n  background: white;\n  display: flex;\n  justify-content: center;\n  flex-direction: column;\n  align-items: center;\n  padding: 16px;\n  text-align: center;\n  border-radius: 4px;\n}\n";
20 13
 var styles = {
21
-  modalBg: "WantedPublishModal_modalBg__3OlNh"
14
+  "modalBg": "WantedPublishModal_modalBg__3OlNh"
22 15
 };
23 16
 styleInject(css);
24 17
 
25 18
 var WantedPublishModal =
26
-  /*#__PURE__*/
27
-  (function(_Component) {
28
-    _inherits(WantedPublishModal, _Component);
19
+/*#__PURE__*/
20
+function (_Component) {
21
+  _inherits(WantedPublishModal, _Component);
29 22
 
30
-    function WantedPublishModal(props) {
31
-      var _this;
23
+  function WantedPublishModal(props) {
24
+    var _this;
32 25
 
33
-      _classCallCheck(this, WantedPublishModal);
26
+    _classCallCheck(this, WantedPublishModal);
34 27
 
35
-      _this = _possibleConstructorReturn(
36
-        this,
37
-        _getPrototypeOf(WantedPublishModal).call(this, props)
38
-      );
28
+    _this = _possibleConstructorReturn(this, _getPrototypeOf(WantedPublishModal).call(this, props));
39 29
 
40
-      _this.handleModalShow = function() {};
30
+    _this.handleModalShow = function () {};
41 31
 
42
-      _this.handleClose = function() {
43
-        var handleConfirm = _this.props.handleConfirm;
32
+    _this.handleClose = function () {
33
+      var handleConfirm = _this.props.handleConfirm;
44 34
 
45
-        if (handleConfirm) {
46
-          _this.handleUpdateCurrentWanted(_this.state.current_wanted, function(
47
-            value
48
-          ) {
49
-            handleConfirm(Number(value).toFixed(2));
50
-          });
51
-        }
52
-
53
-        _this.setState({
54
-          modalVisible: false
35
+      if (handleConfirm) {
36
+        _this.handleUpdateCurrentWanted(_this.state.current_wanted, function (value) {
37
+          handleConfirm(Number(value).toFixed(2));
55 38
         });
56
-      };
39
+      }
57 40
 
58
-      _this.handleUpdateCurrentWanted = function(value, afterUpdate) {
59
-        if (!value) return;
60
-        var result;
61
-        result = value;
41
+      _this.setState({
42
+        modalVisible: false
43
+      });
44
+    };
62 45
 
63
-        if (parseInt("".concat(value), 10) === value) {
64
-          result = Number(value);
65
-        }
46
+    _this.handleUpdateCurrentWanted = function (value, afterUpdate) {
47
+      if (!value) return;
48
+      var result;
49
+      result = value;
50
+
51
+      if (parseInt("".concat(value), 10) === value) {
52
+        result = Number(value);
53
+      }
66 54
 
67
-        if (!result) return;
68
-        if (result > 10000) result = 10000;
69
-        if (result < 5) result = 5;
70
-
71
-        _this.setState(
72
-          {
73
-            current_wanted: result
74
-          },
75
-          function() {
76
-            return afterUpdate && afterUpdate(result);
77
-          }
78
-        );
79
-      };
80
-
81
-      _this.clearCurrentWanted = function(cb) {
82
-        _this.setState(
83
-          {
84
-            current_wanted: null
85
-          },
86
-          function() {
87
-            return cb();
88
-          }
89
-        );
90
-      };
91
-
92
-      _this.state = {
93
-        modalVisible: false,
55
+      if (!result) return;
56
+      if (result > 10000) result = 10000;
57
+      if (result < 5) result = 5;
58
+
59
+      _this.setState({
60
+        current_wanted: result
61
+      }, function () {
62
+        return afterUpdate && afterUpdate(result);
63
+      });
64
+    };
65
+
66
+    _this.clearCurrentWanted = function (cb) {
67
+      _this.setState({
94 68
         current_wanted: null
95
-      };
96
-      return _this;
69
+      }, function () {
70
+        return cb();
71
+      });
72
+    };
73
+
74
+    _this.state = {
75
+      modalVisible: false,
76
+      current_wanted: null
77
+    };
78
+    return _this;
79
+  }
80
+
81
+  _createClass(WantedPublishModal, [{
82
+    key: "renderMain",
83
+    value: function renderMain() {
84
+      var _this2 = this;
85
+
86
+      var current_wanted = this.state.current_wanted;
87
+      return React.createElement(WantedPublishView, {
88
+        wrapperClass: styles.modalBg,
89
+        current_wanted: current_wanted,
90
+        InputWantedValueChange: function InputWantedValueChange(v) {
91
+          return _this2.setState({
92
+            current_wanted: v
93
+          });
94
+        },
95
+        InputWantedPressEnter: function InputWantedPressEnter(v) {
96
+          return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
97
+        },
98
+        InputWantedOnBlur: function InputWantedOnBlur(v) {
99
+          return _this2.handleUpdateCurrentWanted(v);
100
+        },
101
+        InputWantedClear: function InputWantedClear() {
102
+          return _this2.clearCurrentWanted(_this2.handleClose);
103
+        },
104
+        CloseFunction: this.handleClose
105
+      });
97 106
     }
98
-
99
-    _createClass(WantedPublishModal, [
100
-      {
101
-        key: "renderMain",
102
-        value: function renderMain() {
103
-          var _this2 = this;
104
-
105
-          var current_wanted = this.state.current_wanted;
106
-          return React.createElement(WantedPublishView, {
107
-            wrapperClass: styles.modalBg,
108
-            current_wanted: current_wanted,
109
-            InputWantedValueChange: function InputWantedValueChange(v) {
110
-              return _this2.setState({
111
-                current_wanted: v
112
-              });
113
-            },
114
-            InputWantedPressEnter: function InputWantedPressEnter(v) {
115
-              return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
116
-            },
117
-            InputWantedOnBlur: function InputWantedOnBlur(v) {
118
-              return _this2.handleUpdateCurrentWanted(v);
119
-            },
120
-            InputWantedClear: function InputWantedClear() {
121
-              return _this2.clearCurrentWanted(_this2.handleClose);
122
-            },
123
-            CloseFunction: this.handleClose
107
+  }, {
108
+    key: "render",
109
+    value: function render() {
110
+      var _this3 = this;
111
+
112
+      return React.createElement(React.Fragment, null, React.createElement("div", {
113
+        onClick: function onClick() {
114
+          return _this3.setState({
115
+            modalVisible: true
124 116
           });
125 117
         }
126
-      },
127
-      {
128
-        key: "render",
129
-        value: function render() {
130
-          var _this3 = this;
131
-
132
-          return React.createElement(
133
-            React.Fragment,
134
-            null,
135
-            React.createElement(
136
-              "div",
137
-              {
138
-                onClick: function onClick() {
139
-                  return _this3.setState({
140
-                    modalVisible: true
141
-                  });
142
-                }
143
-              },
144
-              this.props.children
145
-            ),
146
-            React.createElement(
147
-              Modal,
148
-              {
149
-                visible: this.state.modalVisible,
150
-                onCancel: this.handleClose
151
-              },
152
-              this.renderMain()
153
-            )
154
-          );
155
-        }
156
-      }
157
-    ]);
118
+      }, this.props.children), React.createElement(Modal, Object.assign({
119
+        visible: this.state.modalVisible,
120
+        onCancel: this.handleClose
121
+      }, this.props.modalConfig), this.renderMain()));
122
+    }
123
+  }]);
158 124
 
159
-    return WantedPublishModal;
160
-  })(Component);
125
+  return WantedPublishModal;
126
+}(Component);
161 127
 
162 128
 export default WantedPublishModal;
163 129
 export { WantedPublishModal };

+ 1
- 1
eslib/WantedPublishModal/index.js.map
File diff suppressed because it is too large
View File


+ 12
- 23
eslib/WantedPublishPopover/index.d.ts View File

@@ -2,30 +2,19 @@
2 2
 import React from "react";
3 3
 import { PopoverProps } from "antd/lib/popover";
4 4
 interface WantedPublishPopoverProp {
5
-  popoverConfig?: PopoverProps;
6
-  handleConfirm?: Function;
5
+    popoverConfig?: PopoverProps;
6
+    handleConfirm?: Function;
7 7
 }
8 8
 interface WantedPublishPopoverState {
9
-  visible: boolean;
10
-  current_wanted: number | string | null;
9
+    visible: boolean;
10
+    current_wanted: number | string | null;
11 11
 }
12
-declare class WantedPublishPopover extends React.Component<
13
-  WantedPublishPopoverProp,
14
-  WantedPublishPopoverState
15
-> {
16
-  constructor(props: WantedPublishPopoverProp);
17
-  handleClose: () => void;
18
-  clearCurrentWanted: (cb: Function) => void;
19
-  handleUpdateCurrentWanted: (
20
-    value: string | number | null,
21
-    afterUpdate?: Function | undefined
22
-  ) => void;
23
-  renderInitView(): JSX.Element;
24
-  render(): JSX.Element;
12
+declare class WantedPublishPopover extends React.Component<WantedPublishPopoverProp, WantedPublishPopoverState> {
13
+    constructor(props: WantedPublishPopoverProp);
14
+    handleClose: () => void;
15
+    clearCurrentWanted: (cb: Function) => void;
16
+    handleUpdateCurrentWanted: (value: string | number | null, afterUpdate?: Function | undefined) => void;
17
+    renderInitView(): JSX.Element;
18
+    render(): JSX.Element;
25 19
 }
26
-export {
27
-  WantedPublishPopover as default,
28
-  WantedPublishPopover,
29
-  WantedPublishPopoverProp,
30
-  WantedPublishPopoverState
31
-};
20
+export { WantedPublishPopover as default, WantedPublishPopover, WantedPublishPopoverProp, WantedPublishPopoverState };

+ 129
- 173
eslib/WantedPublishPopover/index.js View File

@@ -1,195 +1,151 @@
1
-import {
2
-  a as _inherits,
3
-  b as _classCallCheck,
4
-  c as _possibleConstructorReturn,
5
-  d as _getPrototypeOf,
6
-  e as _createClass
7
-} from "../inherits-6cb67931.js";
8
-import React from "react";
9
-import { s as styleInject } from "../style-inject.es-1f59c1d0.js";
10
-import "../defineProperty-18999f8e.js";
11
-import "../_commonjsHelpers-97e6d7b1.js";
12
-import "../index-c9837619.js";
13
-import { Popover } from "antd";
14
-import WantedPublishView from "../WantedPublishView/index.js";
15
-
16
-var img =
17
-  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAFNElEQVRYR82Yf0jcdRjH33enp1NbTQ3FdKhTY64hTTsURc6keQeSqIPSQJIiMHM3zj8ST/BE/And+c8wmSSMomHl4EaaP2aeuq/R1MwrraEgLVbLXcvpReY847l9v3I7774/LKUHjuN79/k8z+v7+fG8n89Hhv+pyf4F1xEAxwE8BSAIQDAAPwB/AnCwnzsAVgHsSI0jFcwfwEkA8QAiRAYj0BUACwDsIvtALJgcwLMA0tjREevfs90tADcBbAg5EAN2FEAegFAhZyL/3wYwBeB7vvZCYFEAzgIIEBlUSjMCYwA4vXXiA6N1lAuApvGg7DaAL7zB+QILB1DA7rKDguL80shNegbxBkZbv4jd/gcNxfmfYHftbjxvYDR9CYdFxMahDfExm/tcP3mC0RQWHzIUF+5HAGPcgydYPoBn+MCSk5ODm5ubs4qKigadTq8b6rHuFRUVcYmJicf0ev2swAuTOnwC4L7niD0J4FW+zvHx8YEMw+gjIiKOz8zM3MjIyPhwa2vLp9xUV1cntra2VioUCv+WlpYug8EwLwD3HYAbnmApANL5OlZVVZ0wm806hUKhpHbz8/Nfq1Sqns3NzT1wdXV1J41GYwXXdnZ2lklNTb0sAEaK8JEnGKWHSKH1xY2Cn59fILVdXFz8RqVSXdrY2Nid16amptM1NTVvyeVy0laIGV23uJ+SpnJrTAHgTSEo7v/Kyso4k8l0XqlUUoWBpaUlW3p6epfdbn9oMpnO6HS6N+RyOfnE1NTUWFZW1hUx65H1T3I1z4E9AaBULBi1Ky8vj+ns7NQFBASE0PPKysqi1WqdKSsrK5XJZC61sFqtw2q1+jMpfgmK3ocDoymkqZRkJSUlUd3d3ReCgoJI6B+zwcHBzzUazTVJDh81XgJwnQOLY8Vasp+CgoKI3t7ed5VKJSmGy4aGhvrz8vIskp096kDF5TUOjCpR7X4c9fX1nS0sLCQJ27XV1dXbubm5HTabjSpZqfYTgAEOLAzAOake+vv787VaLSVlsh2Hw/EgODiY8iHsdvsdjUbTMT09/UCi3x9oeXJgtLvKpDgYHR0tzMnJoQISOzs7zq6urss9PT0LAwMDF0JDQ6mOw9ra2t38/Hzz5OTkHxJ8k0Lc5MDo+3UArsTJZ3K5HOPj469kZmbmsFDbHR0dH+j1+hl6TklJCRkZGdGFh4fH0PP6+vq94uJi8/DwsNh6/0sAt9y18kUAiXxQ/v7+MoZhXktLS8uidk6n82FbW9ul2trab937JSUlBVmt1vORkZGx9LvD4bhfWlpqtlgsvwm8NykIqcNf7mBUsb7E19FoNJ6qr6+vojbb29t/NzY2vt/Q0ECnnz0WGxsbODEx8U50dLSrhFpeXrYlJCRcFAD7BYBrN7uDkXzQOqOzoU+zWCwarVarNRgMF9vb2+nU49OioqKUDMO8HRIScjQ7O/u9hYUFoV1KZwCbJxg9vwDgjNA6U6vVx8bGxlzliZCFhYX5xcTEHJmbm1sXaEvnzysAtryB0eIvAeAS6EO2caoJuJjeSutTAFyL+xDtdwCkqbsViq9T0mHW/ZsArlLacx8IX2C0AV4G8PQBjxqlh34AP3vG4TvwkihrDhCOTkZ0+KBqYo8JXRHQyKkBnPiPR4524CAAnwlXCIzjOc3e9AhKlogXoCspOnnz5jSxYBSPLlaeB/AcAFfZLNHuAvgKwK9i+kkB4/xRjqP6jXSQhJpPKUi4aYToc08MEF8ek9KfRo675qRv7qqTu+6kVLAv28+I7SuQ1E7/AHTQdDZ7M6+KAAAAAElFTkSuQmCC";
18
-
19
-var css =
20
-  ".WantedPublishPopover_wantedWrapper__3CrCz {\n  width: 366px;\n  height: 424px;\n  font-size: 18px;\n  text-align: center;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 {\n  position: absolute;\n  top: 10px;\n  right: 16px;\n  width: 20px;\n  height: 20px;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58:focus {\n  outline: none;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB {\n  border: none;\n  padding: 0px;\n  margin: 0px;\n  cursor: pointer;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB > img {\n  width: 100%;\n}\n";
1
+import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _getPrototypeOf, e as _createClass } from '../inherits-6cb67931.js';
2
+import React from 'react';
3
+import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
4
+import '../defineProperty-18999f8e.js';
5
+import '../_commonjsHelpers-97e6d7b1.js';
6
+import '../index-c9837619.js';
7
+import { Popover } from 'antd';
8
+import WantedPublishView from '../WantedPublishView/index.js';
9
+
10
+var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAFNElEQVRYR82Yf0jcdRjH33enp1NbTQ3FdKhTY64hTTsURc6keQeSqIPSQJIiMHM3zj8ST/BE/And+c8wmSSMomHl4EaaP2aeuq/R1MwrraEgLVbLXcvpReY847l9v3I7774/LKUHjuN79/k8z+v7+fG8n89Hhv+pyf4F1xEAxwE8BSAIQDAAPwB/AnCwnzsAVgHsSI0jFcwfwEkA8QAiRAYj0BUACwDsIvtALJgcwLMA0tjREevfs90tADcBbAg5EAN2FEAegFAhZyL/3wYwBeB7vvZCYFEAzgIIEBlUSjMCYwA4vXXiA6N1lAuApvGg7DaAL7zB+QILB1DA7rKDguL80shNegbxBkZbv4jd/gcNxfmfYHftbjxvYDR9CYdFxMahDfExm/tcP3mC0RQWHzIUF+5HAGPcgydYPoBn+MCSk5ODm5ubs4qKigadTq8b6rHuFRUVcYmJicf0ev2swAuTOnwC4L7niD0J4FW+zvHx8YEMw+gjIiKOz8zM3MjIyPhwa2vLp9xUV1cntra2VioUCv+WlpYug8EwLwD3HYAbnmApANL5OlZVVZ0wm806hUKhpHbz8/Nfq1Sqns3NzT1wdXV1J41GYwXXdnZ2lklNTb0sAEaK8JEnGKWHSKH1xY2Cn59fILVdXFz8RqVSXdrY2Nid16amptM1NTVvyeVy0laIGV23uJ+SpnJrTAHgTSEo7v/Kyso4k8l0XqlUUoWBpaUlW3p6epfdbn9oMpnO6HS6N+RyOfnE1NTUWFZW1hUx65H1T3I1z4E9AaBULBi1Ky8vj+ns7NQFBASE0PPKysqi1WqdKSsrK5XJZC61sFqtw2q1+jMpfgmK3ocDoymkqZRkJSUlUd3d3ReCgoJI6B+zwcHBzzUazTVJDh81XgJwnQOLY8Vasp+CgoKI3t7ed5VKJSmGy4aGhvrz8vIskp096kDF5TUOjCpR7X4c9fX1nS0sLCQJ27XV1dXbubm5HTabjSpZqfYTgAEOLAzAOake+vv787VaLSVlsh2Hw/EgODiY8iHsdvsdjUbTMT09/UCi3x9oeXJgtLvKpDgYHR0tzMnJoQISOzs7zq6urss9PT0LAwMDF0JDQ6mOw9ra2t38/Hzz5OTkHxJ8k0Lc5MDo+3UArsTJZ3K5HOPj469kZmbmsFDbHR0dH+j1+hl6TklJCRkZGdGFh4fH0PP6+vq94uJi8/DwsNh6/0sAt9y18kUAiXxQ/v7+MoZhXktLS8uidk6n82FbW9ul2trab937JSUlBVmt1vORkZGx9LvD4bhfWlpqtlgsvwm8NykIqcNf7mBUsb7E19FoNJ6qr6+vojbb29t/NzY2vt/Q0ECnnz0WGxsbODEx8U50dLSrhFpeXrYlJCRcFAD7BYBrN7uDkXzQOqOzoU+zWCwarVarNRgMF9vb2+nU49OioqKUDMO8HRIScjQ7O/u9hYUFoV1KZwCbJxg9vwDgjNA6U6vVx8bGxlzliZCFhYX5xcTEHJmbm1sXaEvnzysAtryB0eIvAeAS6EO2caoJuJjeSutTAFyL+xDtdwCkqbsViq9T0mHW/ZsArlLacx8IX2C0AV4G8PQBjxqlh34AP3vG4TvwkihrDhCOTkZ0+KBqYo8JXRHQyKkBnPiPR4524CAAnwlXCIzjOc3e9AhKlogXoCspOnnz5jSxYBSPLlaeB/AcAFfZLNHuAvgKwK9i+kkB4/xRjqP6jXSQhJpPKUi4aYToc08MEF8ek9KfRo675qRv7qqTu+6kVLAv28+I7SuQ1E7/AHTQdDZ7M6+KAAAAAElFTkSuQmCC";
11
+
12
+var css = ".WantedPublishPopover_wantedWrapper__3CrCz {\n  width: 366px;\n  height: 424px;\n  font-size: 18px;\n  text-align: center;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 {\n  position: absolute;\n  top: 10px;\n  right: 16px;\n  width: 20px;\n  height: 20px;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58:focus {\n  outline: none;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB {\n  border: none;\n  padding: 0px;\n  margin: 0px;\n  cursor: pointer;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB > img {\n  width: 100%;\n}\n";
21 13
 var styles = {
22
-  wantedWrapper: "WantedPublishPopover_wantedWrapper__3CrCz",
23
-  closeBtnWrapper: "WantedPublishPopover_closeBtnWrapper__1KV58",
24
-  closeBtn: "WantedPublishPopover_closeBtn__1aBMB"
14
+  "wantedWrapper": "WantedPublishPopover_wantedWrapper__3CrCz",
15
+  "closeBtnWrapper": "WantedPublishPopover_closeBtnWrapper__1KV58",
16
+  "closeBtn": "WantedPublishPopover_closeBtn__1aBMB"
25 17
 };
26 18
 styleInject(css);
27 19
 
28 20
 var WantedPublishPopover =
29
-  /*#__PURE__*/
30
-  (function(_React$Component) {
31
-    _inherits(WantedPublishPopover, _React$Component);
21
+/*#__PURE__*/
22
+function (_React$Component) {
23
+  _inherits(WantedPublishPopover, _React$Component);
32 24
 
33
-    function WantedPublishPopover(props) {
34
-      var _this;
25
+  function WantedPublishPopover(props) {
26
+    var _this;
35 27
 
36
-      _classCallCheck(this, WantedPublishPopover);
28
+    _classCallCheck(this, WantedPublishPopover);
37 29
 
38
-      _this = _possibleConstructorReturn(
39
-        this,
40
-        _getPrototypeOf(WantedPublishPopover).call(this, props)
41
-      );
30
+    _this = _possibleConstructorReturn(this, _getPrototypeOf(WantedPublishPopover).call(this, props));
42 31
 
43
-      _this.handleClose = function() {
44
-        var handleConfirm = _this.props.handleConfirm;
32
+    _this.handleClose = function () {
33
+      var handleConfirm = _this.props.handleConfirm;
45 34
 
46
-        if (handleConfirm) {
47
-          _this.handleUpdateCurrentWanted(_this.state.current_wanted, function(
48
-            value
49
-          ) {
50
-            handleConfirm(Number(value).toFixed(2));
51
-          });
52
-        }
53
-
54
-        _this.setState({
55
-          visible: false
35
+      if (handleConfirm) {
36
+        _this.handleUpdateCurrentWanted(_this.state.current_wanted, function (value) {
37
+          handleConfirm(Number(value).toFixed(2));
56 38
         });
57
-      };
58
-
59
-      _this.clearCurrentWanted = function(cb) {
60
-        _this.setState(
61
-          {
62
-            current_wanted: null
63
-          },
64
-          function() {
65
-            return cb();
66
-          }
67
-        );
68
-      };
69
-
70
-      _this.handleUpdateCurrentWanted = function(value, afterUpdate) {
71
-        if (!value) return;
72
-        var result;
73
-        result = value;
74
-
75
-        if (parseInt("".concat(value), 10) === value) {
76
-          result = Number(value);
77
-        }
39
+      }
78 40
 
79
-        if (!result) return;
80
-        if (result > 10000) result = 10000;
81
-        if (result < 5) result = 5;
41
+      _this.setState({
42
+        visible: false
43
+      });
44
+    };
82 45
 
83
-        _this.setState(
84
-          {
85
-            current_wanted: result
86
-          },
87
-          function() {
88
-            return afterUpdate && afterUpdate(result);
89
-          }
90
-        );
91
-      };
92
-
93
-      _this.state = {
94
-        visible: false,
46
+    _this.clearCurrentWanted = function (cb) {
47
+      _this.setState({
95 48
         current_wanted: null
96
-      };
97
-      return _this;
49
+      }, function () {
50
+        return cb();
51
+      });
52
+    };
53
+
54
+    _this.handleUpdateCurrentWanted = function (value, afterUpdate) {
55
+      if (!value) return;
56
+      var result;
57
+      result = value;
58
+
59
+      if (parseInt("".concat(value), 10) === value) {
60
+        result = Number(value);
61
+      }
62
+
63
+      if (!result) return;
64
+      if (result > 10000) result = 10000;
65
+      if (result < 5) result = 5;
66
+
67
+      _this.setState({
68
+        current_wanted: result
69
+      }, function () {
70
+        return afterUpdate && afterUpdate(result);
71
+      });
72
+    };
73
+
74
+    _this.state = {
75
+      visible: false,
76
+      current_wanted: null
77
+    };
78
+    return _this;
79
+  }
80
+
81
+  _createClass(WantedPublishPopover, [{
82
+    key: "renderInitView",
83
+    value: function renderInitView() {
84
+      var _this2 = this;
85
+
86
+      var current_wanted = this.state.current_wanted;
87
+      return React.createElement(WantedPublishView, {
88
+        type: "pop",
89
+        current_wanted: current_wanted,
90
+        InputWantedValueChange: function InputWantedValueChange(v) {
91
+          return _this2.setState({
92
+            current_wanted: v
93
+          });
94
+        },
95
+        InputWantedPressEnter: function InputWantedPressEnter(v) {
96
+          return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
97
+        },
98
+        InputWantedOnBlur: function InputWantedOnBlur(v) {
99
+          return _this2.handleUpdateCurrentWanted(v);
100
+        },
101
+        InputWantedClear: function InputWantedClear() {
102
+          return _this2.clearCurrentWanted(_this2.handleClose);
103
+        },
104
+        CloseFunction: this.handleClose
105
+      });
98 106
     }
107
+  }, {
108
+    key: "render",
109
+    value: function render() {
110
+      var _this3 = this;
111
+
112
+      var _this$props = this.props,
113
+          children = _this$props.children,
114
+          _this$props$popoverCo = _this$props.popoverConfig,
115
+          popoverConfig = _this$props$popoverCo === void 0 ? {} : _this$props$popoverCo;
116
+      return React.createElement(Popover, Object.assign({
117
+        placement: "left",
118
+        trigger: "click",
119
+        visible: this.state.visible,
120
+        onVisibleChange: function onVisibleChange(value) {
121
+          if (!value) {
122
+            _this3.handleClose();
123
+          }
99 124
 
100
-    _createClass(WantedPublishPopover, [
101
-      {
102
-        key: "renderInitView",
103
-        value: function renderInitView() {
104
-          var _this2 = this;
105
-
106
-          var current_wanted = this.state.current_wanted;
107
-          return React.createElement(WantedPublishView, {
108
-            type: "pop",
109
-            current_wanted: current_wanted,
110
-            InputWantedValueChange: function InputWantedValueChange(v) {
111
-              return _this2.setState({
112
-                current_wanted: v
113
-              });
114
-            },
115
-            InputWantedPressEnter: function InputWantedPressEnter(v) {
116
-              return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
117
-            },
118
-            InputWantedOnBlur: function InputWantedOnBlur(v) {
119
-              return _this2.handleUpdateCurrentWanted(v);
120
-            },
121
-            InputWantedClear: function InputWantedClear() {
122
-              return _this2.clearCurrentWanted(_this2.handleClose);
123
-            },
124
-            CloseFunction: this.handleClose
125
+          _this3.setState({
126
+            visible: value
125 127
           });
126 128
         }
127
-      },
128
-      {
129
-        key: "render",
130
-        value: function render() {
131
-          var _this3 = this;
132
-
133
-          var _this$props = this.props,
134
-            children = _this$props.children,
135
-            _this$props$popoverCo = _this$props.popoverConfig,
136
-            popoverConfig =
137
-              _this$props$popoverCo === void 0 ? {} : _this$props$popoverCo;
138
-          return React.createElement(
139
-            Popover,
140
-            Object.assign(
141
-              {
142
-                placement: "left",
143
-                trigger: "click",
144
-                visible: this.state.visible,
145
-                onVisibleChange: function onVisibleChange(value) {
146
-                  if (!value) {
147
-                    _this3.handleClose();
148
-                  }
149
-
150
-                  _this3.setState({
151
-                    visible: value
152
-                  });
153
-                }
154
-              },
155
-              popoverConfig,
156
-              {
157
-                content: React.createElement(
158
-                  "div",
159
-                  {
160
-                    className: styles.wantedWrapper
161
-                  },
162
-                  React.createElement(
163
-                    "div",
164
-                    {
165
-                      role: "button",
166
-                      tabIndex: 1,
167
-                      className: styles.closeBtnWrapper
168
-                    },
169
-                    React.createElement(
170
-                      "div",
171
-                      {
172
-                        className: styles.closeBtn,
173
-                        onClick: this.handleClose
174
-                      },
175
-                      React.createElement("img", {
176
-                        src: img,
177
-                        alt: "close wanted button"
178
-                      })
179
-                    )
180
-                  ),
181
-                  this.renderInitView()
182
-                )
183
-              }
184
-            ),
185
-            children
186
-          );
187
-        }
188
-      }
189
-    ]);
129
+      }, popoverConfig, {
130
+        content: React.createElement("div", {
131
+          className: styles.wantedWrapper
132
+        }, React.createElement("div", {
133
+          role: "button",
134
+          tabIndex: 1,
135
+          className: styles.closeBtnWrapper
136
+        }, React.createElement("div", {
137
+          className: styles.closeBtn,
138
+          onClick: this.handleClose
139
+        }, React.createElement("img", {
140
+          src: img,
141
+          alt: "close wanted button"
142
+        }))), this.renderInitView())
143
+      }), children);
144
+    }
145
+  }]);
190 146
 
191
-    return WantedPublishPopover;
192
-  })(React.Component);
147
+  return WantedPublishPopover;
148
+}(React.Component);
193 149
 
194 150
 export default WantedPublishPopover;
195 151
 export { WantedPublishPopover };

+ 1
- 1
eslib/WantedPublishPopover/index.js.map
File diff suppressed because it is too large
View File


+ 13
- 16
eslib/WantedPublishView/index.d.ts View File

@@ -1,23 +1,20 @@
1 1
 /// <reference types="react" />
2
-import React from "react";
2
+import React from 'react';
3 3
 interface WantedPublishViewProps {
4
-  type?: "pop" | "modal";
5
-  wrapperClass?: string;
6
-  current_wanted: number | string | null;
7
-  InputWantedValueChange: Function;
8
-  InputWantedPressEnter: Function;
9
-  InputWantedOnBlur: Function;
10
-  InputWantedClear: Function;
11
-  CloseFunction: Function;
4
+    type?: 'pop' | 'modal';
5
+    wrapperClass?: string;
6
+    current_wanted: number | string | null;
7
+    InputWantedValueChange: Function;
8
+    InputWantedPressEnter: Function;
9
+    InputWantedOnBlur: Function;
10
+    InputWantedClear: Function;
11
+    CloseFunction: Function;
12 12
 }
13 13
 interface WantedPublishViewState {
14
-  payment?: number;
14
+    payment?: number;
15 15
 }
16
-declare class WantedPublishView extends React.Component<
17
-  WantedPublishViewProps,
18
-  WantedPublishViewState
19
-> {
20
-  constructor(props: WantedPublishViewProps);
21
-  render(): JSX.Element;
16
+declare class WantedPublishView extends React.Component<WantedPublishViewProps, WantedPublishViewState> {
17
+    constructor(props: WantedPublishViewProps);
18
+    render(): JSX.Element;
22 19
 }
23 20
 export { WantedPublishView as default };

+ 95
- 155
eslib/WantedPublishView/index.js
File diff suppressed because it is too large
View File


+ 4
- 15
eslib/_commonjsHelpers-97e6d7b1.js View File

@@ -1,22 +1,11 @@
1
-var commonjsGlobal =
2
-  typeof globalThis !== "undefined"
3
-    ? globalThis
4
-    : typeof window !== "undefined"
5
-    ? window
6
-    : typeof global !== "undefined"
7
-    ? global
8
-    : typeof self !== "undefined"
9
-    ? self
10
-    : {};
1
+var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
11 2
 
12
-function unwrapExports(x) {
13
-  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default")
14
-    ? x["default"]
15
-    : x;
3
+function unwrapExports (x) {
4
+	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
16 5
 }
17 6
 
18 7
 function createCommonjsModule(fn, module) {
19
-  return (module = { exports: {} }), fn(module, module.exports), module.exports;
8
+	return module = { exports: {} }, fn(module, module.exports), module.exports;
20 9
 }
21 10
 
22 11
 export { commonjsGlobal as a, createCommonjsModule as c, unwrapExports as u };

+ 44
- 43
eslib/index-c9837619.js View File

@@ -1,51 +1,52 @@
1
-import { c as createCommonjsModule } from "./_commonjsHelpers-97e6d7b1.js";
1
+import { c as createCommonjsModule } from './_commonjsHelpers-97e6d7b1.js';
2 2
 
3
-var classnames = createCommonjsModule(function(module) {
4
-  /*!
3
+var classnames = createCommonjsModule(function (module) {
4
+/*!
5 5
   Copyright (c) 2017 Jed Watson.
6 6
   Licensed under the MIT License (MIT), see
7 7
   http://jedwatson.github.io/classnames
8 8
 */
9
-  /* global define */
10
-
11
-  (function() {
12
-    var hasOwn = {}.hasOwnProperty;
13
-
14
-    function classNames() {
15
-      var classes = [];
16
-
17
-      for (var i = 0; i < arguments.length; i++) {
18
-        var arg = arguments[i];
19
-        if (!arg) continue;
20
-
21
-        var argType = typeof arg;
22
-
23
-        if (argType === "string" || argType === "number") {
24
-          classes.push(arg);
25
-        } else if (Array.isArray(arg) && arg.length) {
26
-          var inner = classNames.apply(null, arg);
27
-          if (inner) {
28
-            classes.push(inner);
29
-          }
30
-        } else if (argType === "object") {
31
-          for (var key in arg) {
32
-            if (hasOwn.call(arg, key) && arg[key]) {
33
-              classes.push(key);
34
-            }
35
-          }
36
-        }
37
-      }
38
-
39
-      return classes.join(" ");
40
-    }
41
-
42
-    if (module.exports) {
43
-      classNames.default = classNames;
44
-      module.exports = classNames;
45
-    } else {
46
-      window.classNames = classNames;
47
-    }
48
-  })();
9
+/* global define */
10
+
11
+(function () {
12
+
13
+	var hasOwn = {}.hasOwnProperty;
14
+
15
+	function classNames () {
16
+		var classes = [];
17
+
18
+		for (var i = 0; i < arguments.length; i++) {
19
+			var arg = arguments[i];
20
+			if (!arg) continue;
21
+
22
+			var argType = typeof arg;
23
+
24
+			if (argType === 'string' || argType === 'number') {
25
+				classes.push(arg);
26
+			} else if (Array.isArray(arg) && arg.length) {
27
+				var inner = classNames.apply(null, arg);
28
+				if (inner) {
29
+					classes.push(inner);
30
+				}
31
+			} else if (argType === 'object') {
32
+				for (var key in arg) {
33
+					if (hasOwn.call(arg, key) && arg[key]) {
34
+						classes.push(key);
35
+					}
36
+				}
37
+			}
38
+		}
39
+
40
+		return classes.join(' ');
41
+	}
42
+
43
+	if ( module.exports) {
44
+		classNames.default = classNames;
45
+		module.exports = classNames;
46
+	} else {
47
+		window.classNames = classNames;
48
+	}
49
+}());
49 50
 });
50 51
 
51 52
 export { classnames as c };

+ 18
- 18
eslib/index.js View File

@@ -1,19 +1,19 @@
1
-import "./inherits-6cb67931.js";
2
-import "react";
3
-import "react-dom";
4
-export { default as Modal } from "./Modal/index.js";
5
-import "./style-inject.es-1f59c1d0.js";
6
-import "./defineProperty-18999f8e.js";
7
-import "./_commonjsHelpers-97e6d7b1.js";
8
-import "./index-c9837619.js";
9
-import "./utils-6b513b37.js";
10
-export { default as ConsumeListView } from "./ConsumeListView/index.js";
11
-export { default as PayPlatformOptions } from "./PayPlatformOptions/index.js";
12
-import "./slicedToArray-4cd9e6d3.js";
13
-import "antd";
14
-export { default as PriceOptions } from "./PriceOptions/index.js";
15
-export { default as WaitPayInfoView } from "./WaitPayInfoView/index.js";
16
-export { default as AllocWantedModal } from "./AllocWantedModal/index.js";
17
-export { default as WantedPublishView } from "./WantedPublishView/index.js";
18
-export { default as WantedPublishPopover } from "./WantedPublishPopover/index.js";
1
+import './inherits-6cb67931.js';
2
+import 'react';
3
+import 'react-dom';
4
+export { default as Modal } from './Modal/index.js';
5
+import './style-inject.es-1f59c1d0.js';
6
+import './defineProperty-18999f8e.js';
7
+import './_commonjsHelpers-97e6d7b1.js';
8
+import './index-c9837619.js';
9
+import './utils-6b513b37.js';
10
+export { default as ConsumeListView } from './ConsumeListView/index.js';
11
+export { default as PayPlatformOptions } from './PayPlatformOptions/index.js';
12
+import './slicedToArray-4cd9e6d3.js';
13
+import 'antd';
14
+export { default as PriceOptions } from './PriceOptions/index.js';
15
+export { default as WaitPayInfoView } from './WaitPayInfoView/index.js';
16
+export { default as AllocWantedModal } from './AllocWantedModal/index.js';
17
+export { default as WantedPublishView } from './WantedPublishView/index.js';
18
+export { default as WantedPublishPopover } from './WantedPublishPopover/index.js';
19 19
 //# sourceMappingURL=index.js.map

+ 10
- 28
eslib/inherits-6cb67931.js View File

@@ -29,12 +29,7 @@ function _typeof(obj) {
29 29
     };
30 30
   } else {
31 31
     _typeof = function _typeof(obj) {
32
-      return obj &&
33
-        typeof Symbol === "function" &&
34
-        obj.constructor === Symbol &&
35
-        obj !== Symbol.prototype
36
-        ? "symbol"
37
-        : typeof obj;
32
+      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
38 33
     };
39 34
   }
40 35
 
@@ -43,9 +38,7 @@ function _typeof(obj) {
43 38
 
44 39
 function _assertThisInitialized(self) {
45 40
   if (self === void 0) {
46
-    throw new ReferenceError(
47
-      "this hasn't been initialised - super() hasn't been called"
48
-    );
41
+    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
49 42
   }
50 43
 
51 44
   return self;
@@ -60,21 +53,17 @@ function _possibleConstructorReturn(self, call) {
60 53
 }
61 54
 
62 55
 function _getPrototypeOf(o) {
63
-  _getPrototypeOf = Object.setPrototypeOf
64
-    ? Object.getPrototypeOf
65
-    : function _getPrototypeOf(o) {
66
-        return o.__proto__ || Object.getPrototypeOf(o);
67
-      };
56
+  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
57
+    return o.__proto__ || Object.getPrototypeOf(o);
58
+  };
68 59
   return _getPrototypeOf(o);
69 60
 }
70 61
 
71 62
 function _setPrototypeOf(o, p) {
72
-  _setPrototypeOf =
73
-    Object.setPrototypeOf ||
74
-    function _setPrototypeOf(o, p) {
75
-      o.__proto__ = p;
76
-      return o;
77
-    };
63
+  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
64
+    o.__proto__ = p;
65
+    return o;
66
+  };
78 67
 
79 68
   return _setPrototypeOf(o, p);
80 69
 }
@@ -94,12 +83,5 @@ function _inherits(subClass, superClass) {
94 83
   if (superClass) _setPrototypeOf(subClass, superClass);
95 84
 }
96 85
 
97
-export {
98
-  _typeof as _,
99
-  _inherits as a,
100
-  _classCallCheck as b,
101
-  _possibleConstructorReturn as c,
102
-  _getPrototypeOf as d,
103
-  _createClass as e
104
-};
86
+export { _typeof as _, _inherits as a, _classCallCheck as b, _possibleConstructorReturn as c, _getPrototypeOf as d, _createClass as e };
105 87
 //# sourceMappingURL=inherits-6cb67931.js.map

+ 3
- 14
eslib/slicedToArray-4cd9e6d3.js View File

@@ -3,12 +3,7 @@ function _arrayWithHoles(arr) {
3 3
 }
4 4
 
5 5
 function _iterableToArrayLimit(arr, i) {
6
-  if (
7
-    !(
8
-      Symbol.iterator in Object(arr) ||
9
-      Object.prototype.toString.call(arr) === "[object Arguments]"
10
-    )
11
-  ) {
6
+  if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
12 7
     return;
13 8
   }
14 9
 
@@ -18,11 +13,7 @@ function _iterableToArrayLimit(arr, i) {
18 13
   var _e = undefined;
19 14
 
20 15
   try {
21
-    for (
22
-      var _i = arr[Symbol.iterator](), _s;
23
-      !(_n = (_s = _i.next()).done);
24
-      _n = true
25
-    ) {
16
+    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
26 17
       _arr.push(_s.value);
27 18
 
28 19
       if (i && _arr.length === i) break;
@@ -46,9 +37,7 @@ function _nonIterableRest() {
46 37
 }
47 38
 
48 39
 function _slicedToArray(arr, i) {
49
-  return (
50
-    _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest()
51
-  );
40
+  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
52 41
 }
53 42
 
54 43
 export { _slicedToArray as _ };

+ 6
- 8
eslib/style-inject.es-1f59c1d0.js View File

@@ -1,16 +1,14 @@
1 1
 function styleInject(css, ref) {
2
-  if (ref === void 0) ref = {};
2
+  if ( ref === void 0 ) ref = {};
3 3
   var insertAt = ref.insertAt;
4 4
 
5
-  if (!css || typeof document === "undefined") {
6
-    return;
7
-  }
5
+  if (!css || typeof document === 'undefined') { return; }
8 6
 
9
-  var head = document.head || document.getElementsByTagName("head")[0];
10
-  var style = document.createElement("style");
11
-  style.type = "text/css";
7
+  var head = document.head || document.getElementsByTagName('head')[0];
8
+  var style = document.createElement('style');
9
+  style.type = 'text/css';
12 10
 
13
-  if (insertAt === "top") {
11
+  if (insertAt === 'top') {
14 12
     if (head.firstChild) {
15 13
       head.insertBefore(style, head.firstChild);
16 14
     } else {

+ 10
- 23
eslib/utils-6b513b37.d.ts View File

@@ -2,29 +2,16 @@ declare const IMAGE_PROCESS = "?x-oss-process=image/resize,h_350";
2 2
 declare const IMAGE_PROCESS_SMALL = "?x-oss-process=image/resize,h_100";
3 3
 declare const IMAGE_PROCESS_LARGE = "?x-oss-process=image/resize,h_500";
4 4
 interface AddImageProcessOptions {
5
-  small?: boolean;
6
-  large?: boolean;
7
-  custom?: boolean;
8
-  width?: string;
9
-  height?: string;
5
+    small?: boolean;
6
+    large?: boolean;
7
+    custom?: boolean;
8
+    width?: string;
9
+    height?: string;
10 10
 }
11
-declare function addImageProcess(
12
-  url: string,
13
-  options?: AddImageProcessOptions
14
-): string;
11
+declare function addImageProcess(url: string, options?: AddImageProcessOptions): string;
15 12
 declare function formatMoney(input: any, fuzz?: number): any;
16
-type classSize = "small" | "normal" | "large";
17
-declare function exportStyleSizeClass(
18
-  styles: any,
19
-  size: classSize
20
-): {
21
-  [x: number]: boolean;
22
-};
23
-export {
24
-  IMAGE_PROCESS,
25
-  IMAGE_PROCESS_SMALL,
26
-  IMAGE_PROCESS_LARGE,
27
-  addImageProcess,
28
-  formatMoney,
29
-  exportStyleSizeClass
13
+type classSize = 'small' | 'normal' | 'large';
14
+declare function exportStyleSizeClass(styles: any, size: classSize): {
15
+    [x: number]: boolean;
30 16
 };
17
+export { IMAGE_PROCESS, IMAGE_PROCESS_SMALL, IMAGE_PROCESS_LARGE, addImageProcess, formatMoney, exportStyleSizeClass };

+ 10
- 16
eslib/utils-6b513b37.js View File

@@ -1,18 +1,15 @@
1
-import { _ as _defineProperty } from "./defineProperty-18999f8e.js";
1
+import { _ as _defineProperty } from './defineProperty-18999f8e.js';
2 2
 
3
-var IMAGE_PROCESS = "?x-oss-process=image/resize,h_350";
4
-var IMAGE_PROCESS_SMALL = "?x-oss-process=image/resize,h_100";
5
-var IMAGE_PROCESS_LARGE = "?x-oss-process=image/resize,h_500";
3
+var IMAGE_PROCESS = '?x-oss-process=image/resize,h_350';
4
+var IMAGE_PROCESS_SMALL = '?x-oss-process=image/resize,h_100';
5
+var IMAGE_PROCESS_LARGE = '?x-oss-process=image/resize,h_500';
6 6
 function addImageProcess(url) {
7
-  var options =
8
-    arguments.length > 1 && arguments[1] !== undefined
9
-      ? arguments[1]
10
-      : {
11
-          width: "36px",
12
-          height: "36px"
13
-        };
7
+  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
8
+    width: '36px',
9
+    height: '36px'
10
+  };
14 11
 
15
-  if (url && url.indexOf("x-oss-process") > -1) {
12
+  if (url && url.indexOf('x-oss-process') > -1) {
16 13
     return url;
17 14
   }
18 15
 
@@ -25,10 +22,7 @@ function addImageProcess(url) {
25 22
   }
26 23
 
27 24
   if (options.custom) {
28
-    return ""
29
-      .concat(url, "?x-oss-process=image/resize,limit_0,m_fill,w_")
30
-      .concat(options.width, ",h_")
31
-      .concat(options.height);
25
+    return "".concat(url, "?x-oss-process=image/resize,limit_0,m_fill,w_").concat(options.width, ",h_").concat(options.height);
32 26
   }
33 27
 
34 28
   return url + IMAGE_PROCESS;

+ 24
- 27
lib/AllocWantedModal/index.d.ts View File

@@ -3,35 +3,32 @@ import React from "react";
3 3
 import { RefObject } from "react";
4 4
 import { Input } from "antd";
5 5
 interface AllocWantedModalProps {
6
-  allocValue: string | number | null;
7
-  sendValueRange: Array<string | number>;
8
-  sendRequest: Function;
9
-  sendGiftData: {
10
-    answerId: string | number;
11
-    questionId: string | number;
12
-    toUserId: string | number;
13
-  };
14
-  handleVisibleChange: (visible: boolean) => void;
6
+    allocValue: string | number | null;
7
+    sendValueRange: Array<string | number>;
8
+    sendRequest: Function;
9
+    sendGiftData: {
10
+        answerId: string | number;
11
+        questionId: string | number;
12
+        toUserId: string | number;
13
+    };
14
+    handleVisibleChange: (visible: boolean) => void;
15 15
 }
16 16
 interface AllocWantedModalState {
17
-  visible: boolean;
18
-  outRangeTip: boolean;
19
-  sendValue: string | number;
17
+    visible: boolean;
18
+    outRangeTip: boolean;
19
+    sendValue: string | number;
20 20
 }
21
-declare class AllocWantedModal extends React.Component<
22
-  AllocWantedModalProps,
23
-  AllocWantedModalState
24
-> {
25
-  ModalInputRef: RefObject<Input>;
26
-  ModalContentRef: RefObject<any>;
27
-  constructor(props: AllocWantedModalProps);
28
-  handleSendValueChange: (v: React.ReactText) => void;
29
-  checkSendValue: () => boolean;
30
-  handleCloseAction: () => void;
31
-  handleShowAction: () => void;
32
-  handleConfirm: () => null | undefined;
33
-  renderCloseButton: () => JSX.Element;
34
-  renderModalContent: () => JSX.Element;
35
-  render(): JSX.Element;
21
+declare class AllocWantedModal extends React.Component<AllocWantedModalProps, AllocWantedModalState> {
22
+    ModalInputRef: RefObject<Input>;
23
+    ModalContentRef: RefObject<any>;
24
+    constructor(props: AllocWantedModalProps);
25
+    handleSendValueChange: (v: React.ReactText) => void;
26
+    checkSendValue: () => boolean;
27
+    handleCloseAction: () => void;
28
+    handleShowAction: () => void;
29
+    handleConfirm: () => null | undefined;
30
+    renderCloseButton: () => JSX.Element;
31
+    renderModalContent: () => JSX.Element;
32
+    render(): JSX.Element;
36 33
 }
37 34
 export { AllocWantedModal as default };

+ 198
- 316
lib/AllocWantedModal/index.js View File

@@ -1,351 +1,233 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
3
+Object.defineProperty(exports, '__esModule', { value: true });
4 4
 
5
-function _interopDefault(ex) {
6
-  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7
-}
5
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
8 6
 
9
-var inherits = require("../inherits-c86d64c1.js");
10
-var React = require("react");
7
+var inherits = require('../inherits-c86d64c1.js');
8
+var React = require('react');
11 9
 var React__default = _interopDefault(React);
12
-require("react-dom");
13
-var Modal = require("../Modal/index.js");
14
-var styleInject_es = require("../style-inject.es-dcee06b6.js");
15
-var antd = require("antd");
10
+require('react-dom');
11
+var Modal = require('../Modal/index.js');
12
+var styleInject_es = require('../style-inject.es-dcee06b6.js');
13
+var antd = require('antd');
16 14
 
17
-var img =
18
-  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAACMUlEQVQ4T52Uz4tSURTHPxP9oCkKy0UuIqvZSAsrHHgLEaFSDCJoU0GpQaBgqOCmP6AWKrR5kIELNzZZUUQLlReFFowOboQK2oyLkgExsxqJoprixlx5yXs1dXbvnO/93HPPO+dM8WfbCuwANgNfgA/A0OzIlElgH3AIsBrEl4EXwEvguz4+CdsIHAV2/yVjEX4PVFez/SXXwzYAJ4GdawBJyWfggQTqYSKj/f8AklKR4V1gRcJ2rWY1Zvl8PqumaW8n4YFAwFqpVCb988BzCTsCzMiDDodjut1uX11YWGh4PJ470p/L5ZRIJHI+kUhcU1V1UXfRR+CWhF0ARPHHpqrqbCwWC7darXm32z2Xz+fdoVDobL1ef+z1eu8ZlOO2gIkeChrVKpPJHEylUhd7vd5rm822V9O0it/vf2hS16qAbQfOmBW+3W6HnU6nMhgMlux2+5XRaLRion0iYJuAsJGgWq2e8Pv9x5vN5lOXy6V0Op1XiqLkh8PhNwN9WdbsHLBFL6jVaqc8Hs+xYrE4FwwGnyWTyZl0On2p2+0uKopyo9/vf9XpfwA3JcwNHND/zUajcblUKpWj0WhT+qPRqD2bzUbi8fj1QqHwRgfrA/clbBtwGlgnBRaLZb3Rc0z8j4COfgJmgcP/MQEiw/LkbAqwGCmxMdZq7wDRKmI9/Tbo8ltk6NQ/2YTcAWrA+EeY7TPRewK4B5jWwcRB8Syxy5YmLzGD6XViQuSm/QSINjC0n/ltqZBTCKFgAAAAAElFTkSuQmCC";
15
+var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAACMUlEQVQ4T52Uz4tSURTHPxP9oCkKy0UuIqvZSAsrHHgLEaFSDCJoU0GpQaBgqOCmP6AWKrR5kIELNzZZUUQLlReFFowOboQK2oyLkgExsxqJoprixlx5yXs1dXbvnO/93HPPO+dM8WfbCuwANgNfgA/A0OzIlElgH3AIsBrEl4EXwEvguz4+CdsIHAV2/yVjEX4PVFez/SXXwzYAJ4GdawBJyWfggQTqYSKj/f8AklKR4V1gRcJ2rWY1Zvl8PqumaW8n4YFAwFqpVCb988BzCTsCzMiDDodjut1uX11YWGh4PJ470p/L5ZRIJHI+kUhcU1V1UXfRR+CWhF0ARPHHpqrqbCwWC7darXm32z2Xz+fdoVDobL1ef+z1eu8ZlOO2gIkeChrVKpPJHEylUhd7vd5rm822V9O0it/vf2hS16qAbQfOmBW+3W6HnU6nMhgMlux2+5XRaLRion0iYJuAsJGgWq2e8Pv9x5vN5lOXy6V0Op1XiqLkh8PhNwN9WdbsHLBFL6jVaqc8Hs+xYrE4FwwGnyWTyZl0On2p2+0uKopyo9/vf9XpfwA3JcwNHND/zUajcblUKpWj0WhT+qPRqD2bzUbi8fj1QqHwRgfrA/clbBtwGlgnBRaLZb3Rc0z8j4COfgJmgcP/MQEiw/LkbAqwGCmxMdZq7wDRKmI9/Tbo8ltk6NQ/2YTcAWrA+EeY7TPRewK4B5jWwcRB8Syxy5YmLzGD6XViQuSm/QSINjC0n/ltqZBTCKFgAAAAAElFTkSuQmCC";
19 16
 
20
-var css =
21
-  ".AllocWantedModal_wantedModalContent__1VodF {\n  background-color: white;\n  width: 360px;\n  height: 314px;\n  padding: 22px 28px;\n  border-radius: 7px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_title__31i9F {\n  font-size: 18px;\n  font-weight: 400;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueText___uNQe {\n  color: #565656;\n  margin-top: 48px;\n  font-size: 14px;\n  line-height: 20px;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 {\n  margin: 11px auto;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 .ant-input {\n  color: #FB4B56;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueTipBottom__3WBt0 {\n  margin: 0 auto;\n  font-size: 12px;\n  text-align: center;\n  width: 208px;\n  color: #9B9B9B;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-top: 23px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN {\n  color: white;\n  background-color: #71C135;\n  width: 170px;\n  height: 36px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:hover,\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:focus {\n  outline: none;\n  border-color: #8cd158;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw {\n  margin-left: 22px;\n  width: 20px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw .schedule {\n  font-size: 18px;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- {\n  position: absolute;\n  right: 10px;\n  top: 10px;\n  display: block;\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- img {\n  width: 100%;\n  height: 100%;\n}\n.AllocWantedModal_tipsView__3my0J h6 {\n  margin: 0;\n  font-size: 12px;\n  line-height: 22px;\n  color: #3D3D3D;\n}\n.AllocWantedModal_tipsView__3my0J div {\n  font-size: 12px;\n}\n.AllocWantedModal_outRangeTextTip__3R4mw .ant-tooltip-inner {\n  color: red;\n}\n";
17
+var css = ".AllocWantedModal_wantedModalContent__1VodF {\n  background-color: white;\n  width: 360px;\n  height: 314px;\n  padding: 22px 28px;\n  border-radius: 7px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_title__31i9F {\n  font-size: 18px;\n  font-weight: 400;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueText___uNQe {\n  color: #565656;\n  margin-top: 48px;\n  font-size: 14px;\n  line-height: 20px;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 {\n  margin: 11px auto;\n  text-align: center;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedInputNumber__3MyO5 .ant-input {\n  color: #FB4B56;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_wantedValueTipBottom__3WBt0 {\n  margin: 0 auto;\n  font-size: 12px;\n  text-align: center;\n  width: 208px;\n  color: #9B9B9B;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-top: 23px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN {\n  color: white;\n  background-color: #71C135;\n  width: 170px;\n  height: 36px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:hover,\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_confirmButton__1yXDN:focus {\n  outline: none;\n  border-color: #8cd158;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw {\n  margin-left: 22px;\n  width: 20px;\n}\n.AllocWantedModal_wantedModalContent__1VodF .AllocWantedModal_buttonRow__FegZX .AllocWantedModal_tipsButton__UmFpw .schedule {\n  font-size: 18px;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- {\n  position: absolute;\n  right: 10px;\n  top: 10px;\n  display: block;\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  cursor: pointer;\n}\n.AllocWantedModal_closeButton__1d4p- img {\n  width: 100%;\n  height: 100%;\n}\n.AllocWantedModal_tipsView__3my0J h6 {\n  margin: 0;\n  font-size: 12px;\n  line-height: 22px;\n  color: #3D3D3D;\n}\n.AllocWantedModal_tipsView__3my0J div {\n  font-size: 12px;\n}\n.AllocWantedModal_outRangeTextTip__3R4mw .ant-tooltip-inner {\n  color: red;\n}\n";
22 18
 var styles = {
23
-  wantedModalContent: "AllocWantedModal_wantedModalContent__1VodF",
24
-  title: "AllocWantedModal_title__31i9F",
25
-  wantedValueText: "AllocWantedModal_wantedValueText___uNQe",
26
-  wantedInputNumber: "AllocWantedModal_wantedInputNumber__3MyO5",
27
-  wantedValueTipBottom: "AllocWantedModal_wantedValueTipBottom__3WBt0",
28
-  buttonRow: "AllocWantedModal_buttonRow__FegZX",
29
-  confirmButton: "AllocWantedModal_confirmButton__1yXDN",
30
-  tipsButton: "AllocWantedModal_tipsButton__UmFpw",
31
-  closeButton: "AllocWantedModal_closeButton__1d4p-",
32
-  tipsView: "AllocWantedModal_tipsView__3my0J",
33
-  outRangeTextTip: "AllocWantedModal_outRangeTextTip__3R4mw"
19
+  "wantedModalContent": "AllocWantedModal_wantedModalContent__1VodF",
20
+  "title": "AllocWantedModal_title__31i9F",
21
+  "wantedValueText": "AllocWantedModal_wantedValueText___uNQe",
22
+  "wantedInputNumber": "AllocWantedModal_wantedInputNumber__3MyO5",
23
+  "wantedValueTipBottom": "AllocWantedModal_wantedValueTipBottom__3WBt0",
24
+  "buttonRow": "AllocWantedModal_buttonRow__FegZX",
25
+  "confirmButton": "AllocWantedModal_confirmButton__1yXDN",
26
+  "tipsButton": "AllocWantedModal_tipsButton__UmFpw",
27
+  "closeButton": "AllocWantedModal_closeButton__1d4p-",
28
+  "tipsView": "AllocWantedModal_tipsView__3my0J",
29
+  "outRangeTextTip": "AllocWantedModal_outRangeTextTip__3R4mw"
34 30
 };
35 31
 styleInject_es.styleInject(css);
36 32
 
37 33
 var AllocWantedModal =
38
-  /*#__PURE__*/
39
-  (function(_React$Component) {
40
-    inherits._inherits(AllocWantedModal, _React$Component);
34
+/*#__PURE__*/
35
+function (_React$Component) {
36
+  inherits._inherits(AllocWantedModal, _React$Component);
41 37
 
42
-    function AllocWantedModal(props) {
43
-      var _this;
38
+  function AllocWantedModal(props) {
39
+    var _this;
44 40
 
45
-      inherits._classCallCheck(this, AllocWantedModal);
41
+    inherits._classCallCheck(this, AllocWantedModal);
46 42
 
47
-      _this = inherits._possibleConstructorReturn(
48
-        this,
49
-        inherits._getPrototypeOf(AllocWantedModal).call(this, props)
50
-      );
51
-
52
-      _this.handleSendValueChange = function(v) {
53
-        if (_this.state.outRangeTip) {
54
-          _this.setState({
55
-            outRangeTip: !_this.checkSendValue()
56
-          });
57
-        }
43
+    _this = inherits._possibleConstructorReturn(this, inherits._getPrototypeOf(AllocWantedModal).call(this, props));
58 44
 
45
+    _this.handleSendValueChange = function (v) {
46
+      if (_this.state.outRangeTip) {
59 47
         _this.setState({
60
-          sendValue: v
48
+          outRangeTip: !_this.checkSendValue()
61 49
         });
62
-      };
63
-
64
-      _this.checkSendValue = function() {
65
-        var sendValueRange = _this.props.sendValueRange;
66
-        var sendValue = _this.state.sendValue;
67
-        var min = 0;
68
-        var max = Number(_this.props.allocValue);
69
-
70
-        if (sendValueRange) {
71
-          min = Number(sendValueRange[0]);
72
-          max = Number(sendValueRange[1]);
73
-        }
74
-
75
-        if (sendValue > max) {
76
-          _this.setState({
77
-            outRangeTip: true
78
-          });
79
-
80
-          return false;
81
-        } else if (sendValue < min) {
82
-          _this.setState({
83
-            outRangeTip: true
84
-          });
85
-
86
-          return false;
87
-        }
88
-
89
-        return true;
90
-      };
91
-
92
-      _this.handleCloseAction = function() {
93
-        _this.setState(
94
-          {
95
-            visible: false,
96
-            sendValue: 0,
97
-            outRangeTip: false
98
-          },
99
-          function() {
100
-            _this.props.handleVisibleChange(false);
101
-          }
102
-        );
103
-      };
104
-
105
-      _this.handleShowAction = function() {
106
-        _this.setState(
107
-          {
108
-            visible: true
109
-          },
110
-          function() {
111
-            _this.props.handleVisibleChange(true);
112
-          }
113
-        );
114
-      };
50
+      }
115 51
 
116
-      _this.handleConfirm = function() {
117
-        var sendGiftData = _this.props.sendGiftData;
52
+      _this.setState({
53
+        sendValue: v
54
+      });
55
+    };
118 56
 
119
-        var checkResult = _this.checkSendValue();
57
+    _this.checkSendValue = function () {
58
+      var sendValueRange = _this.props.sendValueRange;
59
+      var sendValue = _this.state.sendValue;
60
+      var min = 0;
61
+      var max = Number(_this.props.allocValue);
120 62
 
121
-        if (!checkResult) {
122
-          return null;
123
-        }
63
+      if (sendValueRange) {
64
+        min = Number(sendValueRange[0]);
65
+        max = Number(sendValueRange[1]);
66
+      }
124 67
 
125
-        Promise.resolve(
126
-          _this.props.sendRequest({
127
-            business_type: 14,
128
-            ref_id: sendGiftData.answerId.toString(),
129
-            origin_id: sendGiftData.questionId,
130
-            to_user: sendGiftData.toUserId,
131
-            goods_id: 2,
132
-            num: Number(_this.state.sendValue)
133
-          })
134
-        ).then(function(res) {
135
-          console.log("res: ", res);
68
+      if (sendValue > max) {
69
+        _this.setState({
70
+          outRangeTip: true
71
+        });
136 72
 
137
-          if (res) {
138
-            _this.handleCloseAction();
139
-          } else {
140
-            _this.handleCloseAction();
141
-          }
73
+        return false;
74
+      } else if (sendValue < min) {
75
+        _this.setState({
76
+          outRangeTip: true
142 77
         });
143
-      };
144 78
 
145
-      _this.renderCloseButton = function() {
146
-        return React__default.createElement(
147
-          "div",
148
-          {
149
-            role: "button",
150
-            tabIndex: -1,
151
-            className: styles.closeButton,
152
-            onClick: function onClick() {
153
-              _this.handleCloseAction();
154
-            }
155
-          },
156
-          React__default.createElement("img", {
157
-            src: img,
158
-            alt: "close button for send wanted"
159
-          })
160
-        );
161
-      };
79
+        return false;
80
+      }
162 81
 
163
-      _this.renderModalContent = function() {
164
-        return React__default.createElement(
165
-          "div",
166
-          {
167
-            className: styles.wantedModalContent,
168
-            ref: _this.ModalContentRef
169
-          },
170
-          _this.renderCloseButton(),
171
-          React__default.createElement(
172
-            "h4",
173
-            {
174
-              className: styles.title
175
-            },
176
-            "\u5206\u914D\u60AC\u8D4F\u5956\u91D1"
177
-          ),
178
-          React__default.createElement(
179
-            "div",
180
-            {
181
-              className: styles.wantedValueText
182
-            },
183
-            "\u5269\u4F59\u53EF\u5206\u914D ".concat(
184
-              _this.props.allocValue,
185
-              "\u5143"
186
-            )
187
-          ),
188
-          React__default.createElement(
189
-            antd.Tooltip,
190
-            {
191
-              visible: _this.state.outRangeTip,
192
-              title: "\u8D85\u8FC7\u8303\u56F4\u503C",
193
-              placement: "bottom",
194
-              overlayClassName: styles.outRangeTextTip,
195
-              getTooltipContainer: function getTooltipContainer() {
196
-                return _this.ModalContentRef && _this.ModalContentRef.current;
197
-              }
198
-            },
199
-            React__default.createElement(antd.Input, {
200
-              ref: _this.ModalInputRef,
201
-              className: styles.wantedInputNumber,
202
-              suffix: "\u5143",
203
-              value: _this.state.sendValue,
204
-              onChange: function onChange(e) {
205
-                return _this.handleSendValueChange(e.target.value);
206
-              },
207
-              onFocus: function onFocus(e) {
208
-                return e.target.setSelectionRange(
209
-                  0,
210
-                  String(_this.state.sendValue).length
211
-                );
212
-              }
213
-            })
214
-          ),
215
-          React__default.createElement(
216
-            "div",
217
-            {
218
-              className: styles.wantedValueTipBottom
219
-            },
220
-            "\u9700\u8981\u5728\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\u5C06\u5956\u91D1\u5206\u914D\u5B8C\u6210, \u5426\u5219\u5C06\u6309\u7167\u89C4\u5219\u81EA\u52A8\u5206\u914D"
221
-          ),
222
-          React__default.createElement(
223
-            "div",
224
-            {
225
-              className: styles.buttonRow
226
-            },
227
-            React__default.createElement("div", {
228
-              className: styles.tipsButton
229
-            }),
230
-            React__default.createElement(
231
-              antd.Button,
232
-              {
233
-                className: styles.confirmButton,
234
-                onClick: _this.handleConfirm
235
-              },
236
-              "\u786E\u8BA4"
237
-            ),
238
-            React__default.createElement(
239
-              "div",
240
-              {
241
-                className: styles.tipsButton
242
-              },
243
-              React__default.createElement(
244
-                antd.Popover,
245
-                {
246
-                  placement: "bottom",
247
-                  trigger: "click",
248
-                  getPopupContainer: function getPopupContainer() {
249
-                    return (
250
-                      _this.ModalContentRef && _this.ModalContentRef.current
251
-                    );
252
-                  },
253
-                  overlayStyle: {
254
-                    width: "320px"
255
-                  },
256
-                  content: React__default.createElement(
257
-                    "div",
258
-                    {
259
-                      className: styles.tipsView
260
-                    },
261
-                    React__default.createElement(
262
-                      "h6",
263
-                      null,
264
-                      "1\u3001\u5982\u4F55\u53C2\u4E0E\u60AC\u8D4F\uFF1F"
265
-                    ),
266
-                    React__default.createElement(
267
-                      "div",
268
-                      null,
269
-                      "\u60AC\u8D4F\u95EE\u9898\u7686\u6709\u6709\u6548\u671F\uFF0C\u9ED8\u8BA4\u4E3A120\u5C0F\u65F6\uFF085\u5929\uFF09\uFF0C\u5728\u6709\u6548\u671F\u5185\u56DE\u590D\u7684\u7B54\u6848\uFF0C\u624D\u6709\u8D44\u683C\u88AB\u9009\u4E3A\u6700\u4F73\u7B54\u6848\uFF0C\u4EE5\u53CA\u5206\u5F97\u8D4F\u91D1\u3002"
270
-                    ),
271
-                    React__default.createElement(
272
-                      "h6",
273
-                      null,
274
-                      "2\u3001\u8D4F\u91D1\u5982\u4F55\u5206\uFF1F"
275
-                    ),
276
-                    React__default.createElement(
277
-                      "div",
278
-                      null,
279
-                      "\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\uFF0C\u63D0\u95EE\u8005\u53EF\u968F\u65F6\u9009\u51FA\u6700\u4F18\u7B54\u6848\uFF0C\u5E76\u5BF9\u8D4F\u91D1\u8FDB\u884C\u5206\u914D\uFF0C\u76F4\u81F3\u8D4F\u91D1\u88AB\u5206\u5B8C\u6216\u65F6\u95F4\u5230\u671F\u4E3A\u6B62\u3002\u82E5\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u4ECD\u672A\u5206\u914D\u8D4F\u91D1\uFF0C\u4E14\u56DE\u7B54\u6570\u5927\u4E8E\u7B49\u4E8E2\uFF0C\u7CFB\u7EDF\u5219\u9ED8\u8BA4\u5C06\u8D4F\u91D1\u5E73\u5206\u7ED9\u70B9\u8D5E\u6570\u524D3\u540D\u7684\u56DE\u7B54\u3002"
280
-                    ),
281
-                    React__default.createElement(
282
-                      "h6",
283
-                      null,
284
-                      "3\u3001\u8D4F\u91D1\u80FD\u9000\u6B3E\u5417\uFF1F"
285
-                    ),
286
-                    React__default.createElement(
287
-                      "div",
288
-                      null,
289
-                      "\u8D4F\u91D1\u53EA\u4F1A\u5728\u4EE5\u4E0B2\u79CD\u60C5\u51B5\u8FDB\u884C\u9000\u6B3E\uFF1A\u4E00\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u56DE\u7B54\u6570\u5C0F\u4E8E2\uFF0C\u8D4F\u91D1\u5C06\u81EA\u52A8\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\uFF1B\u4E8C\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u672A\u5206\u914D\u5B8C\u8D4F\u91D1\uFF0C\u7CFB\u7EDF\u81EA\u52A8\u5C06\u5269\u4F59\u7684\u8D4F\u91D1\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\u3002"
290
-                    )
291
-                  )
292
-                },
293
-                React__default.createElement("i", {
294
-                  className: "schedule schedule-icon_rewardtips"
295
-                })
296
-              )
297
-            )
298
-          )
299
-        );
300
-      };
82
+      return true;
83
+    };
301 84
 
302
-      _this.state = {
85
+    _this.handleCloseAction = function () {
86
+      _this.setState({
303 87
         visible: false,
304 88
         sendValue: 0,
305 89
         outRangeTip: false
306
-      };
307
-      _this.ModalContentRef = React__default.createRef();
308
-      _this.ModalInputRef = React__default.createRef();
309
-      return _this;
310
-    }
311
-
312
-    inherits._createClass(AllocWantedModal, [
313
-      {
314
-        key: "render",
315
-        value: function render() {
316
-          var _this2 = this;
90
+      }, function () {
91
+        _this.props.handleVisibleChange(false);
92
+      });
93
+    };
94
+
95
+    _this.handleShowAction = function () {
96
+      _this.setState({
97
+        visible: true
98
+      }, function () {
99
+        _this.props.handleVisibleChange(true);
100
+      });
101
+    };
102
+
103
+    _this.handleConfirm = function () {
104
+      var sendGiftData = _this.props.sendGiftData;
105
+
106
+      var checkResult = _this.checkSendValue();
107
+
108
+      if (!checkResult) {
109
+        return null;
110
+      }
317 111
 
318
-          var children = this.props.children;
319
-          return React__default.createElement(
320
-            React__default.Fragment,
321
-            null,
322
-            React__default.createElement(
323
-              "div",
324
-              {
325
-                className: styles.wrapper,
326
-                onClick: function onClick() {
327
-                  return _this2.handleShowAction();
328
-                }
329
-              },
330
-              children
331
-            ),
332
-            React__default.createElement(
333
-              Modal.Modal,
334
-              {
335
-                visible: this.state.visible,
336
-                onCancel: function onCancel() {
337
-                  return _this2.handleCloseAction();
338
-                }
339
-              },
340
-              this.renderModalContent()
341
-            )
342
-          );
112
+      Promise.resolve(_this.props.sendRequest({
113
+        business_type: 14,
114
+        ref_id: sendGiftData.answerId.toString(),
115
+        origin_id: sendGiftData.questionId,
116
+        to_user: sendGiftData.toUserId,
117
+        goods_id: 2,
118
+        num: Number(_this.state.sendValue)
119
+      })).then(function (res) {
120
+        console.log("res: ", res);
121
+
122
+        if (res) {
123
+          _this.handleCloseAction();
124
+        } else {
125
+          _this.handleCloseAction();
343 126
         }
344
-      }
345
-    ]);
127
+      });
128
+    };
129
+
130
+    _this.renderCloseButton = function () {
131
+      return React__default.createElement("div", {
132
+        role: "button",
133
+        tabIndex: -1,
134
+        className: styles.closeButton,
135
+        onClick: function onClick() {
136
+          _this.handleCloseAction();
137
+        }
138
+      }, React__default.createElement("img", {
139
+        src: img,
140
+        alt: "close button for send wanted"
141
+      }));
142
+    };
143
+
144
+    _this.renderModalContent = function () {
145
+      return React__default.createElement("div", {
146
+        className: styles.wantedModalContent,
147
+        ref: _this.ModalContentRef
148
+      }, _this.renderCloseButton(), React__default.createElement("h4", {
149
+        className: styles.title
150
+      }, "\u5206\u914D\u60AC\u8D4F\u5956\u91D1"), React__default.createElement("div", {
151
+        className: styles.wantedValueText
152
+      }, "\u5269\u4F59\u53EF\u5206\u914D ".concat(_this.props.allocValue, "\u5143")), React__default.createElement(antd.Tooltip, {
153
+        visible: _this.state.outRangeTip,
154
+        title: "\u8D85\u8FC7\u8303\u56F4\u503C",
155
+        placement: "bottom",
156
+        overlayClassName: styles.outRangeTextTip,
157
+        getTooltipContainer: function getTooltipContainer() {
158
+          return _this.ModalContentRef && _this.ModalContentRef.current;
159
+        }
160
+      }, React__default.createElement(antd.Input, {
161
+        ref: _this.ModalInputRef,
162
+        className: styles.wantedInputNumber,
163
+        suffix: "\u5143",
164
+        value: _this.state.sendValue,
165
+        onChange: function onChange(e) {
166
+          return _this.handleSendValueChange(e.target.value);
167
+        },
168
+        onFocus: function onFocus(e) {
169
+          return e.target.setSelectionRange(0, String(_this.state.sendValue).length);
170
+        }
171
+      })), React__default.createElement("div", {
172
+        className: styles.wantedValueTipBottom
173
+      }, "\u9700\u8981\u5728\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\u5C06\u5956\u91D1\u5206\u914D\u5B8C\u6210, \u5426\u5219\u5C06\u6309\u7167\u89C4\u5219\u81EA\u52A8\u5206\u914D"), React__default.createElement("div", {
174
+        className: styles.buttonRow
175
+      }, React__default.createElement("div", {
176
+        className: styles.tipsButton
177
+      }), React__default.createElement(antd.Button, {
178
+        className: styles.confirmButton,
179
+        onClick: _this.handleConfirm
180
+      }, "\u786E\u8BA4"), React__default.createElement("div", {
181
+        className: styles.tipsButton
182
+      }, React__default.createElement(antd.Popover, {
183
+        placement: "bottom",
184
+        trigger: "click",
185
+        getPopupContainer: function getPopupContainer() {
186
+          return _this.ModalContentRef && _this.ModalContentRef.current;
187
+        },
188
+        overlayStyle: {
189
+          width: "320px"
190
+        },
191
+        content: React__default.createElement("div", {
192
+          className: styles.tipsView
193
+        }, React__default.createElement("h6", null, "1\u3001\u5982\u4F55\u53C2\u4E0E\u60AC\u8D4F\uFF1F"), React__default.createElement("div", null, "\u60AC\u8D4F\u95EE\u9898\u7686\u6709\u6709\u6548\u671F\uFF0C\u9ED8\u8BA4\u4E3A120\u5C0F\u65F6\uFF085\u5929\uFF09\uFF0C\u5728\u6709\u6548\u671F\u5185\u56DE\u590D\u7684\u7B54\u6848\uFF0C\u624D\u6709\u8D44\u683C\u88AB\u9009\u4E3A\u6700\u4F73\u7B54\u6848\uFF0C\u4EE5\u53CA\u5206\u5F97\u8D4F\u91D1\u3002"), React__default.createElement("h6", null, "2\u3001\u8D4F\u91D1\u5982\u4F55\u5206\uFF1F"), React__default.createElement("div", null, "\u60AC\u8D4F\u65F6\u95F4\u7ED3\u675F\u524D\uFF0C\u63D0\u95EE\u8005\u53EF\u968F\u65F6\u9009\u51FA\u6700\u4F18\u7B54\u6848\uFF0C\u5E76\u5BF9\u8D4F\u91D1\u8FDB\u884C\u5206\u914D\uFF0C\u76F4\u81F3\u8D4F\u91D1\u88AB\u5206\u5B8C\u6216\u65F6\u95F4\u5230\u671F\u4E3A\u6B62\u3002\u82E5\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u4ECD\u672A\u5206\u914D\u8D4F\u91D1\uFF0C\u4E14\u56DE\u7B54\u6570\u5927\u4E8E\u7B49\u4E8E2\uFF0C\u7CFB\u7EDF\u5219\u9ED8\u8BA4\u5C06\u8D4F\u91D1\u5E73\u5206\u7ED9\u70B9\u8D5E\u6570\u524D3\u540D\u7684\u56DE\u7B54\u3002"), React__default.createElement("h6", null, "3\u3001\u8D4F\u91D1\u80FD\u9000\u6B3E\u5417\uFF1F"), React__default.createElement("div", null, "\u8D4F\u91D1\u53EA\u4F1A\u5728\u4EE5\u4E0B2\u79CD\u60C5\u51B5\u8FDB\u884C\u9000\u6B3E\uFF1A\u4E00\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u56DE\u7B54\u6570\u5C0F\u4E8E2\uFF0C\u8D4F\u91D1\u5C06\u81EA\u52A8\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\uFF1B\u4E8C\u3001\u60AC\u8D4F\u65F6\u95F4\u5230\u671F\uFF0C\u60AC\u8D4F\u8005\u672A\u5206\u914D\u5B8C\u8D4F\u91D1\uFF0C\u7CFB\u7EDF\u81EA\u52A8\u5C06\u5269\u4F59\u7684\u8D4F\u91D1\u9000\u8FD8\u81F3\u63D0\u95EE\u8005\u7684\u94B1\u5305\u3002"))
194
+      }, React__default.createElement("i", {
195
+        className: "schedule schedule-icon_rewardtips"
196
+      })))));
197
+    };
198
+
199
+    _this.state = {
200
+      visible: false,
201
+      sendValue: 0,
202
+      outRangeTip: false
203
+    };
204
+    _this.ModalContentRef = React__default.createRef();
205
+    _this.ModalInputRef = React__default.createRef();
206
+    return _this;
207
+  }
208
+
209
+  inherits._createClass(AllocWantedModal, [{
210
+    key: "render",
211
+    value: function render() {
212
+      var _this2 = this;
213
+
214
+      var children = this.props.children;
215
+      return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
216
+        className: styles.wrapper,
217
+        onClick: function onClick() {
218
+          return _this2.handleShowAction();
219
+        }
220
+      }, children), React__default.createElement(Modal.Modal, {
221
+        visible: this.state.visible,
222
+        onCancel: function onCancel() {
223
+          return _this2.handleCloseAction();
224
+        }
225
+      }, this.renderModalContent()));
226
+    }
227
+  }]);
346 228
 
347
-    return AllocWantedModal;
348
-  })(React__default.Component);
229
+  return AllocWantedModal;
230
+}(React__default.Component);
349 231
 
350 232
 exports.default = AllocWantedModal;
351 233
 //# sourceMappingURL=index.js.map

+ 3
- 1
lib/BraftEditor/index.d.ts View File

@@ -1,3 +1,5 @@
1 1
 /// <reference types="react" />
2
-declare const BarftEditorPage: ({ value }: { value: string }) => JSX.Element;
2
+declare const BarftEditorPage: ({ value, }: {
3
+    value: string;
4
+}) => JSX.Element;
3 5
 export { BarftEditorPage as default, BarftEditorPage };

+ 28928
- 39957
lib/BraftEditor/index.js
File diff suppressed because it is too large
View File


+ 9
- 7
lib/Common/index.js View File

@@ -1,12 +1,14 @@
1
-"use strict";
1
+'use strict';
2
+
3
+Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+require('../inherits-c86d64c1.js');
6
+require('react');
7
+require('react-dom');
8
+var Modal = require('../Modal/index.js');
9
+require('../style-inject.es-dcee06b6.js');
2 10
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
4 11
 
5
-require("../inherits-c86d64c1.js");
6
-require("react");
7
-require("react-dom");
8
-var Modal = require("../Modal/index.js");
9
-require("../style-inject.es-dcee06b6.js");
10 12
 
11 13
 exports.Modal = Modal.default;
12 14
 //# sourceMappingURL=index.js.map

+ 21
- 21
lib/ConsumeListView/index.d.ts View File

@@ -1,29 +1,29 @@
1 1
 /// <reference types="react" />
2
-import { Component, MouseEvent } from "react";
2
+import { Component, MouseEvent } from 'react';
3 3
 interface dataItem {
4
-  id?: string | number;
5
-  user_avatar?: string;
6
-  bill_price?: number;
4
+    id?: string | number;
5
+    user_avatar?: string;
6
+    bill_price?: number;
7 7
 }
8 8
 interface Props {
9
-  isToggle: boolean;
10
-  onToggleChange: Function;
11
-  onConsumeItemClick: (e: MouseEvent, clickData: any) => any;
12
-  dataSource: Array<dataItem>;
13
-  listLength: number;
14
-  showLength: number;
15
-  options: {
16
-    avatarSize: number;
17
-    avatarMarginLeftAndRight: number;
18
-    kingdomWidth: number;
19
-    kingdomHeight: number;
20
-    kingdomPosition: [number, number];
21
-  };
9
+    isToggle: boolean;
10
+    onToggleChange: Function;
11
+    onConsumeItemClick: (e: MouseEvent, clickData: any) => any;
12
+    dataSource: Array<dataItem>;
13
+    listLength: number;
14
+    showLength: number;
15
+    options: {
16
+        avatarSize: number;
17
+        avatarMarginLeftAndRight: number;
18
+        kingdomWidth: number;
19
+        kingdomHeight: number;
20
+        kingdomPosition: [number, number];
21
+    };
22 22
 }
23 23
 declare class ConsumeListView extends Component<Props, {}> {
24
-  static defaultProps: Props;
25
-  renderConsumeItem(): JSX.Element[];
26
-  renderToggleButton(): JSX.Element | null;
27
-  render(): JSX.Element;
24
+    static defaultProps: Props;
25
+    renderConsumeItem(): JSX.Element[];
26
+    renderToggleButton(): JSX.Element | null;
27
+    render(): JSX.Element;
28 28
 }
29 29
 export { ConsumeListView as default };

+ 130
- 165
lib/ConsumeListView/index.js View File

@@ -1,192 +1,157 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
3
+Object.defineProperty(exports, '__esModule', { value: true });
4 4
 
5
-function _interopDefault(ex) {
6
-  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7
-}
5
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
8 6
 
9
-var inherits = require("../inherits-c86d64c1.js");
10
-var React = require("react");
7
+var inherits = require('../inherits-c86d64c1.js');
8
+var React = require('react');
11 9
 var React__default = _interopDefault(React);
12
-var styleInject_es = require("../style-inject.es-dcee06b6.js");
13
-var defineProperty = require("../defineProperty-ba7cd53d.js");
14
-require("../_commonjsHelpers-72d386ba.js");
15
-var index = require("../index-44e17595.js");
16
-var utils = require("../utils-b800dc99.js");
10
+var styleInject_es = require('../style-inject.es-dcee06b6.js');
11
+var defineProperty = require('../defineProperty-ba7cd53d.js');
12
+require('../_commonjsHelpers-72d386ba.js');
13
+var index = require('../index-44e17595.js');
14
+var utils = require('../utils-b800dc99.js');
17 15
 
18
-var img =
19
-  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAABvklEQVQ4T62UTygEcRTHv29MIsqfk6OL5CYH5aKd9WfjwqxEnBzExYWTCEWJJGove5H8OTA1uwdCrOWAi83ZwUXJiSj5u+Z5s0msmd2SX81h+r33ee/7fW+G8E+H/srhqEcFCjphve1RzcaVK4j3mmoB5YxqQzdOxTji1wE2QZglb2jAEcT7/g4wr0rQugS1OYJ26nOg5nYDr4ZrR7yrl0FBAKBlqjEX3eRLwSXAmidvOJbSI47oF9LVKaCOkNc4/w7kSPOoFBqDwjpp4XA60LUkF8nzbsuERQt4ejtGdsYwiAYTYIV6STOD6UB3EpqXJC0u7zKxz0Mk3Zrj7lOLerJg5T9K+2lWhALiYx8xS9NbDZnUuPXy0wN/hYw3lnbPiNfE7HaSfTAloRqKWkya8WAnMrdmIBqfBqM/BehJAo+gKHMibdMGzUhqKUiZAHGVXJYLwPdpshPnRDRM4fl5+7uKL/0c1WXdOSie5Dh3wZcyoR7SQttO9z+M5MOWEsStFQmsTAoOwVK7qM64d5P6ayKJj9EqHBa5Q4kx2/ujqR1Exnsq493HH2muFN98oNtJ0g7s3Ul5/vwbSab+G+gDqFybE11pYkYAAAAASUVORK5CYII=";
16
+var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAABvklEQVQ4T62UTygEcRTHv29MIsqfk6OL5CYH5aKd9WfjwqxEnBzExYWTCEWJJGove5H8OTA1uwdCrOWAi83ZwUXJiSj5u+Z5s0msmd2SX81h+r33ee/7fW+G8E+H/srhqEcFCjphve1RzcaVK4j3mmoB5YxqQzdOxTji1wE2QZglb2jAEcT7/g4wr0rQugS1OYJ26nOg5nYDr4ZrR7yrl0FBAKBlqjEX3eRLwSXAmidvOJbSI47oF9LVKaCOkNc4/w7kSPOoFBqDwjpp4XA60LUkF8nzbsuERQt4ejtGdsYwiAYTYIV6STOD6UB3EpqXJC0u7zKxz0Mk3Zrj7lOLerJg5T9K+2lWhALiYx8xS9NbDZnUuPXy0wN/hYw3lnbPiNfE7HaSfTAloRqKWkya8WAnMrdmIBqfBqM/BehJAo+gKHMibdMGzUhqKUiZAHGVXJYLwPdpshPnRDRM4fl5+7uKL/0c1WXdOSie5Dh3wZcyoR7SQttO9z+M5MOWEsStFQmsTAoOwVK7qM64d5P6ayKJj9EqHBa5Q4kx2/ujqR1Exnsq493HH2muFN98oNtJ0g7s3Ul5/vwbSab+G+gDqFybE11pYkYAAAAASUVORK5CYII=";
20 17
 
21
-var css =
22
-  ".ConsumeListView_wrapper__wlJjh {\n  display: flex;\n  justify-content: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR {\n  padding: 0;\n  margin: 0;\n  display: flex;\n  flex-wrap: wrap;\n  padding-top: 10px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR li {\n  list-style: none;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ {\n  margin: 0 6px 10px;\n  text-align: center;\n  position: relative;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_kingdomIcon__1nBe5 {\n  position: absolute;\n  width: 24px;\n  height: 22px;\n  left: -6px;\n  top: -12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_avatar__1H-E5 {\n  margin: 0 auto 4px;\n  width: 36px;\n  height: 36px;\n  background-size: cover;\n  border-radius: 50%;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_gray__3do1I {\n  color: #9b9b9b;\n  font-size: 12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC {\n  margin: 0 6px 10px;\n  width: 36px;\n  height: 36px;\n  line-height: 36px;\n  background-color: #ececec;\n  border-radius: 50%;\n  color: #a8adb6;\n  cursor: pointer;\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAACv0lEQVRIS8WXTW8SURSGzzAYNSYCA7SCUEqBioLtohvjD9CN7ozG36AmXfsRafxYN9b+BqNx50r3GjddqEVRRgSRVr4GWmOsERjfOwEzVYa5lAokEwJzznnOe865d+4IxPFRVXVPrVY73Wq1TgmCMIffYbjZ2q4b+E/GfysWi+WZw+F4it+/zMIKvQwAszcajXnYXEIwl1kwdh8JVPC1bLVaF5FE3cjHEFytVs8hyH04jvMAu9gUkexlp9P5uJv/P2DABCi9hbJehUPPinAkpKL8d6H8BpJQ9fbbAjOooigP8H2BIyi3CaAPJUm6qIdvAwN6G0qvcUfswxDK7wB+vePyB9zu6aNdKK9ROioUn+/0XAOz6W02m6kBBolXe1EUxSibdg0MtQn09Sav9yB2UL0A1QmBbQ6VSmWNd50OAu2sc5fL5WVTfAYD9WTQgP34Y9DOClB7D05X+nHcBdslAf19jnKfNAr2cmWVDuzfR7HoFCFTUyaqR8lUhr7/2KITc/Gu9mjrC6a4iLtjRhHfvv9Ea1/L5JLsNBML94Qz6OukTBWlTt5Dbjp2JGgUtsTAW7i713DxqSql0jkqrJfIKdloNhbpCmfQV8k0VZUNOuwZo2gkQFBmFPanKVibRFxpOUefC0VyOmw0E4+QqCt7s8mgH0ipbdKEb5wiIUB7N0UD9yy13l/O5CmbXyfJfpBm49MkihbSoKuA1jdpcsJD4aDfdA5gUDIdrr+jZLIFyuQK5AD8+NEQvXknU63+jUKTPgoGvDxQ1gJtuPpeTkw1U8+mnPU2MuWngN/DBW0bLe14A8mj3x+zX7TS+ryGi6JrMtoGMrItk6VULpcTqPtQHhIQuuB2uxOjfSwy1SM5CHQmYCRHn/azcjSHvQ586Mdb/aIb+oFeD2eHQOxM87j6eoXBBrGMa2evMPoE/sdL22+mI4T0ou1LqAAAAABJRU5ErkJggg==);\n  background-position: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC.ConsumeListView_expand__3l80q {\n  transform: rotate(180deg);\n}\n";
18
+var css = ".ConsumeListView_wrapper__wlJjh {\n  display: flex;\n  justify-content: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR {\n  padding: 0;\n  margin: 0;\n  display: flex;\n  flex-wrap: wrap;\n  padding-top: 10px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR li {\n  list-style: none;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ {\n  margin: 0 6px 10px;\n  text-align: center;\n  position: relative;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_kingdomIcon__1nBe5 {\n  position: absolute;\n  width: 24px;\n  height: 22px;\n  left: -6px;\n  top: -12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_avatar__1H-E5 {\n  margin: 0 auto 4px;\n  width: 36px;\n  height: 36px;\n  background-size: cover;\n  border-radius: 50%;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_consumeItem__1QGpJ .ConsumeListView_gray__3do1I {\n  color: #9b9b9b;\n  font-size: 12px;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC {\n  margin: 0 6px 10px;\n  width: 36px;\n  height: 36px;\n  line-height: 36px;\n  background-color: #ececec;\n  border-radius: 50%;\n  color: #a8adb6;\n  cursor: pointer;\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAACv0lEQVRIS8WXTW8SURSGzzAYNSYCA7SCUEqBioLtohvjD9CN7ozG36AmXfsRafxYN9b+BqNx50r3GjddqEVRRgSRVr4GWmOsERjfOwEzVYa5lAokEwJzznnOe865d+4IxPFRVXVPrVY73Wq1TgmCMIffYbjZ2q4b+E/GfysWi+WZw+F4it+/zMIKvQwAszcajXnYXEIwl1kwdh8JVPC1bLVaF5FE3cjHEFytVs8hyH04jvMAu9gUkexlp9P5uJv/P2DABCi9hbJehUPPinAkpKL8d6H8BpJQ9fbbAjOooigP8H2BIyi3CaAPJUm6qIdvAwN6G0qvcUfswxDK7wB+vePyB9zu6aNdKK9ROioUn+/0XAOz6W02m6kBBolXe1EUxSibdg0MtQn09Sav9yB2UL0A1QmBbQ6VSmWNd50OAu2sc5fL5WVTfAYD9WTQgP34Y9DOClB7D05X+nHcBdslAf19jnKfNAr2cmWVDuzfR7HoFCFTUyaqR8lUhr7/2KITc/Gu9mjrC6a4iLtjRhHfvv9Ea1/L5JLsNBML94Qz6OukTBWlTt5Dbjp2JGgUtsTAW7i713DxqSql0jkqrJfIKdloNhbpCmfQV8k0VZUNOuwZo2gkQFBmFPanKVibRFxpOUefC0VyOmw0E4+QqCt7s8mgH0ipbdKEb5wiIUB7N0UD9yy13l/O5CmbXyfJfpBm49MkihbSoKuA1jdpcsJD4aDfdA5gUDIdrr+jZLIFyuQK5AD8+NEQvXknU63+jUKTPgoGvDxQ1gJtuPpeTkw1U8+mnPU2MuWngN/DBW0bLe14A8mj3x+zX7TS+ryGi6JrMtoGMrItk6VULpcTqPtQHhIQuuB2uxOjfSwy1SM5CHQmYCRHn/azcjSHvQ586Mdb/aIb+oFeD2eHQOxM87j6eoXBBrGMa2evMPoE/sdL22+mI4T0ou1LqAAAAABJRU5ErkJggg==);\n  background-position: center;\n}\n.ConsumeListView_wrapper__wlJjh .ConsumeListView_consumelist__2dMCR .ConsumeListView_toggle__3eBTC.ConsumeListView_expand__3l80q {\n  transform: rotate(180deg);\n}\n";
23 19
 var styles = {
24
-  wrapper: "ConsumeListView_wrapper__wlJjh",
25
-  consumelist: "ConsumeListView_consumelist__2dMCR",
26
-  consumeItem: "ConsumeListView_consumeItem__1QGpJ",
27
-  kingdomIcon: "ConsumeListView_kingdomIcon__1nBe5",
28
-  avatar: "ConsumeListView_avatar__1H-E5",
29
-  gray: "ConsumeListView_gray__3do1I",
30
-  toggle: "ConsumeListView_toggle__3eBTC",
31
-  expand: "ConsumeListView_expand__3l80q"
20
+  "wrapper": "ConsumeListView_wrapper__wlJjh",
21
+  "consumelist": "ConsumeListView_consumelist__2dMCR",
22
+  "consumeItem": "ConsumeListView_consumeItem__1QGpJ",
23
+  "kingdomIcon": "ConsumeListView_kingdomIcon__1nBe5",
24
+  "avatar": "ConsumeListView_avatar__1H-E5",
25
+  "gray": "ConsumeListView_gray__3do1I",
26
+  "toggle": "ConsumeListView_toggle__3eBTC",
27
+  "expand": "ConsumeListView_expand__3l80q"
32 28
 };
33 29
 styleInject_es.styleInject(css);
34 30
 
35
-var DEFAULT_AVATAR =
36
-  "//links-comment.oss-cn-beijing.aliyuncs.com/comment/20180820/Kgka4_oU1.jpeg";
31
+var DEFAULT_AVATAR = '//links-comment.oss-cn-beijing.aliyuncs.com/comment/20180820/Kgka4_oU1.jpeg';
37 32
 
38 33
 var ConsumeListView =
39
-  /*#__PURE__*/
40
-  (function(_Component) {
41
-    inherits._inherits(ConsumeListView, _Component);
34
+/*#__PURE__*/
35
+function (_Component) {
36
+  inherits._inherits(ConsumeListView, _Component);
42 37
 
43
-    function ConsumeListView() {
44
-      inherits._classCallCheck(this, ConsumeListView);
38
+  function ConsumeListView() {
39
+    inherits._classCallCheck(this, ConsumeListView);
45 40
 
46
-      return inherits._possibleConstructorReturn(
47
-        this,
48
-        inherits._getPrototypeOf(ConsumeListView).apply(this, arguments)
49
-      );
50
-    }
41
+    return inherits._possibleConstructorReturn(this, inherits._getPrototypeOf(ConsumeListView).apply(this, arguments));
42
+  }
51 43
 
52
-    inherits._createClass(ConsumeListView, [
53
-      {
54
-        key: "renderConsumeItem",
55
-        value: function renderConsumeItem() {
56
-          var _this$props = this.props,
57
-            dataSource = _this$props.dataSource,
58
-            isToggle = _this$props.isToggle,
59
-            onConsumeItemClick = _this$props.onConsumeItemClick,
60
-            showLength = _this$props.showLength,
61
-            listLength = _this$props.listLength,
62
-            options = _this$props.options;
63
-          var kingdomWidth = options.kingdomWidth,
64
-            kingdomHeight = options.kingdomHeight,
65
-            kingdomPosition = options.kingdomPosition,
66
-            avatarSize = options.avatarSize,
67
-            avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
68
-          var renderData = dataSource;
69
-
70
-          if (!isToggle && listLength > showLength) {
71
-            renderData = dataSource.slice(0, showLength - 1);
72
-          }
44
+  inherits._createClass(ConsumeListView, [{
45
+    key: "renderConsumeItem",
46
+    value: function renderConsumeItem() {
47
+      var _this$props = this.props,
48
+          dataSource = _this$props.dataSource,
49
+          isToggle = _this$props.isToggle,
50
+          onConsumeItemClick = _this$props.onConsumeItemClick,
51
+          showLength = _this$props.showLength,
52
+          listLength = _this$props.listLength,
53
+          options = _this$props.options;
54
+      var kingdomWidth = options.kingdomWidth,
55
+          kingdomHeight = options.kingdomHeight,
56
+          kingdomPosition = options.kingdomPosition,
57
+          avatarSize = options.avatarSize,
58
+          avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
59
+      var renderData = dataSource;
60
+
61
+      if (!isToggle && listLength > showLength) {
62
+        renderData = dataSource.slice(0, showLength - 1);
63
+      }
73 64
 
74
-          return renderData.map(function(v, i) {
75
-            var kingdom = null;
76
-
77
-            if (i === 0) {
78
-              kingdom = React__default.createElement("img", {
79
-                className: styles.kingdomIcon,
80
-                src: img,
81
-                alt: "reward top user",
82
-                style: {
83
-                  width: "".concat(kingdomWidth, "px"),
84
-                  height: "".concat(kingdomHeight, "px"),
85
-                  left: "".concat(kingdomPosition[0], "px"),
86
-                  top: "".concat(kingdomPosition[1], "px")
87
-                }
88
-              });
89
-            }
65
+      return renderData.map(function (v, i) {
66
+        var kingdom = null;
90 67
 
91
-            return React__default.createElement(
92
-              "li",
93
-              {
94
-                key: v.id,
95
-                className: styles.consumeItem,
96
-                style: {
97
-                  margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
98
-                }
99
-              },
100
-              kingdom,
101
-              React__default.createElement("div", {
102
-                className: styles.avatar,
103
-                onClick: function onClick(e) {
104
-                  return onConsumeItemClick(e, v);
105
-                },
106
-                style: {
107
-                  backgroundImage: "url(".concat(
108
-                    utils.addImageProcess(v.user_avatar || DEFAULT_AVATAR, {
109
-                      small: true
110
-                    }),
111
-                    ")"
112
-                  ),
113
-                  width: "".concat(avatarSize, "px"),
114
-                  height: "".concat(avatarSize, "px")
115
-                }
116
-              }),
117
-              React__default.createElement("span", {
118
-                className: styles.gray
119
-              })
120
-            );
68
+        if (i === 0) {
69
+          kingdom = React__default.createElement("img", {
70
+            className: styles.kingdomIcon,
71
+            src: img,
72
+            alt: "reward top user",
73
+            style: {
74
+              width: "".concat(kingdomWidth, "px"),
75
+              height: "".concat(kingdomHeight, "px"),
76
+              left: "".concat(kingdomPosition[0], "px"),
77
+              top: "".concat(kingdomPosition[1], "px")
78
+            }
121 79
           });
122 80
         }
123
-      },
124
-      {
125
-        key: "renderToggleButton",
126
-        value: function renderToggleButton() {
127
-          var _this$props2 = this.props,
128
-            isToggle = _this$props2.isToggle,
129
-            onToggleChange = _this$props2.onToggleChange,
130
-            listLength = _this$props2.listLength,
131
-            showLength = _this$props2.showLength,
132
-            options = _this$props2.options;
133
-          var avatarSize = options.avatarSize,
134
-            avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
135
-
136
-          if (listLength <= showLength) {
137
-            return null;
81
+
82
+        return React__default.createElement("li", {
83
+          key: v.id,
84
+          className: styles.consumeItem,
85
+          style: {
86
+            margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
87
+          }
88
+        }, kingdom, React__default.createElement("div", {
89
+          className: styles.avatar,
90
+          onClick: function onClick(e) {
91
+            return onConsumeItemClick(e, v);
92
+          },
93
+          style: {
94
+            backgroundImage: "url(".concat(utils.addImageProcess(v.user_avatar || DEFAULT_AVATAR, {
95
+              small: true
96
+            }), ")"),
97
+            width: "".concat(avatarSize, "px"),
98
+            height: "".concat(avatarSize, "px")
138 99
           }
100
+        }), React__default.createElement("span", {
101
+          className: styles.gray
102
+        }));
103
+      });
104
+    }
105
+  }, {
106
+    key: "renderToggleButton",
107
+    value: function renderToggleButton() {
108
+      var _this$props2 = this.props,
109
+          isToggle = _this$props2.isToggle,
110
+          onToggleChange = _this$props2.onToggleChange,
111
+          listLength = _this$props2.listLength,
112
+          showLength = _this$props2.showLength,
113
+          options = _this$props2.options;
114
+      var avatarSize = options.avatarSize,
115
+          avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
116
+
117
+      if (listLength <= showLength) {
118
+        return null;
119
+      }
139 120
 
140
-          return React__default.createElement("li", {
141
-            onClick: function onClick() {
142
-              return onToggleChange();
143
-            },
144
-            className: index.classnames(
145
-              styles.toggle,
146
-              defineProperty._defineProperty({}, styles.expand, isToggle)
147
-            ),
148
-            style: {
149
-              width: "".concat(avatarSize, "px"),
150
-              height: "".concat(avatarSize, "px"),
151
-              lineHeight: "".concat(avatarSize, "px"),
152
-              margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
153
-            }
154
-          });
121
+      return React__default.createElement("li", {
122
+        onClick: function onClick() {
123
+          return onToggleChange();
124
+        },
125
+        className: index.classnames(styles.toggle, defineProperty._defineProperty({}, styles.expand, isToggle)),
126
+        style: {
127
+          width: "".concat(avatarSize, "px"),
128
+          height: "".concat(avatarSize, "px"),
129
+          lineHeight: "".concat(avatarSize, "px"),
130
+          margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
155 131
         }
156
-      },
157
-      {
158
-        key: "render",
159
-        value: function render() {
160
-          var _this$props3 = this.props,
161
-            showLength = _this$props3.showLength,
162
-            options = _this$props3.options;
163
-          var avatarSize = options.avatarSize,
164
-            avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
165
-          return React__default.createElement(
166
-            "div",
167
-            {
168
-              className: styles.wrapper
169
-            },
170
-            React__default.createElement(
171
-              "ul",
172
-              {
173
-                className: styles.consumelist,
174
-                style: {
175
-                  width: "calc("
176
-                    .concat(avatarMarginLeftAndRight * 2 + avatarSize, "px * ")
177
-                    .concat(showLength, ")")
178
-                }
179
-              },
180
-              this.renderConsumeItem(),
181
-              this.renderToggleButton()
182
-            )
183
-          );
132
+      });
133
+    }
134
+  }, {
135
+    key: "render",
136
+    value: function render() {
137
+      var _this$props3 = this.props,
138
+          showLength = _this$props3.showLength,
139
+          options = _this$props3.options;
140
+      var avatarSize = options.avatarSize,
141
+          avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
142
+      return React__default.createElement("div", {
143
+        className: styles.wrapper
144
+      }, React__default.createElement("ul", {
145
+        className: styles.consumelist,
146
+        style: {
147
+          width: "calc(".concat(avatarMarginLeftAndRight * 2 + avatarSize, "px * ").concat(showLength, ")")
184 148
         }
185
-      }
186
-    ]);
149
+      }, this.renderConsumeItem(), this.renderToggleButton()));
150
+    }
151
+  }]);
187 152
 
188
-    return ConsumeListView;
189
-  })(React.Component);
153
+  return ConsumeListView;
154
+}(React.Component);
190 155
 
191 156
 ConsumeListView.defaultProps = {
192 157
   isToggle: false,

+ 11
- 9
lib/Editor/index.js View File

@@ -1,14 +1,16 @@
1
-"use strict";
1
+'use strict';
2
+
3
+Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+require('react');
6
+require('react-dom');
7
+require('../style-inject.es-dcee06b6.js');
8
+require('../_commonjsHelpers-72d386ba.js');
9
+require('../slicedToArray-172f4624.js');
10
+var BraftEditor = require('../BraftEditor/index.js');
11
+require('react-dom/server');
2 12
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
4 13
 
5
-require("react");
6
-require("react-dom");
7
-require("../style-inject.es-dcee06b6.js");
8
-require("../_commonjsHelpers-72d386ba.js");
9
-require("../slicedToArray-172f4624.js");
10
-var BraftEditor = require("../BraftEditor/index.js");
11
-require("react-dom/server");
12 14
 
13 15
 exports.BraftEditor = BraftEditor.default;
14 16
 //# sourceMappingURL=index.js.map

+ 5
- 5
lib/Modal/index.d.ts View File

@@ -1,12 +1,12 @@
1 1
 /// <reference types="react" />
2 2
 import React from "react";
3 3
 interface ModalProps {
4
-  visible: boolean;
5
-  onCancel: (e: any) => void;
6
-  container?: HTMLElement | null;
4
+    visible: boolean;
5
+    onCancel: (e: any) => void;
6
+    container?: HTMLElement;
7 7
 }
8 8
 declare class Modal extends React.PureComponent<ModalProps> {
9
-  static hasShowWarning: boolean;
10
-  render(): false | React.ReactPortal | null;
9
+    static hasShowWarning: boolean;
10
+    render(): false | React.ReactPortal | null;
11 11
 }
12 12
 export { Modal as default, Modal, ModalProps };

+ 56
- 84
lib/Modal/index.js View File

@@ -1,111 +1,83 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
3
+Object.defineProperty(exports, '__esModule', { value: true });
4 4
 
5
-function _interopDefault(ex) {
6
-  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7
-}
5
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
8 6
 
9
-var inherits = require("../inherits-c86d64c1.js");
10
-var React = require("react");
7
+var inherits = require('../inherits-c86d64c1.js');
8
+var React = require('react');
11 9
 var React__default = _interopDefault(React);
12
-var reactDom = require("react-dom");
10
+var reactDom = require('react-dom');
13 11
 var reactDom__default = _interopDefault(reactDom);
14
-var styleInject_es = require("../style-inject.es-dcee06b6.js");
12
+var styleInject_es = require('../style-inject.es-dcee06b6.js');
15 13
 
16 14
 function isBrowser() {
17
-  return !(
18
-    (typeof window === "undefined" ? "undefined" : inherits._typeof(window)) ===
19
-    undefined
20
-  );
15
+  return !((typeof window === "undefined" ? "undefined" : inherits._typeof(window)) === undefined);
21 16
 }
22 17
 
23
-var css =
24
-  ".Modal_wrapper__2hzaC {\n  position: fixed;\n  width: 100vw;\n  height: 100vh;\n  top: 0;\n  left: 0;\n  z-index: 1000;\n}\n.Modal_overlay__3iNdm {\n  width: 100vw;\n  height: 100vh;\n  background: #000;\n  animation: Modal_overlayer__1zSH9 0.3s forwards;\n}\n.Modal_container__2veos {\n  position: absolute;\n  top: 20%;\n  left: 50%;\n  animation: Modal_container__2veos 0.3s forwards;\n}\n@keyframes Modal_overlayer__1zSH9 {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 0.3;\n  }\n}\n@keyframes Modal_container__2veos {\n  from {\n    transform: translateX(-50%) scale(0, 0);\n  }\n  to {\n    transform: translateX(-50%) scale(1, 1);\n  }\n}\n";
18
+var css = ".Modal_wrapper__2hzaC {\n  position: fixed;\n  width: 100vw;\n  height: 100vh;\n  top: 0;\n  left: 0;\n  z-index: 1000;\n}\n.Modal_overlay__3iNdm {\n  width: 100vw;\n  height: 100vh;\n  background: #000;\n  animation: Modal_overlayer__1zSH9 0.3s forwards;\n}\n.Modal_container__2veos {\n  position: absolute;\n  top: 20%;\n  left: 50%;\n  animation: Modal_container__2veos 0.3s forwards;\n}\n@keyframes Modal_overlayer__1zSH9 {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 0.3;\n  }\n}\n@keyframes Modal_container__2veos {\n  from {\n    transform: translateX(-50%) scale(0, 0);\n  }\n  to {\n    transform: translateX(-50%) scale(1, 1);\n  }\n}\n";
25 19
 var styles = {
26
-  wrapper: "Modal_wrapper__2hzaC",
27
-  overlay: "Modal_overlay__3iNdm",
28
-  overlayer: "Modal_overlayer__1zSH9",
29
-  container: "Modal_container__2veos"
20
+  "wrapper": "Modal_wrapper__2hzaC",
21
+  "overlay": "Modal_overlay__3iNdm",
22
+  "overlayer": "Modal_overlayer__1zSH9",
23
+  "container": "Modal_container__2veos"
30 24
 };
31 25
 styleInject_es.styleInject(css);
32 26
 
33 27
 var Modal =
34
-  /*#__PURE__*/
35
-  (function(_React$PureComponent) {
36
-    inherits._inherits(Modal, _React$PureComponent);
37
-
38
-    function Modal() {
39
-      inherits._classCallCheck(this, Modal);
28
+/*#__PURE__*/
29
+function (_React$PureComponent) {
30
+  inherits._inherits(Modal, _React$PureComponent);
40 31
 
41
-      return inherits._possibleConstructorReturn(
42
-        this,
43
-        inherits._getPrototypeOf(Modal).apply(this, arguments)
44
-      );
45
-    }
32
+  function Modal() {
33
+    inherits._classCallCheck(this, Modal);
46 34
 
47
-    inherits._createClass(Modal, [
48
-      {
49
-        key: "render",
50
-        value: function render() {
51
-          if (!isBrowser()) return null;
52
-          var DEFAULT_CONTAINER = document.getElementById("container");
53
-          var _this$props = this.props,
54
-            children = _this$props.children,
55
-            visible = _this$props.visible,
56
-            onCancel = _this$props.onCancel,
57
-            _this$props$container = _this$props.container,
58
-            container =
59
-              _this$props$container === void 0
60
-                ? DEFAULT_CONTAINER
61
-                : _this$props$container;
62
-          var finalMountContainer = document.body;
35
+    return inherits._possibleConstructorReturn(this, inherits._getPrototypeOf(Modal).apply(this, arguments));
36
+  }
63 37
 
64
-          if (!container) {
65
-            if (!DEFAULT_CONTAINER) {
66
-              if (!Modal.hasShowWarning) {
67
-                Modal.hasShowWarning = true;
68
-              }
38
+  inherits._createClass(Modal, [{
39
+    key: "render",
40
+    value: function render() {
41
+      if (!isBrowser()) return null;
42
+      var DEFAULT_CONTAINER = document.getElementById("container");
43
+      var _this$props = this.props,
44
+          children = _this$props.children,
45
+          visible = _this$props.visible,
46
+          onCancel = _this$props.onCancel,
47
+          container = _this$props.container;
48
+      var finalMountContainer;
69 49
 
70
-              finalMountContainer = document.body;
71
-            } else {
72
-              if (!Modal.hasShowWarning) {
73
-                Modal.hasShowWarning = true;
74
-              }
50
+      if (!container) {
51
+        if (!DEFAULT_CONTAINER) {
52
+          if (!Modal.hasShowWarning) {
53
+            Modal.hasShowWarning = true;
54
+          }
75 55
 
76
-              finalMountContainer = DEFAULT_CONTAINER;
77
-            }
56
+          finalMountContainer = document.body;
57
+        } else {
58
+          if (!Modal.hasShowWarning) {
59
+            Modal.hasShowWarning = true;
78 60
           }
79 61
 
80
-          return (
81
-            visible &&
82
-            reactDom.createPortal(
83
-              React__default.createElement(
84
-                "div",
85
-                {
86
-                  className: styles.wrapper
87
-                },
88
-                React__default.createElement("div", {
89
-                  className: styles.overlay,
90
-                  onClick: onCancel
91
-                }),
92
-                React__default.createElement(
93
-                  "div",
94
-                  {
95
-                    className: styles.container
96
-                  },
97
-                  children
98
-                )
99
-              ),
100
-              finalMountContainer
101
-            )
102
-          );
62
+          finalMountContainer = DEFAULT_CONTAINER;
103 63
         }
64
+      } else {
65
+        finalMountContainer = container;
104 66
       }
105
-    ]);
106 67
 
107
-    return Modal;
108
-  })(React__default.PureComponent);
68
+      return visible && reactDom.createPortal(React__default.createElement("div", {
69
+        className: styles.wrapper
70
+      }, React__default.createElement("div", {
71
+        className: styles.overlay,
72
+        onClick: onCancel
73
+      }), React__default.createElement("div", {
74
+        className: styles.container
75
+      }, children)), finalMountContainer);
76
+    }
77
+  }]);
78
+
79
+  return Modal;
80
+}(React__default.PureComponent);
109 81
 Modal.hasShowWarning = false;
110 82
 
111 83
 exports.Modal = Modal;

+ 1
- 1
lib/Modal/index.js.map View File

@@ -1 +1 @@
1
-{"version":3,"file":"index.js","sources":["../../src/components/Common/Utils/utils.ts","../../src/components/Common/Modal/index.tsx"],"sourcesContent":["export function isBrowser() {\n  return !(typeof window === undefined);\n}","import React from 'react';\nimport { createPortal } from 'react-dom';\nimport { isBrowser } from '../Utils/utils';\n\nimport styles from './Modal.less';\n\nexport interface ModalProps {\n  visible: boolean\n  onCancel: (e: any) => void\n  container?: HTMLElement | null\n}\n\nexport class Modal extends React.PureComponent<ModalProps> {\n  static hasShowWarning = false;\n\n  render() {\n    if (!isBrowser()) return null; // 服务端无需渲染下列代码,渲染也会出错\n    const DEFAULT_CONTAINER: HTMLElement | null = document.getElementById('container');\n    const { children, visible, onCancel, container = DEFAULT_CONTAINER } = this.props\n    let finalMountContainer: HTMLElement = document.body;\n    if (!container) {\n      if (!DEFAULT_CONTAINER) {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = document.body;\n      } else {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = DEFAULT_CONTAINER;\n      }\n    }\n    return visible && createPortal(\n      <div className={ styles.wrapper }>\n        <div\n          className={ styles.overlay }\n          onClick={ onCancel }\n        />\n        <div\n          className={ styles.container }\n        >\n          { children }\n        </div>\n      </div>,\n      finalMountContainer,\n    )\n  }\n}\n\nexport default Modal;"],"names":["isBrowser","window","undefined","Modal","DEFAULT_CONTAINER","document","getElementById","props","children","visible","onCancel","container","finalMountContainer","body","hasShowWarning","createPortal","React","createElement","className","styles","wrapper","overlay","onClick","PureComponent"],"mappings":";;;;;;;;;;;;;AAAM,SAAUA,SAAV,GAAmB;SAChB,EAAE,QAAOC,wDAAAA,OAAP,MAAkBC,SAApB;;;;;;;;;;;;ICWIC,KAAb;AAAA;AAAA,8BAAA;;;;;;;;;;;6BAGQ;UACA,CAACH,SAAS,IAAI,OAAO,IAAP;UACZI,iBAAiB,GAAuBC,QAAQ,CAACC,cAAT,CAAwB,WAAxB;wBACyB,KAAKC;UAApEC,QAHJ,eAGIA;UAAUC,OAHd,eAGcA;UAASC,QAHvB,eAGuBA;8CAAUC;UAAAA,SAHjC,sCAG6CP;UAC7CQ,mBAAmB,GAAgBP,QAAQ,CAACQ;;UAC5C,CAACF,WAAW;YACV,CAACP,mBAAmB;cAClB,CAACD,KAAK,CAACW,gBAAgB;AACzBX,YAAAA,KAAK,CAACW,cAAN,GAAuB,IAAvB;;;AAEFF,UAAAA,mBAAmB,GAAGP,QAAQ,CAACQ,IAA/B;AAJF,eAKO;cACD,CAACV,KAAK,CAACW,gBAAgB;AACzBX,YAAAA,KAAK,CAACW,cAAN,GAAuB,IAAvB;;;AAEFF,UAAAA,mBAAmB,GAAGR,iBAAtB;;;;aAGGK,OAAO,IAAIM,qBAAY,CAC5BC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAGC,MAAM,CAACC;AAAxB,OAAA,EACEJ,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,QAAAA,SAAS,EAAGC,MAAM,CAACE,OADrB;AAEEC,QAAAA,OAAO,EAAGZ;AAFZ,OAAA,CADF,EAKEM,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,QAAAA,SAAS,EAAGC,MAAM,CAACR;AADrB,OAAA,EAGIH,QAHJ,CALF,CAD4B,EAY5BI,mBAZ4B;;;;;CArBlC,CAA2BI,cAAK,CAACO,aAAjC;AACSpB,KAAA,CAAAW,cAAA,GAAiB,KAAjB;;;;;"}
1
+{"version":3,"file":"index.js","sources":["../../src/components/Common/Utils/utils.ts","../../src/components/Common/Modal/index.tsx"],"sourcesContent":["export function isBrowser() {\n  return !(typeof window === undefined);\n}","import React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { isBrowser } from \"../Utils/utils\";\n\nimport styles from \"./Modal.less\";\n\nexport interface ModalProps {\n  visible: boolean;\n  onCancel: (e: any) => void;\n  container?: HTMLElement;\n}\n\nexport class Modal extends React.PureComponent<ModalProps> {\n  static hasShowWarning = false;\n\n  render() {\n    if (!isBrowser()) return null; // 服务端无需渲染下列代码,渲染也会出错\n    const DEFAULT_CONTAINER: HTMLElement | null = document.getElementById(\n      \"container\"\n    );\n    const { children, visible, onCancel, container } = this.props;\n    let finalMountContainer: HTMLElement;\n    if (!container) {\n      if (!DEFAULT_CONTAINER) {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = document.body;\n      } else {\n        if (!Modal.hasShowWarning) {\n          Modal.hasShowWarning = true;\n        }\n        finalMountContainer = DEFAULT_CONTAINER;\n      }\n    } else {\n      finalMountContainer = container;\n    }\n    return (\n      visible &&\n      createPortal(\n        <div className={styles.wrapper}>\n          <div className={styles.overlay} onClick={onCancel} />\n          <div className={styles.container}>{children}</div>\n        </div>,\n        finalMountContainer\n      )\n    );\n  }\n}\n\nexport default Modal;\n"],"names":["isBrowser","window","undefined","Modal","DEFAULT_CONTAINER","document","getElementById","props","children","visible","onCancel","container","finalMountContainer","hasShowWarning","body","createPortal","React","createElement","className","styles","wrapper","overlay","onClick","PureComponent"],"mappings":";;;;;;;;;;;;;AAAM,SAAUA,SAAV,GAAmB;SAChB,EAAE,QAAOC,wDAAAA,OAAP,MAAkBC,SAApB;;;;;;;;;;;;ICWIC,KAAb;AAAA;AAAA,8BAAA;;;;;;;;;;;6BAGQ;UACA,CAACH,SAAS,IAAI,OAAO,IAAP;UACZI,iBAAiB,GAAuBC,QAAQ,CAACC,cAAT,CAC5C,WAD4C;wBAGK,KAAKC;UAAhDC,QALJ,eAKIA;UAAUC,OALd,eAKcA;UAASC,QALvB,eAKuBA;UAAUC,SALjC,eAKiCA;UACjCC;;UACA,CAACD,WAAW;YACV,CAACP,mBAAmB;cAClB,CAACD,KAAK,CAACU,gBAAgB;AACzBV,YAAAA,KAAK,CAACU,cAAN,GAAuB,IAAvB;;;AAEFD,UAAAA,mBAAmB,GAAGP,QAAQ,CAACS,IAA/B;AAJF,eAKO;cACD,CAACX,KAAK,CAACU,gBAAgB;AACzBV,YAAAA,KAAK,CAACU,cAAN,GAAuB,IAAvB;;;AAEFD,UAAAA,mBAAmB,GAAGR,iBAAtB;;AAVJ,aAYO;AACLQ,QAAAA,mBAAmB,GAAGD,SAAtB;;;aAGAF,OAAO,IACPM,qBAAY,CACVC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAEC,MAAM,CAACC;AAAvB,OAAA,EACEJ,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAEC,MAAM,CAACE,OAAvB;AAAgCC,QAAAA,OAAO,EAAEZ;AAAzC,OAAA,CADF,EAEEM,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,QAAAA,SAAS,EAAEC,MAAM,CAACR;AAAvB,OAAA,EAAmCH,QAAnC,CAFF,CADU,EAKVI,mBALU;;;;;CA3BlB,CAA2BI,cAAK,CAACO,aAAjC;AACSpB,KAAA,CAAAU,cAAA,GAAiB,KAAjB;;;;;"}

+ 18
- 35
lib/PayPlatformOptions/index.d.ts View File

@@ -1,45 +1,28 @@
1 1
 /// <reference types="react" />
2
-type PAY_CHANNEL_VALUE =
3
-  | "PAYPAL_PAYPAL"
4
-  | "ALI_WEB"
5
-  | "ALI_WAP"
6
-  | "WX_WAP"
7
-  | "WX_NATIVE";
2
+type PAY_CHANNEL_VALUE = "PAYPAL_PAYPAL" | "ALI_WEB" | "ALI_WAP" | "WX_WAP" | "WX_NATIVE";
8 3
 type PAY_CHANNEL_CATEGORY_VALUE = "Alipay" | "Wechat" | "Paypal";
9 4
 interface PAY_CHANNEL_TYPE {
10
-  PAYPAL: PAY_CHANNEL_VALUE;
11
-  ALI_WEB: PAY_CHANNEL_VALUE;
12
-  ALI_WAP: PAY_CHANNEL_VALUE;
13
-  WX_WAP: PAY_CHANNEL_VALUE;
14
-  WX_NATIVE: PAY_CHANNEL_VALUE;
5
+    PAYPAL: PAY_CHANNEL_VALUE;
6
+    ALI_WEB: PAY_CHANNEL_VALUE;
7
+    ALI_WAP: PAY_CHANNEL_VALUE;
8
+    WX_WAP: PAY_CHANNEL_VALUE;
9
+    WX_NATIVE: PAY_CHANNEL_VALUE;
15 10
 }
16 11
 interface PAY_CHANNEL_CATEGORY {
17
-  ALI: PAY_CHANNEL_CATEGORY_VALUE;
18
-  WX: PAY_CHANNEL_CATEGORY_VALUE;
19
-  PAYPAL: PAY_CHANNEL_CATEGORY_VALUE;
12
+    ALI: PAY_CHANNEL_CATEGORY_VALUE;
13
+    WX: PAY_CHANNEL_CATEGORY_VALUE;
14
+    PAYPAL: PAY_CHANNEL_CATEGORY_VALUE;
20 15
 }
21 16
 interface Props {
22
-  payChannel: PAY_CHANNEL_VALUE;
23
-  onPayChannelChange: (value: PAY_CHANNEL_VALUE) => void;
24
-  isMobile: boolean;
25
-  size: "small" | "normal" | "large";
26
-  withTitle: boolean;
27
-  titleText?: string;
28
-  locale: "zh" | "en";
17
+    payChannel: PAY_CHANNEL_VALUE;
18
+    onPayChannelChange: (value: PAY_CHANNEL_VALUE) => void;
19
+    isMobile: boolean;
20
+    size: "small" | "normal" | "large";
21
+    withTitle: boolean;
22
+    titleText?: string;
23
+    locale: "zh" | "en";
29 24
 }
30 25
 declare const PAY_CHANNEL: PAY_CHANNEL_TYPE;
31 26
 declare const PAY_CHANNEL_CATEGORY$0: PAY_CHANNEL_CATEGORY;
32
-declare const PayPlatformOptions: ({
33
-  payChannel,
34
-  onPayChannelChange,
35
-  size,
36
-  isMobile,
37
-  withTitle,
38
-  titleText,
39
-  locale
40
-}: Props) => JSX.Element;
41
-export {
42
-  PayPlatformOptions as default,
43
-  PAY_CHANNEL,
44
-  PAY_CHANNEL_CATEGORY$0 as PAY_CHANNEL_CATEGORY
45
-};
27
+declare const PayPlatformOptions: ({ payChannel, onPayChannelChange, size, isMobile, withTitle, titleText, locale }: Props) => JSX.Element;
28
+export { PayPlatformOptions as default, PAY_CHANNEL, PAY_CHANNEL_CATEGORY$0 as PAY_CHANNEL_CATEGORY };

+ 143
- 228
lib/PayPlatformOptions/index.js
File diff suppressed because it is too large
View File


+ 22
- 20
lib/Payment/index.js View File

@@ -1,25 +1,27 @@
1
-"use strict";
1
+'use strict';
2
+
3
+Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+require('../inherits-c86d64c1.js');
6
+require('react');
7
+require('react-dom');
8
+require('../Modal/index.js');
9
+require('../style-inject.es-dcee06b6.js');
10
+require('../defineProperty-ba7cd53d.js');
11
+require('../_commonjsHelpers-72d386ba.js');
12
+require('../index-44e17595.js');
13
+require('../utils-b800dc99.js');
14
+var ConsumeListView = require('../ConsumeListView/index.js');
15
+var PayPlatformOptions = require('../PayPlatformOptions/index.js');
16
+require('../slicedToArray-172f4624.js');
17
+require('antd');
18
+var PriceOptions = require('../PriceOptions/index.js');
19
+var WaitPayInfoView = require('../WaitPayInfoView/index.js');
20
+var AllocWantedModal = require('../AllocWantedModal/index.js');
21
+var WantedPublishView = require('../WantedPublishView/index.js');
22
+var WantedPublishPopover = require('../WantedPublishPopover/index.js');
2 23
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
4 24
 
5
-require("../inherits-c86d64c1.js");
6
-require("react");
7
-require("react-dom");
8
-require("../Modal/index.js");
9
-require("../style-inject.es-dcee06b6.js");
10
-require("../defineProperty-ba7cd53d.js");
11
-require("../_commonjsHelpers-72d386ba.js");
12
-require("../index-44e17595.js");
13
-require("../utils-b800dc99.js");
14
-var ConsumeListView = require("../ConsumeListView/index.js");
15
-var PayPlatformOptions = require("../PayPlatformOptions/index.js");
16
-require("../slicedToArray-172f4624.js");
17
-require("antd");
18
-var PriceOptions = require("../PriceOptions/index.js");
19
-var WaitPayInfoView = require("../WaitPayInfoView/index.js");
20
-var AllocWantedModal = require("../AllocWantedModal/index.js");
21
-var WantedPublishView = require("../WantedPublishView/index.js");
22
-var WantedPublishPopover = require("../WantedPublishPopover/index.js");
23 25
 
24 26
 exports.ConsumeListView = ConsumeListView.default;
25 27
 exports.PayPlatformOptions = PayPlatformOptions.default;

+ 18
- 33
lib/PriceOptions/index.d.ts View File

@@ -1,38 +1,23 @@
1 1
 /// <reference types="react" />
2 2
 import React from "react";
3 3
 interface Props {
4
-  rowMode: "single" | "multi";
5
-  price: number;
6
-  onPriceChange: (v: number) => void;
7
-  size: "small" | "normal" | "large";
8
-  focusScroll: boolean;
9
-  withTitle: boolean;
10
-  titleText?: string | JSX.Element[] | JSX.Element;
11
-  inputPlaceholderText?: string;
12
-  priceOptions?: Array<any>;
13
-  priceRender?: Function;
14
-  inputPriceRender?: Function;
15
-  inputSuffix?: string | JSX.Element[] | JSX.Element;
16
-  injectOptions?: {
17
-    priceBtnClass: (isActive: boolean) => any;
18
-    priceInputClass: Function;
19
-  };
20
-  inputRef: React.RefObject<any>;
4
+    rowMode: "single" | "multi";
5
+    price: number;
6
+    onPriceChange: (v: number) => void;
7
+    size: "small" | "normal" | "large";
8
+    focusScroll: boolean;
9
+    withTitle: boolean;
10
+    titleText?: string | JSX.Element[] | JSX.Element;
11
+    inputPlaceholderText?: string;
12
+    priceOptions?: Array<any>;
13
+    priceRender?: Function;
14
+    inputPriceRender?: Function;
15
+    inputSuffix?: string | JSX.Element[] | JSX.Element;
16
+    injectOptions?: {
17
+        priceBtnClass: (isActive: boolean) => any;
18
+        priceInputClass: Function;
19
+    };
20
+    inputRef: React.RefObject<any>;
21 21
 }
22
-declare const PriceOptions: ({
23
-  price,
24
-  onPriceChange,
25
-  rowMode,
26
-  size,
27
-  focusScroll,
28
-  withTitle,
29
-  titleText,
30
-  inputPlaceholderText,
31
-  priceOptions,
32
-  priceRender,
33
-  inputPriceRender,
34
-  inputSuffix,
35
-  injectOptions,
36
-  inputRef
37
-}: Props) => JSX.Element;
22
+declare const PriceOptions: ({ price, onPriceChange, rowMode, size, focusScroll, withTitle, titleText, inputPlaceholderText, priceOptions, priceRender, inputPriceRender, inputSuffix, injectOptions, inputRef }: Props) => JSX.Element;
38 23
 export { PriceOptions as default };

+ 139
- 201
lib/PriceOptions/index.js View File

@@ -1,32 +1,29 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
3
+Object.defineProperty(exports, '__esModule', { value: true });
4 4
 
5
-function _interopDefault(ex) {
6
-  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7
-}
5
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
8 6
 
9
-var React = require("react");
7
+var React = require('react');
10 8
 var React__default = _interopDefault(React);
11
-var styleInject_es = require("../style-inject.es-dcee06b6.js");
12
-var defineProperty = require("../defineProperty-ba7cd53d.js");
13
-require("../_commonjsHelpers-72d386ba.js");
14
-var index = require("../index-44e17595.js");
15
-var utils = require("../utils-b800dc99.js");
16
-var slicedToArray = require("../slicedToArray-172f4624.js");
17
-var antd = require("antd");
18
-
19
-var css =
20
-  ".PriceOptions_options__ifYbC p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n  margin-bottom: 20px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  background: rgba(243, 243, 243, 0.14);\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n  font-size: 14px;\n  font-weight: 600;\n  color: #616a79;\n  display: inline-block;\n  text-align: center;\n  vertical-align: top;\n  height: 30px;\n  width: 70px;\n  line-height: 30px;\n  cursor: pointer;\n  margin: 6px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background: rgba(255, 50, 102, 0.1);\n  border-radius: 4px;\n  border: 1px solid #ff3266;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  display: inline-block;\n  min-width: 70px;\n  height: 72px;\n  width: auto;\n  margin: 6px;\n  text-align: center;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx button {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  height: 30px;\n  width: 50px;\n  vertical-align: top;\n  padding: 0 5px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 {\n  margin-left: 10px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 i {\n  margin-right: 5px;\n  color: #1790FF;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceBtn__1UaE8 {\n  display: flex;\n  justify-content: space-between;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  display: inline-block;\n  background-color: #fff;\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background-color: #fff;\n  color: #FF3266FF;\n  border: 1px solid #ff3266;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  width: 222px;\n  width: auto;\n}\n";
9
+var styleInject_es = require('../style-inject.es-dcee06b6.js');
10
+var defineProperty = require('../defineProperty-ba7cd53d.js');
11
+require('../_commonjsHelpers-72d386ba.js');
12
+var index = require('../index-44e17595.js');
13
+var utils = require('../utils-b800dc99.js');
14
+var slicedToArray = require('../slicedToArray-172f4624.js');
15
+var antd = require('antd');
16
+
17
+var css = ".PriceOptions_options__ifYbC p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n  margin-bottom: 20px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  background: rgba(243, 243, 243, 0.14);\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n  font-size: 14px;\n  font-weight: 600;\n  color: #616a79;\n  display: inline-block;\n  text-align: center;\n  vertical-align: top;\n  height: 30px;\n  width: 70px;\n  line-height: 30px;\n  cursor: pointer;\n  margin: 6px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background: rgba(255, 50, 102, 0.1);\n  border-radius: 4px;\n  border: 1px solid #ff3266;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  display: inline-block;\n  min-width: 70px;\n  width: auto;\n  margin: 6px;\n  text-align: center;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx button {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  height: 30px;\n  width: 50px;\n  vertical-align: top;\n  padding: 0 5px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 {\n  margin-left: 10px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 i {\n  margin-right: 5px;\n  color: #1790ff;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx {\n  padding-right: 0;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceBtn__1UaE8 {\n  display: flex;\n  justify-content: space-between;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n  display: inline-block;\n  background-color: #fff;\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n  background-color: #fff;\n  color: #ff3266ff;\n  border: 1px solid #ff3266;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n  width: 222px;\n  width: auto;\n}\n";
21 18
 var styles = {
22
-  options: "PriceOptions_options__ifYbC",
23
-  infoItem: "PriceOptions_infoItem__246mx",
24
-  priceItem: "PriceOptions_priceItem__3CPe3",
25
-  active: "PriceOptions_active__154by",
26
-  priceInput: "PriceOptions_priceInput__2JFc0",
27
-  rate: "PriceOptions_rate__17U-9",
28
-  multi: "PriceOptions_multi__2fM8z",
29
-  priceBtn: "PriceOptions_priceBtn__1UaE8"
19
+  "options": "PriceOptions_options__ifYbC",
20
+  "infoItem": "PriceOptions_infoItem__246mx",
21
+  "priceItem": "PriceOptions_priceItem__3CPe3",
22
+  "active": "PriceOptions_active__154by",
23
+  "priceInput": "PriceOptions_priceInput__2JFc0",
24
+  "rate": "PriceOptions_rate__17U-9",
25
+  "multi": "PriceOptions_multi__2fM8z",
26
+  "priceBtn": "PriceOptions_priceBtn__1UaE8"
30 27
 };
31 28
 styleInject_es.styleInject(css);
32 29
 
@@ -35,10 +32,9 @@ function ownKeys(object, enumerableOnly) {
35 32
 
36 33
   if (Object.getOwnPropertySymbols) {
37 34
     var symbols = Object.getOwnPropertySymbols(object);
38
-    if (enumerableOnly)
39
-      symbols = symbols.filter(function(sym) {
40
-        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
41
-      });
35
+    if (enumerableOnly) symbols = symbols.filter(function (sym) {
36
+      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
37
+    });
42 38
     keys.push.apply(keys, symbols);
43 39
   }
44 40
 
@@ -50,18 +46,14 @@ function _objectSpread(target) {
50 46
     var source = arguments[i] != null ? arguments[i] : {};
51 47
 
52 48
     if (i % 2) {
53
-      ownKeys(Object(source), true).forEach(function(key) {
49
+      ownKeys(Object(source), true).forEach(function (key) {
54 50
         defineProperty._defineProperty(target, key, source[key]);
55 51
       });
56 52
     } else if (Object.getOwnPropertyDescriptors) {
57 53
       Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
58 54
     } else {
59
-      ownKeys(Object(source)).forEach(function(key) {
60
-        Object.defineProperty(
61
-          target,
62
-          key,
63
-          Object.getOwnPropertyDescriptor(source, key)
64
-        );
55
+      ownKeys(Object(source)).forEach(function (key) {
56
+        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
65 57
       });
66 58
     }
67 59
   }
@@ -71,176 +63,122 @@ function _objectSpread(target) {
71 63
 
72 64
 var PriceOptions = function PriceOptions(_ref) {
73 65
   var price = _ref.price,
74
-    onPriceChange = _ref.onPriceChange,
75
-    _ref$rowMode = _ref.rowMode,
76
-    rowMode = _ref$rowMode === void 0 ? "single" : _ref$rowMode,
77
-    _ref$size = _ref.size,
78
-    size = _ref$size === void 0 ? "normal" : _ref$size,
79
-    _ref$focusScroll = _ref.focusScroll,
80
-    focusScroll = _ref$focusScroll === void 0 ? true : _ref$focusScroll,
81
-    _ref$withTitle = _ref.withTitle,
82
-    withTitle = _ref$withTitle === void 0 ? true : _ref$withTitle,
83
-    _ref$titleText = _ref.titleText,
84
-    titleText = _ref$titleText === void 0 ? "Price" : _ref$titleText,
85
-    _ref$inputPlaceholder = _ref.inputPlaceholderText,
86
-    inputPlaceholderText =
87
-      _ref$inputPlaceholder === void 0 ? "Others" : _ref$inputPlaceholder,
88
-    _ref$priceOptions = _ref.priceOptions,
89
-    priceOptions =
90
-      _ref$priceOptions === void 0 ? [100, 600, 800] : _ref$priceOptions,
91
-    _ref$priceRender = _ref.priceRender,
92
-    priceRender =
93
-      _ref$priceRender === void 0
94
-        ? function(i) {
95
-            return i / 100;
96
-          }
97
-        : _ref$priceRender,
98
-    _ref$inputPriceRender = _ref.inputPriceRender,
99
-    inputPriceRender =
100
-      _ref$inputPriceRender === void 0
101
-        ? function(i) {
102
-            return i ? i / 100 : "";
103
-          }
104
-        : _ref$inputPriceRender,
105
-    _ref$inputSuffix = _ref.inputSuffix,
106
-    inputSuffix = _ref$inputSuffix === void 0 ? "¥" : _ref$inputSuffix,
107
-    _ref$injectOptions = _ref.injectOptions,
108
-    injectOptions =
109
-      _ref$injectOptions === void 0
110
-        ? {
111
-            priceBtnClass: function priceBtnClass() {
112
-              return undefined;
113
-            },
114
-            priceInputClass: function priceInputClass() {
115
-              return undefined;
116
-            }
117
-          }
118
-        : _ref$injectOptions,
119
-    inputRef = _ref.inputRef;
66
+      onPriceChange = _ref.onPriceChange,
67
+      _ref$rowMode = _ref.rowMode,
68
+      rowMode = _ref$rowMode === void 0 ? "single" : _ref$rowMode,
69
+      _ref$size = _ref.size,
70
+      size = _ref$size === void 0 ? "normal" : _ref$size,
71
+      _ref$focusScroll = _ref.focusScroll,
72
+      focusScroll = _ref$focusScroll === void 0 ? true : _ref$focusScroll,
73
+      _ref$withTitle = _ref.withTitle,
74
+      withTitle = _ref$withTitle === void 0 ? true : _ref$withTitle,
75
+      _ref$titleText = _ref.titleText,
76
+      titleText = _ref$titleText === void 0 ? "Price" : _ref$titleText,
77
+      _ref$inputPlaceholder = _ref.inputPlaceholderText,
78
+      inputPlaceholderText = _ref$inputPlaceholder === void 0 ? "Others" : _ref$inputPlaceholder,
79
+      _ref$priceOptions = _ref.priceOptions,
80
+      priceOptions = _ref$priceOptions === void 0 ? [100, 600, 800] : _ref$priceOptions,
81
+      _ref$priceRender = _ref.priceRender,
82
+      priceRender = _ref$priceRender === void 0 ? function (i) {
83
+    return i / 100;
84
+  } : _ref$priceRender,
85
+      _ref$inputPriceRender = _ref.inputPriceRender,
86
+      inputPriceRender = _ref$inputPriceRender === void 0 ? function (i) {
87
+    return i ? i / 100 : "";
88
+  } : _ref$inputPriceRender,
89
+      _ref$inputSuffix = _ref.inputSuffix,
90
+      inputSuffix = _ref$inputSuffix === void 0 ? "¥" : _ref$inputSuffix,
91
+      _ref$injectOptions = _ref.injectOptions,
92
+      injectOptions = _ref$injectOptions === void 0 ? {
93
+    priceBtnClass: function priceBtnClass() {
94
+      return undefined;
95
+    },
96
+    priceInputClass: function priceInputClass() {
97
+      return undefined;
98
+    }
99
+  } : _ref$injectOptions,
100
+      inputRef = _ref.inputRef;
120 101
   var defaultOptions = priceOptions;
121 102
 
122 103
   var _useState = React.useState(false),
123
-    _useState2 = slicedToArray._slicedToArray(_useState, 2),
124
-    inputStatus = _useState2[0],
125
-    setInputStatus = _useState2[1];
126
-
127
-  var _useState3 = React.useState(""),
128
-    _useState4 = slicedToArray._slicedToArray(_useState3, 2),
129
-    inputPrice = _useState4[0],
130
-    setInputPrice = _useState4[1];
131
-
132
-  return React__default.createElement(
133
-    "div",
134
-    {
135
-      className: index.classnames(
136
-        styles.options,
137
-        _objectSpread(
138
-          defineProperty._defineProperty({}, styles.multi, rowMode === "multi"),
139
-          utils.exportStyleSizeClass(styles, size)
140
-        )
141
-      )
104
+      _useState2 = slicedToArray._slicedToArray(_useState, 2),
105
+      inputStatus = _useState2[0],
106
+      setInputStatus = _useState2[1];
107
+
108
+  var _useState3 = React.useState(''),
109
+      _useState4 = slicedToArray._slicedToArray(_useState3, 2),
110
+      inputPrice = _useState4[0],
111
+      setInputPrice = _useState4[1];
112
+
113
+  return React__default.createElement("div", {
114
+    className: index.classnames(styles.options, _objectSpread(defineProperty._defineProperty({}, styles.multi, rowMode === "multi"), utils.exportStyleSizeClass(styles, size)))
115
+  }, withTitle ? titleText || null : null, React__default.createElement("div", {
116
+    className: styles.infoItem
117
+  }, React__default.createElement("span", {
118
+    className: styles.priceBtn
119
+  }, defaultOptions.map(function (item) {
120
+    var _objectSpread3;
121
+
122
+    return React__default.createElement("span", {
123
+      className: index.classnames(_objectSpread((_objectSpread3 = {}, defineProperty._defineProperty(_objectSpread3, styles.priceItem, true), defineProperty._defineProperty(_objectSpread3, styles.active, price === item && !inputStatus), _objectSpread3), injectOptions.priceBtnClass(price === item && !inputStatus))),
124
+      key: item,
125
+      onClick: function onClick() {
126
+        onPriceChange(item);
127
+        setInputStatus(false);
128
+      }
129
+    }, priceRender(item));
130
+  })), React__default.createElement(antd.Input, {
131
+    ref: inputRef,
132
+    className: index.classnames(styles.priceInput, _objectSpread({}, injectOptions.priceInputClass())),
133
+    onMouseEnter: function onMouseEnter() {
134
+      if (inputStatus && inputRef && inputRef.current) {
135
+        inputRef.current.focus();
136
+        inputRef.current.select();
137
+      }
142 138
     },
143
-    withTitle ? titleText || null : null,
144
-    React__default.createElement(
145
-      "div",
146
-      {
147
-        className: styles.infoItem
148
-      },
149
-      React__default.createElement(
150
-        "span",
151
-        {
152
-          className: styles.priceBtn
153
-        },
154
-        defaultOptions.map(function(item) {
155
-          var _objectSpread3;
156
-
157
-          return React__default.createElement(
158
-            "span",
159
-            {
160
-              className: index.classnames(
161
-                _objectSpread(
162
-                  ((_objectSpread3 = {}),
163
-                  defineProperty._defineProperty(
164
-                    _objectSpread3,
165
-                    styles.priceItem,
166
-                    true
167
-                  ),
168
-                  defineProperty._defineProperty(
169
-                    _objectSpread3,
170
-                    styles.active,
171
-                    price === item && !inputStatus
172
-                  ),
173
-                  _objectSpread3),
174
-                  injectOptions.priceBtnClass(price === item && !inputStatus)
175
-                )
176
-              ),
177
-              key: item,
178
-              onClick: function onClick() {
179
-                onPriceChange(item);
180
-                setInputStatus(false);
181
-              }
182
-            },
183
-            priceRender(item)
184
-          );
185
-        })
186
-      ),
187
-      React__default.createElement(antd.Input, {
188
-        ref: inputRef,
189
-        className: index.classnames(
190
-          styles.priceInput,
191
-          _objectSpread({}, injectOptions.priceInputClass())
192
-        ),
193
-        onMouseEnter: function onMouseEnter() {
194
-          if (inputStatus && inputRef && inputRef.current) {
195
-            inputRef.current.focus();
196
-            inputRef.current.select();
197
-          }
198
-        },
199
-        suffix: inputSuffix,
200
-        value: inputStatus ? inputPriceRender(inputPrice) : "",
201
-        placeholder: inputPlaceholderText,
202
-        onChange: function onChange(e) {
203
-          var n = +e.target.value;
204
-
205
-          if (Number.isNaN(n)) {
206
-            return;
207
-          }
208
-
209
-          setInputPrice("".concat(n * 100));
210
-          onPriceChange(n * 100);
211
-        },
212
-        onClick: function onClick(e) {
213
-          if (!inputStatus) {
214
-            setInputPrice("");
215
-            setInputStatus(true);
216
-          }
217
-        },
218
-        onFocus: function onFocus(e) {
219
-          e.target.placeholder = "";
220
-
221
-          if (inputStatus) {
222
-            setInputPrice("".concat(price));
223
-          } else {
224
-            setInputPrice("");
225
-            setInputStatus(true);
226
-          }
227
-
228
-          if (focusScroll) {
229
-            e.target.scrollIntoView();
230
-          }
231
-        },
232
-        onBlur: function onBlur(e) {
233
-          e.target.placeholder = inputPlaceholderText;
234
-
235
-          if (inputPrice) {
236
-            setInputStatus(true);
237
-          } else {
238
-            setInputStatus(false);
239
-          }
240
-        }
241
-      })
242
-    )
243
-  );
139
+    suffix: inputSuffix,
140
+    value: inputStatus ? inputPriceRender(inputPrice) : "",
141
+    placeholder: inputPlaceholderText,
142
+    onChange: function onChange(e) {
143
+      var n = +e.target.value;
144
+
145
+      if (Number.isNaN(n)) {
146
+        return;
147
+      }
148
+
149
+      setInputPrice("".concat(n * 100));
150
+      onPriceChange(n * 100);
151
+    },
152
+    onClick: function onClick(e) {
153
+      if (!inputStatus) {
154
+        setInputPrice('');
155
+        setInputStatus(true);
156
+      }
157
+    },
158
+    onFocus: function onFocus(e) {
159
+      e.target.placeholder = "";
160
+
161
+      if (inputStatus) {
162
+        setInputPrice("".concat(price));
163
+      } else {
164
+        setInputPrice('');
165
+        setInputStatus(true);
166
+      }
167
+
168
+      if (focusScroll) {
169
+        e.target.scrollIntoView();
170
+      }
171
+    },
172
+    onBlur: function onBlur(e) {
173
+      e.target.placeholder = inputPlaceholderText;
174
+
175
+      if (inputPrice) {
176
+        setInputStatus(true);
177
+      } else {
178
+        setInputStatus(false);
179
+      }
180
+    }
181
+  })));
244 182
 };
245 183
 
246 184
 exports.default = PriceOptions;

+ 8
- 8
lib/WaitPayInfoView/index.d.ts View File

@@ -1,14 +1,14 @@
1 1
 /// <reference types="react" />
2
-import { Component } from "react";
2
+import { Component } from 'react';
3 3
 interface Props {
4
-  onClickPayed?: Function;
5
-  onClickProblem?: Function;
4
+    onClickPayed?: Function;
5
+    onClickProblem?: Function;
6 6
 }
7 7
 declare class WaitPayInfoView extends Component<Props, {}> {
8
-  static defaultProps: {
9
-    onClickPayed: () => void;
10
-    onClickProblem: () => void;
11
-  };
12
-  render(): JSX.Element;
8
+    static defaultProps: {
9
+        onClickPayed: () => void;
10
+        onClickProblem: () => void;
11
+    };
12
+    render(): JSX.Element;
13 13
 }
14 14
 export { WaitPayInfoView as default, WaitPayInfoView };

+ 56
- 107
lib/WaitPayInfoView/index.js View File

@@ -1,132 +1,81 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
3
+Object.defineProperty(exports, '__esModule', { value: true });
4 4
 
5
-function _interopDefault(ex) {
6
-  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7
-}
5
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
8 6
 
9
-var inherits = require("../inherits-c86d64c1.js");
10
-var React = require("react");
7
+var inherits = require('../inherits-c86d64c1.js');
8
+var React = require('react');
11 9
 var React__default = _interopDefault(React);
12
-var styleInject_es = require("../style-inject.es-dcee06b6.js");
13
-require("../_commonjsHelpers-72d386ba.js");
14
-var index = require("../index-44e17595.js");
10
+var styleInject_es = require('../style-inject.es-dcee06b6.js');
11
+require('../_commonjsHelpers-72d386ba.js');
12
+var index = require('../index-44e17595.js');
15 13
 
16
-var css =
17
-  ".WaitPayInfoView_waitingContainer__3pU2F {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n}\n";
14
+var css = ".WaitPayInfoView_waitingContainer__3pU2F {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n}\n";
18 15
 var styles = {
19
-  waitingContainer: "WaitPayInfoView_waitingContainer__3pU2F"
16
+  "waitingContainer": "WaitPayInfoView_waitingContainer__3pU2F"
20 17
 };
21 18
 styleInject_es.styleInject(css);
22 19
 
23
-var img =
24
-  "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='48px' height='43px' viewBox='0 0 48 43' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3c!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch --%3e %3ctitle%3ekcxq_popovers_icon_tanhao%3c/title%3e %3cdesc%3eCreated with Sketch.%3c/desc%3e %3cdefs%3e%3c/defs%3e %3cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e %3cg id='%e5%8f%a6%e5%ae%a2%e7%bd%91_%e7%9b%b4%e6%92%ad%e8%af%be_%e8%af%be%e7%a8%8b%e4%bb%8b%e7%bb%8d%e8%af%a6%e6%83%85_%e8%b4%ad%e4%b9%b0%e6%8f%90%e7%a4%ba%e5%bc%b9%e7%aa%97' transform='translate(-936.000000%2c -190.000000)' fill-rule='nonzero'%3e %3cg id='Group-22' transform='translate(690.000000%2c 110.000000)'%3e %3cg id='kcxq_popovers_icon_tanhao' transform='translate(246.000000%2c 80.000000)'%3e %3cpath d='M48%2c21.5 C48%2c33.3736626 38.3645756%2c43 26.4797048%2c43 C21.1306273%2c43 17.0391144%2c42.1506173 13.2841328%2c38.9300412 C11.8140221%2c37.6736626 1.700369%2c43.2123457 0.177121771%2c39.2839506 C-1.06273063%2c36.0987654 5.95129151%2c29.2506173 5.31365314%2c27.0740741 C4.76457565%2c25.1806584 4.95940959%2c23.5703704 4.95940959%2c21.5 C4.95940959%2c9.62633745 14.5948339%2c0 26.4797048%2c0 C38.3645756%2c0 48%2c9.62633745 48%2c21.5 Z' id='Shape' fill='%231790FF'%3e%3c/path%3e %3cg id='Group' transform='translate(23.848708%2c 8.193416)' fill='white'%3e %3cpath d='M2.5%2c27.4971098 C1.13235294%2c27.4971098 0%2c26.3794628 0%2c24.9971098 C0%2c23.6147569 1.13235294%2c22.4971098 2.5%2c22.4971098 C3.86764706%2c22.4971098 5%2c23.6147569 5%2c24.9971098 C5%2c26.3794628 3.86764706%2c27.4971098 2.5%2c27.4971098 Z M2.5%2c19.4219653 C1.13235294%2c19.4219653 0%2c18.1919075 0%2c16.6705202 L0%2c2.75144509 C0%2c1.24624277 1.13235294%2c0 2.5%2c0 C3.86764706%2c0 5%2c1.2300578 5%2c2.75144509 L5%2c16.6705202 C5%2c18.1919075 3.86764706%2c19.4219653 2.5%2c19.4219653 Z' id='Shape'%3e%3c/path%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
20
+var img = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='UTF-8'%3f%3e%3csvg width='48px' height='43px' viewBox='0 0 48 43' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e %3c!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch --%3e %3ctitle%3ekcxq_popovers_icon_tanhao%3c/title%3e %3cdesc%3eCreated with Sketch.%3c/desc%3e %3cdefs%3e%3c/defs%3e %3cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e %3cg id='%e5%8f%a6%e5%ae%a2%e7%bd%91_%e7%9b%b4%e6%92%ad%e8%af%be_%e8%af%be%e7%a8%8b%e4%bb%8b%e7%bb%8d%e8%af%a6%e6%83%85_%e8%b4%ad%e4%b9%b0%e6%8f%90%e7%a4%ba%e5%bc%b9%e7%aa%97' transform='translate(-936.000000%2c -190.000000)' fill-rule='nonzero'%3e %3cg id='Group-22' transform='translate(690.000000%2c 110.000000)'%3e %3cg id='kcxq_popovers_icon_tanhao' transform='translate(246.000000%2c 80.000000)'%3e %3cpath d='M48%2c21.5 C48%2c33.3736626 38.3645756%2c43 26.4797048%2c43 C21.1306273%2c43 17.0391144%2c42.1506173 13.2841328%2c38.9300412 C11.8140221%2c37.6736626 1.700369%2c43.2123457 0.177121771%2c39.2839506 C-1.06273063%2c36.0987654 5.95129151%2c29.2506173 5.31365314%2c27.0740741 C4.76457565%2c25.1806584 4.95940959%2c23.5703704 4.95940959%2c21.5 C4.95940959%2c9.62633745 14.5948339%2c0 26.4797048%2c0 C38.3645756%2c0 48%2c9.62633745 48%2c21.5 Z' id='Shape' fill='%231790FF'%3e%3c/path%3e %3cg id='Group' transform='translate(23.848708%2c 8.193416)' fill='white'%3e %3cpath d='M2.5%2c27.4971098 C1.13235294%2c27.4971098 0%2c26.3794628 0%2c24.9971098 C0%2c23.6147569 1.13235294%2c22.4971098 2.5%2c22.4971098 C3.86764706%2c22.4971098 5%2c23.6147569 5%2c24.9971098 C5%2c26.3794628 3.86764706%2c27.4971098 2.5%2c27.4971098 Z M2.5%2c19.4219653 C1.13235294%2c19.4219653 0%2c18.1919075 0%2c16.6705202 L0%2c2.75144509 C0%2c1.24624277 1.13235294%2c0 2.5%2c0 C3.86764706%2c0 5%2c1.2300578 5%2c2.75144509 L5%2c16.6705202 C5%2c18.1919075 3.86764706%2c19.4219653 2.5%2c19.4219653 Z' id='Shape'%3e%3c/path%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
25 21
 
26 22
 var Button = function Button() {
27
-  for (
28
-    var _len = arguments.length, props = new Array(_len), _key = 0;
29
-    _key < _len;
30
-    _key++
31
-  ) {
23
+  for (var _len = arguments.length, props = new Array(_len), _key = 0; _key < _len; _key++) {
32 24
     props[_key] = arguments[_key];
33 25
   }
34 26
 
35
-  return React__default.createElement(
36
-    "button",
37
-    Object.assign({}, props),
38
-    "button"
39
-  );
27
+  return React__default.createElement("button", Object.assign({}, props), "button");
40 28
 };
41 29
 
42 30
 var WaitPayInfoView =
43
-  /*#__PURE__*/
44
-  (function(_Component) {
45
-    inherits._inherits(WaitPayInfoView, _Component);
31
+/*#__PURE__*/
32
+function (_Component) {
33
+  inherits._inherits(WaitPayInfoView, _Component);
46 34
 
47
-    function WaitPayInfoView() {
48
-      inherits._classCallCheck(this, WaitPayInfoView);
35
+  function WaitPayInfoView() {
36
+    inherits._classCallCheck(this, WaitPayInfoView);
49 37
 
50
-      return inherits._possibleConstructorReturn(
51
-        this,
52
-        inherits._getPrototypeOf(WaitPayInfoView).apply(this, arguments)
53
-      );
54
-    }
38
+    return inherits._possibleConstructorReturn(this, inherits._getPrototypeOf(WaitPayInfoView).apply(this, arguments));
39
+  }
55 40
 
56
-    inherits._createClass(WaitPayInfoView, [
57
-      {
58
-        key: "render",
59
-        value: function render() {
60
-          var _this$props = this.props,
61
-            onClickPayed = _this$props.onClickPayed,
62
-            onClickProblem = _this$props.onClickProblem;
63
-          return React__default.createElement(
64
-            "div",
65
-            {
66
-              className: styles.waitingContainer
67
-            },
68
-            React__default.createElement(
69
-              "div",
70
-              {
71
-                className: styles.infoIconImgContainer
72
-              },
73
-              React__default.createElement("img", {
74
-                src: img,
75
-                alt: "info label icon"
76
-              })
77
-            ),
78
-            React__default.createElement(
79
-              "div",
80
-              null,
81
-              React__default.createElement(
82
-                "div",
83
-                {
84
-                  className: styles.pay_text
85
-                },
86
-                "live.course_info.pay.notification"
87
-              ),
88
-              React__default.createElement(
89
-                "div",
90
-                {
91
-                  className: styles.btn_row
92
-                },
93
-                React__default.createElement(
94
-                  Button,
95
-                  {
96
-                    className: index.classnames(
97
-                      styles.pay_btn,
98
-                      styles.btn_default
99
-                    ),
100
-                    size: "small",
101
-                    onClick: function onClick() {
102
-                      onClickPayed && onClickPayed();
103
-                    }
104
-                  },
105
-                  "live.course_info.pay.payed"
106
-                ),
107
-                React__default.createElement(
108
-                  Button,
109
-                  {
110
-                    className: styles.btn_default,
111
-                    size: "small",
112
-                    style: {
113
-                      marginLeft: "16px"
114
-                    },
115
-                    onClick: function onClick() {
116
-                      onClickProblem && onClickProblem();
117
-                    }
118
-                  },
119
-                  "live.course_info.pay.help"
120
-                )
121
-              )
122
-            )
123
-          );
41
+  inherits._createClass(WaitPayInfoView, [{
42
+    key: "render",
43
+    value: function render() {
44
+      var _this$props = this.props,
45
+          onClickPayed = _this$props.onClickPayed,
46
+          onClickProblem = _this$props.onClickProblem;
47
+      return React__default.createElement("div", {
48
+        className: styles.waitingContainer
49
+      }, React__default.createElement("div", {
50
+        className: styles.infoIconImgContainer
51
+      }, React__default.createElement("img", {
52
+        src: img,
53
+        alt: "info label icon"
54
+      })), React__default.createElement("div", null, React__default.createElement("div", {
55
+        className: styles.pay_text
56
+      }, "live.course_info.pay.notification"), React__default.createElement("div", {
57
+        className: styles.btn_row
58
+      }, React__default.createElement(Button, {
59
+        className: index.classnames(styles.pay_btn, styles.btn_default),
60
+        size: "small",
61
+        onClick: function onClick() {
62
+          onClickPayed && onClickPayed();
124 63
         }
125
-      }
126
-    ]);
64
+      }, "live.course_info.pay.payed"), React__default.createElement(Button, {
65
+        className: styles.btn_default,
66
+        size: "small",
67
+        style: {
68
+          marginLeft: '16px'
69
+        },
70
+        onClick: function onClick() {
71
+          onClickProblem && onClickProblem();
72
+        }
73
+      }, "live.course_info.pay.help"))));
74
+    }
75
+  }]);
127 76
 
128
-    return WaitPayInfoView;
129
-  })(React.Component);
77
+  return WaitPayInfoView;
78
+}(React.Component);
130 79
 WaitPayInfoView.defaultProps = {
131 80
   onClickPayed: function onClickPayed() {
132 81
     console.log("onClickPayed");

+ 12
- 18
lib/WantedPublishModal/index.d.ts View File

@@ -2,26 +2,20 @@
2 2
 import { Component } from "react";
3 3
 import { ModalProps } from "../Modal/index";
4 4
 interface WantedPublishModalProps {
5
-  modalConfig?: ModalProps;
6
-  handleConfirm?: Function;
5
+    modalConfig?: ModalProps;
6
+    handleConfirm?: Function;
7 7
 }
8 8
 interface WantedPublishModalState {
9
-  modalVisible: boolean;
10
-  current_wanted: number | string | null;
9
+    modalVisible: boolean;
10
+    current_wanted: number | string | null;
11 11
 }
12
-declare class WantedPublishModal extends Component<
13
-  WantedPublishModalProps,
14
-  WantedPublishModalState
15
-> {
16
-  constructor(props: WantedPublishModalProps);
17
-  handleModalShow: () => void;
18
-  handleClose: () => void;
19
-  handleUpdateCurrentWanted: (
20
-    value: string | number | null,
21
-    afterUpdate?: Function | undefined
22
-  ) => void;
23
-  clearCurrentWanted: (cb: Function) => void;
24
-  renderMain(): JSX.Element;
25
-  render(): JSX.Element;
12
+declare class WantedPublishModal extends Component<WantedPublishModalProps, WantedPublishModalState> {
13
+    constructor(props: WantedPublishModalProps);
14
+    handleModalShow: () => void;
15
+    handleClose: () => void;
16
+    handleUpdateCurrentWanted: (value: string | number | null, afterUpdate?: Function | undefined) => void;
17
+    clearCurrentWanted: (cb: Function) => void;
18
+    renderMain(): JSX.Element;
19
+    render(): JSX.Element;
26 20
 }
27 21
 export { WantedPublishModal as default, WantedPublishModal };

+ 109
- 139
lib/WantedPublishModal/index.js View File

@@ -1,166 +1,136 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
3
+Object.defineProperty(exports, '__esModule', { value: true });
4 4
 
5
-function _interopDefault(ex) {
6
-  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7
-}
5
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
8 6
 
9
-var inherits = require("../inherits-c86d64c1.js");
10
-var React = require("react");
7
+var inherits = require('../inherits-c86d64c1.js');
8
+var React = require('react');
11 9
 var React__default = _interopDefault(React);
12
-require("react-dom");
13
-var Modal = require("../Modal/index.js");
14
-var styleInject_es = require("../style-inject.es-dcee06b6.js");
15
-require("../defineProperty-ba7cd53d.js");
16
-require("../_commonjsHelpers-72d386ba.js");
17
-require("../index-44e17595.js");
18
-require("antd");
19
-var WantedPublishView = require("../WantedPublishView/index.js");
20
-
21
-var css =
22
-  ".WantedPublishModal_modalBg__3OlNh {\n  background: white;\n  display: flex;\n  justify-content: center;\n  flex-direction: column;\n  align-items: center;\n  padding: 16px;\n  text-align: center;\n  border-radius: 4px;\n}\n";
10
+require('react-dom');
11
+var Modal = require('../Modal/index.js');
12
+var styleInject_es = require('../style-inject.es-dcee06b6.js');
13
+require('../defineProperty-ba7cd53d.js');
14
+require('../_commonjsHelpers-72d386ba.js');
15
+require('../index-44e17595.js');
16
+require('antd');
17
+var WantedPublishView = require('../WantedPublishView/index.js');
18
+
19
+var css = ".WantedPublishModal_modalBg__3OlNh {\n  background: white;\n  display: flex;\n  justify-content: center;\n  flex-direction: column;\n  align-items: center;\n  padding: 16px;\n  text-align: center;\n  border-radius: 4px;\n}\n";
23 20
 var styles = {
24
-  modalBg: "WantedPublishModal_modalBg__3OlNh"
21
+  "modalBg": "WantedPublishModal_modalBg__3OlNh"
25 22
 };
26 23
 styleInject_es.styleInject(css);
27 24
 
28 25
 var WantedPublishModal =
29
-  /*#__PURE__*/
30
-  (function(_Component) {
31
-    inherits._inherits(WantedPublishModal, _Component);
26
+/*#__PURE__*/
27
+function (_Component) {
28
+  inherits._inherits(WantedPublishModal, _Component);
32 29
 
33
-    function WantedPublishModal(props) {
34
-      var _this;
30
+  function WantedPublishModal(props) {
31
+    var _this;
35 32
 
36
-      inherits._classCallCheck(this, WantedPublishModal);
33
+    inherits._classCallCheck(this, WantedPublishModal);
37 34
 
38
-      _this = inherits._possibleConstructorReturn(
39
-        this,
40
-        inherits._getPrototypeOf(WantedPublishModal).call(this, props)
41
-      );
35
+    _this = inherits._possibleConstructorReturn(this, inherits._getPrototypeOf(WantedPublishModal).call(this, props));
42 36
 
43
-      _this.handleModalShow = function() {};
37
+    _this.handleModalShow = function () {};
44 38
 
45
-      _this.handleClose = function() {
46
-        var handleConfirm = _this.props.handleConfirm;
39
+    _this.handleClose = function () {
40
+      var handleConfirm = _this.props.handleConfirm;
47 41
 
48
-        if (handleConfirm) {
49
-          _this.handleUpdateCurrentWanted(_this.state.current_wanted, function(
50
-            value
51
-          ) {
52
-            handleConfirm(Number(value).toFixed(2));
53
-          });
54
-        }
55
-
56
-        _this.setState({
57
-          modalVisible: false
42
+      if (handleConfirm) {
43
+        _this.handleUpdateCurrentWanted(_this.state.current_wanted, function (value) {
44
+          handleConfirm(Number(value).toFixed(2));
58 45
         });
59
-      };
46
+      }
60 47
 
61
-      _this.handleUpdateCurrentWanted = function(value, afterUpdate) {
62
-        if (!value) return;
63
-        var result;
64
-        result = value;
48
+      _this.setState({
49
+        modalVisible: false
50
+      });
51
+    };
65 52
 
66
-        if (parseInt("".concat(value), 10) === value) {
67
-          result = Number(value);
68
-        }
53
+    _this.handleUpdateCurrentWanted = function (value, afterUpdate) {
54
+      if (!value) return;
55
+      var result;
56
+      result = value;
57
+
58
+      if (parseInt("".concat(value), 10) === value) {
59
+        result = Number(value);
60
+      }
69 61
 
70
-        if (!result) return;
71
-        if (result > 10000) result = 10000;
72
-        if (result < 5) result = 5;
73
-
74
-        _this.setState(
75
-          {
76
-            current_wanted: result
77
-          },
78
-          function() {
79
-            return afterUpdate && afterUpdate(result);
80
-          }
81
-        );
82
-      };
83
-
84
-      _this.clearCurrentWanted = function(cb) {
85
-        _this.setState(
86
-          {
87
-            current_wanted: null
88
-          },
89
-          function() {
90
-            return cb();
91
-          }
92
-        );
93
-      };
94
-
95
-      _this.state = {
96
-        modalVisible: false,
62
+      if (!result) return;
63
+      if (result > 10000) result = 10000;
64
+      if (result < 5) result = 5;
65
+
66
+      _this.setState({
67
+        current_wanted: result
68
+      }, function () {
69
+        return afterUpdate && afterUpdate(result);
70
+      });
71
+    };
72
+
73
+    _this.clearCurrentWanted = function (cb) {
74
+      _this.setState({
97 75
         current_wanted: null
98
-      };
99
-      return _this;
76
+      }, function () {
77
+        return cb();
78
+      });
79
+    };
80
+
81
+    _this.state = {
82
+      modalVisible: false,
83
+      current_wanted: null
84
+    };
85
+    return _this;
86
+  }
87
+
88
+  inherits._createClass(WantedPublishModal, [{
89
+    key: "renderMain",
90
+    value: function renderMain() {
91
+      var _this2 = this;
92
+
93
+      var current_wanted = this.state.current_wanted;
94
+      return React__default.createElement(WantedPublishView.default, {
95
+        wrapperClass: styles.modalBg,
96
+        current_wanted: current_wanted,
97
+        InputWantedValueChange: function InputWantedValueChange(v) {
98
+          return _this2.setState({
99
+            current_wanted: v
100
+          });
101
+        },
102
+        InputWantedPressEnter: function InputWantedPressEnter(v) {
103
+          return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
104
+        },
105
+        InputWantedOnBlur: function InputWantedOnBlur(v) {
106
+          return _this2.handleUpdateCurrentWanted(v);
107
+        },
108
+        InputWantedClear: function InputWantedClear() {
109
+          return _this2.clearCurrentWanted(_this2.handleClose);
110
+        },
111
+        CloseFunction: this.handleClose
112
+      });
100 113
     }
101
-
102
-    inherits._createClass(WantedPublishModal, [
103
-      {
104
-        key: "renderMain",
105
-        value: function renderMain() {
106
-          var _this2 = this;
107
-
108
-          var current_wanted = this.state.current_wanted;
109
-          return React__default.createElement(WantedPublishView.default, {
110
-            wrapperClass: styles.modalBg,
111
-            current_wanted: current_wanted,
112
-            InputWantedValueChange: function InputWantedValueChange(v) {
113
-              return _this2.setState({
114
-                current_wanted: v
115
-              });
116
-            },
117
-            InputWantedPressEnter: function InputWantedPressEnter(v) {
118
-              return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
119
-            },
120
-            InputWantedOnBlur: function InputWantedOnBlur(v) {
121
-              return _this2.handleUpdateCurrentWanted(v);
122
-            },
123
-            InputWantedClear: function InputWantedClear() {
124
-              return _this2.clearCurrentWanted(_this2.handleClose);
125
-            },
126
-            CloseFunction: this.handleClose
114
+  }, {
115
+    key: "render",
116
+    value: function render() {
117
+      var _this3 = this;
118
+
119
+      return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
120
+        onClick: function onClick() {
121
+          return _this3.setState({
122
+            modalVisible: true
127 123
           });
128 124
         }
129
-      },
130
-      {
131
-        key: "render",
132
-        value: function render() {
133
-          var _this3 = this;
134
-
135
-          return React__default.createElement(
136
-            React__default.Fragment,
137
-            null,
138
-            React__default.createElement(
139
-              "div",
140
-              {
141
-                onClick: function onClick() {
142
-                  return _this3.setState({
143
-                    modalVisible: true
144
-                  });
145
-                }
146
-              },
147
-              this.props.children
148
-            ),
149
-            React__default.createElement(
150
-              Modal.default,
151
-              {
152
-                visible: this.state.modalVisible,
153
-                onCancel: this.handleClose
154
-              },
155
-              this.renderMain()
156
-            )
157
-          );
158
-        }
159
-      }
160
-    ]);
125
+      }, this.props.children), React__default.createElement(Modal.default, Object.assign({
126
+        visible: this.state.modalVisible,
127
+        onCancel: this.handleClose
128
+      }, this.props.modalConfig), this.renderMain()));
129
+    }
130
+  }]);
161 131
 
162
-    return WantedPublishModal;
163
-  })(React.Component);
132
+  return WantedPublishModal;
133
+}(React.Component);
164 134
 
165 135
 exports.WantedPublishModal = WantedPublishModal;
166 136
 exports.default = WantedPublishModal;

+ 1
- 1
lib/WantedPublishModal/index.js.map
File diff suppressed because it is too large
View File


+ 12
- 23
lib/WantedPublishPopover/index.d.ts View File

@@ -2,30 +2,19 @@
2 2
 import React from "react";
3 3
 import { PopoverProps } from "antd/lib/popover";
4 4
 interface WantedPublishPopoverProp {
5
-  popoverConfig?: PopoverProps;
6
-  handleConfirm?: Function;
5
+    popoverConfig?: PopoverProps;
6
+    handleConfirm?: Function;
7 7
 }
8 8
 interface WantedPublishPopoverState {
9
-  visible: boolean;
10
-  current_wanted: number | string | null;
9
+    visible: boolean;
10
+    current_wanted: number | string | null;
11 11
 }
12
-declare class WantedPublishPopover extends React.Component<
13
-  WantedPublishPopoverProp,
14
-  WantedPublishPopoverState
15
-> {
16
-  constructor(props: WantedPublishPopoverProp);
17
-  handleClose: () => void;
18
-  clearCurrentWanted: (cb: Function) => void;
19
-  handleUpdateCurrentWanted: (
20
-    value: string | number | null,
21
-    afterUpdate?: Function | undefined
22
-  ) => void;
23
-  renderInitView(): JSX.Element;
24
-  render(): JSX.Element;
12
+declare class WantedPublishPopover extends React.Component<WantedPublishPopoverProp, WantedPublishPopoverState> {
13
+    constructor(props: WantedPublishPopoverProp);
14
+    handleClose: () => void;
15
+    clearCurrentWanted: (cb: Function) => void;
16
+    handleUpdateCurrentWanted: (value: string | number | null, afterUpdate?: Function | undefined) => void;
17
+    renderInitView(): JSX.Element;
18
+    render(): JSX.Element;
25 19
 }
26
-export {
27
-  WantedPublishPopover as default,
28
-  WantedPublishPopover,
29
-  WantedPublishPopoverProp,
30
-  WantedPublishPopoverState
31
-};
20
+export { WantedPublishPopover as default, WantedPublishPopover, WantedPublishPopoverProp, WantedPublishPopoverState };

+ 132
- 172
lib/WantedPublishPopover/index.js View File

@@ -1,198 +1,158 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
3
+Object.defineProperty(exports, '__esModule', { value: true });
4 4
 
5
-function _interopDefault(ex) {
6
-  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
7
-}
5
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
8 6
 
9
-var inherits = require("../inherits-c86d64c1.js");
10
-var React = require("react");
7
+var inherits = require('../inherits-c86d64c1.js');
8
+var React = require('react');
11 9
 var React__default = _interopDefault(React);
12
-var styleInject_es = require("../style-inject.es-dcee06b6.js");
13
-require("../defineProperty-ba7cd53d.js");
14
-require("../_commonjsHelpers-72d386ba.js");
15
-require("../index-44e17595.js");
16
-var antd = require("antd");
17
-var WantedPublishView = require("../WantedPublishView/index.js");
18
-
19
-var img =
20
-  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAFNElEQVRYR82Yf0jcdRjH33enp1NbTQ3FdKhTY64hTTsURc6keQeSqIPSQJIiMHM3zj8ST/BE/And+c8wmSSMomHl4EaaP2aeuq/R1MwrraEgLVbLXcvpReY847l9v3I7774/LKUHjuN79/k8z+v7+fG8n89Hhv+pyf4F1xEAxwE8BSAIQDAAPwB/AnCwnzsAVgHsSI0jFcwfwEkA8QAiRAYj0BUACwDsIvtALJgcwLMA0tjREevfs90tADcBbAg5EAN2FEAegFAhZyL/3wYwBeB7vvZCYFEAzgIIEBlUSjMCYwA4vXXiA6N1lAuApvGg7DaAL7zB+QILB1DA7rKDguL80shNegbxBkZbv4jd/gcNxfmfYHftbjxvYDR9CYdFxMahDfExm/tcP3mC0RQWHzIUF+5HAGPcgydYPoBn+MCSk5ODm5ubs4qKigadTq8b6rHuFRUVcYmJicf0ev2swAuTOnwC4L7niD0J4FW+zvHx8YEMw+gjIiKOz8zM3MjIyPhwa2vLp9xUV1cntra2VioUCv+WlpYug8EwLwD3HYAbnmApANL5OlZVVZ0wm806hUKhpHbz8/Nfq1Sqns3NzT1wdXV1J41GYwXXdnZ2lklNTb0sAEaK8JEnGKWHSKH1xY2Cn59fILVdXFz8RqVSXdrY2Nid16amptM1NTVvyeVy0laIGV23uJ+SpnJrTAHgTSEo7v/Kyso4k8l0XqlUUoWBpaUlW3p6epfdbn9oMpnO6HS6N+RyOfnE1NTUWFZW1hUx65H1T3I1z4E9AaBULBi1Ky8vj+ns7NQFBASE0PPKysqi1WqdKSsrK5XJZC61sFqtw2q1+jMpfgmK3ocDoymkqZRkJSUlUd3d3ReCgoJI6B+zwcHBzzUazTVJDh81XgJwnQOLY8Vasp+CgoKI3t7ed5VKJSmGy4aGhvrz8vIskp096kDF5TUOjCpR7X4c9fX1nS0sLCQJ27XV1dXbubm5HTabjSpZqfYTgAEOLAzAOake+vv787VaLSVlsh2Hw/EgODiY8iHsdvsdjUbTMT09/UCi3x9oeXJgtLvKpDgYHR0tzMnJoQISOzs7zq6urss9PT0LAwMDF0JDQ6mOw9ra2t38/Hzz5OTkHxJ8k0Lc5MDo+3UArsTJZ3K5HOPj469kZmbmsFDbHR0dH+j1+hl6TklJCRkZGdGFh4fH0PP6+vq94uJi8/DwsNh6/0sAt9y18kUAiXxQ/v7+MoZhXktLS8uidk6n82FbW9ul2trab937JSUlBVmt1vORkZGx9LvD4bhfWlpqtlgsvwm8NykIqcNf7mBUsb7E19FoNJ6qr6+vojbb29t/NzY2vt/Q0ECnnz0WGxsbODEx8U50dLSrhFpeXrYlJCRcFAD7BYBrN7uDkXzQOqOzoU+zWCwarVarNRgMF9vb2+nU49OioqKUDMO8HRIScjQ7O/u9hYUFoV1KZwCbJxg9vwDgjNA6U6vVx8bGxlzliZCFhYX5xcTEHJmbm1sXaEvnzysAtryB0eIvAeAS6EO2caoJuJjeSutTAFyL+xDtdwCkqbsViq9T0mHW/ZsArlLacx8IX2C0AV4G8PQBjxqlh34AP3vG4TvwkihrDhCOTkZ0+KBqYo8JXRHQyKkBnPiPR4524CAAnwlXCIzjOc3e9AhKlogXoCspOnnz5jSxYBSPLlaeB/AcAFfZLNHuAvgKwK9i+kkB4/xRjqP6jXSQhJpPKUi4aYToc08MEF8ek9KfRo675qRv7qqTu+6kVLAv28+I7SuQ1E7/AHTQdDZ7M6+KAAAAAElFTkSuQmCC";
21
-
22
-var css =
23
-  ".WantedPublishPopover_wantedWrapper__3CrCz {\n  width: 366px;\n  height: 424px;\n  font-size: 18px;\n  text-align: center;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 {\n  position: absolute;\n  top: 10px;\n  right: 16px;\n  width: 20px;\n  height: 20px;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58:focus {\n  outline: none;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB {\n  border: none;\n  padding: 0px;\n  margin: 0px;\n  cursor: pointer;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB > img {\n  width: 100%;\n}\n";
10
+var styleInject_es = require('../style-inject.es-dcee06b6.js');
11
+require('../defineProperty-ba7cd53d.js');
12
+require('../_commonjsHelpers-72d386ba.js');
13
+require('../index-44e17595.js');
14
+var antd = require('antd');
15
+var WantedPublishView = require('../WantedPublishView/index.js');
16
+
17
+var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAFNElEQVRYR82Yf0jcdRjH33enp1NbTQ3FdKhTY64hTTsURc6keQeSqIPSQJIiMHM3zj8ST/BE/And+c8wmSSMomHl4EaaP2aeuq/R1MwrraEgLVbLXcvpReY847l9v3I7774/LKUHjuN79/k8z+v7+fG8n89Hhv+pyf4F1xEAxwE8BSAIQDAAPwB/AnCwnzsAVgHsSI0jFcwfwEkA8QAiRAYj0BUACwDsIvtALJgcwLMA0tjREevfs90tADcBbAg5EAN2FEAegFAhZyL/3wYwBeB7vvZCYFEAzgIIEBlUSjMCYwA4vXXiA6N1lAuApvGg7DaAL7zB+QILB1DA7rKDguL80shNegbxBkZbv4jd/gcNxfmfYHftbjxvYDR9CYdFxMahDfExm/tcP3mC0RQWHzIUF+5HAGPcgydYPoBn+MCSk5ODm5ubs4qKigadTq8b6rHuFRUVcYmJicf0ev2swAuTOnwC4L7niD0J4FW+zvHx8YEMw+gjIiKOz8zM3MjIyPhwa2vLp9xUV1cntra2VioUCv+WlpYug8EwLwD3HYAbnmApANL5OlZVVZ0wm806hUKhpHbz8/Nfq1Sqns3NzT1wdXV1J41GYwXXdnZ2lklNTb0sAEaK8JEnGKWHSKH1xY2Cn59fILVdXFz8RqVSXdrY2Nid16amptM1NTVvyeVy0laIGV23uJ+SpnJrTAHgTSEo7v/Kyso4k8l0XqlUUoWBpaUlW3p6epfdbn9oMpnO6HS6N+RyOfnE1NTUWFZW1hUx65H1T3I1z4E9AaBULBi1Ky8vj+ns7NQFBASE0PPKysqi1WqdKSsrK5XJZC61sFqtw2q1+jMpfgmK3ocDoymkqZRkJSUlUd3d3ReCgoJI6B+zwcHBzzUazTVJDh81XgJwnQOLY8Vasp+CgoKI3t7ed5VKJSmGy4aGhvrz8vIskp096kDF5TUOjCpR7X4c9fX1nS0sLCQJ27XV1dXbubm5HTabjSpZqfYTgAEOLAzAOake+vv787VaLSVlsh2Hw/EgODiY8iHsdvsdjUbTMT09/UCi3x9oeXJgtLvKpDgYHR0tzMnJoQISOzs7zq6urss9PT0LAwMDF0JDQ6mOw9ra2t38/Hzz5OTkHxJ8k0Lc5MDo+3UArsTJZ3K5HOPj469kZmbmsFDbHR0dH+j1+hl6TklJCRkZGdGFh4fH0PP6+vq94uJi8/DwsNh6/0sAt9y18kUAiXxQ/v7+MoZhXktLS8uidk6n82FbW9ul2trab937JSUlBVmt1vORkZGx9LvD4bhfWlpqtlgsvwm8NykIqcNf7mBUsb7E19FoNJ6qr6+vojbb29t/NzY2vt/Q0ECnnz0WGxsbODEx8U50dLSrhFpeXrYlJCRcFAD7BYBrN7uDkXzQOqOzoU+zWCwarVarNRgMF9vb2+nU49OioqKUDMO8HRIScjQ7O/u9hYUFoV1KZwCbJxg9vwDgjNA6U6vVx8bGxlzliZCFhYX5xcTEHJmbm1sXaEvnzysAtryB0eIvAeAS6EO2caoJuJjeSutTAFyL+xDtdwCkqbsViq9T0mHW/ZsArlLacx8IX2C0AV4G8PQBjxqlh34AP3vG4TvwkihrDhCOTkZ0+KBqYo8JXRHQyKkBnPiPR4524CAAnwlXCIzjOc3e9AhKlogXoCspOnnz5jSxYBSPLlaeB/AcAFfZLNHuAvgKwK9i+kkB4/xRjqP6jXSQhJpPKUi4aYToc08MEF8ek9KfRo675qRv7qqTu+6kVLAv28+I7SuQ1E7/AHTQdDZ7M6+KAAAAAElFTkSuQmCC";
18
+
19
+var css = ".WantedPublishPopover_wantedWrapper__3CrCz {\n  width: 366px;\n  height: 424px;\n  font-size: 18px;\n  text-align: center;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 {\n  position: absolute;\n  top: 10px;\n  right: 16px;\n  width: 20px;\n  height: 20px;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58:focus {\n  outline: none;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB {\n  border: none;\n  padding: 0px;\n  margin: 0px;\n  cursor: pointer;\n}\n.WantedPublishPopover_wantedWrapper__3CrCz .WantedPublishPopover_closeBtnWrapper__1KV58 > div.WantedPublishPopover_closeBtn__1aBMB > img {\n  width: 100%;\n}\n";
24 20
 var styles = {
25
-  wantedWrapper: "WantedPublishPopover_wantedWrapper__3CrCz",
26
-  closeBtnWrapper: "WantedPublishPopover_closeBtnWrapper__1KV58",
27
-  closeBtn: "WantedPublishPopover_closeBtn__1aBMB"
21
+  "wantedWrapper": "WantedPublishPopover_wantedWrapper__3CrCz",
22
+  "closeBtnWrapper": "WantedPublishPopover_closeBtnWrapper__1KV58",
23
+  "closeBtn": "WantedPublishPopover_closeBtn__1aBMB"
28 24
 };
29 25
 styleInject_es.styleInject(css);
30 26
 
31 27
 var WantedPublishPopover =
32
-  /*#__PURE__*/
33
-  (function(_React$Component) {
34
-    inherits._inherits(WantedPublishPopover, _React$Component);
35
-
36
-    function WantedPublishPopover(props) {
37
-      var _this;
28
+/*#__PURE__*/
29
+function (_React$Component) {
30
+  inherits._inherits(WantedPublishPopover, _React$Component);
38 31
 
39
-      inherits._classCallCheck(this, WantedPublishPopover);
32
+  function WantedPublishPopover(props) {
33
+    var _this;
40 34
 
41
-      _this = inherits._possibleConstructorReturn(
42
-        this,
43
-        inherits._getPrototypeOf(WantedPublishPopover).call(this, props)
44
-      );
35
+    inherits._classCallCheck(this, WantedPublishPopover);
45 36
 
46
-      _this.handleClose = function() {
47
-        var handleConfirm = _this.props.handleConfirm;
37
+    _this = inherits._possibleConstructorReturn(this, inherits._getPrototypeOf(WantedPublishPopover).call(this, props));
48 38
 
49
-        if (handleConfirm) {
50
-          _this.handleUpdateCurrentWanted(_this.state.current_wanted, function(
51
-            value
52
-          ) {
53
-            handleConfirm(Number(value).toFixed(2));
54
-          });
55
-        }
39
+    _this.handleClose = function () {
40
+      var handleConfirm = _this.props.handleConfirm;
56 41
 
57
-        _this.setState({
58
-          visible: false
42
+      if (handleConfirm) {
43
+        _this.handleUpdateCurrentWanted(_this.state.current_wanted, function (value) {
44
+          handleConfirm(Number(value).toFixed(2));
59 45
         });
60
-      };
61
-
62
-      _this.clearCurrentWanted = function(cb) {
63
-        _this.setState(
64
-          {
65
-            current_wanted: null
66
-          },
67
-          function() {
68
-            return cb();
69
-          }
70
-        );
71
-      };
72
-
73
-      _this.handleUpdateCurrentWanted = function(value, afterUpdate) {
74
-        if (!value) return;
75
-        var result;
76
-        result = value;
77
-
78
-        if (parseInt("".concat(value), 10) === value) {
79
-          result = Number(value);
80
-        }
81
-
82
-        if (!result) return;
83
-        if (result > 10000) result = 10000;
84
-        if (result < 5) result = 5;
46
+      }
85 47
 
86
-        _this.setState(
87
-          {
88
-            current_wanted: result
89
-          },
90
-          function() {
91
-            return afterUpdate && afterUpdate(result);
92
-          }
93
-        );
94
-      };
48
+      _this.setState({
49
+        visible: false
50
+      });
51
+    };
95 52
 
96
-      _this.state = {
97
-        visible: false,
53
+    _this.clearCurrentWanted = function (cb) {
54
+      _this.setState({
98 55
         current_wanted: null
99
-      };
100
-      return _this;
56
+      }, function () {
57
+        return cb();
58
+      });
59
+    };
60
+
61
+    _this.handleUpdateCurrentWanted = function (value, afterUpdate) {
62
+      if (!value) return;
63
+      var result;
64
+      result = value;
65
+
66
+      if (parseInt("".concat(value), 10) === value) {
67
+        result = Number(value);
68
+      }
69
+
70
+      if (!result) return;
71
+      if (result > 10000) result = 10000;
72
+      if (result < 5) result = 5;
73
+
74
+      _this.setState({
75
+        current_wanted: result
76
+      }, function () {
77
+        return afterUpdate && afterUpdate(result);
78
+      });
79
+    };
80
+
81
+    _this.state = {
82
+      visible: false,
83
+      current_wanted: null
84
+    };
85
+    return _this;
86
+  }
87
+
88
+  inherits._createClass(WantedPublishPopover, [{
89
+    key: "renderInitView",
90
+    value: function renderInitView() {
91
+      var _this2 = this;
92
+
93
+      var current_wanted = this.state.current_wanted;
94
+      return React__default.createElement(WantedPublishView.default, {
95
+        type: "pop",
96
+        current_wanted: current_wanted,
97
+        InputWantedValueChange: function InputWantedValueChange(v) {
98
+          return _this2.setState({
99
+            current_wanted: v
100
+          });
101
+        },
102
+        InputWantedPressEnter: function InputWantedPressEnter(v) {
103
+          return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
104
+        },
105
+        InputWantedOnBlur: function InputWantedOnBlur(v) {
106
+          return _this2.handleUpdateCurrentWanted(v);
107
+        },
108
+        InputWantedClear: function InputWantedClear() {
109
+          return _this2.clearCurrentWanted(_this2.handleClose);
110
+        },
111
+        CloseFunction: this.handleClose
112
+      });
101 113
     }
114
+  }, {
115
+    key: "render",
116
+    value: function render() {
117
+      var _this3 = this;
118
+
119
+      var _this$props = this.props,
120
+          children = _this$props.children,
121
+          _this$props$popoverCo = _this$props.popoverConfig,
122
+          popoverConfig = _this$props$popoverCo === void 0 ? {} : _this$props$popoverCo;
123
+      return React__default.createElement(antd.Popover, Object.assign({
124
+        placement: "left",
125
+        trigger: "click",
126
+        visible: this.state.visible,
127
+        onVisibleChange: function onVisibleChange(value) {
128
+          if (!value) {
129
+            _this3.handleClose();
130
+          }
102 131
 
103
-    inherits._createClass(WantedPublishPopover, [
104
-      {
105
-        key: "renderInitView",
106
-        value: function renderInitView() {
107
-          var _this2 = this;
108
-
109
-          var current_wanted = this.state.current_wanted;
110
-          return React__default.createElement(WantedPublishView.default, {
111
-            type: "pop",
112
-            current_wanted: current_wanted,
113
-            InputWantedValueChange: function InputWantedValueChange(v) {
114
-              return _this2.setState({
115
-                current_wanted: v
116
-              });
117
-            },
118
-            InputWantedPressEnter: function InputWantedPressEnter(v) {
119
-              return _this2.handleUpdateCurrentWanted(v, _this2.handleClose);
120
-            },
121
-            InputWantedOnBlur: function InputWantedOnBlur(v) {
122
-              return _this2.handleUpdateCurrentWanted(v);
123
-            },
124
-            InputWantedClear: function InputWantedClear() {
125
-              return _this2.clearCurrentWanted(_this2.handleClose);
126
-            },
127
-            CloseFunction: this.handleClose
132
+          _this3.setState({
133
+            visible: value
128 134
           });
129 135
         }
130
-      },
131
-      {
132
-        key: "render",
133
-        value: function render() {
134
-          var _this3 = this;
135
-
136
-          var _this$props = this.props,
137
-            children = _this$props.children,
138
-            _this$props$popoverCo = _this$props.popoverConfig,
139
-            popoverConfig =
140
-              _this$props$popoverCo === void 0 ? {} : _this$props$popoverCo;
141
-          return React__default.createElement(
142
-            antd.Popover,
143
-            Object.assign(
144
-              {
145
-                placement: "left",
146
-                trigger: "click",
147
-                visible: this.state.visible,
148
-                onVisibleChange: function onVisibleChange(value) {
149
-                  if (!value) {
150
-                    _this3.handleClose();
151
-                  }
152
-
153
-                  _this3.setState({
154
-                    visible: value
155
-                  });
156
-                }
157
-              },
158
-              popoverConfig,
159
-              {
160
-                content: React__default.createElement(
161
-                  "div",
162
-                  {
163
-                    className: styles.wantedWrapper
164
-                  },
165
-                  React__default.createElement(
166
-                    "div",
167
-                    {
168
-                      role: "button",
169
-                      tabIndex: 1,
170
-                      className: styles.closeBtnWrapper
171
-                    },
172
-                    React__default.createElement(
173
-                      "div",
174
-                      {
175
-                        className: styles.closeBtn,
176
-                        onClick: this.handleClose
177
-                      },
178
-                      React__default.createElement("img", {
179
-                        src: img,
180
-                        alt: "close wanted button"
181
-                      })
182
-                    )
183
-                  ),
184
-                  this.renderInitView()
185
-                )
186
-              }
187
-            ),
188
-            children
189
-          );
190
-        }
191
-      }
192
-    ]);
136
+      }, popoverConfig, {
137
+        content: React__default.createElement("div", {
138
+          className: styles.wantedWrapper
139
+        }, React__default.createElement("div", {
140
+          role: "button",
141
+          tabIndex: 1,
142
+          className: styles.closeBtnWrapper
143
+        }, React__default.createElement("div", {
144
+          className: styles.closeBtn,
145
+          onClick: this.handleClose
146
+        }, React__default.createElement("img", {
147
+          src: img,
148
+          alt: "close wanted button"
149
+        }))), this.renderInitView())
150
+      }), children);
151
+    }
152
+  }]);
193 153
 
194
-    return WantedPublishPopover;
195
-  })(React__default.Component);
154
+  return WantedPublishPopover;
155
+}(React__default.Component);
196 156
 
197 157
 exports.WantedPublishPopover = WantedPublishPopover;
198 158
 exports.default = WantedPublishPopover;

+ 1
- 1
lib/WantedPublishPopover/index.js.map
File diff suppressed because it is too large
View File


+ 13
- 16
lib/WantedPublishView/index.d.ts View File

@@ -1,23 +1,20 @@
1 1
 /// <reference types="react" />
2
-import React from "react";
2
+import React from 'react';
3 3
 interface WantedPublishViewProps {
4
-  type?: "pop" | "modal";
5
-  wrapperClass?: string;
6
-  current_wanted: number | string | null;
7
-  InputWantedValueChange: Function;
8
-  InputWantedPressEnter: Function;
9
-  InputWantedOnBlur: Function;
10
-  InputWantedClear: Function;
11
-  CloseFunction: Function;
4
+    type?: 'pop' | 'modal';
5
+    wrapperClass?: string;
6
+    current_wanted: number | string | null;
7
+    InputWantedValueChange: Function;
8
+    InputWantedPressEnter: Function;
9
+    InputWantedOnBlur: Function;
10
+    InputWantedClear: Function;
11
+    CloseFunction: Function;
12 12
 }
13 13
 interface WantedPublishViewState {
14
-  payment?: number;
14
+    payment?: number;
15 15
 }
16
-declare class WantedPublishView extends React.Component<
17
-  WantedPublishViewProps,
18
-  WantedPublishViewState
19
-> {
20
-  constructor(props: WantedPublishViewProps);
21
-  render(): JSX.Element;
16
+declare class WantedPublishView extends React.Component<WantedPublishViewProps, WantedPublishViewState> {
17
+    constructor(props: WantedPublishViewProps);
18
+    render(): JSX.Element;
22 19
 }
23 20
 export { WantedPublishView as default };

+ 98
- 162
lib/WantedPublishView/index.js
File diff suppressed because it is too large
View File


+ 5
- 16
lib/_commonjsHelpers-72d386ba.js View File

@@ -1,24 +1,13 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-var commonjsGlobal =
4
-  typeof globalThis !== "undefined"
5
-    ? globalThis
6
-    : typeof window !== "undefined"
7
-    ? window
8
-    : typeof global !== "undefined"
9
-    ? global
10
-    : typeof self !== "undefined"
11
-    ? self
12
-    : {};
3
+var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13 4
 
14
-function unwrapExports(x) {
15
-  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default")
16
-    ? x["default"]
17
-    : x;
5
+function unwrapExports (x) {
6
+	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
18 7
 }
19 8
 
20 9
 function createCommonjsModule(fn, module) {
21
-  return (module = { exports: {} }), fn(module, module.exports), module.exports;
10
+	return module = { exports: {} }, fn(module, module.exports), module.exports;
22 11
 }
23 12
 
24 13
 exports.commonjsGlobal = commonjsGlobal;

+ 1
- 1
lib/defineProperty-ba7cd53d.js View File

@@ -1,4 +1,4 @@
1
-"use strict";
1
+'use strict';
2 2
 
3 3
 function _defineProperty(obj, key, value) {
4 4
   if (key in obj) {

+ 45
- 44
lib/index-44e17595.js View File

@@ -1,53 +1,54 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-var _commonjsHelpers = require("./_commonjsHelpers-72d386ba.js");
3
+var _commonjsHelpers = require('./_commonjsHelpers-72d386ba.js');
4 4
 
5
-var classnames = _commonjsHelpers.createCommonjsModule(function(module) {
6
-  /*!
5
+var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
6
+/*!
7 7
   Copyright (c) 2017 Jed Watson.
8 8
   Licensed under the MIT License (MIT), see
9 9
   http://jedwatson.github.io/classnames
10 10
 */
11
-  /* global define */
12
-
13
-  (function() {
14
-    var hasOwn = {}.hasOwnProperty;
15
-
16
-    function classNames() {
17
-      var classes = [];
18
-
19
-      for (var i = 0; i < arguments.length; i++) {
20
-        var arg = arguments[i];
21
-        if (!arg) continue;
22
-
23
-        var argType = typeof arg;
24
-
25
-        if (argType === "string" || argType === "number") {
26
-          classes.push(arg);
27
-        } else if (Array.isArray(arg) && arg.length) {
28
-          var inner = classNames.apply(null, arg);
29
-          if (inner) {
30
-            classes.push(inner);
31
-          }
32
-        } else if (argType === "object") {
33
-          for (var key in arg) {
34
-            if (hasOwn.call(arg, key) && arg[key]) {
35
-              classes.push(key);
36
-            }
37
-          }
38
-        }
39
-      }
40
-
41
-      return classes.join(" ");
42
-    }
43
-
44
-    if (module.exports) {
45
-      classNames.default = classNames;
46
-      module.exports = classNames;
47
-    } else {
48
-      window.classNames = classNames;
49
-    }
50
-  })();
11
+/* global define */
12
+
13
+(function () {
14
+
15
+	var hasOwn = {}.hasOwnProperty;
16
+
17
+	function classNames () {
18
+		var classes = [];
19
+
20
+		for (var i = 0; i < arguments.length; i++) {
21
+			var arg = arguments[i];
22
+			if (!arg) continue;
23
+
24
+			var argType = typeof arg;
25
+
26
+			if (argType === 'string' || argType === 'number') {
27
+				classes.push(arg);
28
+			} else if (Array.isArray(arg) && arg.length) {
29
+				var inner = classNames.apply(null, arg);
30
+				if (inner) {
31
+					classes.push(inner);
32
+				}
33
+			} else if (argType === 'object') {
34
+				for (var key in arg) {
35
+					if (hasOwn.call(arg, key) && arg[key]) {
36
+						classes.push(key);
37
+					}
38
+				}
39
+			}
40
+		}
41
+
42
+		return classes.join(' ');
43
+	}
44
+
45
+	if ( module.exports) {
46
+		classNames.default = classNames;
47
+		module.exports = classNames;
48
+	} else {
49
+		window.classNames = classNames;
50
+	}
51
+}());
51 52
 });
52 53
 
53 54
 exports.classnames = classnames;

+ 22
- 20
lib/index.js View File

@@ -1,25 +1,27 @@
1
-"use strict";
1
+'use strict';
2
+
3
+Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+require('./inherits-c86d64c1.js');
6
+require('react');
7
+require('react-dom');
8
+var Modal = require('./Modal/index.js');
9
+require('./style-inject.es-dcee06b6.js');
10
+require('./defineProperty-ba7cd53d.js');
11
+require('./_commonjsHelpers-72d386ba.js');
12
+require('./index-44e17595.js');
13
+require('./utils-b800dc99.js');
14
+var ConsumeListView = require('./ConsumeListView/index.js');
15
+var PayPlatformOptions = require('./PayPlatformOptions/index.js');
16
+require('./slicedToArray-172f4624.js');
17
+require('antd');
18
+var PriceOptions = require('./PriceOptions/index.js');
19
+var WaitPayInfoView = require('./WaitPayInfoView/index.js');
20
+var AllocWantedModal = require('./AllocWantedModal/index.js');
21
+var WantedPublishView = require('./WantedPublishView/index.js');
22
+var WantedPublishPopover = require('./WantedPublishPopover/index.js');
2 23
 
3
-Object.defineProperty(exports, "__esModule", { value: true });
4 24
 
5
-require("./inherits-c86d64c1.js");
6
-require("react");
7
-require("react-dom");
8
-var Modal = require("./Modal/index.js");
9
-require("./style-inject.es-dcee06b6.js");
10
-require("./defineProperty-ba7cd53d.js");
11
-require("./_commonjsHelpers-72d386ba.js");
12
-require("./index-44e17595.js");
13
-require("./utils-b800dc99.js");
14
-var ConsumeListView = require("./ConsumeListView/index.js");
15
-var PayPlatformOptions = require("./PayPlatformOptions/index.js");
16
-require("./slicedToArray-172f4624.js");
17
-require("antd");
18
-var PriceOptions = require("./PriceOptions/index.js");
19
-var WaitPayInfoView = require("./WaitPayInfoView/index.js");
20
-var AllocWantedModal = require("./AllocWantedModal/index.js");
21
-var WantedPublishView = require("./WantedPublishView/index.js");
22
-var WantedPublishPopover = require("./WantedPublishPopover/index.js");
23 25
 
24 26
 exports.Modal = Modal.default;
25 27
 exports.ConsumeListView = ConsumeListView.default;

+ 10
- 21
lib/inherits-c86d64c1.js View File

@@ -1,4 +1,4 @@
1
-"use strict";
1
+'use strict';
2 2
 
3 3
 function _classCallCheck(instance, Constructor) {
4 4
   if (!(instance instanceof Constructor)) {
@@ -31,12 +31,7 @@ function _typeof(obj) {
31 31
     };
32 32
   } else {
33 33
     _typeof = function _typeof(obj) {
34
-      return obj &&
35
-        typeof Symbol === "function" &&
36
-        obj.constructor === Symbol &&
37
-        obj !== Symbol.prototype
38
-        ? "symbol"
39
-        : typeof obj;
34
+      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
40 35
     };
41 36
   }
42 37
 
@@ -45,9 +40,7 @@ function _typeof(obj) {
45 40
 
46 41
 function _assertThisInitialized(self) {
47 42
   if (self === void 0) {
48
-    throw new ReferenceError(
49
-      "this hasn't been initialised - super() hasn't been called"
50
-    );
43
+    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
51 44
   }
52 45
 
53 46
   return self;
@@ -62,21 +55,17 @@ function _possibleConstructorReturn(self, call) {
62 55
 }
63 56
 
64 57
 function _getPrototypeOf(o) {
65
-  _getPrototypeOf = Object.setPrototypeOf
66
-    ? Object.getPrototypeOf
67
-    : function _getPrototypeOf(o) {
68
-        return o.__proto__ || Object.getPrototypeOf(o);
69
-      };
58
+  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
59
+    return o.__proto__ || Object.getPrototypeOf(o);
60
+  };
70 61
   return _getPrototypeOf(o);
71 62
 }
72 63
 
73 64
 function _setPrototypeOf(o, p) {
74
-  _setPrototypeOf =
75
-    Object.setPrototypeOf ||
76
-    function _setPrototypeOf(o, p) {
77
-      o.__proto__ = p;
78
-      return o;
79
-    };
65
+  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
66
+    o.__proto__ = p;
67
+    return o;
68
+  };
80 69
 
81 70
   return _setPrototypeOf(o, p);
82 71
 }

+ 4
- 15
lib/slicedToArray-172f4624.js View File

@@ -1,16 +1,11 @@
1
-"use strict";
1
+'use strict';
2 2
 
3 3
 function _arrayWithHoles(arr) {
4 4
   if (Array.isArray(arr)) return arr;
5 5
 }
6 6
 
7 7
 function _iterableToArrayLimit(arr, i) {
8
-  if (
9
-    !(
10
-      Symbol.iterator in Object(arr) ||
11
-      Object.prototype.toString.call(arr) === "[object Arguments]"
12
-    )
13
-  ) {
8
+  if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
14 9
     return;
15 10
   }
16 11
 
@@ -20,11 +15,7 @@ function _iterableToArrayLimit(arr, i) {
20 15
   var _e = undefined;
21 16
 
22 17
   try {
23
-    for (
24
-      var _i = arr[Symbol.iterator](), _s;
25
-      !(_n = (_s = _i.next()).done);
26
-      _n = true
27
-    ) {
18
+    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
28 19
       _arr.push(_s.value);
29 20
 
30 21
       if (i && _arr.length === i) break;
@@ -48,9 +39,7 @@ function _nonIterableRest() {
48 39
 }
49 40
 
50 41
 function _slicedToArray(arr, i) {
51
-  return (
52
-    _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest()
53
-  );
42
+  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
54 43
 }
55 44
 
56 45
 exports._slicedToArray = _slicedToArray;

+ 7
- 9
lib/style-inject.es-dcee06b6.js View File

@@ -1,18 +1,16 @@
1
-"use strict";
1
+'use strict';
2 2
 
3 3
 function styleInject(css, ref) {
4
-  if (ref === void 0) ref = {};
4
+  if ( ref === void 0 ) ref = {};
5 5
   var insertAt = ref.insertAt;
6 6
 
7
-  if (!css || typeof document === "undefined") {
8
-    return;
9
-  }
7
+  if (!css || typeof document === 'undefined') { return; }
10 8
 
11
-  var head = document.head || document.getElementsByTagName("head")[0];
12
-  var style = document.createElement("style");
13
-  style.type = "text/css";
9
+  var head = document.head || document.getElementsByTagName('head')[0];
10
+  var style = document.createElement('style');
11
+  style.type = 'text/css';
14 12
 
15
-  if (insertAt === "top") {
13
+  if (insertAt === 'top') {
16 14
     if (head.firstChild) {
17 15
       head.insertBefore(style, head.firstChild);
18 16
     } else {

+ 10
- 23
lib/utils-b800dc99.d.ts View File

@@ -2,29 +2,16 @@ declare const IMAGE_PROCESS = "?x-oss-process=image/resize,h_350";
2 2
 declare const IMAGE_PROCESS_SMALL = "?x-oss-process=image/resize,h_100";
3 3
 declare const IMAGE_PROCESS_LARGE = "?x-oss-process=image/resize,h_500";
4 4
 interface AddImageProcessOptions {
5
-  small?: boolean;
6
-  large?: boolean;
7
-  custom?: boolean;
8
-  width?: string;
9
-  height?: string;
5
+    small?: boolean;
6
+    large?: boolean;
7
+    custom?: boolean;
8
+    width?: string;
9
+    height?: string;
10 10
 }
11
-declare function addImageProcess(
12
-  url: string,
13
-  options?: AddImageProcessOptions
14
-): string;
11
+declare function addImageProcess(url: string, options?: AddImageProcessOptions): string;
15 12
 declare function formatMoney(input: any, fuzz?: number): any;
16
-type classSize = "small" | "normal" | "large";
17
-declare function exportStyleSizeClass(
18
-  styles: any,
19
-  size: classSize
20
-): {
21
-  [x: number]: boolean;
22
-};
23
-export {
24
-  IMAGE_PROCESS,
25
-  IMAGE_PROCESS_SMALL,
26
-  IMAGE_PROCESS_LARGE,
27
-  addImageProcess,
28
-  formatMoney,
29
-  exportStyleSizeClass
13
+type classSize = 'small' | 'normal' | 'large';
14
+declare function exportStyleSizeClass(styles: any, size: classSize): {
15
+    [x: number]: boolean;
30 16
 };
17
+export { IMAGE_PROCESS, IMAGE_PROCESS_SMALL, IMAGE_PROCESS_LARGE, addImageProcess, formatMoney, exportStyleSizeClass };

+ 12
- 18
lib/utils-b800dc99.js View File

@@ -1,20 +1,17 @@
1
-"use strict";
1
+'use strict';
2 2
 
3
-var defineProperty = require("./defineProperty-ba7cd53d.js");
3
+var defineProperty = require('./defineProperty-ba7cd53d.js');
4 4
 
5
-var IMAGE_PROCESS = "?x-oss-process=image/resize,h_350";
6
-var IMAGE_PROCESS_SMALL = "?x-oss-process=image/resize,h_100";
7
-var IMAGE_PROCESS_LARGE = "?x-oss-process=image/resize,h_500";
5
+var IMAGE_PROCESS = '?x-oss-process=image/resize,h_350';
6
+var IMAGE_PROCESS_SMALL = '?x-oss-process=image/resize,h_100';
7
+var IMAGE_PROCESS_LARGE = '?x-oss-process=image/resize,h_500';
8 8
 function addImageProcess(url) {
9
-  var options =
10
-    arguments.length > 1 && arguments[1] !== undefined
11
-      ? arguments[1]
12
-      : {
13
-          width: "36px",
14
-          height: "36px"
15
-        };
16
-
17
-  if (url && url.indexOf("x-oss-process") > -1) {
9
+  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
10
+    width: '36px',
11
+    height: '36px'
12
+  };
13
+
14
+  if (url && url.indexOf('x-oss-process') > -1) {
18 15
     return url;
19 16
   }
20 17
 
@@ -27,10 +24,7 @@ function addImageProcess(url) {
27 24
   }
28 25
 
29 26
   if (options.custom) {
30
-    return ""
31
-      .concat(url, "?x-oss-process=image/resize,limit_0,m_fill,w_")
32
-      .concat(options.width, ",h_")
33
-      .concat(options.height);
27
+    return "".concat(url, "?x-oss-process=image/resize,limit_0,m_fill,w_").concat(options.width, ",h_").concat(options.height);
34 28
   }
35 29
 
36 30
   return url + IMAGE_PROCESS;

+ 25
- 25
src/components/Common/Modal/index.tsx View File

@@ -1,13 +1,13 @@
1
-import React from 'react';
2
-import { createPortal } from 'react-dom';
3
-import { isBrowser } from '../Utils/utils';
1
+import React from "react";
2
+import { createPortal } from "react-dom";
3
+import { isBrowser } from "../Utils/utils";
4 4
 
5
-import styles from './Modal.less';
5
+import styles from "./Modal.less";
6 6
 
7 7
 export interface ModalProps {
8
-  visible: boolean
9
-  onCancel: (e: any) => void
10
-  container?: HTMLElement | null
8
+  visible: boolean;
9
+  onCancel: (e: any) => void;
10
+  container?: HTMLElement;
11 11
 }
12 12
 
13 13
 export class Modal extends React.PureComponent<ModalProps> {
@@ -15,9 +15,11 @@ export class Modal extends React.PureComponent<ModalProps> {
15 15
 
16 16
   render() {
17 17
     if (!isBrowser()) return null; // 服务端无需渲染下列代码,渲染也会出错
18
-    const DEFAULT_CONTAINER: HTMLElement | null = document.getElementById('container');
19
-    const { children, visible, onCancel, container = DEFAULT_CONTAINER } = this.props
20
-    let finalMountContainer: HTMLElement = document.body;
18
+    const DEFAULT_CONTAINER: HTMLElement | null = document.getElementById(
19
+      "container"
20
+    );
21
+    const { children, visible, onCancel, container } = this.props;
22
+    let finalMountContainer: HTMLElement;
21 23
     if (!container) {
22 24
       if (!DEFAULT_CONTAINER) {
23 25
         if (!Modal.hasShowWarning) {
@@ -30,22 +32,20 @@ export class Modal extends React.PureComponent<ModalProps> {
30 32
         }
31 33
         finalMountContainer = DEFAULT_CONTAINER;
32 34
       }
35
+    } else {
36
+      finalMountContainer = container;
33 37
     }
34
-    return visible && createPortal(
35
-      <div className={ styles.wrapper }>
36
-        <div
37
-          className={ styles.overlay }
38
-          onClick={ onCancel }
39
-        />
40
-        <div
41
-          className={ styles.container }
42
-        >
43
-          { children }
44
-        </div>
45
-      </div>,
46
-      finalMountContainer,
47
-    )
38
+    return (
39
+      visible &&
40
+      createPortal(
41
+        <div className={styles.wrapper}>
42
+          <div className={styles.overlay} onClick={onCancel} />
43
+          <div className={styles.container}>{children}</div>
44
+        </div>,
45
+        finalMountContainer
46
+      )
47
+    );
48 48
   }
49 49
 }
50 50
 
51
-export default Modal;
51
+export default Modal;

+ 42
- 43
src/components/Payment/PriceOptions/PriceOptions.less View File

@@ -1,22 +1,22 @@
1 1
 @item_width: 70px;
2 2
 @item_margin: 6px;
3 3
 @item_border_width: 1px;
4
-.options{
4
+.options {
5 5
   p {
6
-    font-size:14px;
7
-    font-weight:400;
8
-    color:rgba(97,106,121,1);
6
+    font-size: 14px;
7
+    font-weight: 400;
8
+    color: rgba(97, 106, 121, 1);
9 9
     margin-bottom: 20px;
10 10
   }
11 11
   .infoItem {
12 12
     padding-right: 0;
13 13
     .priceItem {
14
-      background:rgba(243,243,243,0.14);
15
-      border-radius:4px;
16
-      border:@item_border_width solid rgba(207,207,207,1);
17
-      font-size:14px;
18
-      font-weight:600;
19
-      color:rgba(97,106,121,1);
14
+      background: rgba(243, 243, 243, 0.14);
15
+      border-radius: 4px;
16
+      border: @item_border_width solid rgba(207, 207, 207, 1);
17
+      font-size: 14px;
18
+      font-weight: 600;
19
+      color: rgba(97, 106, 121, 1);
20 20
       display: inline-block;
21 21
       text-align: center;
22 22
       vertical-align: top;
@@ -27,66 +27,65 @@
27 27
       margin: @item_margin;
28 28
 
29 29
       &.active {
30
-        background:rgba(255,50,102,0.1);
31
-        border-radius:4px;
32
-        border:@item_border_width solid rgba(255,50,102,1);
33
-        color:rgba(97,106,121,1);
30
+        background: rgba(255, 50, 102, 0.1);
31
+        border-radius: 4px;
32
+        border: @item_border_width solid rgba(255, 50, 102, 1);
33
+        color: rgba(97, 106, 121, 1);
34 34
       }
35 35
     }
36 36
     .priceInput {
37
-        display: inline-block;
38
-        min-width: 70px;
39
-        height: @item_width + @item_border_width * 2;
40
-        width: auto;
41
-        margin: @item_margin;
42
-        text-align: center;
37
+      display: inline-block;
38
+      min-width: 70px;
39
+      width: auto;
40
+      margin: @item_margin;
41
+      text-align: center;
43 42
     }
44 43
     button {
45
-        border-top-left-radius: 0;
46
-        border-bottom-left-radius: 0;
47
-        height: 30px;
48
-        width: 50px;
49
-        vertical-align: top;
50
-        padding: 0 5px;
44
+      border-top-left-radius: 0;
45
+      border-bottom-left-radius: 0;
46
+      height: 30px;
47
+      width: 50px;
48
+      vertical-align: top;
49
+      padding: 0 5px;
51 50
     }
52 51
     .rate {
53
-        margin-left: 10px;
54
-        i {
55
-            margin-right: 5px;
56
-            color: #1790FF;
57
-        }
52
+      margin-left: 10px;
53
+      i {
54
+        margin-right: 5px;
55
+        color: #1790ff;
56
+      }
58 57
     }
59 58
   }
60 59
   &.multi {
61
-    p{
62
-      font-size:14px;
63
-      font-weight:400;
64
-      color:rgba(97,106,121,1);
60
+    p {
61
+      font-size: 14px;
62
+      font-weight: 400;
63
+      color: rgba(97, 106, 121, 1);
65 64
     }
66 65
     .infoItem {
67 66
       padding-right: 0;
68 67
       display: flex;
69 68
       flex-direction: column;
70 69
       justify-content: center;
71
-      .priceBtn{
70
+      .priceBtn {
72 71
         display: flex;
73 72
         justify-content: space-between;
74 73
       }
75 74
       .priceItem {
76 75
         display: inline-block;
77 76
         background-color: #fff;
78
-        border-radius:4px;
79
-        border:@item_border_width solid rgba(207,207,207,1);
80
-          &.active {
77
+        border-radius: 4px;
78
+        border: @item_border_width solid rgba(207, 207, 207, 1);
79
+        &.active {
81 80
           background-color: #fff;
82
-          color: #FF3266FF;
83
-          border:@item_border_width solid rgba(255,50,102,1);
81
+          color: #ff3266ff;
82
+          border: @item_border_width solid rgba(255, 50, 102, 1);
84 83
         }
85 84
       }
86 85
       .priceInput {
87
-        width: @item_width*3+@item_margin*2;
86
+        width: @item_width*3+ @item_margin*2;
88 87
         width: auto;
89 88
       }
90 89
     }
91 90
   }
92
-}
91
+}

+ 5
- 1
src/components/Payment/WantedPublishModal/index.tsx View File

@@ -95,7 +95,11 @@ export class WantedPublishModal extends Component<
95 95
         <div onClick={() => this.setState({ modalVisible: true })}>
96 96
           {this.props.children}
97 97
         </div>
98
-        <Modal visible={this.state.modalVisible} onCancel={this.handleClose}>
98
+        <Modal
99
+          visible={this.state.modalVisible}
100
+          onCancel={this.handleClose}
101
+          {...this.props.modalConfig}
102
+        >
99 103
           {this.renderMain()}
100 104
         </Modal>
101 105
       </>

+ 48
- 29
src/components/Payment/WantedPublishPopover/index.tsx View File

@@ -1,10 +1,10 @@
1
-import React from 'react';
2
-import { Popover, Divider, Input, Button } from 'antd';
3
-import { PopoverProps } from 'antd/lib/popover';
4
-import WantedPublishView from '../WantedPublishView';
1
+import React from "react";
2
+import { Popover } from "antd";
3
+import { PopoverProps } from "antd/lib/popover";
4
+import WantedPublishView from "../WantedPublishView";
5 5
 
6
-import popClose from '../assets/icon/close@2x.png';
7
-import styles from './WantedPublishPopover.less';
6
+import popClose from "../assets/icon/close@2x.png";
7
+import styles from "./WantedPublishPopover.less";
8 8
 
9 9
 export interface WantedPublishPopoverProp {
10 10
   popoverConfig?: PopoverProps;
@@ -13,62 +13,81 @@ export interface WantedPublishPopoverProp {
13 13
 
14 14
 export interface WantedPublishPopoverState {
15 15
   visible: boolean;
16
-  current_wanted: number|string|null;
16
+  current_wanted: number | string | null;
17 17
 }
18 18
 
19
-export class WantedPublishPopover extends React.Component<WantedPublishPopoverProp, WantedPublishPopoverState> {
19
+export class WantedPublishPopover extends React.Component<
20
+  WantedPublishPopoverProp,
21
+  WantedPublishPopoverState
22
+> {
20 23
   constructor(props: WantedPublishPopoverProp) {
21 24
     super(props);
22 25
     this.state = {
23 26
       visible: false,
24 27
 
25
-      current_wanted: null,
26
-    }
28
+      current_wanted: null
29
+    };
27 30
   }
28 31
 
29 32
   handleClose = () => {
30 33
     const { handleConfirm } = this.props;
31 34
     if (handleConfirm) {
32
-      this.handleUpdateCurrentWanted(this.state.current_wanted, (value: string) => {
33
-        handleConfirm(Number(value).toFixed(2));
34
-      });
35
+      this.handleUpdateCurrentWanted(
36
+        this.state.current_wanted,
37
+        (value: string) => {
38
+          handleConfirm(Number(value).toFixed(2));
39
+        }
40
+      );
35 41
     }
36 42
     this.setState({ visible: false });
37
-  }
43
+  };
38 44
 
39 45
   clearCurrentWanted = (cb: Function) => {
40
-    this.setState({
41
-      current_wanted: null,
42
-    }, () => cb())
43
-  }
46
+    this.setState(
47
+      {
48
+        current_wanted: null
49
+      },
50
+      () => cb()
51
+    );
52
+  };
44 53
 
45
-  handleUpdateCurrentWanted = (value: string|number|null, afterUpdate?: Function) => {
54
+  handleUpdateCurrentWanted = (
55
+    value: string | number | null,
56
+    afterUpdate?: Function
57
+  ) => {
46 58
     if (!value) return;
47
-    let result: string|number;
59
+    let result: string | number;
48 60
     result = value;
49 61
     if (parseInt(`${value}`, 10) === value) {
50 62
       // 无小数判断
51
-      result = Number(value)
63
+      result = Number(value);
52 64
     }
53 65
     if (!result) return;
54 66
     if (result > 10000) result = 10000;
55 67
     if (result < 5) result = 5;
56
-    this.setState({ current_wanted: result }, () => afterUpdate && afterUpdate(result));
57
-  }
68
+    this.setState(
69
+      { current_wanted: result },
70
+      () => afterUpdate && afterUpdate(result)
71
+    );
72
+  };
58 73
 
59 74
   renderInitView() {
60
-    const { current_wanted } = this.state; 
75
+    const { current_wanted } = this.state;
61 76
     return (
62 77
       <WantedPublishView
63 78
         type="pop"
64 79
         current_wanted={current_wanted}
65
-        InputWantedValueChange={(v: string) => this.setState({ current_wanted: v })}
66
-        InputWantedPressEnter={(v: string) => this.handleUpdateCurrentWanted(v, this.handleClose)}
80
+        InputWantedValueChange={(v: string) =>
81
+          this.setState({ current_wanted: v })
82
+        }
83
+        InputWantedPressEnter={(v: string) =>
84
+          this.handleUpdateCurrentWanted(v, this.handleClose)
85
+        }
67 86
         InputWantedOnBlur={(v: string) => this.handleUpdateCurrentWanted(v)}
68 87
         InputWantedClear={() => this.clearCurrentWanted(this.handleClose)}
69 88
         CloseFunction={this.handleClose}
70 89
       />
71
-    )
90
+    );
72 91
   }
73 92
 
74 93
   render() {
@@ -90,7 +109,7 @@ export class WantedPublishPopover extends React.Component<WantedPublishPopoverPr
90 109
           <div className={styles.wantedWrapper}>
91 110
             <div role="button" tabIndex={1} className={styles.closeBtnWrapper}>
92 111
               <div className={styles.closeBtn} onClick={this.handleClose}>
93
-                <img src={popClose} alt="close wanted button"/>
112
+                <img src={popClose} alt="close wanted button" />
94 113
               </div>
95 114
             </div>
96 115
             {this.renderInitView()}
@@ -103,4 +122,4 @@ export class WantedPublishPopover extends React.Component<WantedPublishPopoverPr
103 122
   }
104 123
 }
105 124
 
106
-export default WantedPublishPopover;
125
+export default WantedPublishPopover;

+ 1
- 1
stats.html
File diff suppressed because it is too large
View File