[new feature] DropdownMenu: add close-on-click-overlay prop

This commit is contained in:
陈嘉涵
2019-05-07 20:43:59 +08:00
parent df7d33b03d
commit 6832fd8640
4 changed files with 10 additions and 3 deletions
+3 -2
View File
@@ -39,7 +39,7 @@ export default sfc({
},
render(h) {
const { top, zIndex, activeColor } = this.parent;
const { top, zIndex, overlay, activeColor, closeOnClickOverlay } = this.parent;
const Options = this.options.map(option => {
const active = option.value === this.value;
@@ -65,7 +65,8 @@ export default sfc({
position="top"
duration={0.2}
class={bem('content')}
overlay={this.parent.overlay}
overlay={overlay}
closeOnClickOverlay={closeOnClickOverlay}
overlayStyle={{ position: 'absolute' }}
>
{Options}