Browse Source

fix: 部分冗余删除

Roxas 4 years ago
parent
commit
9196f75645

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

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

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

95
         <div onClick={() => this.setState({ modalVisible: true })}>
95
         <div onClick={() => this.setState({ modalVisible: true })}>
96
           {this.props.children}
96
           {this.props.children}
97
         </div>
97
         </div>
98
-        <Modal visible={this.state.modalVisible} onCancel={this.handleClose}>
98
+        <Modal visible={this.state.modalVisible} onCancel={this.handleClose} {...this.props.modalConfig}>
99
           {this.renderMain()}
99
           {this.renderMain()}
100
         </Modal>
100
         </Modal>
101
       </>
101
       </>

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

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

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

249
 stories.add(
249
 stories.add(
250
   "WantedPublishPopover And Modal",
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
     return (
254
     return (
254
       <div>
255
       <div>
255
         <div>
256
         <div>
256
-          <WantedPublishModal>
257
+          <WantedPublishModal
258
+            handleConfirm={(value: any) => {
259
+              setModalWanted(value);
260
+            }}
261
+          >
257
             <div>ModalClick</div>
262
             <div>ModalClick</div>
258
           </WantedPublishModal>
263
           </WantedPublishModal>
259
         </div>
264
         </div>
265
+      {(wanted => (
266
+          <div>modal wanted: {wanted}</div>
267
+      ))(modalwanted)}
260
         <Divider />
268
         <Divider />
261
         <div>
269
         <div>
262
           <WantedPublishPopover
270
           <WantedPublishPopover
293
               )
301
               )
294
             }}
302
             }}
295
             handleConfirm={(value: any) => {
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
           </WantedPublishPopover>
308
           </WantedPublishPopover>
301
         </div>
309
         </div>
302
-        <Divider />
303
         {/* 下面用于分割wanted值的渲染,防止Error */}
310
         {/* 下面用于分割wanted值的渲染,防止Error */}
304
         {(wanted => (
311
         {(wanted => (
305
-          <div>wanted{wanted}</div>
306
-        ))(wanted)}
312
+          <div>popover wanted: {wanted}</div>
313
+        ))(popwanted)}
314
+        <Divider />
307
       </div>
315
       </div>
308
     );
316
     );
309
   },
317
   },