omiu - update popup

This commit is contained in:
张磊 2019-01-04 17:45:22 +08:00
parent 350761fecd
commit c49f18fa67
4 changed files with 5 additions and 2 deletions

View File

@ -28,6 +28,7 @@ Popup content layer.
| ------------- |:-------------:|:-----:|:-------------:|
| show | bool | -- | |
| title | string | -- | |
| width | number | -- | |
| cancelText | string | -- | |
| confirmText | string | -- | |
| onClose |function | -- | |

View File

@ -28,6 +28,7 @@
| ------------- |:-------------:|:-----:|:-------------:|
| show | bool | -- | |
| title | string | -- | |
| width | number | -- | |
| cancelText | string | -- | |
| confirmText | string | -- | |
| onClose |function | -- | |

View File

@ -17,7 +17,8 @@
min-height: 200px;
background-color: white;
position: fixed;
left: 10%;
left: 50%;
margin-left: -40%;
top: 20%;
border-radius: 4px;
}

View File

@ -20,7 +20,7 @@ define('o-popup', class extends WeElement {
if (!props.show) return
return (
<div class="o-popup">
<div class="content">
<div class="content" style={`width:${props.width}px;margin-left:${props.width/-2}px`}>
<div class="header">
<span class="title">{props.title}</span>
<o-icon class="close" scale={1} type="close" onClick={this.close} />