fixed #1700
This commit is contained in:
parent
6ed0cd7377
commit
b75ad4a120
2 changed files with 16 additions and 16 deletions
|
@ -1,19 +1,10 @@
|
|||
<template>
|
||||
<div style="margin: 100px;">
|
||||
<Poptip
|
||||
confirm
|
||||
transfer
|
||||
title="您确认删除这条内容吗?"
|
||||
@on-ok="ok"
|
||||
@on-cancel="cancel">
|
||||
<Button>删除</Button>
|
||||
</Poptip>
|
||||
<Poptip
|
||||
confirm
|
||||
title="您确认删除这条内容吗?"
|
||||
@on-ok="ok"
|
||||
@on-cancel="cancel">
|
||||
<Button>删除</Button>
|
||||
<div style="margin: 200px;">
|
||||
<Poptip title="提示标题" transfer>
|
||||
<div slot="content" style="padding: 50px">
|
||||
<Button>click me</Button>
|
||||
</div>
|
||||
<Button>click 激活</Button>
|
||||
</Poptip>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
:style="styles"
|
||||
ref="popper"
|
||||
v-show="visible"
|
||||
@click="handleTransferClick"
|
||||
@mouseenter="handleMouseenter"
|
||||
@mouseleave="handleMouseleave"
|
||||
:data-transfer="transfer"
|
||||
|
@ -102,7 +103,8 @@
|
|||
return {
|
||||
prefixCls: prefixCls,
|
||||
showTitle: true,
|
||||
isInput: false
|
||||
isInput: false,
|
||||
disableCloseUnderTransfer: false, // transfer 模式下,点击 slot 也会触发关闭
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -156,7 +158,14 @@
|
|||
}
|
||||
this.visible = !this.visible;
|
||||
},
|
||||
handleTransferClick () {
|
||||
if (this.transfer) this.disableCloseUnderTransfer = true;
|
||||
},
|
||||
handleClose () {
|
||||
if (this.disableCloseUnderTransfer) {
|
||||
this.disableCloseUnderTransfer = false;
|
||||
return false;
|
||||
}
|
||||
if (this.confirm) {
|
||||
this.visible = false;
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue