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
padding: {
type: String
}
},
//
modal: {
type: Boolean,
default: false,
},
},
data () {
return {
@ -194,6 +199,7 @@
if (this.transfer) this.disableCloseUnderTransfer = true;
},
handleClose () {
if (!this.modal) {
if (this.disableCloseUnderTransfer) {
this.disableCloseUnderTransfer = false;
return false;
@ -206,6 +212,7 @@
return false;
}
this.visible = false;
}
},
handleFocus (fromInput = true) {
if (this.trigger !== 'focus' || this.confirm || (this.isInput && !fromInput)) {