fix(EmbedVideo): override type if embed
This commit is contained in:
@@ -56,10 +56,11 @@ export default {
|
|||||||
|
|
||||||
item () {
|
item () {
|
||||||
const embed = this.embed
|
const embed = this.embed
|
||||||
|
const type_ = embed ? 'iframe' : this.type
|
||||||
let src = this.src
|
let src = this.src
|
||||||
const attrs = this.type === 'iframe' ? { allowfullscreen: true } : { controls: true }
|
const attrs = type_ === 'iframe' ? { allowfullscreen: true } : { controls: true }
|
||||||
|
|
||||||
if (this.full && this.type === 'iframe') {
|
if (this.full && type_ === 'iframe') {
|
||||||
attrs.width = '100%'
|
attrs.width = '100%'
|
||||||
attrs.height = '100%'
|
attrs.height = '100%'
|
||||||
}
|
}
|
||||||
@@ -72,7 +73,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { type: this.type, src, attrs }
|
return { type: type_, src, attrs }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user