Skip to content
Snippets Groups Projects
Unverified Commit 8c18c000 authored by 花裤衩's avatar 花裤衩 Committed by GitHub
Browse files

fix[Screenfull]: fix screenfull bug (#1603)

parent 9ed5db04
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,9 @@ export default {
isFullscreen: false
}
},
mounted() {
this.init()
},
methods: {
click() {
if (!screenfull.enabled) {
......@@ -23,9 +26,14 @@ export default {
})
return false
}
screenfull.toggle().then(() => {
this.isFullscreen = screenfull.isFullscreen
})
screenfull.toggle()
},
init() {
if (screenfull.enabled) {
screenfull.on('change', () => {
this.isFullscreen = screenfull.isFullscreen
})
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment