feat: add modal prop to Poptip

This commit is contained in:
yison 2019-02-14 17:54:52 +08:00
parent 215bea1818
commit d0bd2b5dfb

View file

@ -111,7 +111,12 @@
// default by css: 8px 16px // default by css: 8px 16px
padding: { padding: {
type: String type: String
} },
//
modal: {
type: Boolean,
default: false,
},
}, },
data () { data () {
return { return {
@ -194,6 +199,7 @@
if (this.transfer) this.disableCloseUnderTransfer = true; if (this.transfer) this.disableCloseUnderTransfer = true;
}, },
handleClose () { handleClose () {
if (!this.modal) {
if (this.disableCloseUnderTransfer) { if (this.disableCloseUnderTransfer) {
this.disableCloseUnderTransfer = false; this.disableCloseUnderTransfer = false;
return false; return false;
@ -206,6 +212,7 @@
return false; return false;
} }
this.visible = false; this.visible = false;
}
}, },
handleFocus (fromInput = true) { handleFocus (fromInput = true) {
if (this.trigger !== 'focus' || this.confirm || (this.isInput && !fromInput)) { if (this.trigger !== 'focus' || this.confirm || (this.isInput && !fromInput)) {