fix[Screenfull]: fix screenfull bug (#1603)
This commit is contained in:
parent
9ed5db044f
commit
8c18c000d4
|
@ -14,6 +14,9 @@ export default {
|
|||
isFullscreen: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
if (!screenfull.enabled) {
|
||||
|
@ -23,11 +26,16 @@ export default {
|
|||
})
|
||||
return false
|
||||
}
|
||||
screenfull.toggle().then(() => {
|
||||
screenfull.toggle()
|
||||
},
|
||||
init() {
|
||||
if (screenfull.enabled) {
|
||||
screenfull.on('change', () => {
|
||||
this.isFullscreen = screenfull.isFullscreen
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue