We can use handwriting directly to realize the full screen function, but it is very convenient to use the screenfull plug-in to deal with the problem of full screen, but there is a bug in normal use today
Install NPM package NPM i screenfull
,the default is to import the latest version
Import Import screenfull from 'screenfull'
to use
You can use the full screen function nomarlly screenfull.toggle()
At this time, I reported an error to me
![]()
when the page was blank and could not be loaded, I went to the Internet to find several articles that said the version was too high and needed to reduce the version of the package plug-in. I tried many times and still reported an error
Solution:
It’s really necessary to reduce the version. I’ve reduced it to [email protected] Version, then why do you report an error?I found that the imported path is screenfull under the module directory, but there is no corresponding index.js file
so we have to change the import pathimport ScreenFull from 'screenfull/dist/screenfull'
, the page will be displayed normally and the full screen function will be normal
Read More:
- [Solved] Vue Error: Failed to mount component: template or render function not defined
- GO Exception Runnerw.exe: CreateProcess failed with error 21
- The index.nvue page of uniapp reports an error about CSS
- [Solved] Flyter uses screenutil to obtain screen width and height initialization error
- How to Solve creating bean with name ‘mappingjackson2httpmessageconverter’ error when elasticsearch advanced client starts‘
- Refresh 404 after packaging Vue project, uncaught syntax error: unexpected token <
- Can’t read property ‘push’ of undefined [How to Solve]
- Error: could not find function … in R [How to Solve]
- [Solved] Unity Publish WebGL Error: Unable to parse Build/webTest2.framework.js.gz
- [Solved] Vscode Error: “export ‘default‘ (imported as ‘VueRouter‘) was not found in ‘vue-router‘
- Taro Use React Hooks Error: TypeError: Object(…) is not a function
- [Solved] throw new Error(“‘output.filename’ is required, either in config file or as –output-filename”);
- NPM start project error: cannot find module ‘webpack’ problem solution
- [Webpack Update] vue-loader Error: Compiled with problems : ERRORModule notfound: Error:Can‘ t resolve vue in
- [Solved] Flutter Amap plug-in amap_location error: AmapLocationPlugin.java:287: error
- [Solved] JMeter Server Command line pressure measurement: Error in NonGUIDriver java.lang.IllegalArgumentException
- How to Solve ModuleNotFoundError: No module named ‘_bz2‘
- [Solved] Excel plug in installation failed: unable to resolve the value of property ‘type’
- [Solved] Failed to resolve: com.serenegiant:common:1.5.20
- [How to Solve] Easyclick read text garbled