keep same window if desired (props.newTab)
This commit is contained in:
@@ -24,6 +24,10 @@ window.app.component('lnbits-qrcode', {
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
newTab: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
margin: {
|
margin: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 3
|
default: 3
|
||||||
@@ -86,7 +90,7 @@ window.app.component('lnbits-qrcode', {
|
|||||||
this.utils.copyText(this.value)
|
this.utils.copyText(this.value)
|
||||||
return false
|
return false
|
||||||
} else if (this.href) {
|
} else if (this.href) {
|
||||||
window.open(this.href, '_blank')
|
window.open(this.href, this.newTab ? '_blank' : '_self')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user