refacor[screenfull]: 4.2.0=>5.0.0

This commit is contained in:
花裤衩 2019-10-09 20:44:17 +08:00
parent 8504f692df
commit 459bef2d2f
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ export default {
}, },
methods: { methods: {
click() { click() {
if (!screenfull.enabled) { if (!screenfull.isEnabled) {
this.$message({ this.$message({
message: 'you browser can not work', message: 'you browser can not work',
type: 'warning' type: 'warning'
@ -35,12 +35,12 @@ export default {
this.isFullscreen = screenfull.isFullscreen this.isFullscreen = screenfull.isFullscreen
}, },
init() { init() {
if (screenfull.enabled) { if (screenfull.isEnabled) {
screenfull.on('change', this.change) screenfull.on('change', this.change)
} }
}, },
destroy() { destroy() {
if (screenfull.enabled) { if (screenfull.isEnabled) {
screenfull.off('change', this.change) screenfull.off('change', this.change)
} }
} }