fix(screenfull): fix fullscreen bug

fix #264
This commit is contained in:
FairyEver 2020-04-18 22:57:44 +08:00
parent f0a392444b
commit 4d96301144
3 changed files with 10 additions and 17 deletions

View File

@ -39,7 +39,7 @@
"nprogress": "^0.2.0",
"qs": "^6.9.1",
"quill": "^1.3.7",
"screenfull": "^5.0.0",
"screenfull": "^5.0.2",
"simplemde": "^1.11.2",
"sortablejs": "^1.10.1",
"ua-parser-js": "^0.7.20",

View File

@ -12,18 +12,11 @@ export default {
* @param {Object} context
*/
listen ({ commit }) {
return new Promise(resolve => {
if (screenfull.enabled) {
screenfull.on('change', () => {
console.log('1')
if (!screenfull.isFullscreen) {
commit('set', false)
}
})
}
// end
resolve()
})
if (screenfull.isEnabled) {
screenfull.on('change', () => {
if (!screenfull.isFullscreen) commit('set', false)
})
}
},
/**
* @description 切换全屏

View File

@ -9271,10 +9271,10 @@ schema-utils@^2.0.0, schema-utils@^2.1.0, schema-utils@^2.5.0, schema-utils@^2.6
ajv "^6.10.2"
ajv-keywords "^3.4.1"
screenfull@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-5.0.0.tgz#5c2010c0e84fd4157bf852877698f90b8cbe96f6"
integrity sha512-yShzhaIoE9OtOhWVyBBffA6V98CDCoyHTsp8228blmqYy1Z5bddzE/4FPiJKlr8DVR4VBiiUyfPzIQPIYDkeMA==
screenfull@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-5.0.2.tgz#b9acdcf1ec676a948674df5cd0ff66b902b0bed7"
integrity sha512-cCF2b+L/mnEiORLN5xSAz6H3t18i2oHh9BA8+CQlAh5DRw2+NFAGQJOSYbcGw8B2k04g/lVvFcfZ83b3ysH5UQ==
select-hose@^2.0.0:
version "2.0.0"