parent
76ae3e8853
commit
6a971099e9
1 changed files with 11 additions and 0 deletions
|
@ -111,6 +111,11 @@
|
||||||
// default by css: 8px 16px
|
// default by css: 8px 16px
|
||||||
padding: {
|
padding: {
|
||||||
type: String
|
type: String
|
||||||
|
},
|
||||||
|
// 3.4.0
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -181,6 +186,8 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick () {
|
handleClick () {
|
||||||
|
if (this.disabled) return;
|
||||||
|
|
||||||
if (this.confirm) {
|
if (this.confirm) {
|
||||||
this.visible = !this.visible;
|
this.visible = !this.visible;
|
||||||
return true;
|
return true;
|
||||||
|
@ -208,6 +215,8 @@
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
},
|
||||||
handleFocus (fromInput = true) {
|
handleFocus (fromInput = true) {
|
||||||
|
if (this.disabled) return;
|
||||||
|
|
||||||
if (this.trigger !== 'focus' || this.confirm || (this.isInput && !fromInput)) {
|
if (this.trigger !== 'focus' || this.confirm || (this.isInput && !fromInput)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -220,6 +229,8 @@
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
},
|
||||||
handleMouseenter () {
|
handleMouseenter () {
|
||||||
|
if (this.disabled) return;
|
||||||
|
|
||||||
if (this.trigger !== 'hover' || this.confirm) {
|
if (this.trigger !== 'hover' || this.confirm) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue