feat: add modal prop to Poptip
This commit is contained in:
parent
215bea1818
commit
d0bd2b5dfb
1 changed files with 18 additions and 11 deletions
|
@ -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,18 +199,20 @@
|
||||||
if (this.transfer) this.disableCloseUnderTransfer = true;
|
if (this.transfer) this.disableCloseUnderTransfer = true;
|
||||||
},
|
},
|
||||||
handleClose () {
|
handleClose () {
|
||||||
if (this.disableCloseUnderTransfer) {
|
if (!this.modal) {
|
||||||
this.disableCloseUnderTransfer = false;
|
if (this.disableCloseUnderTransfer) {
|
||||||
return false;
|
this.disableCloseUnderTransfer = false;
|
||||||
}
|
return false;
|
||||||
if (this.confirm) {
|
}
|
||||||
|
if (this.confirm) {
|
||||||
|
this.visible = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (this.trigger !== 'click') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if (this.trigger !== 'click') {
|
|
||||||
return 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)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue