Browse Source

fix: 部分冗余删除

Roxas 4 years ago
parent
commit
9196f75645

+ 0
- 1
src/components/Payment/PriceOptions/PriceOptions.less View File

@@ -36,7 +36,6 @@
36 36
     .priceInput {
37 37
         display: inline-block;
38 38
         min-width: 70px;
39
-        height: @item_width + @item_border_width * 2;
40 39
         width: auto;
41 40
         margin: @item_margin;
42 41
         text-align: center;

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

@@ -95,7 +95,7 @@ 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 visible={this.state.modalVisible} onCancel={this.handleClose} {...this.props.modalConfig}>
99 99
           {this.renderMain()}
100 100
         </Modal>
101 101
       </>

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

@@ -1,5 +1,5 @@
1 1
 import React from 'react';
2
-import { Popover, Divider, Input, Button } from 'antd';
2
+import { Popover } from 'antd';
3 3
 import { PopoverProps } from 'antd/lib/popover';
4 4
 import WantedPublishView from '../WantedPublishView';
5 5
 

+ 15
- 7
stories/Payment.stories.tsx View File

@@ -249,14 +249,22 @@ stories.add(
249 249
 stories.add(
250 250
   "WantedPublishPopover And Modal",
251 251
   () => {
252
-    const [wanted, setWanted] = React.useState("");
252
+    const [modalwanted, setModalWanted] = React.useState("");
253
+    const [popwanted, setPopWanted] = React.useState("");
253 254
     return (
254 255
       <div>
255 256
         <div>
256
-          <WantedPublishModal>
257
+          <WantedPublishModal
258
+            handleConfirm={(value: any) => {
259
+              setModalWanted(value);
260
+            }}
261
+          >
257 262
             <div>ModalClick</div>
258 263
           </WantedPublishModal>
259 264
         </div>
265
+      {(wanted => (
266
+          <div>modal wanted: {wanted}</div>
267
+      ))(modalwanted)}
260 268
         <Divider />
261 269
         <div>
262 270
           <WantedPublishPopover
@@ -293,17 +301,17 @@ stories.add(
293 301
               )
294 302
             }}
295 303
             handleConfirm={(value: any) => {
296
-              setWanted(value);
304
+                setPopWanted(value);
297 305
             }}
298 306
           >
299
-            <Button>HoverIt{wanted}</Button>
307
+            <Button>HoverIt{popwanted}</Button>
300 308
           </WantedPublishPopover>
301 309
         </div>
302
-        <Divider />
303 310
         {/* 下面用于分割wanted值的渲染,防止Error */}
304 311
         {(wanted => (
305
-          <div>wanted{wanted}</div>
306
-        ))(wanted)}
312
+          <div>popover wanted: {wanted}</div>
313
+        ))(popwanted)}
314
+        <Divider />
307 315
       </div>
308 316
     );
309 317
   },